Subject: Problem with BUILDLINK_CONFIG_WRAPPER_SED?
To: None <tech-pkg@netbsd.org>
From: Eric Gillespie, Jr. <epg@pretzelnet.org>
List: tech-pkg
Date: 10/05/2001 19:04:51
--=-=-=
So i was rebuilding all the gnome stuff again when i ran into a
problem. I don't know why i didn't see it before, but it's there
and i don't know how to solve it.
I first noticed the problem with controlcenter (which i have made
USE_BUILDLINK_ONLY). When a Makefile includes
../../sysutils/gnome-vfs/buildlink.mk the
work/.buildlink/bin/gtk-config script gets hosed. gtk-config
--cflags is supposed to say -Ibuildlink-dir/include/glib/glib-1-2
but instead it says
-Ibuildlink-dir/include/gnome-vfs-1.0/glib/glib-1-2.
I think this might be a fundamental problem with things like
this (from gnome-vfs's buildlink.mk)
BUILDLINK_CONFIG_WRAPPER_SED+= -e "s|\(-I${BUILDLINK_PREFIX.gnome-vfs}/include/\)|\1 -I${BUILDLINK_DIR}/include/gnome-vfs-1.0/|g"
because ${BUILDLINK_PREFIX.gnome-vfs} is the same as glib's
prefix.
I've attached my changes to controlcenter, if you want to test
this.
--
Eric Gillespie, Jr.
mailto:epg@pretzelnet.org <*> jabber:pretzelgod@jabber.org
"This movie sure is gory!"
"Yeah, but that's one cute pig."
--=-=-=
Content-Disposition: attachment; filename=controlcenter.diff
Content-Description: controlcenter diff
Index: x11/controlcenter/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/x11/controlcenter/Makefile,v
retrieving revision 1.31
diff -a -u -r1.31 Makefile
--- Makefile 2001/09/27 23:18:59 1.31
+++ Makefile 2001/10/05 19:34:54
@@ -8,14 +8,13 @@
HOMEPAGE= http://www.gnome.org/
COMMENT= GNOME control-center development library
-DEPENDS+= gnome-libs>=1.2.13:../../x11/gnome-libs
-DEPENDS+= gdk-pixbuf>=0.10.1:../../graphics/gdk-pixbuf
-DEPENDS+= gnome-vfs>=1.0:../../sysutils/gnome-vfs
-DEPENDS+= scrollkeeper-[0-9]*:../../textproc/scrollkeeper
+BUILDLINK_DEPENDS.gnome-libs= gnome-libs>=1.2.13
+DEPENDS+= scrollkeeper-[0-9]*:../../textproc/scrollkeeper
-USE_X11BASE= YES
+USE_BUILDLINK_ONLY= YES
+REPLACE_BUILDLINK= cappletConf.sh
+
USE_GMAKE= YES
-USE_LIBINTL= YES
BUILD_USES_MSGFMT= YES
USE_LIBTOOL= YES
@@ -25,10 +24,13 @@
GNU_CONFIGURE= YES
CONFIGURE_ARGS+= --localstatedir=${LOCALSTATEDIR}
-CONFIGURE_ARGS+= --with-glib-prefix=${LOCALBASE}
-CPPFLAGS+= -I${LOCALBASE}/include # libintl.h
post-patch:
@${ECHO} >>${WRKSRC}/control-center/cappletConf.sh.in ""
+.include "../../graphics/gdk-pixbuf/buildlink.mk"
+.include "../../devel/gettext-lib/buildlink.mk"
+.include "../../sysutils/gnome-vfs/buildlink.mk"
+.include "../../x11/gnome-libs/buildlink.mk"
+.include "../../mk/x11.buildlink.mk"
.include "../../mk/bsd.pkg.mk"
--=-=-=
Content-Disposition: attachment; filename=buildlink.mk
Content-Description: controlcenter buildlink.mk
# $NetBSD$
#
# This Makefile fragment is included by packages that use controlcenter.
#
# To use this Makefile fragment, simply:
#
# (1) Optionally define BUILDLINK_DEPENDS.controlcenter to the dependency
# pattern for the version of controlcenter desired.
# (2) Include this Makefile fragment in the package Makefile,
# (3) Add ${BUILDLINK_DIR}/include to the front of the C preprocessor's header
# search path, and
# (4) Add ${BUILDLINK_DIR}/lib to the front of the linker's library search
# path.
.if !defined(CONTROLCENTER_BUILDLINK_MK)
CONTROLCENTER_BUILDLINK_MK= # defined
.include "../../mk/bsd.buildlink.mk"
BUILDLINK_DEPENDS.controlcenter?= control-center>=1.4
DEPENDS+= ${BUILDLINK_DEPENDS.controlcenter}:../../x11/controlcenter
EVAL_PREFIX+= BUILDLINK_PREFIX.controlcenter=controlcenter
BUILDLINK_PREFIX.controlcenter_DEFAULTS= ${X11PREFIX}
BUILDLINK_FILES.controlcenter= include/capplet-widget.h
BUILDLINK_FILES.controlcenter+= lib/libcapplet.*
.include "../../graphics/gdk-pixbuf/buildlink.mk"
.include "../../devel/gettext-lib/buildlink.mk"
.include "../../sysutils/gnome-vfs/buildlink.mk"
.include "../../x11/gnome-libs/buildlink.mk"
BUILDLINK_TARGETS.controlcenter= controlcenter-buildlink
BUILDLINK_TARGETS.controlcenter+= controlcenter-buildlink-config-wrapper
BUILDLINK_TARGETS+= ${BUILDLINK_TARGETS.controlcenter}
BUILDLINK_CONFIG.controlcenter= ${BUILDLINK_PREFIX.controlcenter}/lib/cappletConf.sh
BUILDLINK_CONFIG_WRAPPER.controlcenter= ${BUILDLINK_DIR}/lib/cappletConf.sh
.if defined(USE_CONFIG_WRAPPER)
CONTROLCENTER_CONFIG?= ${BUILDLINK_CONFIG_WRAPPER.controlcenter}
CONFIGURE_ENV+= CONTROLCENTER_CONFIG="${CONTROLCENTER_CONFIG}"
MAKE_ENV+= CONTROLCENTER_CONFIG="${CONTROLCENTER_CONFIG}"
.endif
pre-configure: ${BUILDLINK_TARGETS.controlcenter}
controlcenter-buildlink: _BUILDLINK_USE
controlcenter-buildlink-config-wrapper: _BUILDLINK_CONFIG_WRAPPER_USE
.endif # CONTROLCENTER_BUILDLINK_MK
--=-=-=--