From owner-freebsd-ports Sun Dec 19 23:56:43 1999 Delivered-To: freebsd-ports@freebsd.org Received: from shale.csir.co.za (shale.csir.co.za [146.64.46.5]) by hub.freebsd.org (Postfix) with ESMTP id DFA5815287 for ; Sun, 19 Dec 1999 23:56:18 -0800 (PST) (envelope-from reg@shale.csir.co.za) Received: from granite.hip.berkeley.edu (granite.hip.berkeley.edu [136.152.155.25]) by shale.csir.co.za (8.9.3/8.9.3) with ESMTP id JAA82996; Mon, 20 Dec 1999 09:50:21 +0200 (SAT) (envelope-from reg@shale.csir.co.za) Received: (from reg@localhost) by granite.hip.berkeley.edu (8.9.3/8.9.3) id XAA25175; Sun, 19 Dec 1999 23:47:51 -0800 (PST) (envelope-from reg) Date: Sun, 19 Dec 1999 23:47:51 -0800 From: Jeremy Lea To: Ade Lovett Cc: freebsd-ports@freebsd.org Subject: Re: RFC: USE_GTK and USE_GNOME rules for bsd.port.mk Message-ID: <19991219234751.A19524@shale.csir.co.za> References: <19991206190030.D82697@shale.csir.co.za> <19991206212812.A20823@lovett.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="vkogqOf2sHV7VnPd" X-Mailer: Mutt 1.0pre3i In-Reply-To: <19991206212812.A20823@lovett.com> Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org --vkogqOf2sHV7VnPd Content-Type: text/plain; charset=us-ascii Hi, Sorry all, the time I thought I'd have between finals got swallowed up by a broken data aquisition system... On Mon, Dec 06, 1999 at 09:28:12PM -0600, Ade Lovett wrote: > 1. I don't think there's much to be had in dealing with GTK+ 1.0.x - > assuming my INDEX is up to date, I only see 6 ports that use > gtk-1.0.6, and one that uses ko-gtk-1.0.6, so the extra > complexity for different versions isn't really worth it here. Spoil sport, it's such a neat hack ;-) I'm not so much worrried here about GTK+ 1.0.x, but GTK+ 1.3.x. There's romours of this already, and if the last "development" branch is anything to go by, people will convert to it en mass... Plus when 1.4 gets here, we'll have the problem all over again. We could use the same thing for Qt 1.x and 2.x, rather than USE_QT and USE_QT2. > 2. I'm getting a little concerned about the number of knobs we're > adding to bsd.port.mk - perhaps the time has come to split all > the USE_* knobs out into their own file, included by bsd.port.mk Ok, attached are untested patches to make a bsd.port.use.mk, which includes both these patches and the bsd.port.optional.mk, into one file, included from bsd.port.mk. Is this cleaner? We need to decide what should and shouldn't go into this file... It uses PORTUSEMK and PORTOPTIONMK to encapsulate the two parts of the file. What we can do in the future (or now if the will is there), is do this: ... .include "/usr/share/mk/perl.use.mk" .include "${PORTSDIR}/x11-toolkits/qt142/use.mk" .include "${PORTSDIR}/x11/gnome/use.mk" ... At the end of the file (outside the ifdef's), slowly moving all of this out into their own, to be updated in sync with their ports. > 3. Extend the macros with a few more variables, to allow somewhat > easier port developing when major new versions turn up, eg: > > > +.if defined(USE_GLIB) > > +LIB_DEPENDS+= glib12.3:${PORTSDIR}/devel/glib12 > > +GLIB_CONFIG?= ${LOCALBASE}/bin/glib12-config > > +.endif > > would become: > > USE_GLIB_DEPEND?= glib12.3:${PORTSDIR}/devel/glib12 > USE_GLIB_CONFIG?= ${LOCALBASE}/bin/glib12-config > > ... > > .if defined(USE_GLIB) > LIB_DEPENDS+= ${USE_GLIB_DEPEND} > GLIB_CONFIG?= ${USE_GLIB_CONFIG} > ... > .endif I'm worried about this. Instead of using USE_GLIB, people will use USE_GLIB_DEPEND, and then we'll have to make sure that we don't break ports with this. Plus it leaves a lot of pollution. I've been thinking a bit more, and how's this for an idea, to make the optional dependancies more extensible (I'll work on implementing this): We make some "test-for" targets in bsd.port.mk (or maybe even in a bsd.port.rules.mk ). These would implement the test parts of the _DEPENDS_USE and lib-depends targets, and would work like .for i in ${LIB_OPTIONAL} do $LIB_DEPENDS+= `make test-for-lib TEST_LIB=$i` Basically, we use LIB_OPTIONAL (or BUILD_OPTIONAL, etc) in a port's Makefile, then cycle through these dependencies, and if they pass the test (ie they are there), then we echo back their dependency information. We could reuse the tests in the _DEPENDS_USE and lib-depends targets, by just cehcking for a non-null return value, although this might complicate reading... Comments? Regards, -Jeremy -- | What will people think when they hear that I'm a Jesus freak? --+-- What will people do when they find that it's true? | I don't really care if they label me a Jesus Freak, | There ain't no disguising the truth. - d c Talk --vkogqOf2sHV7VnPd Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="portmk.diff" diff -urN -x CVS /usr/ports.ref/Mk/bsd.optional.mk Mk/bsd.optional.mk --- /usr/ports.ref/Mk/bsd.optional.mk Wed Dec 31 16:00:00 1969 +++ Mk/bsd.optional.mk Sun Dec 19 23:27:04 1999 @@ -0,0 +1,3 @@ +PORTOPTIONMK= yes +.include "bsd.port.use.mk" +.undef PORTOPTIONMK diff -urN -x CVS /usr/ports.ref/Mk/bsd.port.mk Mk/bsd.port.mk --- /usr/ports.ref/Mk/bsd.port.mk Sat Nov 13 11:56:02 1999 +++ Mk/bsd.port.mk Sun Dec 19 23:28:04 1999 @@ -147,6 +147,18 @@ # USE_QT - Says that the port uses version 1 of the qt toolkit. # USE_QT2 - Says that the port uses version 2 of the qt toolkit. # Implies USE_NEWGCC. +# USE_GLIB - Says that the port uses the GLib package. +# USE_GTK - Says that the port uses the GTK+ toolkit. +# Values other than `yes' imply the version (default: 12) +# 12 - installs GLib/GTK+ 1.2.x +# 10 - installs GTK+ 1.0.x +# yes - installs the latest stable version +# USE_IMLIB - Says that the port uses the imlib library. +# USE_GNOME - Says that the port uses the GNOME desktop environment. +# libs - Only needs gnome-libs +# core - Only needs gnome-core +# control - Only needs gnome-controlcenter +# yes - Same as core # # Dependency checking. Use these if your port requires another port # not in the list above. @@ -562,6 +574,10 @@ PREFIX?= ${LOCALBASE} .endif +PORTOPTIONMK= yes +.include "bsd.port.use.mk" +.undef PORTOPTIONMK + .endif # End of pre-makefile section. @@ -597,88 +613,9 @@ MANCOMPRESSED?= no .endif -.if defined(USE_QT) -LIB_DEPENDS+= qt.2:${PORTSDIR}/x11-toolkits/qt142 -.endif - -.if defined(USE_QT2) -LIB_DEPENDS+= qt2.2:${PORTSDIR}/x11-toolkits/qt20 -USE_NEWGCC= yes -.endif - -.if defined(USE_BZIP2) -BUILD_DEPENDS+= bzip2:${PORTSDIR}/archivers/bzip2 -.endif -.if defined(USE_ZIP) -BUILD_DEPENDS+= unzip:${PORTSDIR}/archivers/unzip -.endif -.if defined(USE_GMAKE) -BUILD_DEPENDS+= gmake:${PORTSDIR}/devel/gmake -.endif -.if defined(USE_AUTOCONF) -GNU_CONFIGURE= yes -BUILD_DEPENDS+= autoconf:${PORTSDIR}/devel/autoconf -.endif -.if defined(USE_LIBTOOL) -GNU_CONFIGURE= yes -BUILD_DEPENDS+= libtool:${PORTSDIR}/devel/libtool -.if defined(USE_AUTOCONF) -LIBTOOLFILES?= aclocal.m4 -.else -LIBTOOLFILES?= configure -.endif -LIBTOOLFLAGS?= --disable-ltlibs -.endif -.if defined(USE_NEWGCC) && ${OSVERSION} < 400004 -CC= gcc295 -CXX= g++295 -BUILD_DEPENDS+= gcc295:${PORTSDIR}/lang/egcs -MAKE_ENV+= CC=${CC} CXX=${CXX} -.endif - -.if defined(REQUIRES_MOTIF) -LIB_DEPENDS+= Xpm.4:${PORTSDIR}/graphics/xpm -.if defined(PARALLEL_PACKAGE_BUILD) -BUILD_DEPENDS+= ${X11BASE}/lib/libXm.a:${PORTSDIR}/x11-toolkits/Motif-dummy -.endif -.endif - -PKG_IGNORE_DEPENDS?= '(XFree86-3\.3\.5|Motif-2\.1\.10)' - -.if ${OSVERSION} >= 300000 -PERL_VERSION= 5.00503 -.else -PERL_VERSION= 5.00502 -.endif -PERL_VER= 5.005 -PERL_ARCH= ${ARCH}-freebsd -PLIST_SUB+= PERL_VERSION=${PERL_VERSION} \ - PERL_VER=${PERL_VER} \ - PERL_ARCH=${PERL_ARCH} - -.if exists(/usr/bin/perl5) && ${OSVERSION} >= 300000 -# 3.0-current after perl5 import -.if !exists(/usr/bin/perl${PERL_VERSION}) && defined(USE_PERL5) -.BEGIN: - @${ECHO_MSG} "Error: you don't have the right version of perl in /usr/bin." - @${FALSE} -.endif -PERL5= /usr/bin/perl${PERL_VERSION} -PERL= /usr/bin/perl -.else -PERL5= ${LOCALBASE}/bin/perl${PERL_VERSION} -PERL= ${LOCALBASE}/bin/perl -.if defined(USE_PERL5) -BUILD_DEPENDS+= perl${PERL_VERSION}:${PORTSDIR}/lang/perl5 -RUN_DEPENDS+= perl${PERL_VERSION}:${PORTSDIR}/lang/perl5 -.endif -.endif - -# Don't try to build XFree86 even if ALWAYS_BUILD_DEPENDS is defined -- -# it's just too big.... -.if defined(USE_XLIB) && !defined(ALWAYS_BUILD_DEPENDS) -LIB_DEPENDS+= X11.6:${PORTSDIR}/x11/XFree86 -.endif +PORTUSEMK= yes +.include "bsd.port.use.mk" +.undef PORTUSEMK .if exists(${PORTSDIR}/../Makefile.inc) .include "${PORTSDIR}/../Makefile.inc" @@ -1631,7 +1568,7 @@ fi) .endif .if defined(USE_IMAKE) - @(cd ${WRKSRC} && ${XMKMF}) + @(cd ${WRKSRC} && ${MAKE_ENV} ${XMKMF}) .endif .endif @@ -1947,6 +1884,7 @@ @(if ${LIBTOOL} --version | grep -vq "1\.3\.3-freebsd-ports"; then \ (echo "Your libtool installation is out of date. Please remove"; \ echo "and reinstall ${PORTSDIR}/devel/libtool."; \ + ${MAKE} NOCLEANDEPENDS=yes clean; \ exit 1); \ fi; \ LIBTOOLDIR=`which ${LIBTOOL} | sed -e 's^/bin/libtool^/share/libtool^'` || ${LOCALBASE}/share/libtool; \ @@ -2357,24 +2295,32 @@ .endif +# Clean dependency lists: build and runtime. Print out directory names. + +clean-depends-list: + @${CLEAN-DEPENDS-LIST} + +CLEAN-DEPENDS-LIST= \ + checked="${PARENT_CHECKED}"; \ + for dir in $$(${ECHO} "${FETCH_DEPENDS} ${BUILD_DEPENDS} ${LIB_DEPENDS} ${RUN_DEPENDS}" | ${TR} '\040' '\012' | ${SED} -e 's/^[^:]*://' -e 's/:.*//') $$(${ECHO} ${DEPENDS} | ${TR} '\040' '\012' | ${SED} -e 's/:.*//'); do \ + if [ -d $$dir ]; then \ + if (${ECHO} $$checked | ${GREP} -qwv "$$dir"); then \ + child=$$(cd $$dir; ${MAKE} PARENT_CHECKED="$$checked" clean-depends-list); \ + for d in $$child; do ${ECHO} $$d; done; \ + ${ECHO} $$dir; \ + checked="$$dir $$child $$checked"; \ + fi; \ + else \ + ${ECHO_MSG} "${PKGNAME}: \"$$dir\" non-existent -- dependency list incomplete" >&2; \ + fi; \ + done | sort -u + .if !target(clean-depends) clean-depends: -.if defined(FETCH_DEPENDS) || defined(BUILD_DEPENDS) || defined(LIB_DEPENDS) \ - || defined(RUN_DEPENDS) - @for dir in `${ECHO} "${FETCH_DEPENDS} ${BUILD_DEPENDS} ${LIB_DEPENDS} ${RUN_DEPENDS}" | ${TR} '\040' '\012' | ${SED} -e 's/^[^:]*://' -e 's/:.*//' | sort -u`; do \ - if [ -d $$dir ] ; then \ - (cd $$dir; ${MAKE} NOCLEANDEPENDS=yes clean clean-depends); \ - fi \ + @for dir in `${CLEAN-DEPENDS-LIST}`; do \ + (cd $$dir; ${MAKE} NOCLEANDEPENDS=yes clean); \ done .endif -.if defined(DEPENDS) - @for dir in `${ECHO} "${DEPENDS}" | ${TR} '\040' '\012' | ${SED} -e 's/:.*//' | sort -u`; do \ - if [ -d $$dir ] ; then \ - (cd $$dir; ${MAKE} NOCLEANDEPENDS=yes clean clean-depends); \ - fi \ - done -.endif -.endif # Dependency lists: build and runtime. Print out directory names. @@ -2402,14 +2348,29 @@ fi; \ done | sort -u -# This one does not print out directory names -- it could take a long time. -package-depends: - @for dir in `${ECHO} "${LIB_DEPENDS} ${RUN_DEPENDS}" | ${TR} '\040' '\012' | ${SED} -e 's/^[^:]*://' -e 's/:.*//' | sort -u` `${ECHO} ${DEPENDS} | ${TR} '\040' '\012' | ${SED} -e 's/:.*//' | sort -u`; do \ +# Clean dependency lists: build and runtime. Print out directory names. + +package-depends-list: + @${PACKAGE-DEPENDS-LIST} + +PACKAGE-DEPENDS-LIST= \ + checked="${PARENT_CHECKED}"; \ + for dir in $$(${ECHO} "${LIB_DEPENDS} ${RUN_DEPENDS}" | ${TR} '\040' '\012' | ${SED} -e 's/^[^:]*://' -e 's/:.*//') $$(${ECHO} ${DEPENDS} | ${TR} '\040' '\012' | ${SED} -e 's/:.*//'); do \ if [ -d $$dir ]; then \ - (cd $$dir ; ${MAKE} package-name package-depends); \ + if (${ECHO} $$checked | ${GREP} -qwv "$$dir"); then \ + child=$$(cd $$dir; ${MAKE} PARENT_CHECKED="$$checked" package-depends-list); \ + for d in $$child; do ${ECHO} $$d; done; \ + ${ECHO} $$dir; \ + checked="$$dir $$child $$checked"; \ + fi; \ else \ ${ECHO_MSG} "${PKGNAME}: \"$$dir\" non-existent -- dependency list incomplete" >&2; \ fi; \ + done | sort -u + +package-depends: + @for dir in `${PACKAGE-DEPENDS-LIST}`; do \ + (cd $$dir; ${MAKE} package-name); \ done ################################################################ diff -urN -x CVS /usr/ports.ref/Mk/bsd.port.use.mk Mk/bsd.port.use.mk --- /usr/ports.ref/Mk/bsd.port.use.mk Wed Dec 31 16:00:00 1969 +++ Mk/bsd.port.use.mk Sun Dec 19 23:29:09 1999 @@ -0,0 +1,307 @@ +#-*- mode: Fundamental; tab-width: 4; -*- +# ex:ts=4 +# +# $FreeBSD: $ +# $NetBSD: $ +# +# Please view me with 4 column tabs! + +.if defined(PORTOPTIONMK) +# This section keeps tests for optional software. To use these, include this +# file where you would normally include , and after that +# file if you need to use it. This works with three sets of variables, +# WITH_, HAVE_ and USE_. WITH_ variables are used to determine if a package +# is wanted, HAVE_ variables determine what is or will be installed. +# A port should never set any WITH_ variables in it's Makefile. This file +# does not set any USE_ variables, these must be set explictly +# based on the results of this file. Other than the setting of HAVE_ +# variables the only side effect of this file is to define a some message +# targets which inform the user that the port has optional dependancies. +# These targets must also be called explictly from the port's Makefile. + +# The following defines are for the various levels of libraries in the +# GLib/GTK+/GNOME group of software. There are the following options: +# +# WITH_GLIB, WITH_GTK, WITH_IMLIB, WITH_GNOME: +# yes - Only set by the user, indicates that they always want +# this setting. +# no - Only set by the user, indicates that they never want +# this setting. +# +# The following variables might be set: +# +# HAVE_GLIB, HAVE_GTK: +# no - WITH_GLIB/WITH_GTK set to no. +# 10 - found GTK+ 1.0.x. +# 12 - found GLib/GTK+ 1.2.x or WITH_GLIB/WITH_GTK set to yes. +# HAVE_IMLIB: +# no - WITH_IMLIB set to no. +# yes - either found imlib or WITH_IMLIB set to yes. +# HAVE_GNOME: +# no - WITH_GNOME set to no. +# libs - found gnome-libs. +# core - found gnome-core or WITH_GNOME set to yes. +# control - found gnome-controlcenter. + +.if defined(WITH_GLIB) +.if ${WITH_GLIB} == "yes" +HAVE_GLIB= 12 +.else +HAVE_GLIB= no +.endif +.else +TEST_LIB:= `${LDCONFIG} -r | ${GREP} -qF -e "-lglib12"` +.if !empty(TEST_LIB) +HAVE_GLIB= 12 +.endif +.endif +.if !target(msg-option-glib) +msg-option-glib: +.if !defined(HAVE_GLIB) && !defined(QUIET_OPTIONS) + @${ECHO_MSG} "" + @${ECHO_MSG} "If you want to compile with GLib support," + @${ECHO_MSG} "hit Ctrl-C right now and use \"make WITH_GLIB=yes\"" + @${ECHO_MSG} "" +.endif +.endif + +.if defined(WITH_GTK) +.if ${WITH_GTK} == "yes" +HAVE_GTK= 12 +.else +HAVE_GTK= no +.endif +.else +TEST_LIB12:= `${LDCONFIG} -r | ${GREP} -qF -e "-lgtk12"` +TEST_LIB10:= `${LDCONFIG} -r | ${GREP} -qF -e "-lgtk10"` +.if !empty(TEST_LIB12) +HAVE_GTK= 12 +.elif !empty(TEST_LIB10) +HAVE_GTK= 10 +.endif +.endif +.if !target(msg-option-gtk) +msg-option-gtk: msg-option-glib +.if !defined(HAVE_GTK) && !defined(QUIET_OPTIONS) + @${ECHO_MSG} "" + @${ECHO_MSG} "If you want to compile with GTK+ support," + @${ECHO_MSG} "hit Ctrl-C right now and use \"make WITH_GTK=yes\"" + @${ECHO_MSG} "" +.endif +.endif + +.if defined(WITH_IMLIB) +.if ${WITH_IMLIB} == "yes" +HAVE_IMLIB= yes +.else +HAVE_IMLIB= no +.endif +.else +TEST_LIB:= `${LDCONFIG} -r | ${GREP} -qF -e "-lImlib"` +.if !empty(TEST_LIB) +HAVE_IMLIB= yes +.endif +.endif +.if !target(msg-option-imlib) +msg-option-imlib: msg-option-gtk +.if !defined(HAVE_IMLIB) && !defined(QUIET_OPTIONS) + @${ECHO_MSG} "" + @${ECHO_MSG} "If you want to compile with Imlib support," + @${ECHO_MSG} "hit Ctrl-C right now and use \"make WITH_IMLIB=yes\"" + @${ECHO_MSG} "" +.endif +.endif + +.if defined(WITH_GNOME) +.if ${WITH_GNOME} == "yes" +HAVE_GNOME= core +.else +HAVE_GNOME= no +.endif +.else +TEST_CONTROL:= `${LDCONFIG} -r | ${GREP} -qF -e "-lcapplet"` +TEST_CORE:= `${LDCONFIG} -r | ${GREP} -qF -e "-lpanel_applet"` +TEST_LIBS:= `${LDCONFIG} -r | ${GREP} -qF -e "-lgnome"` +.if !empty(TEST_CONTROL) +HAVE_GNOME= control +.elif !empty(TEST_CORE) +HAVE_GNOME= core +.elif !empty(TEST_LIBS) +HAVE_GNOME= libs +.endif +.endif +.if !target(msg-option-gnome) +msg-option-gnome: msg-option-imlib +.if !defined(HAVE_GNOME) && !defined(QUIET_OPTIONS) + @${ECHO_MSG} "" + @${ECHO_MSG} "If you want to compile with GNOME support," + @${ECHO_MSG} "hit Ctrl-C right now and use \"make WITH_GNOME=yes\"" + @${ECHO_MSG} "" +.endif +.endif + +.endif +# End of optional part. + +.if defined(PORTUSEMK) +# This section includes the USE_* definitions for bsd.port.mk, to allow them to +# be updated outside of bsd.port.mk. Please see the descriptions in that +# file. + +.if defined(BSD_PORT_USE_MK) +.if defined(USE_QT) +LIB_DEPENDS+= qt.2:${PORTSDIR}/x11-toolkits/qt142 +.endif + +.if defined(USE_QT2) +LIB_DEPENDS+= qt2.2:${PORTSDIR}/x11-toolkits/qt20 +USE_NEWGCC= yes +.endif + +.if defined(USE_BZIP2) +BUILD_DEPENDS+= bzip2:${PORTSDIR}/archivers/bzip2 +.endif +.if defined(USE_ZIP) +BUILD_DEPENDS+= unzip:${PORTSDIR}/archivers/unzip +.endif +.if defined(USE_GMAKE) +BUILD_DEPENDS+= gmake:${PORTSDIR}/devel/gmake +.endif +.if defined(USE_AUTOCONF) +GNU_CONFIGURE= yes +BUILD_DEPENDS+= autoconf:${PORTSDIR}/devel/autoconf +.endif +.if defined(USE_LIBTOOL) +GNU_CONFIGURE= yes +BUILD_DEPENDS+= libtool:${PORTSDIR}/devel/libtool +.if defined(USE_AUTOCONF) +LIBTOOLFILES?= aclocal.m4 +.else +LIBTOOLFILES?= configure +.endif +LIBTOOLFLAGS?= --disable-ltlibs +.endif +.if defined(USE_NEWGCC) && ${OSVERSION} < 400004 +CC= gcc295 +CXX= g++295 +BUILD_DEPENDS+= gcc295:${PORTSDIR}/lang/egcs +MAKE_ENV+= CC=${CC} CXX=${CXX} +.endif + +.if defined(REQUIRES_MOTIF) +LIB_DEPENDS+= Xpm.4:${PORTSDIR}/graphics/xpm +.if defined(PARALLEL_PACKAGE_BUILD) +BUILD_DEPENDS+= ${X11BASE}/lib/libXm.a:${PORTSDIR}/x11-toolkits/Motif-dummy +.endif +.endif + +PKG_IGNORE_DEPENDS?= '(XFree86-3\.3\.5|Motif-2\.1\.10)' + +.if ${OSVERSION} >= 300000 +PERL_VERSION= 5.00503 +.else +PERL_VERSION= 5.00502 +.endif +PERL_VER= 5.005 +PERL_ARCH= ${ARCH}-freebsd +PLIST_SUB+= PERL_VERSION=${PERL_VERSION} \ + PERL_VER=${PERL_VER} \ + PERL_ARCH=${PERL_ARCH} + +.if exists(/usr/bin/perl5) && ${OSVERSION} >= 300000 +# 3.0-current after perl5 import +.if !exists(/usr/bin/perl${PERL_VERSION}) && defined(USE_PERL5) +.BEGIN: + @${ECHO_MSG} "Error: you don't have the right version of perl in /usr/bin." + @${FALSE} +.endif +PERL5= /usr/bin/perl${PERL_VERSION} +PERL= /usr/bin/perl +.else +PERL5= ${LOCALBASE}/bin/perl${PERL_VERSION} +PERL= ${LOCALBASE}/bin/perl +.if defined(USE_PERL5) +BUILD_DEPENDS+= perl${PERL_VERSION}:${PORTSDIR}/lang/perl5 +RUN_DEPENDS+= perl${PERL_VERSION}:${PORTSDIR}/lang/perl5 +.endif +.endif + +# Don't try to build XFree86 even if ALWAYS_BUILD_DEPENDS is defined -- +# it's just too big.... +.if defined(USE_XLIB) && !defined(ALWAYS_BUILD_DEPENDS) +LIB_DEPENDS+= X11.6:${PORTSDIR}/x11/XFree86 +.endif + +# do these here backwards to make things look pretty... +.if defined(USE_GNOME) +USE_IMLIB= yes +.endif +.if defined(USE_IMLIB) +USE_GTK= yes +.endif +.if defined(USE_GTK) +.if ${USE_GTK} == "yes" +USE_GTK= 12 +.endif +.if ${USE_GTK} == "12" +USE_GLIB= 12 +.endif +.endif +.if defined(USE_GLIB) +.if ${USE_GLIB} == "yes" +USE_GLIB= 12 +.endif +.endif + +.if defined(USE_GLIB) +.if ${USE_GLIB} == "12" +LIB_DEPENDS+= glib12.3:${PORTSDIR}/devel/glib12 +GLIB_CONFIG?= ${LOCALBASE}/bin/glib12-config +.else +.error "Error: Invaild USE_GLIB version." +.endif +CONFIGURE_ENV+= GLIB_CONFIG="${GLIB_CONFIG}" +MAKE_ENV+= GLIB_CONFIG="${GLIB_CONFIG}" +.endif + +.if defined(USE_GTK) +.if ${USE_GTK} == "12" +LIB_DEPENDS+= gtk12.2:${PORTSDIR}/x11-toolkits/gtk12 +GTK_CONFIG?= ${X11BASE}/bin/gtk12-config +.elif ${USE_GTK} == "10" +# GTK+ 1.0 did not have a seperate GLib. +LIB_DEPENDS+= gtk10.1:${PORTSDIR}/x11-toolkits/gtk10 +GTK_CONFIG?= ${X11BASE}/bin/gtk10-config +.else +.error "Error: Invaild USE_GTK version." +.endif +CONFIGURE_ENV+= GTK_CONFIG="${GTK_CONFIG}" +MAKE_ENV+= GTK_CONFIG="${GTK_CONFIG}" +.endif + +.if defined(USE_IMLIB) +LIB_DEPENDS+= Imlib.5:${PORTSDIR}/graphics/imlib +.endif + +.if defined(USE_GNOME) +CONFIGURE_ARGS+= --localstatedir=${PREFIX}/share/gnome \ + --datadir=${PREFIX}/share/gnome \ + --with-gnome=${PREFIX} +.if ${USE_GNOME} == "yes" +USE_GNOME= core +.endif +.if ${USE_GNOME} == "control" +LIB_DEPENDS+= capplet.1:${PORTSDIR}/sysutils/gnomecontrolcenter +USE_GNOME= core +.endif +.if ${USE_GNOME} == "core" +LIB_DEPENDS+= panel_applet.2:${PORTSDIR}/x11/gnomecore +USE_GNOME= libs +.endif +.if ${USE_GNOME} == "libs" +LIB_DEPENDS+= gnome.3:${PORTSDIR}/x11/gnomelibs +.endif +.endif + +.endif +# End of use part. --vkogqOf2sHV7VnPd-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message