pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/textproc/ruby-rdtool Migrate ruby-rdtool to use new fr...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/7b3d11d1ce16
branches:  trunk
changeset: 484454:7b3d11d1ce16
user:      taca <taca%pkgsrc.org@localhost>
date:      Sat Nov 27 15:28:30 2004 +0000

description:
Migrate ruby-rdtool to use new framework for Ruby packages.

Add patch to prevent warning with Ruby 1.8, too.

diffstat:

 textproc/ruby-rdtool/DESCR            |   2 -
 textproc/ruby-rdtool/Makefile         |  32 ++++++++++++++++-----------
 textproc/ruby-rdtool/Makefile.common  |  19 ----------------
 textproc/ruby-rdtool/PLIST            |   3 +-
 textproc/ruby-rdtool/buildlink3.mk    |  40 +++++++++++++++++++++++++++++++++++
 textproc/ruby-rdtool/distinfo         |   5 ++-
 textproc/ruby-rdtool/patches/patch-ac |  28 +++++++++++++++++++++---
 textproc/ruby-rdtool/patches/patch-ad |  13 +++++++++++
 textproc/ruby-rdtool/rdversion.mk     |   6 +++++
 9 files changed, 106 insertions(+), 42 deletions(-)

diffs (241 lines):

diff -r cfa10d724cf2 -r 7b3d11d1ce16 textproc/ruby-rdtool/DESCR
--- a/textproc/ruby-rdtool/DESCR        Sat Nov 27 15:22:15 2004 +0000
+++ b/textproc/ruby-rdtool/DESCR        Sat Nov 27 15:28:30 2004 +0000
@@ -3,5 +3,3 @@
 RD is a multipurpose documentation format created for documentating
 Ruby and output of Ruby world.  Briefly, RD is to Ruby as POD is to
 Perl.
-
-Author:        Tosh (Toshiro Kuwabara) <toshirok%yb3.so-net.ne.jp@localhost>
diff -r cfa10d724cf2 -r 7b3d11d1ce16 textproc/ruby-rdtool/Makefile
--- a/textproc/ruby-rdtool/Makefile     Sat Nov 27 15:22:15 2004 +0000
+++ b/textproc/ruby-rdtool/Makefile     Sat Nov 27 15:28:30 2004 +0000
@@ -1,9 +1,8 @@
-# $NetBSD: Makefile,v 1.12 2004/04/11 13:17:09 taca Exp $
+# $NetBSD: Makefile,v 1.13 2004/11/27 15:28:30 taca Exp $
 # FreeBSD: ports/textproc/ruby-rdtool/Makefile,v 1.15 2001/01/30 19:20:09 knu Exp
 
-DISTNAME=      rdtool-${RUBY_RD_VERSION}
-PKGNAME=       ${RUBY_PKGNAMEPREFIX}${DISTNAME}
-PKGREVISION=   3
+DISTNAME=      rdtool-0.6.14
+PKGNAME=       ${RUBY_PKGPREFIX}-${DISTNAME}
 CATEGORIES=    textproc ruby
 MASTER_SITES=  http://www2.pos.to/~tosh/ruby/rdtool/archive/
 
@@ -11,16 +10,24 @@
 HOMEPAGE=      http://www2.pos.to/~tosh/ruby/rdtool/
 COMMENT=       RD (Ruby Document) converter to HTML/man/etc
 
-DEPENDS+=      ${RUBY_PKGNAMEPREFIX}optparse>=0.7:../../devel/ruby-optparse
-DEPENDS+=      ${RUBY_PKGNAMEPREFIX}strscan>=0.6.1:../../devel/ruby-strscan
-BUILD_DEPENDS+=        ${RUBY_PKGNAMEPREFIX}racc>=1.3.6:../../devel/ruby-racc
+# Since rd2 commands depends its name and it can't rename, we cannot
+# install multiple ruby??-rd2 package (unless supported by pkgview.
+CONFLICTS+=    ruby[1-9][0-9]-rdtool-*
 
-DIST_SUBDIR=   ruby
-USE_RUBY=      yes
+REPLACE_RUBY=  rd2 rmi2html.rb utils/rdswap.rb
 INSTALL_TARGET=        install install-rmi2html
 
-REPLACE_RUBY=  rmi2html.rb utils/rdswap.rb
+.include "../../lang/ruby/rubyversion.mk"
 
