pkgsrc-WIP-changes archive

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

rio: fix pre-configure for wgpu-28.x vendor crates



Module Name:	pkgsrc-wip
Committed By:	ci4ic4 <ci4ic4%gmail.com@localhost>
Pushed By:	ci4ic4
Date:		Sun May 24 19:58:44 2026 +0100
Changeset:	9ba4e20d259c1fadb929f21a07f6ed640ad08ded

Modified Files:
	rio/Makefile

Log Message:
rio: fix pre-configure for wgpu-28.x vendor crates

Update vendor crate version strings from wgpu-25.0.2/wgpu-core-25.0.2/
wgpu-core-deps-windows-linux-android-25.0.0 to the versions actually
bundled with rio-0.4.5 (wgpu-28.0.0, wgpu-core-28.0.1,
wgpu-core-deps-windows-linux-android-28.0.0).

Also update the sed patterns to match the wgpu-28 source layout:
- vulkan/gles anchor on freebsd (wgpu-28 already added FreeBSD) rather
  than android (wgpu-25)
- gles Emscripten anchor is unchanged
- wgpu-core-deps target cfg includes freebsd in the existing list

Fix a make(1) quoting bug: the AWK pattern used a bare $, which make
expanded as an empty variable; change to 422 so make passes a literal $
to the shell and awk sees the correct end-of-line anchor.

Verified: clean pkgsrc build of rio-0.4.5 completes without errors on
NetBSD-current amd64.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=9ba4e20d259c1fadb929f21a07f6ed640ad08ded

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

diffstat:
 rio/Makefile | 36 ++++++++++++++++++------------------
 1 file changed, 18 insertions(+), 18 deletions(-)

diffs:
diff --git a/rio/Makefile b/rio/Makefile
index 4924339b89..8f21752c1b 100644
--- a/rio/Makefile
+++ b/rio/Makefile
@@ -41,39 +41,39 @@ INSTALLATION_DIRS=	bin \
 
 # Patch vendor crates to enable wgpu GLES backend on NetBSD.
 #
-# wgpu and wgpu-core have explicit platform allowlists (Windows/Linux/Android/Apple)
+# wgpu and wgpu-core have explicit platform allowlists (Windows/Linux/Android/FreeBSD/Apple)
 # for their Vulkan and GLES backends.  Each patched file is followed by a checksum
 # reset ("files":{}) so Cargo skips per-file verification of the modified entries.
 pre-configure:
 	# wgpu/build.rs: add NetBSD to vulkan and gles cfg platform conditions
 	${SED} -i \
-	    -e 's|target_os = "android"), feature = "vulkan")|target_os = "android", target_os = "netbsd"), feature = "vulkan")|' \
-	    -e 's|target_os = "android", Emscripten), feature = "gles")|target_os = "android", Emscripten, target_os = "netbsd"), feature = "gles")|' \
-	    ${WRKDIR}/vendor/wgpu-25.0.2/build.rs
+	    -e 's|target_os = "freebsd"), feature = "vulkan")|target_os = "freebsd", target_os = "netbsd"), feature = "vulkan")|' \
+	    -e 's|Emscripten), feature = "gles")|Emscripten, target_os = "netbsd"), feature = "gles")|' \
+	    ${WRKDIR}/vendor/wgpu-28.0.0/build.rs
 	${SED} -i 's/"files":{[^}]*}/"files":{}/' \
-	    ${WRKDIR}/vendor/wgpu-25.0.2/.cargo-checksum.json
+	    ${WRKDIR}/vendor/wgpu-28.0.0/.cargo-checksum.json
 	# wgpu-core/build.rs: add NetBSD to windows_linux_android alias
 	${SED} -i \
-	    -e 's|target_os = "android") }|target_os = "android", target_os = "netbsd") }|' \
-	    ${WRKDIR}/vendor/wgpu-core-25.0.2/build.rs
+	    -e 's|target_os = "freebsd") }|target_os = "freebsd", target_os = "netbsd") }|' \
+	    ${WRKDIR}/vendor/wgpu-core-28.0.1/build.rs
 	# wgpu-core/Cargo.toml: add NetBSD to target dep + activate wgpu-hal features directly
 	${SED} -i \
