summaryrefslogtreecommitdiff
path: root/devel/glib2
diff options
context:
space:
mode:
Diffstat (limited to 'devel/glib2')
-rw-r--r--devel/glib2/Makefile30
-rw-r--r--devel/glib2/options.mk27
2 files changed, 38 insertions, 19 deletions
diff --git a/devel/glib2/Makefile b/devel/glib2/Makefile
index 655ab7738f3..2473e077594 100644
--- a/devel/glib2/Makefile
+++ b/devel/glib2/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.138 2008/05/20 21:07:57 tnn Exp $
+# $NetBSD: Makefile,v 1.139 2008/05/28 21:20:48 joerg Exp $
# When updating glib2, please apply patch-ak to configure.in
# Then run a matching version of autoconf to regen patch-aa.
@@ -81,16 +81,6 @@ SUBST_MESSAGE.thr= Fixing libgthread.
CONFIGURE_ENV+= gt_cv_c_wchar_t=no
.endif
-.if ${OPSYS} == "IRIX"
-SUBST_CLASSES+= fam-linkage
-SUBST_STAGE.fam-linkage= pre-configure
-SUBST_MESSAGE.fam-linkage= Fixing fam linkage
-SUBST_FILES.fam-linkage= gio/fam/Makefile.in
-SUBST_SED.fam-linkage= -e 's,^FAM_LIBS =.*$$,FAM_LIBS = -lfam -lC,g'
-
-BUILDLINK_TRANSFORM+= l:fam:fam:C
-.endif
-
.if ${OPSYS} == "HPUX"
CONFIGURE_ENV+= ac_cv_func_mmap_fixed_mapped=yes
.endif
@@ -100,22 +90,24 @@ PRINT_PLIST_AWK+= /^@dirrm include\/glib$$/ \
{ print "@unexec $${RMDIR} %D/" $$2 \
" 2>/dev/null || $${TRUE}"; next; }
+PLIST_VARS+= fam
+
+# Overriden in options.mk.
+CONFIGURE_ARGS+= --disable-fam
+
+.if ${OPSYS} != "HPUX" && ${OPSYS} != "OSF1"
+.include "options.mk"
+.endif
+
.include "../../converters/libiconv/buildlink3.mk"
.include "../../devel/gettext-lib/buildlink3.mk"
.include "../../mk/dlopen.buildlink3.mk"
+
.if !empty(MACHINE_PLATFORM:MIRIX-5*)
CONFIGURE_ARGS+= --disable-threads
.else
.include "../../mk/pthread.buildlink3.mk"
.endif
.include "../../devel/pcre/buildlink3.mk"
-PLIST_VARS+= fam
-.if ${OPSYS} == "HPUX" || ${OPSYS} == "OSF1"
-CONFIGURE_ARGS+= --disable-fam
-.else
-PLIST.fam= yes
-FAM_ACCEPTED= fam
-. include "../../mk/fam.buildlink3.mk"
-.endif
.include "../../mk/bsd.pkg.mk"
diff --git a/devel/glib2/options.mk b/devel/glib2/options.mk
new file mode 100644
index 00000000000..36d537e9e8a
--- /dev/null
+++ b/devel/glib2/options.mk
@@ -0,0 +1,27 @@
+# $NetBSD: options.mk,v 1.3 2008/05/28 21:20:48 joerg Exp $
+#
+# This file is *not* included for HPUX and OSF1, as they don't have
+# a working FAM implementation.
+
+PKG_OPTIONS_VAR = PKG_OPTIONS.glib2
+
+PKG_SUGGESTED_OPTIONS= fam
+PKG_SUPPORTED_OPTIONS= fam
+.include "../../mk/bsd.options.mk"
+
+.if !empty(PKG_OPTIONS:Mfam)
+PLIST.fam= yes
+FAM_ACCEPTED= fam
+. include "../../mk/fam.buildlink3.mk"
+CONFIGURE_ARGS+= --enable-fam
+
+. if ${OPSYS} == "IRIX"
+SUBST_CLASSES+= fam-linkage
+SUBST_STAGE.fam-linkage= pre-configure
+SUBST_MESSAGE.fam-linkage= Fixing fam linkage
+SUBST_FILES.fam-linkage= gio/fam/Makefile.in
+SUBST_SED.fam-linkage= -e 's,^FAM_LIBS =.*$$,FAM_LIBS = -lfam -lC,g'
+
+BUILDLINK_TRANSFORM+= l:fam:fam:C
+. endif
+.endif