Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 02 Jul 2002 20:15:51 +0300
From:      Maxim Sobolev <sobomax@FreeBSD.org>
To:        Joe Marcus Clarke <marcus@marcuscom.com>
Cc:        gnome@FreeBSD.ORG
Subject:   Re: bsd.gnomeNG.mk
Message-ID:  <3D21DFC7.15905832@FreeBSD.org>
References:  <3D20736D.9481E0D8@FreeBSD.org> <1025537086.321.4.camel@gyros.marcuscom.com>

next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.
--------------03C2C8ADF58FB163A579185C
Content-Type: text/plain; charset=koi8-r
Content-Transfer-Encoding: 7bit

Joe Marcus Clarke wrote:
> 
> On Mon, 2002-07-01 at 11:21, Maxim Sobolev wrote:
> > Folks,
> >
> > I really sorry, but my current Real Work and New Possible Work things
> > don't live much time to finish rewrite of bsd.gnome.mk to be more
> > scalable than currently. Paricularly, I've stumbled into the problem
> > with automatic handling of optional dependencies - it seems that it is
> > impossible to correctly implement it in the new framework. Therefore,
> > I am now in favour of dropping that support from bsd.gnomeNG.mk
> > completely and leaving only basic autodetection stuff, so that each
> > particular gnome-optional port will decide what to do with the
> > obtained information (i.e. set LIB/RUN_DEPENDS, PKGNAMESUFFIX and so
> > on). I will try to finish remaining work by tomorrow and submit
> > results for review.
> 
> Glad I didn't start on it ;-).  I have some ideas of what I'd like to
> see (something a la the XFREE86_VERSION stuff), but I await your work.

Ok, see attached, both bsd.gnomeng.mk and example diff for gnomelibs
port. My plan is to make both old bsd.gnome.mk and bsd.gnomeng.mk
co-existing during conversion procedure (say via new USE_GNOMENG knob
for already converted ports) with the goal to burry up old
bsd.gnome.mk completely RSN. The new bsd.gnomeng.mk contains no
provisions for GNOME2 ports, but it could be added later when GNOME1
apps is completely converted to a new framework.

Any comments or suggestion are as always appreciated.

-Maxim
--------------03C2C8ADF58FB163A579185C
Content-Type: text/plain; charset=koi8-r;
 name="gnomelibs.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="gnomelibs.diff"

Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/x11/gnomelibs/Makefile,v
retrieving revision 1.100
diff -d -u -r1.100 Makefile
--- Makefile	24 May 2002 03:26:41 -0000	1.100
+++ Makefile	2 Jul 2002 17:04:30 -0000
@@ -16,8 +16,6 @@
 MAINTAINER?=	gnome@FreeBSD.org
 
 BUILD_DEPENDS=	scrollkeeper-config:${PORTSDIR}/textproc/scrollkeeper
-LIB_DEPENDS+=	xml.5:${PORTSDIR}/textproc/libxml \
-		ORBit.2:${PORTSDIR}/devel/ORBit
 RUN_DEPENDS=	scrollkeeper-config:${PORTSDIR}/textproc/scrollkeeper
 
 USE_BZIP2=	yes
@@ -25,16 +23,12 @@
 USE_XPM=	yes
 USE_PERL5=	yes
 USE_GMAKE=	yes
-USE_IMLIB=	yes
-USE_ESOUND=	yes
+USE_GNOME=	gnomehack gnomeprefix esound gtk12 imlib libxml orbit
 INSTALLS_SHLIB=	yes
 USE_LIBTOOL=	yes
 LIBTOOLFILES=	configure libart_lgpl/configure
-CONFIGURE_ARGS=	--localstatedir=${PREFIX}/share/gnome \
-		--datadir=${PREFIX}/share/gnome \
-		--disable-test-gnome \
-		--disable-gtk-doc \
-		--with-html-dir=${PREFIX}/share/doc
+CONFIGURE_ARGS=	--disable-test-gnome \
+		--disable-gtk-doc
 CONFIGURE_ENV=	CPPFLAGS="-I${LOCALBASE}/include" \
 		LIBS="-L${LOCALBASE}/lib"
 
