This adds a no_ri_docs PSUEDO_FLAVOR to the ruby 1.8 and ruby 1.9 ports,
allowing you to skip building the ri documentation during build and not
create an ri_docs subpackage.  This may allow ruby to actually build on
sparc and alpha, as they don't have enough memory to build the ri
documentation.

Tested on i386 and amd64.

Jeremy

Index: Makefile.inc
===================================================================
RCS file: /cvs/ports/lang/ruby/Makefile.inc,v
retrieving revision 1.3
diff -u -p -r1.3 Makefile.inc
--- Makefile.inc        19 Jul 2011 17:28:48 -0000      1.3
+++ Makefile.inc        14 Nov 2011 12:13:19 -0000
@@ -26,7 +26,6 @@ CONFIGURE_ENV +=      PREFIX="${PREFIX}" \
                        CPPFLAGS="-DOPENSSL_NO_STATIC_ENGINE 
-I${LOCALBASE}/include" \
                        LDFLAGS="-L${LOCALBASE}/lib"
 
-INSTALL_TARGET ?=      install install-doc
 REV ?=                 ${VERSION:R}
 SUB ?=                 ${MACHINE_ARCH:S/amd64/x86_64/}-openbsd
 SUBST_VARS +=          SUB REV
Index: 1.8/Makefile
===================================================================
RCS file: /cvs/ports/lang/ruby/1.8/Makefile,v
retrieving revision 1.16
diff -u -p -r1.16 Makefile
--- 1.8/Makefile        8 Nov 2011 23:40:05 -0000       1.16
+++ 1.8/Makefile        14 Nov 2011 13:03:37 -0000
@@ -38,10 +38,10 @@ WANTLIB-main=               c m readline termcap uti
 LIB_DEPENDS-main=
 RUN_DEPENDS-main=
 
-PSEUDO_FLAVORS=        no_x11
+PSEUDO_FLAVORS=        no_x11 no_ri_docs
 FLAVOR?=
 
-MULTI_PACKAGES=                -main -iconv -gdbm -ri_docs
+MULTI_PACKAGES=                -main -iconv -gdbm
 
 WANTLIB-iconv =                ${MODLIBICONV_WANTLIB} c m ruby18
 LIB_DEPENDS-iconv =    ${MODLIBICONV_LIB_DEPENDS} \
@@ -62,6 +62,12 @@ WANTLIB-tk =         X11 c m ruby18 tcl85 tk85
 LIB_DEPENDS-tk =               tk->=8.5,<8.6:x11/tk/8.5 \
                        lang/ruby/${REV},-main
 RUN_DEPENDS-tk =               
+.endif
+
+.if !${FLAVOR:L:Mno_ri_docs}
+MULTI_PACKAGES +=      -ri_docs
+ALL_TARGET =           all rdoc
+INSTALL_TARGET =       install install-doc
 .endif
 
 # Known regression failures in OpenSSL extension on sparc64
Index: 1.8/patches/patch-common_mk
===================================================================
RCS file: /cvs/ports/lang/ruby/1.8/patches/patch-common_mk,v
retrieving revision 1.1
diff -u -p -r1.1 patch-common_mk
--- 1.8/patches/patch-common_mk 23 Sep 2010 21:58:50 -0000      1.1
+++ 1.8/patches/patch-common_mk 14 Nov 2011 12:15:44 -0000
@@ -1,16 +1,16 @@
 $OpenBSD: patch-common_mk,v 1.1 2010/09/23 21:58:50 jeremy Exp $
 
-Build the docs and the ext stuff during the build phase so we don't have to
+Build the ext stuff during the build phase so we don't have to
 run 'make clean' as root.
 
---- common.mk.orig     Thu Dec 24 10:01:58 2009
-+++ common.mk  Sat Dec 26 15:31:27 2009
+--- common.mk.orig     Sun Nov 21 23:22:16 2010
++++ common.mk  Mon Nov 14 04:14:50 2011
 @@ -79,7 +79,9 @@ PRE_LIBRUBY_UPDATE = $(MINIRUBY) -e 'ARGV[1] or File.u
  TESTSDIR      = $(srcdir)/test
  TESTWORKDIR   = testwork
  
 -all: $(MKFILES) $(PREP) $(RBCONFIG) $(LIBRUBY)
