diff options
author | wiz <wiz> | 2002-03-18 15:48:19 +0000 |
---|---|---|
committer | wiz <wiz> | 2002-03-18 15:48:19 +0000 |
commit | 6cd25fd29eb1cd6a6b106434d2acf66e5c380aed (patch) | |
tree | feb26efb7d13286742f23fc85c47245a74007249 /devel | |
parent | 19742f8d57033a5e1af72ac38eeac1e5c12c3925 (diff) | |
download | pkgsrc-6cd25fd29eb1cd6a6b106434d2acf66e5c380aed.tar.gz |
Add a workaround for broken 1.2.10 installations [see pkg/14150].
Improved by some comments by tron.
Diffstat (limited to 'devel')
-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 |