Page MenuHomeFreeBSD

x11/ghostty: Update 1.2.0 => 1.2.3, unmark BROKEN
Needs ReviewPublic

Authored by nxjoseph on Mon, Mar 9, 8:27 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Mar 11, 10:26 AM
Unknown Object (File)
Wed, Mar 11, 10:18 AM
Unknown Object (File)
Wed, Mar 11, 8:37 AM
Unknown Object (File)
Wed, Mar 11, 7:55 AM
Unknown Object (File)
Wed, Mar 11, 5:24 AM
Unknown Object (File)
Wed, Mar 11, 4:52 AM
Unknown Object (File)
Wed, Mar 11, 4:19 AM
Subscribers

Details

Reviewers
diizzy
osa
vvd
Summary

Hi,

I have tried to update x11/ghostty to latest stable release and unmarked recently-added BROKEN by diizzy@.

It seems it was failing to build due to library search - it looks for libbzip2.so which on our side we have libbz2.so instead.

Currently I have not tried the DOCS option, since it needs pandoc (requires lang/ghc) which I need to take time and build, but I am going to try and let you know about it.

Thank you in advance.

Diff Detail

Repository
R11 FreeBSD ports repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

nxjoseph created this revision.

I have added a post-patch target to change where ghostty installs ($PREFIX/share/ghostty/doc) their documentation to the default $DOCSDIR value.

I have tested it in poudriere with both DOCS=on and off.

Also one thing I'd like to note, there is a warning from lld that says:

ct-0.3.0-Skun7ET3nQAc0LzvO0NAvTiGGnmkF36cnmbeCAF6MB7Z/src/gdkpixbuf2/gdkpixbuf2.zig -OReleaseFast --dep gbp -MGraphemeData=/wrkdirs/usr/ports/x11/ghostty/work/zig-packages/zg-0.13.4-AAAAAGiZ7QLz4pvECFa_wG4O4TP4FLABHHbemH2KakWM/src/GraphemeData.zig -OReleaseFast -Mascii=/wrkdirs/usr/ports/x11/ghostty/work/zig-packages/zg-0.13.4-AAAAAGiZ7QLz4pvECFa_wG4O4TP4FLABHHbemH2KakWM/src/ascii.zig -OReleaseFast --dep dwp --dep GraphemeData -MDisplayWidthData=/wrkdirs/usr/ports/x11/ghostty/work/zig-packages/zg-0.13.4-AAAAAGiZ7QLz4pvECFa_wG4O4TP4FLABHHbemH2KakWM/src/WidthData.zig -Mgbp=/wrkdirs/usr/ports/x11/ghostty/work/ghostty-1.2.3/.zig-cache/o/147457d07c5b04b1ef1ab0d4b51f7e1c/gbp.bin.z -Mdwp=/wrkdirs/usr/ports/x11/ghostty/work/ghostty-1.2.3/.zig-cache/o/e84352f839e4f96c9e0feac5c0d05d86/dwp.bin.z -I/usr/local/include/freetype2 -I/usr/local/include/libpng16 -I/usr/local/include -lc++ -lc --cache-dir /wrkdirs/usr/ports/x11/ghostty/work/ghostty-1.2.3/.zig-cache --global-cache-dir /wrkdirs/usr/ports/x11/ghostty/work/.cache/zig --name ghostty --zig-lib-dir /usr/local/lib/zig/ -fPIE --listen=-
install
└─ install ghostty
   └─ zig build-exe ghostty ReleaseSmall native-native failure
error: warning(link): unexpected LLD stderr:
ld.lld: warning: /wrkdirs/usr/ports/x11/ghostty/work/ghostty-1.2.3/.zig-cache/o/e85944919bd1b779ba3874b7d2fc2b04/libcimgui.a: archive member '/usr/local/lib/libfreetype.so' is neither ET_REL nor LLVM bitcode


====> Compressing man pages (compress-man)
yusuf@143amd64-default:/usr/ports/x11/ghostty $

I don't know if it's an important thing but the port seems to function fine so that running make again won't rebuild it.

Thank you.

In D55762#1275805, @vvd wrote:

Okay, Thanks. I have checked, now I have made these changes below.

diff --git a/x11/ghostty/Makefile b/x11/ghostty/Makefile
index d47c486b3a91..00027f521623 100644
--- a/x11/ghostty/Makefile
+++ b/x11/ghostty/Makefile
@@ -14,7 +14,9 @@ LICENSE_FILE= ${WRKSRC}/LICENSE
 BUILD_DEPENDS= blueprint-compiler>0:devel/blueprint-compiler
 LIB_DEPENDS=   libgtk4-layer-shell.so:x11-toolkits/gtk4-layer-shell \
                libonig.so:devel/oniguruma \
-               libsimdutf.so:converters/simdutf
+               libsimdutf.so:converters/simdutf \
+               libspirv-cross-c-shared.so:graphics/spirv-cross \
+               libfreetype.so:print/freetype2

 USES=          gettext-runtime gettext-tools gnome pkgconfig zig:014
 USE_GITHUB=    yes
@@ -23,11 +25,9 @@ GH_ACCOUNT=  ghostty-org
 USE_GNOME=     glib20 gtk40 libadwaita libxml2

 ZIG_ARGS=      -Dapp-runtime=gtk -Dgtk-wayland=true -Dgtk-x11=true \
-               -fsys=simdutf -fno-sys=spirv-cross
+               -fsys=simdutf -fsys=spirv-cross -fsys=freetype

-# Try to use system bzip2 (libbz2.so) instead of port archivers/bzip2
-CFLAGS+=       -I/usr/include
-LDFLAGS+=      -L/usr/lib
+LDFLAGS+=      -lbz2

 OPTIONS_DEFINE=        DOCS
 OPTIONS_SUB=   yes
diff --git a/x11/ghostty/files/patch-src_build_SharedDeps.zig b/x11/ghostty/files/patch-src_build_SharedDeps.zig
index fcfabeae669c..67fc8362a024 100644
--- a/x11/ghostty/files/patch-src_build_SharedDeps.zig
+++ b/x11/ghostty/files/patch-src_build_SharedDeps.zig
@@ -1,6 +1,6 @@
 The library name is different in our side so change like this -> libbz2.so.

---- src/build/SharedDeps.zig.orig      2026-03-09 07:19:09 UTC
+--- src/build/SharedDeps.zig.orig      2025-10-23 17:14:48 UTC
 +++ src/build/SharedDeps.zig
 @@ -121,7 +121,7 @@ pub fn add(
              );
@@ -11,3 +11,14 @@ The library name is different in our side so change like this -> libbz2.so.
                  step.linkSystemLibrary2("freetype2", dynamic_link_opts);
              } else {
                  step.linkLibrary(freetype_dep.artifact("freetype"));
+@@ -256,8 +256,8 @@ pub fn add(
+             "spirv_cross",
+             spirv_cross_dep.module("spirv_cross"),
+         );
+-        if (b.systemIntegrationOption("spirv-cross", .{})) {
+-            step.linkSystemLibrary2("spirv-cross", dynamic_link_opts);
++        if (b.systemIntegrationOption("spirv-cross-c-shared", .{})) {
++            step.linkSystemLibrary2("spirv-cross-c-shared", dynamic_link_opts);
+         } else {
+             step.linkLibrary(spirv_cross_dep.artifact("spirv_cross"));
+             try static_libs.append(