-+all: $(MKFILES) $(PREP) $(RBCONFIG) $(LIBRUBY) all-extmk rdoc
++all: $(MKFILES) $(PREP) $(RBCONFIG) $(LIBRUBY) all-extmk
 +
 +all-extmk:
        @$(MINIRUBY) $(srcdir)/ext/extmk.rb --make="$(MAKE)" $(EXTMK_ARGS)
Index: 1.9/Makefile
===================================================================
RCS file: /cvs/ports/lang/ruby/1.9/Makefile,v
retrieving revision 1.19
diff -u -p -r1.19 Makefile
--- 1.9/Makefile        9 Nov 2011 19:23:35 -0000       1.19
+++ 1.9/Makefile        14 Nov 2011 13:12:12 -0000
@@ -31,8 +31,8 @@ CONFIGURE_ENV =               LIBruby19_VERSION=${LIB
                        ac_cv_prog_DOXYGEN="" \
                        ac_cv_prog_DOT=""
 
-ALL_TARGET =           all V=1
-INSTALL_TARGET =       install-all V=1
+ALL_TARGET =           V=1 main
+INSTALL_TARGET =       V=1 install-nodoc
 
 MODULES =              converters/libiconv
 USE_GROFF =            Yes
@@ -44,10 +44,10 @@ LIB_DEPENDS-main =  ${MODLIBICONV_LIB_DEP
                        devel/libffi
 RUN_DEPENDS-main =     ${MODLIBICONV_RUN_DEPENDS}
 
-PSEUDO_FLAVORS=                no_x11
+PSEUDO_FLAVORS=                no_x11 no_ri_docs
 FLAVOR?=
 
-MULTI_PACKAGES =       -main -gdbm -dbm -ri_docs
+MULTI_PACKAGES =       -main -gdbm -dbm
 
 WANTLIB-gdbm =         c m gdbm ruby19
 LIB_DEPENDS-gdbm =     databases/gdbm \
@@ -68,6 +68,12 @@ WANTLIB-tk =         X11 c m ruby19 tcl85 tk85
 LIB_DEPENDS-tk =       tk->=8.5,<8.6:x11/tk/8.5 \
                        lang/ruby/${REV},-main>=${VERSION}.${PATCHLEVEL}
 RUN_DEPENDS-tk =       
+.endif
+
+.if !${FLAVOR:L:Mno_ri_docs}
+MULTI_PACKAGES +=      -ri_docs
+ALL_TARGET +=          rdoc
+INSTALL_TARGET +=      install-doc
 .endif
 
 SUBST_VARS +=          RUBYLIBREV
Index: 1.9/patches/patch-common_mk
===================================================================
RCS file: 1.9/patches/patch-common_mk
diff -N 1.9/patches/patch-common_mk
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ 1.9/patches/patch-common_mk 14 Nov 2011 13:02:05 -0000
@@ -0,0 +1,15 @@
+$OpenBSD$
+
+Don't regenerate rdoc documentation during install.
+
+--- common.mk.orig     Mon Nov 14 05:01:15 2011
++++ common.mk  Mon Nov 14 05:01:18 2011
+@@ -393,7 +393,7 @@ dont-install-man: $(PREP)
+ post-no-install-man::
+       @$(NULLCMD)
+ 
+-install-doc: rdoc pre-install-doc do-install-doc post-install-doc
++install-doc: pre-install-doc do-install-doc post-install-doc
+ pre-install-doc:: install-prereq
+ do-install-doc: $(PROGRAM)
+       $(INSTRUBY) --make="$(MAKE)" $(INSTRUBY_ARGS) --install=rdoc 
--rdoc-output="$(RDOCOUT)"

Reply via email to