Here's a better update for gconf2.
  - The GTK+2 dependency is split off into a subpackage controlled by a
    PSEUDO_FLAVOR, per Alek's suggestion.
  - Moved an .so from PLIST into PFRAG.shared.

(In my previous post, I'd put more things in LIB_DEPENDS than necessary because the gtk+2 package's dependencies weren't registered correctly on my system --- I'm not sure why; it was freshly built...)



Index: Makefile
===================================================================
RCS file: /cvs/ports/devel/gconf2/Makefile,v
retrieving revision 1.10
diff -u -r1.10 Makefile
--- Makefile    24 May 2005 21:37:09 -0000      1.10
+++ Makefile    16 Jul 2005 16:43:44 -0000
@@ -1,10 +1,13 @@
 # $OpenBSD: Makefile,v 1.10 2005/05/24 21:37:09 marcm Exp $

 COMMENT=               "configuration database system for GNOME"
+COMMENT-check=         "sanity checking and troubleshooting tool for gconf2"

 VERSION=               2.10.0
+PKGVERSION=            p2
 DISTNAME=              GConf-${VERSION}
-PKGNAME=               gconf2-${VERSION}
+PKGNAME=               gconf2-${VERSION}${PKGVERSION}
+PKGNAME-check=         gconf2-check-${VERSION}${PKGVERSION}
 CATEGORIES=            devel

 HOMEPAGE=              http://www.gnome.org/projects/gconf/
@@ -15,20 +18,20 @@
 MODULES=               devel/gettext

 BUILD_DEPENDS=         :pkgconfig-*:devel/pkgconfig
-LIB_DEPENDS=           ORBit-2::devel/ORBit2 \
-                       
gdk-x11-2.0.0.0,gdk_pixbuf-2.0.0.0,gtk-x11-2.0.0.0::x11/gtk+2 \
+LIB_DEPENDS=           ORBit-2:ORBit2->=2.4.0:devel/ORBit2 \
+                       
glib-2.0.0.0,gmodule-2.0.0.0,gobject-2.0.0.0,gthread-2.0.0.0::devel/glib2 \
+                       popt::devel/popt \
                        xml2.6::textproc/libxml

+PSEUDO_FLAVORS=                no_gtk
+FLAVOR?=
+
 # GPL
 PERMIT_PACKAGE_CDROM=  Yes
 PERMIT_PACKAGE_FTP=    Yes
 PERMIT_DISTFILES_CDROM=        Yes
 PERMIT_DISTFILES_FTP=  Yes
-WANTLIB=               X11 Xft Xrender atk-1.0.0.0 c \
-                       fontconfig freetype glib-2.0.0.0 gmodule-2.0.0.0 \
-                       gobject-2.0.0.0 gthread-2.0.0.0 m pango-1.0.0.0 \
-                       pangoft2-1.0.0.0 pangox-1.0.0.0 pangoxft-1.0.0.0 \
-                       popt pthread z
+WANTLIB=               c m pthread z

 SEPARATE_BUILD=                concurrent

@@ -38,10 +41,31 @@
 USE_GMAKE=             Yes
 CONFIGURE_STYLE=       gnu
 CONFIGURE_ARGS+=       ${CONFIGURE_SHARED}
-CONFIGURE_ARGS+=       --disable-gtk-conf
 CONFIGURE_ARGS+=       --enable-gconf-source=${DEFAULT_GCONF_SOURCE}
 CONFIGURE_ENV=         CPPFLAGS="-I${LOCALBASE}/include" \
                        LDFLAGS="-L${LOCALBASE}/lib"
+
+.if ${FLAVOR:L:Mno_gtk}
+CONFIGURE_ARGS+=       --disable-gtk
+.else
+# If flavor=gtk is specified, build the optional checker as a subpackage,
+# and specify the GTK dependencies. Use BUILD_DEPENDS so that they
+# won't affect the main subpackage.
+MULTI_PACKAGES=        -check
+BUILD_DEPENDS+=                
gdk-x11-2.0.0.3,gdk_pixbuf-2.0.0.3,gtk-x11-2.0.0.3::x11/gtk+2
+CONFIGURE_ARGS+=       --enable-gtk
+.endif
+
+# If we're packaging the checker, add the GTK stuff to the dependencies.
+.if defined(PACKAGING) && defined(SUBPACKAGE)
+.if ${SUBPACKAGE} == "-check"
+LIB_DEPENDS+=          
gdk-x11-2.0.0.3,gdk_pixbuf-2.0.0.3,gtk-x11-2.0.0.3::x11/gtk+2 \
+                       gconf-2:${PKGNAME}:devel/gconf2
+WANTLIB+=              X11 Xft Xrender fontconfig freetype \
+                       pangox-1.0.0.0 pangoft2-1.0.0.0 pangoxft-1.0.0.0 \
+                       pango-1.0.0.0 atk-1.0.0.0
+.endif
+.endif

 post-install:
        @${INSTALL_DATA_DIR} ${PREFIX}/share/examples/gconf2; \
Index: pkg/DESCR-check
===================================================================
RCS file: pkg/DESCR-check
diff -N pkg/DESCR-check
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ pkg/DESCR-check     16 Jul 2005 16:43:44 -0000
@@ -0,0 +1 @@
+The gconf-sanity-check program can be used to check GConf databases.
Index: pkg/PFRAG.shared
===================================================================
RCS file: /cvs/ports/devel/gconf2/pkg/PFRAG.shared,v
retrieving revision 1.2
diff -u -r1.2 PFRAG.shared
--- pkg/PFRAG.shared    14 Sep 2004 23:43:55 -0000      1.2
+++ pkg/PFRAG.shared    16 Jul 2005 16:43:44 -0000
@@ -1,3 +1,4 @@
 @comment $OpenBSD: PFRAG.shared,v 1.2 2004/09/14 23:43:55 espie Exp $
+lib/GConf/2/libgconfbackend-oldxml.so
 lib/GConf/2/libgconfbackend-xml.so
 @lib lib/libgconf-2.so.5.0
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/devel/gconf2/pkg/PLIST,v
retrieving revision 1.11
diff -u -r1.11 PLIST
--- pkg/PLIST   24 May 2005 21:37:09 -0000      1.11
+++ pkg/PLIST   16 Jul 2005 16:43:45 -0000
@@ -17,14 +17,12 @@
 lib/GConf/2/
 lib/GConf/2/libgconfbackend-oldxml.a
 lib/GConf/2/libgconfbackend-oldxml.la
-lib/GConf/2/libgconfbackend-oldxml.so
 lib/GConf/2/libgconfbackend-xml.a
 lib/GConf/2/libgconfbackend-xml.la
 lib/libgconf-2.a
 lib/libgconf-2.la
 lib/pkgconfig/
 lib/pkgconfig/gconf-2.0.pc
-libexec/gconf-sanity-check-2
 libexec/gconfd-2
 @man man/man1/gconftool-2.1
 share/aclocal/gconf-2.m4
Index: pkg/PLIST-check
===================================================================
RCS file: pkg/PLIST-check
diff -N pkg/PLIST-check
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ pkg/PLIST-check     16 Jul 2005 16:43:45 -0000
@@ -0,0 +1 @@
+libexec/gconf-sanity-check-2

Reply via email to