Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/x11/gtkmm3 x11/gtkmm3: move gtk3 buildlink above the P...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/21bdedc72a61
branches:  trunk
changeset: 433843:21bdedc72a61
user:      rillig <rillig%pkgsrc.org@localhost>
date:      Sun Jun 07 17:14:23 2020 +0000

description:
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:

 x11/gtkmm3/Makefile |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (29 lines):

diff -r c24b4640a062 -r 21bdedc72a61 x11/gtkmm3/Makefile
--- a/x11/gtkmm3/Makefile       Sun Jun 07 17:01:32 2020 +0000
+++ b/x11/gtkmm3/Makefile       Sun Jun 07 17:14:23 2020 +0000
@@ -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+=   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 @@
 .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"



Home | Main Index | Thread Index | Old Index