summaryrefslogtreecommitdiff
path: root/x11/gtkmm3
diff options
context:
space:
mode:
authorrillig <rillig@pkgsrc.org>2020-06-07 17:14:23 +0000
committerrillig <rillig@pkgsrc.org>2020-06-07 17:14:23 +0000
commit919e4582b6373fc31669f8247cc29c53fcddb7de (patch)
tree37b613be825bb9c34a62f0a636a27e394762ff99 /x11/gtkmm3
parentd6285bcf054866bd2c6e8f5c1bab2eed192dbb3d (diff)
downloadpkgsrc-919e4582b6373fc31669f8247cc29c53fcddb7de.tar.gz
x11/gtkmm3: move gtk3 buildlink above the PKG_BUILD_OPTIONS
Before, "bmake show-all" showed that PLIST.x11 was commented out. This was misleading since during the actual package build, that variable is active, and the corresponding files are included in the PLIST. This inconsistency was due to the magic of MAKEVARS and the barrier. When bmake is run, the build options of gtk3 are determined and added to MAKEVARS. At that point PLIST.x11 is still undefined. That doesn't matter since this variable is not evaluated yet. Before the actual PLIST generation happens, the value of PKG_BUILD_OPTIONS.gtk3 is stored in work/.build_makevars.mk, which acts as a cache. After that, the barrier steps in, and bmake calls an inner bmake to do the actual work. This inner bmake reads the package Makefile again, and when bsd.prefs.mk is included, the makevars.mk cache is loaded as well. This makes PKG_BUILD_OPTIONS.gtk3 known at load time, and at that point, PLIST.x11 is evaluated as expected and becomes "yes". Luckily, PLIST.x11 was not added to MAKEVARS. Otherwise it would have been evaluated too early, the early value would have been cached, and the whole trick wouldn't have worked.
Diffstat (limited to 'x11/gtkmm3')
-rw-r--r--x11/gtkmm3/Makefile8
1 files changed, 4 insertions, 4 deletions
diff --git a/x11/gtkmm3/Makefile b/x11/gtkmm3/Makefile
index 34dc265a0d7..a777bc6ccc1 100644
--- a/x11/gtkmm3/Makefile
+++ b/x11/gtkmm3/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.39 2020/06/07 17:01:32 rillig Exp $
+# $NetBSD: Makefile,v 1.40 2020/06/07 17:14:23 rillig Exp $
DISTNAME= gtkmm-3.24.2
PKGNAME= ${DISTNAME:S/gtkmm/gtkmm3/1}
@@ -21,9 +21,10 @@ PKGCONFIG_OVERRIDE+= gdk/gdkmm.pc.in
PKGCONFIG_OVERRIDE+= gtk/gtkmm.pc.in
TEST_TARGET= check
-.include "../../mk/bsd.prefs.mk"
+.include "../../x11/gtk3/buildlink3.mk"
+
PLIST_VARS+= x11
-.if !empty(PKG_BUILD_OPTIONS.gtk3:Mx11)
+.if ${PKG_BUILD_OPTIONS.gtk3:Mx11}
PLIST.x11= yes
.endif
@@ -35,6 +36,5 @@ PLIST.x11= yes
.include "../../graphics/cairomm/buildlink3.mk"
.include "../../graphics/gdk-pixbuf2/buildlink3.mk"
.include "../../textproc/libxslt/buildlink3.mk"
-.include "../../x11/gtk3/buildlink3.mk"
.include "../../mk/pthread.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"