Thu Oct 31 15:05:52 2019 UTC ()
gmake: Unbreak PREFER_PKGSRC circular dependencies.

Just because a builtin is available does not mean a user has configured their
system to use it.  Check for USE_BUILTIN instead of IS_BUILTIN to ensure both
the builtin is available, and the user has allowed pkgsrc to use it, before
enabling.


(jperkin)
diff -r1.7 -r1.8 pkgsrc/devel/gmake/options.mk

cvs diff -r1.7 -r1.8 pkgsrc/devel/gmake/options.mk (expand / switch to unified diff)

--- pkgsrc/devel/gmake/options.mk 2019/10/28 10:03:18 1.7
+++ pkgsrc/devel/gmake/options.mk 2019/10/31 15:05:52 1.8
@@ -1,25 +1,24 @@ @@ -1,25 +1,24 @@
1# $NetBSD: options.mk,v 1.7 2019/10/28 10:03:18 triaxx Exp $ 1# $NetBSD: options.mk,v 1.8 2019/10/31 15:05:52 jperkin Exp $
2 2
3PKG_OPTIONS_VAR= PKG_OPTIONS.gmake 3PKG_OPTIONS_VAR= PKG_OPTIONS.gmake
4PKG_SUPPORTED_OPTIONS= nls 4PKG_SUPPORTED_OPTIONS= nls
5PKG_SUGGESTED_OPTIONS= nls 5PKG_SUGGESTED_OPTIONS= nls
6 6
7PLIST_VARS+= nls 7PLIST_VARS+= nls
8 8
9.include "../../mk/bsd.options.mk" 9.include "../../mk/bsd.options.mk"
10 10
11# Build NLS support only if a native implementation of gettext is available 11# Build NLS support only if a native implementation of gettext is available
12# to avoid a circular dependency (gmake->gettext-tools->ncurses->gmake). 12# to avoid a circular dependency (gmake->gettext-tools->ncurses->gmake).
13.include "../../devel/gettext-lib/builtin.mk" 13.include "../../devel/gettext-lib/builtin.mk"
14.if !empty(PKG_OPTIONS:Mnls) && \ 14.if !empty(PKG_OPTIONS:Mnls) && \
15 !empty(IS_BUILTIN.gettext:M[yY][eE][sS]) 15 !empty(USE_BUILTIN.gettext:M[yY][eE][sS])
16USE_PKGLOCALEDIR= yes 16USE_PKGLOCALEDIR= yes
17USE_TOOLS+= msgfmt 17USE_TOOLS+= msgfmt
18USE_BUILTIN.gettext= yes 
19. include "../../devel/gettext-lib/buildlink3.mk" 18. include "../../devel/gettext-lib/buildlink3.mk"
20PLIST.nls= yes 19PLIST.nls= yes
21.else 20.else
22CONFIGURE_ARGS+= --without-libintl-prefix 21CONFIGURE_ARGS+= --without-libintl-prefix
23CONFIGURE_ARGS+= --without-libiconv-prefix 22CONFIGURE_ARGS+= --without-libiconv-prefix
24CONFIGURE_ARGS+= --disable-nls 23CONFIGURE_ARGS+= --disable-nls
25.endif 24.endif