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

PFRAGs for shared, with flavours?



I'm installing stuff on a box without X11, so I'm using FLAVOR=no_x11 a
lot.  Some ports have dependencies on X stuff, where the actual software
can be safely configured without it, so I'm knocking together some
patches for the maintainers.

Problem: how do I set up the PFRAG files where PFRAG.shared contains
something which I want to extract to no-no_x11 ?

To make this more concrete ... I'm specifically looking at the ruby
port.  It's mostly trivial enough.  The patch below shows what I have,
with the file "fred" containing what needs to go in the shared&no-no_x11
file, or whatever other solution there is.  I didn't see any support for
conditionals, beyond the inclusion stuff.

Thanks,

PS: removed tcl too, since Ruby _only_ seems to use tcl when using tk.
    but this is from a very cursory examiniation, since I'm not a Ruby
    user; re-ordered @dirrm since the current version doesn't work.

-----------------------------< cut here >-------------------------------
diff -uPr ruby.dist/Makefile ruby/Makefile
--- ruby.dist/Makefile	Wed May 30 04:07:01 2001
+++ ruby/Makefile	Thu May 31 05:04:38 2001
@@ -12,6 +12,9 @@
 
 MASTER_SITES0=${MASTER_SITES:C,$,doc/,}
 
+FLAVORS=	no_x11
+FLAVOR?=
+
 BINARCH=${DISTNAME}.tar.gz
 MANARCH=ruby-man-1.4.6.tar.gz
 DISTFILES=${BINARCH} ${MANARCH}:0
@@ -24,17 +27,22 @@
 PERMIT_DISTFILES_CDROM=	Yes
 PERMIT_PACKAGE_CDROM=	Yes
 
-LIB_DEPENDS=tcl83.::lang/tcl/8.3 \
-            tk83.::x11/tk/8.3
-
 CONFIGURE_STYLE=	autoconf
 SEPARATE_BUILD=	concurrent
 
 CONFIGURE_ENV=YACC=yacc
-CONFIGURE_ARGS=${CONFIGURE_SHARED} \
+CONFIGURE_ARGS=${CONFIGURE_SHARED}
+
+.if ${FLAVOR:L} == "no_x11"
+.else
+LIB_DEPENDS=tcl83.::lang/tcl/8.3 \
+	    tk83.::x11/tk/8.3
+
+CONFIGURE_ARGS+= \
     --with-tcl-include=${PREFIX}/include/tcl8.3 \
     --with-tk-include=${PREFIX}/include/tk8.3 \
     --with-X11-dir=${X11BASE} 
+.endif
 
 # Force rebuild of parse.c with yacc
 post-extract: 
diff -uPr ruby.dist/pkg/PFRAG.no-no_x11 ruby/pkg/PFRAG.no-no_x11
--- ruby.dist/pkg/PFRAG.no-no_x11	Thu Jan  1 00:00:00 1970
+++ ruby/pkg/PFRAG.no-no_x11	Thu May 31 04:48:46 2001
@@ -0,0 +1,15 @@
+lib/ruby/${REV}/tcltk.rb
+lib/ruby/${REV}/tk.rb
+lib/ruby/${REV}/tkafter.rb
+lib/ruby/${REV}/tkbgerror.rb
+lib/ruby/${REV}/tkcanvas.rb
+lib/ruby/${REV}/tkclass.rb
+lib/ruby/${REV}/tkdialog.rb
+lib/ruby/${REV}/tkentry.rb
+lib/ruby/${REV}/tkfont.rb
+lib/ruby/${REV}/tkmenubar.rb
+lib/ruby/${REV}/tkmngfocus.rb
+lib/ruby/${REV}/tkpalette.rb
+lib/ruby/${REV}/tkscrollbox.rb
+lib/ruby/${REV}/tktext.rb
+lib/ruby/${REV}/tkvirtevent.rb
diff -uPr ruby.dist/pkg/PFRAG.shared ruby/pkg/PFRAG.shared
--- ruby.dist/pkg/PFRAG.shared	Wed May 30 04:07:01 2001
+++ ruby/pkg/PFRAG.shared	Thu May 31 04:54:03 2001
@@ -11,5 +11,3 @@
 lib/ruby/${REV}/${SUB}/readline.so
 lib/ruby/${REV}/${SUB}/sdbm.so
 lib/ruby/${REV}/${SUB}/socket.so
-lib/ruby/${REV}/${SUB}/tcltklib.so
-lib/ruby/${REV}/${SUB}/tkutil.so
diff -uPr ruby.dist/pkg/PLIST ruby/pkg/PLIST
--- ruby.dist/pkg/PLIST	Wed May 30 04:07:01 2001
+++ ruby/pkg/PLIST	Thu May 31 05:07:29 2001
@@ -82,28 +82,14 @@
 lib/ruby/${REV}/shellwords.rb
 lib/ruby/${REV}/singleton.rb
 lib/ruby/${REV}/sync.rb
-lib/ruby/${REV}/tcltk.rb
 lib/ruby/${REV}/telnet.rb
 lib/ruby/${REV}/tempfile.rb
 lib/ruby/${REV}/thread.rb
 lib/ruby/${REV}/thwait.rb
 lib/ruby/${REV}/timeout.rb
-lib/ruby/${REV}/tk.rb
-lib/ruby/${REV}/tkafter.rb
-lib/ruby/${REV}/tkbgerror.rb
-lib/ruby/${REV}/tkcanvas.rb
-lib/ruby/${REV}/tkclass.rb
-lib/ruby/${REV}/tkdialog.rb
-lib/ruby/${REV}/tkentry.rb
-lib/ruby/${REV}/tkfont.rb
-lib/ruby/${REV}/tkmenubar.rb
-lib/ruby/${REV}/tkmngfocus.rb
-lib/ruby/${REV}/tkpalette.rb
-lib/ruby/${REV}/tkscrollbox.rb
-lib/ruby/${REV}/tktext.rb
-lib/ruby/${REV}/tkvirtevent.rb
 lib/ruby/${REV}/tracer.rb
 lib/ruby/${REV}/weakref.rb
+!%%no_x11%%
 %%SHARED%%
 man/man1/ruby.1
 share/doc/ruby/Array.html
@@ -156,9 +142,9 @@
 share/doc/ruby/variable.html
 share/doc/ruby/yacc.html
 @dirrm share/doc/ruby
-@dirrm lib/ruby/site_ruby
 @dirrm lib/ruby/site_ruby/${REV}/${SUB}
 @dirrm lib/ruby/site_ruby/${REV}
+@dirrm lib/ruby/site_ruby
 @dirrm lib/ruby/${REV}/net
 @dirrm lib/ruby/${REV}/irb
 @dirrm lib/ruby/${REV}/cgi
diff -uPr ruby.dist/pkg/fred ruby/pkg/fred
--- ruby.dist/pkg/fred	Thu Jan  1 00:00:00 1970
+++ ruby/pkg/fred	Thu May 31 04:54:08 2001
@@ -0,0 +1,2 @@
+lib/ruby/${REV}/${SUB}/tcltklib.so
+lib/ruby/${REV}/${SUB}/tkutil.so
-----------------------------< cut here >-------------------------------
-- 
You can lead a person to information, but you cannot make them absorb it.