Dependencies listed in build.zon files could be tarballs
that contain:
- a single directory
- multiple files and directories
- hidden files
This patch takes those into account when moving the extracted
contents into zig-packages.
Differential D54379
[PATCH] Uses/zig.mk: fix zig-package extraction Authored by guest-svmhdvn on Sat, Dec 27, 1:55 PM. Tags None Referenced Files
Details
Dependencies listed in build.zon files could be tarballs
This patch takes those into account when moving the extracted
Diff Detail
Event TimelineComment Actions I also notice that Uses/zig.mk is unmaintained. I have a few other fixes/improvements locally that I'd like to submit soon. I am willing to take over maintainership if necessary (I don't have a ports commit bit yet though). Comment Actions Do you have a concrete example that this patch fixes? What hidden files would need to be considered? Comment Actions I am trying to port https://github.com/neurosnap/zmx with this patch: {F140747876}. It pulls in dependencies that are tarballs reflecting the above examples in the patch description. Trying to build zmx without this patch fails. I'm sure many other zig projects with a decent number of recursive dependencies will have this issue. Comment Actions make -C /home/charlie/src/freebsd-ports/x11/ghostty do-extract EXTRACT_ONLY=breakpad-b99f444ba5f6b98cac261cbb391d8766b34a5918.tar.gz WRKDIR=/home/charlie/src/freebsd-ports/x11/ghostty/work/zig-packages-tmp /bin/mv /home/charlie/src/freebsd-ports/x11/ghostty/work/zig-packages-tmp/* /home/charlie/src/freebsd-ports/x11/ghostty/work/zig-packages/N-V-__8AALw2uwF_03u4JRkZwRLc3Y9hakkYV7NKRR9-RIZJ mv: rename /home/charlie/src/freebsd-ports/x11/ghostty/work/zig-packages-tmp/breakpad-b99f444ba5f6b98cac261cbb391d8766b34a5918 to /home/charlie/src/freebsd-ports/x11/ghostty/work/zig-packages/N-V-__8AALw2uwF_03u4JRkZwRLc3Y9hakkYV7NKRR9-RIZJ: No such file or directory *** Error code 1 Comment Actions @charlesrocket How did you reproduce that error? With your ghostty-1.2.0 patch from https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=287642 on top of this patch, I ran make patch and things ran successfully. I also tested with poudriere testport and things are building fine. I don't think this patch is the cause of that. This fixes the issues listed in https://github.com/kenrap/zig2tuple/issues/1. Comment Actions @guest-svmhdvn that patch is outdated, right now I have this: PORTNAME= ghostty
DISTVERSIONPREFIX= v
DISTVERSION= 1.3.0
CATEGORIES= x11 wayland
DIST_SUBDIR= ${PORTNAME}
MAINTAINER= slowdive@me.com
COMMENT= Fast, native and feature-rich terminal emulator with GPU acceleration
WWW= https://github.com/ghostty-org/ghostty
LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/LICENSE
BUILD_DEPENDS= blueprint-compiler>0:devel/blueprint-compiler \
zig=0.15.2:lang/zig
LIB_DEPENDS= libgtk4-layer-shell.so:x11-toolkits/gtk4-layer-shell \
libonig.so:devel/oniguruma \
libsimdutf.so:converters/simdutf
USES= gettext-runtime gettext-tools gnome pkgconfig zig
USE_GITHUB= yes
GH_ACCOUNT= ghostty-org
GH_TAGNAME= c355a94b123b0da0b66ff9e8af784140b6102400
USE_GNOME= glib20 gtk40 libadwaita libxml2
ZIG_ARGS= -Dapp-runtime=gtk -Dgtk-wayland=true -Dgtk-x11=true \
-fsys=simdutf -fno-sys=spirv-cross
ZIG_TUPLE= breakpad:deps.files.ghostty.org/breakpad-b99f444ba5f6b98cac261cbb391d8766b34a5918.tar.gz:N-V-__8AALw2uwF_03u4JRkZwRLc3Y9hakkYV7NKRR9-RIZJ \
fontconfig:deps.files.ghostty.org/fontconfig-2.14.2.tar.gz:N-V-__8AAIrfdwARSa-zMmxWwFuwpXf1T3asIN7s5jqi9c1v \
freetype:deps.files.ghostty.org/freetype-1220b81f6ecfb3fd222f76cf9106fecfa6554ab07ec7fdc4124b9bb063ae2adf969d.tar.gz:N-V-__8AAKLKpwC4H27Ps_0iL3bPkQb-z6ZVSrB-x_3EEkub \
gettext:deps.files.ghostty.org/gettext-0.24.tar.gz:N-V-__8AADcZkgn4cMhTUpIz6mShCKyqqB-NBtf_S2bHaTC- \
glslang:deps.files.ghostty.org/glslang-12201278a1a05c0ce0b6eb6026c65cd3e9247aa041b1c260324bf29cee559dd23ba1.tar.gz:N-V-__8AABzkUgISeKGgXAzgtutgJsZc0-kkeqBBscJgMkvy \
gobject:deps.files.ghostty.org/gobject-2025-11-08-23-1.tar.zst:gobject-0.3.0-Skun7ANLnwDvEfIpVmohcppXgOvg_I6YOJFmPIsKfXk- \
gtk4_layer_shell:deps.files.ghostty.org/gtk4-layer-shell-1.1.0.tar.gz:N-V-__8AALiNBAA-_0gprYr92CjrMj1I5bqNu0TSJOnjFNSr \
harfbuzz:deps.files.ghostty.org/harfbuzz-11.0.0.tar.xz:N-V-__8AAG02ugUcWec-Ndp-i7JTsJ0dgF8nnJRUInkGLG7G \
highway:deps.files.ghostty.org/highway-66486a10623fa0d72fe91260f96c892e41aceb06.tar.gz:N-V-__8AAGmZhABbsPJLfbqrh6JTHsXhY6qCaLAQyx25e0XE \
imgui:deps.files.ghostty.org/imgui-1220bc6b9daceaf7c8c60f3c3998058045ba0c5c5f48ae255ff97776d9cd8bfc6402.tar.gz:N-V-__8AAH0GaQC8a52s6vfIxg88OZgFgEW6DFxfSK4lX_l3 \
iterm2_themes:deps.files.ghostty.org/ghostty-themes-release-20251201-150531-bfb3ee1.tgz:N-V-__8AANFEAwCzzNzNs3Gaq8pzGNl2BbeyFBwTyO5iZJL- \
jetbrains_mono:deps.files.ghostty.org/JetBrainsMono-2.304.tar.gz:N-V-__8AAIC5lwAVPJJzxnCAahSvZTIlG-HhtOvnM1uh-66x \
libpng:deps.files.ghostty.org/libpng-1220aa013f0c83da3fb64ea6d327f9173fa008d10e28bc9349eac3463457723b1c66.tar.gz:N-V-__8AAJrvXQCqAT8Mg9o_tk6m0yf5Fz-gCNEOKLyTSerD \
libxev:deps.files.ghostty.org/libxev-34fa50878aec6e5fa8f532867001ab3c36fae23e.tar.gz:libxev-0.0.0-86vtc4IcEwCqEYxEYoN_3KXmc6A9VLcm22aVImfvecYs \
libxml2:deps.files.ghostty.org/libxml2-2.11.5.tar.gz:N-V-__8AAG3RoQEyRC2Vw7Qoro5SYBf62IHn3HjqtNVY6aWK \
nerd_fonts_symbols_only:deps.files.ghostty.org/NerdFontsSymbolsOnly-3.4.0.tar.gz:N-V-__8AAMVLTABmYkLqhZPLXnMl-KyN38R8UVYqGrxqO26s \
oniguruma:deps.files.ghostty.org/oniguruma-1220c15e72eadd0d9085a8af134904d9a0f5dfcbed5f606ad60edc60ebeccd9706bb.tar.gz:N-V-__8AAHjwMQDBXnLq3Q2QhaivE0kE2aD138vtX2Bq1g7c \
pixels:deps.files.ghostty.org/pixels-12207ff340169c7d40c570b4b6a97db614fe47e0d83b5801a932dcd44917424c8806.tar.gz:N-V-__8AADYiAAB_80AWnH1AxXC0tql9thT-R-DYO1gBqTLc \
plasma_wayland_protocols:deps.files.ghostty.org/plasma_wayland_protocols-12207e0851c12acdeee0991e893e0132fc87bb763969a585dc16ecca33e88334c566.tar.gz:N-V-__8AAKYZBAB-CFHBKs3u4JkeiT4BMvyHu3Y5aaWF3Bbs \
sentry:deps.files.ghostty.org/sentry-1220446be831adcca918167647c06c7b825849fa3fba5f22da394667974537a9c77e.tar.gz:N-V-__8AAPlZGwBEa-gxrcypGBZ2R8Bse4JYSfo_ul8i2jlG \
spirv_cross:deps.files.ghostty.org/spirv_cross-1220fb3b5586e8be67bc3feb34cbe749cf42a60d628d2953632c2f8141302748c8da.tar.gz:N-V-__8AANb6pwD7O1WG6L5nvD_rNMvnSc9Cpg1ijSlTYywv \
utfcpp:deps.files.ghostty.org/utfcpp-1220d4d18426ca72fc2b7e56ce47273149815501d0d2395c2a98c726b31ba931e641.tar.gz:N-V-__8AAHffAgDU0YQmynL8K35WzkcnMUmBVQHQ0jlcKpjH \
uucode:deps.files.ghostty.org/uucode-31655fba3c638229989cc524363ef5e3c7b580c1.tar.gz:uucode-0.1.0-ZZjBPicPTQDlG6OClzn2bPu7ICkkkyWrTB6aRsBr-A1E \
vaxis:deps.files.ghostty.org/vaxis-7dbb9fd3122e4ffad262dd7c151d80d863b68558.tar.gz:vaxis-0.5.1-BWNV_LosCQAGmCCNOLljCIw6j6-yt53tji6n6rwJ2BhS \
wayland:deps.files.ghostty.org/wayland-9cb3d7aa9dc995ffafdbdef7ab86a949d0fb0e7d.tar.gz:N-V-__8AAKrHGAAs2shYq8UkE6bGcR1QJtLTyOE_lcosMn6t \
wayland_protocols:deps.files.ghostty.org/wayland-protocols-258d8f88f2c8c25a830c6316f87d23ce1a0f12d9.tar.gz:N-V-__8AAKw-DAAaV8bOAAGqA0-oD7o-HNIlPFYKRXSPT03S \
wuffs:deps.files.ghostty.org/wuffs-122037b39d577ec2db3fd7b2130e7b69ef6cc1807d68607a7c232c958315d381b5cd.tar.gz:N-V-__8AAAzZywE3s51XfsLbP9eyEw57ae9swYB9aGB6fCMs \
z2d:deps.files.ghostty.org/z2d-0.9.0-j5P_Hu-WFgA_JEfRpiFss6gdvcvS47cgOc0Via2eKD_T.tar.gz:z2d-0.9.0-j5P_Hu-WFgA_JEfRpiFss6gdvcvS47cgOc0Via2eKD_T \
zf:deps.files.ghostty.org/zf-3c52637b7e937c5ae61fd679717da3e276765b23.tar.gz:zf-0.10.3-OIRy8RuJAACKA3Lohoumrt85nRbHwbpMcUaLES8vxDnh \
zig_js:deps.files.ghostty.org/zig_js-04db83c617da1956ac5adc1cb9ba1e434c1cb6fd.tar.gz:zig_js-0.0.0-rjCAV-6GAADxFug7rDmPH-uM_XcnJ5NmuAMJCAscMjhi \
zig_objc:deps.files.ghostty.org/zig_objc-f356ed02833f0f1b8e84d50bed9e807bf7cdc0ae.tar.gz:zig_objc-0.0.0-Ir_Sp5gTAQCvxxR7oVIrPXxXwsfKgVP7_wqoOQrZjFeK \
zig_wayland:deps.files.ghostty.org/zig_wayland-1b5c038ec10da20ed3a15b0b2a6db1c21383e8ea.tar.gz:wayland-0.5.0-dev-lQa1khrMAQDJDwYFKpdH3HizherB7sHo5dKMECfvxQHe \
zlib:deps.files.ghostty.org/zlib-1220fed0c74e1019b3ee29edae2051788b080cd96e90d56836eea857b0b966742efb.tar.gz:N-V-__8AAB0eQwD-0MdOEBmz7intriBReIsIDNlukNVoNu6o
OPTIONS_DEFINE= DOCS
DOCS_BUILD_DEPENDS= pandoc:textproc/hs-pandoc
DOCS_ZIG_BOOL= emit-docs
.include <bsd.port.mk>(After applying your changes to Mk) I just do make since we don't patch anything in this port (I push directly to the upstream instead). Comment Actions @guest-svmhdvn oh wait looks like I missed the line porting your patch. Now I am getting this: /home/charlie/src/freebsd-ports/x11/ghostty/work/zig-packages/vaxis-0.5.1-BWNV_LosCQAGmCCNOLljCIw6j6-yt53tji6n6rwJ2BhS/build.zig.zon:10:14: error: package not found at '/home/charlie/src/freebsd-ports/x11/ghostty/work/zig-packages/zigimg-0.1.0-8_eo2vHnEwCIVW34Q14Ec-xUlzIoVg86-7FU2ypPtxms'
.hash = "zigimg-0.1.0-8_eo2vHnEwCIVW34Q14Ec-xUlzIoVg86-7FU2ypPtxms",
^~~~
/home/charlie/src/freebsd-ports/x11/ghostty/work/zig-packages/vaxis-0.5.1-BWNV_LosCQAGmCCNOLljCIw6j6-yt53tji6n6rwJ2BhS/build.zig.zon:14:14: error: package not found at '/home/charlie/src/freebsd-ports/x11/ghostty/work/zig-packages/uucode-0.1.0-ZZjBPj96QADXyt5sqwBJUnhaDYs_qBeeKijZvlRa0eqM'
.hash = "uucode-0.1.0-ZZjBPj96QADXyt5sqwBJUnhaDYs_qBeeKijZvlRa0eqM",Not sure if this is zig2tuple or something else, checking. Comment Actions The latest version of zig2tuple needs to be merged in the ports tree in order to pick up the missing dependencies that @guest-charlesrocket needed to build ghostty: https://github.com/freebsd/freebsd-ports/pull/469 Comment Actions ... well actually, perhaps @arrowd should take this one as he also has 287642 assigned. Comment Actions I have fixed this issue in c35f76fc2d0b8a7547c94fcf12693d66eb1a3b26. Thanks Siva for bringing this up. |