summaryrefslogtreecommitdiff
path: root/devel
diff options
context:
space:
mode:
authorhans <hans@pkgsrc.org>2011-11-26 19:01:15 +0000
committerhans <hans@pkgsrc.org>2011-11-26 19:01:15 +0000
commit038e77f83ff2d541b709f8983b201a798d244fab (patch)
treee1508bc9b4542f8747381dd7d0296373707ebcf6 /devel
parentaea3c15457b42969c571219c9dc4aba435468311 (diff)
downloadpkgsrc-038e77f83ff2d541b709f8983b201a798d244fab.tar.gz
Use options framework for NLS support. Enable by default on NetBSD, but
not on other platforms.
Diffstat (limited to 'devel')
-rw-r--r--devel/gmake/Makefile18
-rw-r--r--devel/gmake/options.mk23
2 files changed, 26 insertions, 15 deletions
diff --git a/devel/gmake/Makefile b/devel/gmake/Makefile
index 472e6ac9b98..6d852a006a6 100644
--- a/devel/gmake/Makefile
+++ b/devel/gmake/Makefile
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.78 2011/07/09 16:25:35 bsiegert Exp $
+# $NetBSD: Makefile,v 1.79 2011/11/26 19:01:15 hans Exp $
DISTNAME= make-3.82
PKGNAME= g${DISTNAME}
-PKGREVISION= 2
+PKGREVISION= 3
CATEGORIES= devel
MASTER_SITES= ${MASTER_SITE_GNU:=make/}
EXTRACT_SUFX= .tar.bz2
@@ -25,6 +25,7 @@ INFO_FILES= yes
TEST_TARGET= check
.include "../../mk/bsd.prefs.mk"
+.include "options.mk"
.if defined(GNU_PROGRAM_PREFIX)
CONFIGURE_ARGS+= --program-prefix=${GNU_PROGRAM_PREFIX:Q}
@@ -40,19 +41,6 @@ PLIST.gmake= yes
PLIST_SRC= ${PKGDIR}/PLIST
-GMAKE_LOCALE?= yes
-BUILD_DEFS+= GMAKE_LOCALE
-MAKEFLAGS+= GMAKE_LOCALE=${GMAKE_LOCALE:Q}
-.if !empty(GMAKE_LOCALE:M[yY][eE][sS])
-USE_PKGLOCALEDIR= yes
-PLIST_SRC+= ${PKGDIR}/PLIST.locale
-USE_TOOLS+= msgfmt
-. include "../../devel/gettext-lib/buildlink3.mk"
-.else
-CONFIGURE_ARGS+= --without-libintl
-CONFIGURE_ARGS+= --without-libiconv
-.endif
-
.if ${OPSYS} == "MirBSD"
# workaround for broken strndup
CONFIGURE_ARGS+= ac_cv_func_strndup=no
diff --git a/devel/gmake/options.mk b/devel/gmake/options.mk
new file mode 100644
index 00000000000..2f9649ead32
--- /dev/null
+++ b/devel/gmake/options.mk
@@ -0,0 +1,23 @@
+# $NetBSD: options.mk,v 1.1 2011/11/26 19:01:15 hans Exp $
+
+PKG_OPTIONS_VAR= PKG_OPTIONS.gmake
+PKG_SUPPORTED_OPTIONS= nls
+PKG_SUGGESTED_OPTIONS=
+.if ${OPSYS} == "NetBSD"
+PKG_SUGGESTED_OPTIONS+= nls
+.endif
+
+PKG_OPTIONS_LEGACY_VARS= GMAKE_LOCALE
+
+.include "../../mk/bsd.options.mk"
+
+.if !empty(PKG_OPTIONS:Mnls)
+USE_PKGLOCALEDIR= yes
+PLIST_SRC+= ${PKGDIR}/PLIST.locale
+USE_TOOLS+= msgfmt
+. include "../../devel/gettext-lib/buildlink3.mk"
+.else
+CONFIGURE_ARGS+= --without-libintl-prefix
+CONFIGURE_ARGS+= --without-libiconv-prefix
+CONFIGURE_ARGS+= --disable-nls
+.endif