@@ -45,15 +39,10 @@
 		libart-config.1 loadshlib.1 new-object.1
 MAN5=		gnome-mime.5
 
-pre-patch:
-	@${PERL} -pi -e 's|-lpthread|${PTHREAD_LIBS}|g ; \
-		 s|DATADIRNAME=lib|DATADIRNAME=share|g' ${WRKSRC}/configure
-	@find ${WRKSRC} -name "Makefile.in*" | xargs ${PERL} -pi -e \
-		's|\$\(datadir\)/gnome/|\$\(datadir\)/|g ; \
-		 s|\$\(datadir\)/locale|\$\(prefix\)/share/locale|g'
-
 post-patch:
-	@${PERL} -pi -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \
+	@${REINPLACE_CMD} -e 's|-lpthread|${PTHREAD_LIBS}|g ; \
+		 s|DATADIRNAME=lib|DATADIRNAME=share|g' ${WRKSRC}/configure
+	@${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \
 		${WRKSRC}/gnome-config.in ${WRKSRC}/libgnome/gnome-util.c
 
 # need to make launched gnome-terminals appear in utmp/wtmp

--------------03C2C8ADF58FB163A579185C
Content-Type: text/plain; charset=koi8-r;
 name="bsd.gnomeng.mk"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="bsd.gnomeng.mk"

.if !defined(_POSTMKINCLUDED)

# Please make sure all changes to this file are past through the maintainer.
# Do not commit them yourself (unless of course you're the Port's Wraith ;).
Gnome_Include_MAINTAINER=	gnome@FreeBSD.org

# This section defines possible names of GNOME components and all information
# necessary for ports to use those components.

# Ports can use this as follows:
#
# USE_GNOME=	gnomeprint bonobo
#
# .include <bsd.port.mk>
#
# As a result proper LIB_DEPENDS/RUN_DEPENDS will be added and CONFIGURE_ENV
# and MAKE_ENV defined.

_USE_GNOME_ALL=	gnomehack gnomeprefix gnomehier gnomeaudio esound libghttp \
		glib12 gtk12 libxml gdkpixbuf imlib orbit gnomelibs \
		gnomecanvas oaf gnomemimedata gconf gnomevfs gnomecc \
		gnomeprint bonobo libgda gnomedb libglade gal glibwww gtkhtml \
		gnomecore

gnomehack_PRE_PATCH=	${FIND} ${WRKSRC} -name "Makefile.in*" | ${XARGS} ${REINPLACE_CMD} -e \
				's|[(]GNOME_datadir[)]/gnome/|(datadir)/|g ; \
				 s|[(]GNOME_datadir[)]/locale|(prefix)/share/locale|g ; \
				 s|[(]datadir[)]/locale|(prefix)/share/locale|g ; \
				 s|[(]gnomedatadir[)]/gnome|(gnomedatadir)|g ; \
				 s|[(]datadir[)]/aclocal|(prefix)/share/aclocal|g ; \
				 s|[(]datadir[)]/gnome/|(datadir)/|g ; \
				 s|[(]libdir[)]/pkgconfig|(prefix)/libdata/pkgconfig|g ; \
				 s|[(]libdir[)]/bonobo/servers|(prefix)/libdata/bonobo/servers|g'

gnomehier_RUN_DEPENDS=	${X11BASE}/share/gnome/.keep_me:${PORTSDIR}/misc/gnomehier
gnomehier_DETECT=	${X11BASE}/share/gnome/.keep_me

gnomeprefix_CONFIGURE_ARGS=--localstatedir=${PREFIX}/share/gnome \
			   --datadir=${PREFIX}/share/gnome \
			   --with-html-dir=${PREFIX}/share/doc
gnomeprefix_USE_GNOME_IMPL=gnomehier

gnomeaudio_RUN_DEPENDS=	${X11BASE}/share/gnome/sounds/login.wav:${PORTSDIR}/audio/gnomeaudio
gnomeaudio_DETECT=	${X11BASE}/share/gnome/sounds/login.wav
gnomeaudio_USE_GNOME_IMPL=gnomehier

ESD_CONFIG?=		${LOCALBASE}/bin/esd-config
esound_LIB_DEPENDS=	esd.2:${PORTSDIR}/audio/esound
esound_CONFIGURE_ENV=	ESD_CONFIG="${ESD_CONFIG}"
esound_MAKE_ENV=	ESD_CONFIG="${ESD_CONFIG}"
esound_PKGNAMESUFFIX=	-esound
esound_DETECT=		${ESD_CONFIG}

libghttp_LIB_DEPENDS=	ghttp.1:${PORTSDIR}/www/libghttp
libghttp_PKGNAMESUFFIX=	-libghttp
libghttp_DETECT=	${LOCALBASE}/etc/ghttpConf.sh

GLIB_CONFIG?=		${LOCALBASE}/bin/glib12-config
glib12_LIB_DEPENDS=	glib12.3:${PORTSDIR}/devel/glib12
glib12_CONFIGURE_ENV=	GLIB_CONFIG="${GLIB_CONFIG}"
glib12_MAKE_ENV=	GLIB_CONFIG="${GLIB_CONFIG}"
glib12_PKGNAMESUFFIX=	-glib
glib12_DETECT=		${GLIB_CONFIG}

GTK_CONFIG?=		${X11BASE}/bin/gtk12-config
gtk12_LIB_DEPENDS=	gtk12.2:${PORTSDIR}/x11-toolkits/gtk12
gtk12_CONFIGURE_ENV=	GTK_CONFIG="${GTK_CONFIG}"
gtk12_MAKE_ENV=		GTK_CONFIG="${GTK_CONFIG}"
gtk12_PKGNAMESUFFIX=	-gtk
gtk12_DETECT=		${GTK_CONFIG}
gtk12_USE_GNOME_IMPL=	glib12 gnomehier

XML_CONFIG?=		${LOCALBASE}/bin/xml-config
libxml_LIB_DEPENDS=	xml.5:${PORTSDIR}/textproc/libxml
libxml_CONFIGURE_ENV=	XML_CONFIG="${XML_CONFIG}"
libxml_MAKE_ENV=	XML_CONFIG="${XML_CONFIG}"
libxml_PKGNAMESUFFIX=	-libxml
libxml_DETECT=		${XML_CONFIG}
libxml_USE_GNOME_IMPL=	glib12

ORBIT_CONFIG?=		${LOCALBASE}/bin/orbit-config
orbit_LIB_DEPENDS=	ORBit.2:${PORTSDIR}/devel/ORBit
orbit_CONFIGURE_ENV=	ORBIT_CONFIG="${ORBIT_CONFIG}"
orbit_MAKE_ENV=		ORBIT_CONFIG="${ORBIT_CONFIG}"
orbit_PKGNAMESUFFIX=	-orbit
orbit_DETECT=		${ORBIT_CONFIG}
orbit_USE_GNOME_IMPL=	glib12

GDK_PIXBUF_CONFIG?=	${X11BASE}/bin/gdk-pixbuf-config
gdkpixbuf_LIB_DEPENDS=	gdk_pixbuf.2:${PORTSDIR}/graphics/gdk-pixbuf
gdkpixbuf_CONFIGURE_ENV=GDK_PIXBUF_CONFIG="${GDK_PIXBUF_CONFIG}"
gdkpixbuf_MAKE_ENV=	GDK_PIXBUF_CONFIG="${GDK_PIXBUF_CONFIG}"
gdkpixbuf_PKGNAMESUFFIX=-gdkpixbuf
gdkpixbuf_DETECT=	${GDK_PIXBUF_CONFIG}
gdkpixbuf_USE_GNOME_IMPL=gtk12

IMLIB_CONFIG?=		${X11BASE}/bin/imlib-config
imlib_LIB_DEPENDS=	Imlib.5:${PORTSDIR}/graphics/imlib
imlib_CONFIGURE_ENV=	IMLIB_CONFIG="${IMLIB_CONFIG}"
imlib_MAKE_ENV=		IMLIB_CONFIG="${IMLIB_CONFIG}"
imlib_PKGNAMESUFFIX=	-imlib
imlib_DETECT=		${IMLIB_CONFIG}
imlib_USE_GNOME_IMPL=	gtk12

GNOME_CONFIG?=		${X11BASE}/bin/gnome-config
gnomelibs_LIB_DEPENDS=	gnome.5:${PORTSDIR}/x11/gnomelibs
gnomelibs_CONFIGURE_ENV=GNOME_CONFIG="${GNOME_CONFIG}"
gnomelibs_MAKE_ENV=	GNOME_CONFIG="${GNOME_CONFIG}"
gnomelibs_PKGNAMESUFFIX=-gnomelibs
gnomelibs_DETECT=	${GNOME_CONFIG}
gnomelibs_USE_GNOME_IMPL=esound gtk12 imlib libxml orbit

gnomecanvas_LIB_DEPENDS=gnomecanvaspixbuf.1:${PORTSDIR}/graphics/gnomecanvas
gnomecanvas_PKGNAMESUFFIX=-gnomecanvas
gnomecanvas_DETECT=	${X11BASE}/etc/gnomecanvaspixbufConf.sh
gnomecanvas_USE_GNOME_IMPL=gnomelibs gdkpixbuf

OAF_CONFIG?=		${X11BASE}/bin/oaf-config
oaf_LIB_DEPENDS=	oaf.0:${PORTSDIR}/devel/oaf
oaf_CONFIGURE_ENV=	OAF_CONFIG="${OAF_CONFIG}"
oaf_MAKE_ENV=		OAF_CONFIG="${OAF_CONFIG}"
oaf_PKGNAMESUFFIX=	-oaf
oaf_DETECT=		${OAF_CONFIG}
oaf_USE_GNOME_IMPL=	gnomelibs

gnomemimedata_RUN_DEPENDS=${X11BASE}/libdata/pkgconfig/gnome-mime-data-2.0.pc:${PORTSDIR}/misc/gnomemimedata
gnomemimedata_PKGNAMESUFFIX=-gnomemimedata
gnomemimedata_DETECT=	${X11BASE}/libdata/pkgconfig/gnome-mime-data-2.0.pc
gnomemimedata_USE_GNOME_IMPL=gnomelibs

GCONF_CONFIG?=		${X11BASE}/bin/gconf-config
gconf_LIB_DEPENDS=	gconf-1.1:${PORTSDIR}/devel/gconf
gconf_CONFIGURE_ENV=	GCONF_CONFIG="${GCONF_CONFIG}"
gconf_MAKE_ENV=		GCONF_CONFIG="${GCONF_CONFIG}"
gconf_PKGNAMESUFFIX=	-gconf
gconf_DETECT=		${GCONF_CONFIG}
gconf_USE_GNOME_IMPL=	oaf

GNOME_VFS_CONFIG?=	${X11BASE}/bin/gnome-vfs-config
gnomevfs_LIB_DEPENDS=	gnomevfs.0:${PORTSDIR}/devel/gnomevfs
gnomevfs_CONFIGURE_ENV=	GNOME_VFS_CONFIG="${GNOME_VFS_CONFIG}"
gnomevfs_MAKE_ENV=	GNOME_VFS_CONFIG="${GNOME_VFS_CONFIG}"
gnomevfs_PKGNAMESUFFIX=	-gnomevfs
gnomevfs_DETECT=	${GNOME_VFS_CONFIG}
gnomevfs_USE_GNOME_IMPL=gnomemimedata gconf

gnomecc_LIB_DEPENDS=	capplet.5:${PORTSDIR}/sysutils/gnomecontrolcenter
gnomecc_PKGNAMESUFFIX=	-gnomecc
gnomecc_DETECT=		${X11BASE}/etc/cappletConf.sh
gnomecc_USE_GNOME_IMPL=	gnomevfs

gnomeprint_LIB_DEPENDS=	gnomeprint.16:${PORTSDIR}/print/gnomeprint
gnomeprint_PKGNAMESUFFIX=-gnomeprint
gnomeprint_DETECT=	${X11BASE}/etc/printConf.sh
gnomeprint_USE_GNOME_IMPL=gnomecc

bonobo_LIB_DEPENDS=	bonobo.2:${PORTSDIR}/devel/bonobo
bonobo_PKGNAMESUFFIX=	-bonobo
bonobo_DETECT=		${X11BASE}/etc/bonoboConf.sh
bonobo_USE_GNOME_IMPL=	gnomeprint

GDA_CONFIG?=		${X11BASE}/bin/gda-config
libgda_LIB_DEPENDS=	gda-client.0:${PORTSDIR}/databases/libgda
libgda_CONFIGURE_ENV=	GDA_CONFIG="${GDA_CONFIG}"
libgda_MAKE_ENV=	GDA_CONFIG="${GDA_CONFIG}"
libgda_PKGNAMESUFFIX=	-libgda
libgda_DETECT=		${GDA_CONFIG}
libgda_USE_GNOME_IMPL=	bonobo

GNOMEDB_CONFIG?=	${X11BASE}/bin/gnomedb-config
gnomedb_LIB_DEPENDS=	gnomedb.0:${PORTSDIR}/databases/gnomedb
gnomedb_CONFIGURE_ENV=	GNOMEDB_CONFIG="${GNOMEDB_CONFIG}"
gnomedb_MAKE_ENV=	GNOMEDB_CONFIG="${GNOMEDB_CONFIG}"
gnomedb_PKGNAMESUFFIX=	-gnomedb
gnomedb_DETECT=		${GNOMEDB_CONFIG}
gnomedb_USE_GNOME_IMPL=	libgda

LIBGLADE_CONFIG?=	${X11BASE}/bin/libglade-config
libglade_LIB_DEPENDS=	glade.4:${PORTSDIR}/devel/libglade
libglade_CONFIGURE_ENV=	LIBGLADE_CONFIG="${LIBGLADE_CONFIG}"
libglade_MAKE_ENV=	LIBGLADE_CONFIG="${LIBGLADE_CONFIG}"
libglade_PKGNAMESUFFIX=	-libglade
libglade_DETECT=	${LIBGLADE_CONFIG}
libglade_USE_GNOME_IMPL=gnomedb

gal_LIB_DEPENDS=	gal.19:${PORTSDIR}/x11-toolkits/gal
gal_PKGNAMESUFFIX=	-gal
gal_DETECT=		${X11BASE}/etc/galConf.sh
gal_USE_GNOME_IMPL=	libglade

glibwww_LIB_DEPENDS=	glibwww.1:${PORTSDIR}/www/glibwww
glibwww_PKGNAMESUFFIX=	-glibwww
glibwww_DETECT=		${X11BASE}/etc/glibwwwConf.sh
glibwww_USE_GNOME_IMPL=	gnomecc

gtkhtml_LIB_DEPENDS=	gtkhtml.21:${PORTSDIR}/www/gtkhtml
gtkhtml_PKGNAMESUFFIX=	-gtkhtml
gtkhtml_DETECT=		${X11BASE}/etc/gtkhtmlConf.sh
gtkhtml_USE_GNOME_IMPL=	glibwww

gnomecore_LIB_DEPENDS=	panel_applet.5:${PORTSDIR}/x11/gnomecore
gnomecore_PKGNAMESUFFIX=-gnome
gnomecore_DETECT=	${X11BASE}/etc/appletsConf.sh
gnomecore_USE_GNOME_IMPL=gtkhtml gnomeaudio

# This section keeps tests for optional software.  These work off four
# types of of variables.  WANT_GNOM, WITH_GNOME, HAVE_GNOME and USE_GNOME.
# The logic of this is that a port can WANT support for a package, a user
# specifies if they want ports compiles WITH certain features.  This section
# tests if we HAVE these features, and the port is then free to USE them.

# The logic of this section is like this:
#
# .for foo in ALL_GNOME_COMPONENTS
#   .ifdef WANT_GNOME
#     .if defined(WITHOUT_GNOME)
#       (do nothing)
#     .elif defined(WITH_GNOME)
#       HAVE_GNOME += foo
#     .elif (if foo installed)
#       HAVE_GNOME += foo
#     .else
#       Print option message
#     .endif
#   .endif
# .endfor
#
# Although it apears a little more convoluted in the tests.

# Ports can make use of this like so:
#
# WANT_GNOME=		yes
#
# .include <bsd.port.pre.mk>
#
# .if ${HAVE_GNOME:S/foo//}!=${HAVE_GNOME:S/  / /g}
# ... Do some things ...
# USE_GNOME=		foo
# .else
# ... Do some other things ...
# .endif

.if defined(WANT_GNOME)
. for component in ${_USE_GNOME_ALL}
.  if defined(WITHOUT_GNOME)
#   Do nothing
.  else
.   if exists(${${component}_DETECT}) || defined(WITH_GNOME)
HAVE_GNOME+=	${component}
.   endif
.  endif
. endfor
.endif

.endif
# End of optional part.

.if defined(_POSTMKINCLUDED)

.if defined(USE_GNOME)
# First of all expand all USE_GNOME_IMPL recursively
. for component in ${_USE_GNOME_ALL}
.  for subcomponent in ${${component}_USE_GNOME_IMPL}
${component}_USE_GNOME_IMPL+=${${subcomponent}_USE_GNOME_IMPL}
.  endfor
. endfor

# Then use already expanded USE_GNOME_IMPL to expand USE_GNOME
. for component in ${USE_GNOME}
_USE_GNOME+=	${${component}_USE_GNOME_IMPL} ${component}
. endfor

# Then traverse through all possible components, check which of them
# exist in ${_USE_GNOME} and set variables accordingly
. for component in ${_USE_GNOME_ALL}
.  if ${_USE_GNOME:S/${component}//}!=${_USE_GNOME:S/  / /g}
BUILD_DEPENDS+=	${${component}_BUILD_DEPENDS}
LIB_DEPENDS+=	${${component}_LIB_DEPENDS}
RUN_DEPENDS+=	${${component}_RUN_DEPENDS}

CONFIGURE_ARGS+=${${component}_CONFIGURE_ARGS}
CONFIGURE_ENV+=	${${component}_CONFIGURE_ENV}
MAKE_ENV+=	${${component}_MAKE_ENV}

.   if defined(${component}_PRE_PATCH)
GNOME_PRE_PATCH+=	${${component}_PRE_PATCH}
.   endif

.  endif
. endfor
.endif

.if defined(GNOME_PRE_PATCH) && !target(pre-patch)
USE_REINPLACE=	yes

pre-patch:
	@${GNOME_PRE_PATCH}
.endif

.if defined(WANT_GNOME) && !defined(USE_GNOME)
PLIST_SUB+=	GNOME:="@comment " NOGNOME:=""
.endif
.if defined(WANT_GNOME) && defined(USE_GNOME)
PLIST_SUB+=	GNOME:="" NOGNOME:="@comment "
.endif

.endif
# End of use part.

--------------03C2C8ADF58FB163A579185C--


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




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