pkgsrc-Changes archive

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

CVS commit: pkgsrc/devel/wayland



Module Name:    pkgsrc
Committed By:   riastradh
Date:           Tue Jun 27 10:42:07 UTC 2023

Modified Files:
        pkgsrc/devel/wayland: Makefile distinfo
Added Files:
        pkgsrc/devel/wayland/patches: patch-meson__options.txt
            patch-src_meson.build

Log Message:
devel/wayland: Make this cross-compile.

For cross-compilation, it depends on a native build of itself, for
the wayland-scanner tool.  This, in turn, requires a patch to the
meson files to allow it to be passed as a parameter (rather than
discovered through cmake or pkg-config, which are generally limited
to references into the cross-destdir).

(If someone can figure out how to spell `./configure
ac_cv_foo_path=...' in meson to obviate the need for that patch,
please do so!  I searched around in the manual and I couldn't find
any way to cause something like override_find_program to happen from
a command-line argument or environment variable.)


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 pkgsrc/devel/wayland/Makefile
cvs rdiff -u -r1.11 -r1.12 pkgsrc/devel/wayland/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/devel/wayland/patches/patch-meson__options.txt \
    pkgsrc/devel/wayland/patches/patch-src_meson.build

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

Modified files:

Index: pkgsrc/devel/wayland/Makefile
diff -u pkgsrc/devel/wayland/Makefile:1.18 pkgsrc/devel/wayland/Makefile:1.19
--- pkgsrc/devel/wayland/Makefile:1.18  Wed Apr 19 08:09:48 2023
+++ pkgsrc/devel/wayland/Makefile       Tue Jun 27 10:42:07 2023
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.18 2023/04/19 08:09:48 adam Exp $
+# $NetBSD: Makefile,v 1.19 2023/06/27 10:42:07 riastradh Exp $
 
 DISTNAME=      wayland-1.21.0
 PKGREVISION=   2
@@ -28,9 +28,16 @@ PKGCONFIG_OVERRIDE+=         output/meson-priva
 PKGCONFIG_OVERRIDE+=           output/meson-private/wayland-scanner.pc
 PKGCONFIG_OVERRIDE+=           output/meson-private/wayland-server.pc
 
+.include "../../mk/bsd.fast.prefs.mk"
+
+.if ${USE_CROSS_COMPILE:tl} == "yes"
+# wayland runs wayland-scanner at build-time.
+TOOL_DEPENDS+= ${PKGNAME}:../../${PKGPATH}
+MESON_ARGS+=   -Dcross_scanner=${TOOLBASE:Q}/bin/wayland-scanner
+.endif
+
 .include "platform.mk"
 .include "../../devel/meson/build.mk"
-.include "../../mk/bsd.fast.prefs.mk"
 .if ${OPSYS} != "Linux"
 .  include "../../devel/libepoll-shim/buildlink3.mk"
 CPPFLAGS+=     -I${BUILDLINK_PREFIX.libepoll-shim}/include/libepoll-shim

Index: pkgsrc/devel/wayland/distinfo
diff -u pkgsrc/devel/wayland/distinfo:1.11 pkgsrc/devel/wayland/distinfo:1.12
--- pkgsrc/devel/wayland/distinfo:1.11  Thu Aug  4 15:21:26 2022
+++ pkgsrc/devel/wayland/distinfo       Tue Jun 27 10:42:07 2023
@@ -1,7 +1,9 @@
-$NetBSD: distinfo,v 1.11 2022/08/04 15:21:26 nia Exp $
+$NetBSD: distinfo,v 1.12 2023/06/27 10:42:07 riastradh Exp $
 
 BLAKE2s (wayland-1.21.0.tar.xz) = a4c8a8c41c3b502fe6f56a5ad4913762ddfe6dea619287d44443b8b54633847f
 SHA512 (wayland-1.21.0.tar.xz) = 5575216d30fdf5c63caa6bcad071e15f2a4f3acb12df776806073f65db37a50b5b5b3cc7957c5497636f4ac01893e2eaab26e453ded44b287acde01762f5fdc3
 Size (wayland-1.21.0.tar.xz) = 225936 bytes
 SHA1 (patch-meson.build) = 50b64c24a298596c7fdadf96551e8923a1f3eb38
+SHA1 (patch-meson__options.txt) = af930cd03994d7a2202af97b17939555c3aa7409
+SHA1 (patch-src_meson.build) = 47bb46d9af0ab428667bebbed36b09f0b0b9c414
 SHA1 (patch-src_wayland-os.c) = 8bbd574108e06697c874d372062d3129eb7937d1

Added files:

Index: pkgsrc/devel/wayland/patches/patch-meson__options.txt
diff -u /dev/null pkgsrc/devel/wayland/patches/patch-meson__options.txt:1.1
--- /dev/null   Tue Jun 27 10:42:07 2023
+++ pkgsrc/devel/wayland/patches/patch-meson__options.txt       Tue Jun 27 10:42:07 2023
@@ -0,0 +1,15 @@
+$NetBSD: patch-meson__options.txt,v 1.1 2023/06/27 10:42:07 riastradh Exp $
+
+New cross_scanner option so we can pass the exact path to the
+build-time wayland-scanner tool through when cross-compiling.
+
+--- meson_options.txt.orig     2022-06-30 21:59:11.000000000 +0000
++++ meson_options.txt
+@@ -22,3 +22,7 @@ option('icon_directory',
+   description: 'Location used to look for cursors (defaults to ${datadir}/icons if unset)',
+   type: 'string',
+   value: '')
++option('cross_scanner',
++  description: 'Path to build-time wayland-scanner binary',
++  type: 'string',
++  value: 'wayland-scanner')
Index: pkgsrc/devel/wayland/patches/patch-src_meson.build
diff -u /dev/null pkgsrc/devel/wayland/patches/patch-src_meson.build:1.1
--- /dev/null   Tue Jun 27 10:42:07 2023
+++ pkgsrc/devel/wayland/patches/patch-src_meson.build  Tue Jun 27 10:42:07 2023
@@ -0,0 +1,18 @@
+$NetBSD: patch-src_meson.build,v 1.1 2023/06/27 10:42:07 riastradh Exp $
+
+When cross-compiling, let the caller (the pkgsrc Makefile) specify the
+exact path to wayland-scanner rather than flailing around with
+pkgconfig or cmake to (not) find it.
+
+--- src/meson.build.orig       2022-06-30 21:59:11.000000000 +0000
++++ src/meson.build
+@@ -78,8 +78,7 @@ if get_option('scanner')
+ endif
+ 
+ if meson.is_cross_build() or not get_option('scanner')
+-      scanner_dep = dependency('wayland-scanner', native: true, version: meson.project_version())
+-      wayland_scanner_for_build = find_program(scanner_dep.get_variable(pkgconfig: 'wayland_scanner'))
++      wayland_scanner_for_build = find_program(get_option('cross_scanner'))
+ else
+       wayland_scanner_for_build = wayland_scanner
+ endif



Home | Main Index | Thread Index | Old Index