Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 6 Dec 1999 19:00:30 -0800
From:      Jeremy Lea <reg@shale.csir.co.za>
To:        freebsd-ports@freebsd.org
Subject:   RFC: USE_GTK and USE_GNOME rules for bsd.port.mk
Message-ID:  <19991206190030.D82697@shale.csir.co.za>

next in thread | raw e-mail | index | archive | help
Hi,

I'd like to get some feedback from the ports list about the following
patch, which adds USE_GLIB, USE_GTK, USE_IMLIB and USE_GNOME to
<bsd.port.mk>.

Although this affects about 130 ports (I've got patches for most of
them), I think the only controversial thing is the setting of --datadir
in USE_GNOME.

If people don't comment I'll send-pr it.

Regards,
 -Jeremy

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	Thu Nov 25 16:18:01 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.
@@ -680,6 +692,77 @@
 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
+
 .if exists(${PORTSDIR}/../Makefile.inc)
 .include "${PORTSDIR}/../Makefile.inc"
 .endif
@@ -1631,7 +1714,7 @@
 		fi)
 .endif
 .if defined(USE_IMAKE)
-	@(cd ${WRKSRC} && ${XMKMF})
+	@(cd ${WRKSRC} && ${MAKE_ENV} ${XMKMF})
 .endif
 .endif
 
-- 
  |    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


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19991206190030.D82697>