diff options
author | wiz <wiz@pkgsrc.org> | 2002-03-18 15:48:19 +0000 |
---|---|---|
committer | wiz <wiz@pkgsrc.org> | 2002-03-18 15:48:19 +0000 |
commit | 9a064539042a8d5f39d7e02bfe3c1a27a15510d5 (patch) | |
tree | feb26efb7d13286742f23fc85c47245a74007249 /devel/glib | |
parent | 43ab952addc9be3f9df5c1cb6e639d93097dc80f (diff) | |
download | pkgsrc-9a064539042a8d5f39d7e02bfe3c1a27a15510d5.tar.gz |
Add a workaround for broken 1.2.10 installations [see pkg/14150].
Improved by some comments by tron.
Diffstat (limited to 'devel/glib')
-rw-r--r-- | devel/glib/buildlink.mk | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/devel/glib/buildlink.mk b/devel/glib/buildlink.mk index 006e225e146..702e7ab932f 100644 --- a/devel/glib/buildlink.mk +++ b/devel/glib/buildlink.mk @@ -1,4 +1,4 @@ -# $NetBSD: buildlink.mk,v 1.13 2001/12/31 22:25:19 jlam Exp $ +# $NetBSD: buildlink.mk,v 1.14 2002/03/18 15:48:19 wiz Exp $ # # This Makefile fragment is included by packages that use glib. # @@ -36,6 +36,7 @@ USE_PTHREAD= native pth BUILDLINK_TARGETS.glib= glib-buildlink BUILDLINK_TARGETS.glib+= glib-buildlink-config-wrapper +BUILDLINK_TARGETS.glib+= glib-fix-glib-h BUILDLINK_TARGETS+= ${BUILDLINK_TARGETS.glib} BUILDLINK_CONFIG.glib= ${BUILDLINK_PREFIX.glib}/bin/glib-config @@ -53,4 +54,18 @@ pre-configure: ${BUILDLINK_TARGETS.glib} glib-buildlink: _BUILDLINK_USE glib-buildlink-config-wrapper: _BUILDLINK_CONFIG_WRAPPER_USE +glib-fix-glib-h: +.if exists(/usr/include/sys/null.h) + @cd ${BUILDLINK_DIR}/include/glib/glib-1.2; \ + if grep "^\#define.NULL" glib.h > /dev/null; then \ + ${ECHO} WARNING\!; \ + ${ECHO} The installed glib package is broken, please rebuild it from source.;\ + ${ECHO} For more information, see PR 14150.; \ + ${SED} -e "s|^#define.NULL.*|#include <sys/null.h>|" \ + glib.h > glib.h.fixed; \ + ${RM} glib.h; \ + ${MV} glib.h.fixed glib.h; \ + fi +.endif + .endif # GLIB_BUILDLINK_MK |