+.if ${RUBY_VER} == "16"
+BUILD_DEPENDS+=        ${RUBY_PKGPREFIX}-racc>=1.3.6:../../devel/ruby16-racc
+DEPENDS+=      ${RUBY_PKGPREFIX}-optparse>=0.7:../../devel/ruby-optparse
+DEPENDS+=      ${RUBY_PKGPREFIX}-strscan>=0.6.1:../../devel/ruby-strscan
+.else
+BUILD_DEPENDS+=        ${RUBY_PKGPREFIX}-racc>=1.3.6:../../devel/ruby-racc
+.endif
+
+MAKE_ENV+=     RACC=${RACC}
 DOCS_RD=       README.rd README.rd.ja doc/rd-draft.rd doc/rd-draft.rd.ja
 DOCS=          ${DOCS_RD} README.html README.html.ja \
                doc/rd-draft.html doc/rd-draft.html.ja
@@ -37,7 +44,6 @@
 .endfor
 
 post-install:
-       ${LN} -sf rmi2html.rb ${PREFIX}/bin/rmi2html
        ${INSTALL_SCRIPT} ${WRKSRC}/utils/rdswap.rb ${PREFIX}/bin/rdswap
        ${INSTALL_DATA_DIR} ${RUBY_DOCDIR}/rd
 .for f in ${DOCS}
@@ -46,6 +52,6 @@
        ${INSTALL_DATA_DIR} ${RUBY_EXAMPLESDIR}/rd
        ${INSTALL_DATA} ${RUBY_SITELIBDIR}/rd/dot.rd2rc ${RUBY_EXAMPLESDIR}/rd
 
-.include "Makefile.common"
-.include "../../lang/ruby-base/Makefile.common"
+.include "../../lang/ruby/modules.mk"
+.include "../../devel/ruby-racc/raccversion.mk"
 .include "../../mk/bsd.pkg.mk"
diff -r cfa10d724cf2 -r 7b3d11d1ce16 textproc/ruby-rdtool/Makefile.common
--- a/textproc/ruby-rdtool/Makefile.common      Sat Nov 27 15:22:15 2004 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,19 +0,0 @@
-# $NetBSD: Makefile.common,v 1.7 2003/09/10 15:57:31 taca Exp $
-#
-
-# USE_RUBY_RD          - Says that the package uses rd to generate documents.
-#                        (It dosen't mean rd need to run time.)
-#
-# [variables that each package should not define]
-#
-# RUBY_RD              - full path of rd
-# RUBY_RD_VERSION      - rdtool version required.
-#
-RUBY_RD=               ${LOCALBASE}/bin/rd2
-RUBY_RD_VERSION =      0.6.14
-RUBY_RD_REQD =         0.6.7
-
-.if defined(USE_RUBY_RD)
-USE_RUBY?=             # defined
-BUILD_DEPENDS+=                ${RUBY_PKGNAMEPREFIX}rdtool>=${RUBY_RD_REQD}:../../textproc/ruby-rdtool
-.endif
diff -r cfa10d724cf2 -r 7b3d11d1ce16 textproc/ruby-rdtool/PLIST
--- a/textproc/ruby-rdtool/PLIST        Sat Nov 27 15:22:15 2004 +0000
+++ b/textproc/ruby-rdtool/PLIST        Sat Nov 27 15:28:30 2004 +0000
@@ -1,8 +1,7 @@
-@comment $NetBSD: PLIST,v 1.2 2002/02/04 15:30:17 taca Exp $
+@comment $NetBSD: PLIST,v 1.3 2004/11/27 15:28:30 taca Exp $
 bin/rd2
 bin/rdswap
 bin/rmi2html
-bin/rmi2html.rb
 ${RUBY_SITELIBDIR}/rd/block-element.rb
 ${RUBY_SITELIBDIR}/rd/complex-list-item.rb
 ${RUBY_SITELIBDIR}/rd/desclist.rb
