From 9a064539042a8d5f39d7e02bfe3c1a27a15510d5 Mon Sep 17 00:00:00 2001 From: wiz Date: Mon, 18 Mar 2002 15:48:19 +0000 Subject: Add a workaround for broken 1.2.10 installations [see pkg/14150]. Improved by some comments by tron. --- devel/glib/buildlink.mk | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) 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 |" \ + glib.h > glib.h.fixed; \ + ${RM} glib.h; \ + ${MV} glib.h.fixed glib.h; \ + fi +.endif + .endif # GLIB_BUILDLINK_MK -- cgit v1.2.3