-	    -e "s|'cfg(any(windows, target_os = \"linux\", target_os = \"android\"))'\.dependencies\.wgpu-core-deps|'cfg(any(windows, target_os = \"linux\", target_os = \"android\", target_os = \"netbsd\"))'.dependencies.wgpu-core-deps|" \
+	    -e "s|'cfg(any(windows, target_os = \"linux\", target_os = \"android\", target_os = \"freebsd\"))'\.dependencies\.wgpu-core-deps|'cfg(any(windows, target_os = \"linux\", target_os = \"android\", target_os = \"freebsd\", target_os = \"netbsd\"))'.dependencies.wgpu-core-deps|" \
 	    -e 's|vulkan = \["wgpu-core-deps-windows-linux-android/vulkan"\]|vulkan = ["wgpu-core-deps-windows-linux-android/vulkan", "wgpu-hal/vulkan"]|' \
-	    ${WRKDIR}/vendor/wgpu-core-25.0.2/Cargo.toml
-	${AWK} '/"wgpu-core-deps-emscripten\/gles",$/ { print; print "    \"wgpu-hal/gles\","; next } { print }' \
-	    ${WRKDIR}/vendor/wgpu-core-25.0.2/Cargo.toml > \
-	    ${WRKDIR}/vendor/wgpu-core-25.0.2/Cargo.toml.new
-	${MV} ${WRKDIR}/vendor/wgpu-core-25.0.2/Cargo.toml.new \
-	    ${WRKDIR}/vendor/wgpu-core-25.0.2/Cargo.toml
+	    ${WRKDIR}/vendor/wgpu-core-28.0.1/Cargo.toml
+	${AWK} '/"wgpu-core-deps-emscripten\/gles",$$/ { print; print "    \"wgpu-hal/gles\","; next } { print }' \
+	    ${WRKDIR}/vendor/wgpu-core-28.0.1/Cargo.toml > \
+	    ${WRKDIR}/vendor/wgpu-core-28.0.1/Cargo.toml.new
+	${MV} ${WRKDIR}/vendor/wgpu-core-28.0.1/Cargo.toml.new \
+	    ${WRKDIR}/vendor/wgpu-core-28.0.1/Cargo.toml
 	${SED} -i 's/"files":{[^}]*}/"files":{}/' \
-	    ${WRKDIR}/vendor/wgpu-core-25.0.2/.cargo-checksum.json
+	    ${WRKDIR}/vendor/wgpu-core-28.0.1/.cargo-checksum.json
 	# wgpu-core-deps-windows-linux-android/Cargo.toml: unconditional wgpu-hal dependency
 	${SED} -i \
-	    -e "s|\[target\.'cfg(any(windows, target_os = \"linux\", target_os = \"android\"))'\.dependencies\.wgpu-hal\]|[dependencies.wgpu-hal]|" \
-	    ${WRKDIR}/vendor/wgpu-core-deps-windows-linux-android-25.0.0/Cargo.toml
+	    -e "s|\[target\.'cfg(any(windows, target_os = \"linux\", target_os = \"android\", target_os = \"freebsd\"))'\.dependencies\.wgpu-hal\]|[dependencies.wgpu-hal]|" \
+	    ${WRKDIR}/vendor/wgpu-core-deps-windows-linux-android-28.0.0/Cargo.toml
 	${SED} -i 's/"files":{[^}]*}/"files":{}/' \
-	    ${WRKDIR}/vendor/wgpu-core-deps-windows-linux-android-25.0.0/.cargo-checksum.json
+	    ${WRKDIR}/vendor/wgpu-core-deps-windows-linux-android-28.0.0/.cargo-checksum.json
 
 do-install:
 	${INSTALL_PROGRAM} ${WRKSRC}/target/release/rio \


Home | Main Index | Thread Index | Old Index