diff -r cfa10d724cf2 -r 7b3d11d1ce16 textproc/ruby-rdtool/buildlink3.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/textproc/ruby-rdtool/buildlink3.mk        Sat Nov 27 15:28:30 2004 +0000
@@ -0,0 +1,40 @@
+# $NetBSD: buildlink3.mk,v 1.1 2004/11/27 15:28:30 taca Exp $
+
+BUILDLINK_DEPTH:=              ${BUILDLINK_DEPTH}+
+
+.include "rdversion.mk"
+
+.if ${RUBY_VER} == ${RUBY_VER_DEFAULT}
+RUBY18_RDTOOL_BUILDLINK3_MK:=  ${RUBY18_RDTOOL_BUILDLINK3_MK}+
+.else
+RUBY16_RDTOOL_BUILDLINK3_MK:=  ${RUBY16_RDTOOL_BUILDLINK3_MK}+
+.endif
+
+.if !empty(BUILDLINK_DEPTH:M+)
+BUILDLINK_DEPENDS+=    ${RUBY_PKGPREFIX}-rdtool
+.endif
+
+.if ${RUBY_VER} == ${RUBY_VER_DEFAULT}
+BUILDLINK_PACKAGES:=   ${BUILDLINK_PACKAGES:Nruby18-rdtool}
+.else
+BUILDLINK_PACKAGES:=   ${BUILDLINK_PACKAGES:Nruby16-rdtool}
+.endif
+BUILDLINK_PACKAGES+=   ${RUBY_PKGPREFIX}-rdtool
+
+.if ${RUBY_VER} == ${RUBY_VER_DEFAULT}
+.if !empty(RUBY18_RDTOOL_BUILDLINK3_MK:M+)
+BUILDLINK_FILES.ruby18-rdtool+=                bin/rd2
+BUILDLINK_DEPMETHOD.ruby18-rdtool?=     build
+BUILDLINK_DEPENDS.ruby18-rdtool+=      ${RUBY_PKGPREFIX}-rdtool>=0.6.14
+BUILDLINK_PKGSRCDIR.ruby18-rdtool?=    ../../textproc/ruby-rdtool
+.endif # RUBY18_RDTOOL_BUILDLINK3_MK
+.else
+.if !empty(RUBY16_RDTOOL_BUILDLINK3_MK:M+)
+BUILDLINK_FILES.ruby16-rdtool+=                bin/rd2
+BUILDLINK_DEPMETHOD.ruby16-rdtool?=     build
+BUILDLINK_DEPENDS.ruby16-rdtool+=      ${RUBY_PKGPREFIX}-rdtool>=0.6.14
+BUILDLINK_PKGSRCDIR.ruby16-rdtool?=    ../../textproc/ruby-rdtool
+.endif # RUBY16_RDTOOL_BUILDLINK3_MK
+.endif
+
+BUILDLINK_DEPTH:=     ${BUILDLINK_DEPTH:S/+$//}
diff -r cfa10d724cf2 -r 7b3d11d1ce16 textproc/ruby-rdtool/distinfo
--- a/textproc/ruby-rdtool/distinfo     Sat Nov 27 15:22:15 2004 +0000
+++ b/textproc/ruby-rdtool/distinfo     Sat Nov 27 15:28:30 2004 +0000
@@ -1,5 +1,6 @@
-$NetBSD: distinfo,v 1.9 2004/03/07 04:40:26 taca Exp $
+$NetBSD: distinfo,v 1.10 2004/11/27 15:28:30 taca Exp $
 
 SHA1 (ruby/rdtool-0.6.14.tar.gz) = 6c61ffad85c62c7d3708c19a8793c1f8b395a1c0
 Size (ruby/rdtool-0.6.14.tar.gz) = 58750 bytes
-SHA1 (patch-ac) = d4121acf5bae2dfbda9ad16e7155761e46d76c99
+SHA1 (patch-ac) = 8309d97d2fc13c3695738ec54ef3f93ae7642f5d
+SHA1 (patch-ad) = 0a80f85e8ec50a67273c0721b3018e582bf219d5
diff -r cfa10d724cf2 -r 7b3d11d1ce16 textproc/ruby-rdtool/patches/patch-ac
--- a/textproc/ruby-rdtool/patches/patch-ac     Sat Nov 27 15:22:15 2004 +0000
+++ b/textproc/ruby-rdtool/patches/patch-ac     Sat Nov 27 15:28:30 2004 +0000
@@ -1,8 +1,8 @@
-$NetBSD: patch-ac,v 1.3 2004/03/07 04:40:26 taca Exp $
+$NetBSD: patch-ac,v 1.4 2004/11/27 15:28:30 taca Exp $
 
 --- rdtoolconf.rb.orig 2003-03-08 21:45:07.000000000 +0900
 +++ rdtoolconf.rb
-@@ -4,20 +4,32 @@
+@@ -4,28 +4,41 @@
  
  require 'mkmf'
  require 'rbconfig'
@@ -38,12 +38,32 @@
  BIN_DIR = #{$bindir}
  SITE_RUBY = #{$siterubydir}
  RD_DIR = #{$rddir}
-@@ -25,7 +37,7 @@ RD_DIR = #{$rddir}
+ 
  RUBY = #{CONFIG["ruby_install_name"]}
  RUBY_OPT = -I.
- RACC = #{$racc}
+-RACC = #{$racc}
 -# RACC_OPT = -gv
++#RACC = #{$racc}
 +RACC_OPT = #{racc_opt}
++#RD_SUFFIX=
  
  RD_LIBS = rd/block-element.rb \\
            rd/complex-list-item.rb \\
+@@ -90,7 +103,7 @@ clean :
+       rm -f ./Makefile
+ 
+ install : rd2 $(RD_LIBS) $(PARSERS)
+-      @$(RUBY) -r ftools -e 'File::install(ARGV[0], ARGV[1], 0755, true)' rd2 $(BIN_DIR)
++      @$(RUBY) -r ftools -e 'File::install(ARGV[0], ARGV[1], 0755, true)' rd2 $(BIN_DIR)/rd2${RD_SUFFIX}
+       @$(RUBY) -r ftools -e 'File::makedirs(*ARGV)' $(SITE_RUBY)/rd
+       @$(RUBY) -r ftools -e "dest = ARGV[-1]; ARGV.each do |file| File::install(file, dest, 0644, true) if file != dest end" $(RD_LIBS) $(PARSERS) $(SITE_RUBY)/rd
+ 
+@@ -100,7 +113,7 @@ install-nonext : rd2 $(RD_LIBS) $(PARSER
+       @$(RUBY) -r ftools -e "dest = ARGV[-1]; ARGV.each do |file| File::install(file, dest, 0644, true) if file != dest end" $(RD_LIBS) $(PARSERS_NONEXT) $(SITE_RUBY)/rd
+ 
+ install-rmi2html : rmi2html.rb
+-      @$(RUBY) -r ftools -e 'File::install(ARGV[0], ARGV[1], 0755, true)' rmi2html.rb $(BIN_DIR)
++      @$(RUBY) -r ftools -e 'File::install(ARGV[0], ARGV[1], 0755, true)' rmi2html.rb $(BIN_DIR)/rmi2html${RD_SUFFIX}
+       @$(RUBY) -r ftools -e 'File::install(ARGV[0], ARGV[1], 0644, true)' rd/rd2rmi-lib.rb $(SITE_RUBY)/rd
+ 
+ dist :
diff -r cfa10d724cf2 -r 7b3d11d1ce16 textproc/ruby-rdtool/patches/patch-ad
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/textproc/ruby-rdtool/patches/patch-ad     Sat Nov 27 15:28:30 2004 +0000
@@ -0,0 +1,13 @@
+$NetBSD: patch-ad,v 1.1 2004/11/27 15:28:30 taca Exp $
+
+--- rd2.orig   2003-03-08 21:45:07.000000000 +0900
++++ rd2
+@@ -240,7 +240,7 @@ out = $Visitor.visit(tree)
+ out = Kconv.kconv(out, Kconv::NAME2CONST[out_code], Kconv::AUTO) if out_code
+ 
+ if output_file
+-  filename = output_file + "." + $Visitor.type::OUTPUT_SUFFIX
++  filename = output_file + "." + $Visitor.class::OUTPUT_SUFFIX
+   file = open(filename, "w")
+   file.print(out)
+   file.close
diff -r cfa10d724cf2 -r 7b3d11d1ce16 textproc/ruby-rdtool/rdversion.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/textproc/ruby-rdtool/rdversion.mk Sat Nov 27 15:28:30 2004 +0000
@@ -0,0 +1,6 @@
+# $NetBSD: rdversion.mk,v 1.1 2004/11/27 15:28:30 taca Exp $
+#
+.include "../../lang/ruby/rubyversion.mk"
+
+RUBY_RD=               ${LOCALBASE}/bin/rd2
+RUBY_RD_VERSION =      0.6.14



Home | Main Index | Thread Index | Old Index