pkgsrc-Changes archive

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

CVS commit: pkgsrc/x11/gtkmm3



Module Name:    pkgsrc
Committed By:   rillig
Date:           Sun Jun  7 17:14:23 UTC 2020

Modified Files:
        pkgsrc/x11/gtkmm3: Makefile

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 pkgsrc/x11/gtkmm3/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/x11/gtkmm3/Makefile
diff -u pkgsrc/x11/gtkmm3/Makefile:1.39 pkgsrc/x11/gtkmm3/Makefile:1.40
--- pkgsrc/x11/gtkmm3/Makefile:1.39     Sun Jun  7 17:01:32 2020
+++ pkgsrc/x11/gtkmm3/Makefile  Sun Jun  7 17:14:23 2020
@@ -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"



Home | Main Index | Thread Index | Old Index