summaryrefslogtreecommitdiff
path: root/textproc/ruby-rdtool
diff options
context:
space:
mode:
authortaca <taca>2004-11-27 15:28:30 +0000
committertaca <taca>2004-11-27 15:28:30 +0000
commit6b29c9a5c57871723520b280771adcb2527ef869 (patch)
tree61bd0e30bc227b94ebba7e4e35feb60abe6dbb21 /textproc/ruby-rdtool
parenta4adae2a11f2d864aec72cd0bd2cb9d761d11e28 (diff)
downloadpkgsrc-6b29c9a5c57871723520b280771adcb2527ef869.tar.gz
Migrate ruby-rdtool to use new framework for Ruby packages.
Add patch to prevent warning with Ruby 1.8, too.
Diffstat (limited to 'textproc/ruby-rdtool')
-rw-r--r--textproc/ruby-rdtool/DESCR2
-rw-r--r--textproc/ruby-rdtool/Makefile32
-rw-r--r--textproc/ruby-rdtool/Makefile.common19
-rw-r--r--textproc/ruby-rdtool/PLIST3
-rw-r--r--textproc/ruby-rdtool/buildlink3.mk40
-rw-r--r--textproc/ruby-rdtool/distinfo5
-rw-r--r--textproc/ruby-rdtool/patches/patch-ac28
-rw-r--r--textproc/ruby-rdtool/patches/patch-ad13
-rw-r--r--textproc/ruby-rdtool/rdversion.mk6
9 files changed, 106 insertions, 42 deletions
diff --git a/textproc/ruby-rdtool/DESCR b/textproc/ruby-rdtool/DESCR
index 62edce750b0..11b1c7e5860 100644
--- a/textproc/ruby-rdtool/DESCR
+++ b/textproc/ruby-rdtool/DESCR
@@ -3,5 +3,3 @@ RDtool converts RD to HTML, man, etc.
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>
diff --git a/textproc/ruby-rdtool/Makefile b/textproc/ruby-rdtool/Makefile
index bbb42041144..11baee4b72c 100644
--- a/textproc/ruby-rdtool/Makefile
+++ b/textproc/ruby-rdtool/Makefile
@@ -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 @@ MAINTAINER= taca@NetBSD.org
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 @@ post-build:
.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 @@ post-install:
${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 --git a/textproc/ruby-rdtool/Makefile.common b/textproc/ruby-rdtool/Makefile.common
deleted file mode 100644
index d71269343e5..00000000000
--- a/textproc/ruby-rdtool/Makefile.common
+++ /dev/null
@@ -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 --git a/textproc/ruby-rdtool/PLIST b/textproc/ruby-rdtool/PLIST
index 3846756414e..dd3cd39f6ee 100644
--- a/textproc/ruby-rdtool/PLIST
+++ b/textproc/ruby-rdtool/PLIST
@@ -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 --git a/textproc/ruby-rdtool/buildlink3.mk b/textproc/ruby-rdtool/buildlink3.mk
new file mode 100644
index 00000000000..c6bd97340d8
--- /dev/null
+++ b/textproc/ruby-rdtool/buildlink3.mk
@@ -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 --git a/textproc/ruby-rdtool/distinfo b/textproc/ruby-rdtool/distinfo
index 93337d77e4e..b6dd6e76990 100644
--- a/textproc/ruby-rdtool/distinfo
+++ b/textproc/ruby-rdtool/distinfo
@@ -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 --git a/textproc/ruby-rdtool/patches/patch-ac b/textproc/ruby-rdtool/patches/patch-ac
index 197c6d03e5c..e57d145bada 100644
--- a/textproc/ruby-rdtool/patches/patch-ac
+++ b/textproc/ruby-rdtool/patches/patch-ac
@@ -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 @@ $NetBSD: patch-ac,v 1.3 2004/03/07 04:40:26 taca Exp $
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 --git a/textproc/ruby-rdtool/patches/patch-ad b/textproc/ruby-rdtool/patches/patch-ad
new file mode 100644
index 00000000000..819b056bb84
--- /dev/null
+++ b/textproc/ruby-rdtool/patches/patch-ad
@@ -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 --git a/textproc/ruby-rdtool/rdversion.mk b/textproc/ruby-rdtool/rdversion.mk
new file mode 100644
index 00000000000..3996e8be8fd
--- /dev/null
+++ b/textproc/ruby-rdtool/rdversion.mk
@@ -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