#!/bin/bash # Build script for bzip2 set -e cd "$SRCDIR" # Build bzip2 (uses simple Makefile, not autotools) gmake -j${JOBS:-1} CC=gcc # Install gmake install PREFIX="$PKGDIR$PREFIX" # Also install shared library gmake -f Makefile-libbz2_so clean gmake -f Makefile-libbz2_so CC=gcc cp -a libbz2.so* "$PKGDIR$PREFIX/lib/" # bzip2 - High-quality data compressor # https://sourceware.org/bzip2/ [package] name = "bzip2" version = "1.0.8" release = 1 description = "High-quality data compressor" url = "https://sourceware.org/bzip2/" license = "BSD-4-Clause" maintainer = "Chris Tusa " arch = "x86_64" [dependencies] runtime = [] build = [] [[source]] file = "bzip2-1.0.8.tar.gz" urls = ["https://sourceware.org/pub/bzip2/bzip2-1.0.8.tar.gz"] checksum = "ab5a03176ee106d3f0fa90e381da478ddae405918153cca248e682cd0c4a2269" [build] parallel = true #!/bin/sh # Build script for cairo (Meson, Template B). # Deps: pixman, freetype, fontconfig, libpng, libX11, libXext, libXrender # (all ported, M2/M3a), glib2 (this task, above). set -e cd "$SRCDIR" export PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig:$PREFIX/share/pkgconfig:/usr/lib/pkgconfig:$PKG_CONFIG_PATH" # GOTCHA (Task 6, same class as glib2): illumos's gates the # POSIX 2-arg ctime_r()/asctime_r() prototypes behind # _POSIX_C_SOURCE>=199506L || _POSIX_PTHREAD_SEMANTICS, same as # getpwnam_r/getpwuid_r in . Without it, cairo-ps-surface.c's # 3-arg ctime_r() call ("too few arguments") fails against the POSIX # 2-arg prototype that __EXTENSIONS__ alone leaves selected. export CFLAGS="${CFLAGS} -D__EXTENSIONS__ -D_POSIX_PTHREAD_SEMANTICS" export LDFLAGS="${LDFLAGS} -Wl,-R,$PREFIX/lib" meson setup build \ --prefix="$PREFIX" \ --libdir=lib \ --buildtype=release \ -Ddefault_library=shared \ -Dxlib=enabled \ -Dxcb=enabled \ -Dtests=disabled \ -Dglib=enabled \ -Dfreetype=enabled \ -Dfontconfig=enabled \ -Dpng=enabled ninja -C build -j${JOBS:-1} DESTDIR="$PKGDIR" ninja -C build install # cairo - 2D graphics library (pango / Openbox render dep) # https://www.cairographics.org/releases/ [package] name = "cairo" version = "1.18.4" release = 1 description = "2D graphics library" url = "https://www.cairographics.org/" license = "LGPL-2.1-or-later OR MPL-1.1" maintainer = "Chris Tusa " arch = "x86_64" [dependencies] runtime = ["pixman", "freetype", "fontconfig", "libpng", "libX11", "libXext", "libXrender", "glib2"] build = ["pixman", "freetype", "fontconfig", "libpng", "libX11", "libXext", "libXrender", "glib2"] [[source]] file = "cairo-1.18.4.tar.xz" urls = ["https://www.cairographics.org/releases/cairo-1.18.4.tar.xz"] checksum = "445ed8208a6e4823de1226a74ca319d3600e83f6369f99b14265006599c32ccb" [build] parallel = true #!/bin/sh # Build script for conky (CMake, Ninja generator). RISKY per task brief: # conky's native stats backend is Linux/BSD/Solaris-specific and illumos is # not an upstream-supported OS name (it only recognizes "SunOS"). # # GOOD NEWS: conky already ships a real Solaris/illumos kstat-based stats # backend (src/data/os/solaris.cc, gated on OS_SOLARIS, which is set from # `CMAKE_SYSTEM_NAME MATCHES "SunOS"`). Hammerhead's uname -s is # "Hammerhead", not "SunOS", so that gate never fires and CMake instead # hits ConkyPlatformChecks.cmake's final `if(NOT OS_LINUX AND NOT ...) # message(FATAL_ERROR "platform not supported")`. Patch the OS_SOLARIS # gate to also match "Hammerhead" (see patches/001-illumos-os-detect.patch # for the readable diff) so the REAL native kstat backend builds - the # M3 config's ${exec}-based widgets don't strictly need this, but it's a # strictly better outcome than a stub, and Hammerhead does ship libkstat. set -e cd "$SRCDIR" sed -i \ -e 's/if(CMAKE_SYSTEM_NAME MATCHES "SunOS")/if(CMAKE_SYSTEM_NAME MATCHES "SunOS" OR CMAKE_SYSTEM_NAME MATCHES "Hammerhead")/' \ -e 's/else(CMAKE_SYSTEM_NAME MATCHES "SunOS")/else(CMAKE_SYSTEM_NAME MATCHES "SunOS" OR CMAKE_SYSTEM_NAME MATCHES "Hammerhead")/' \ -e 's/endif(CMAKE_SYSTEM_NAME MATCHES "SunOS")/endif(CMAKE_SYSTEM_NAME MATCHES "SunOS" OR CMAKE_SYSTEM_NAME MATCHES "Hammerhead")/' \ cmake/ConkyPlatformChecks.cmake # solaris.cc is missing get_battery_power_draw() - every OTHER platform # backend (linux.cc, freebsd.cc, netbsd.cc, haiku.cc, darwin.mm) implements # it, but upstream conky's Solaris/illumos backend never got battery-draw # support (real Solaris/illumos servers rarely have batteries). common.cc # calls it unconditionally regardless of platform -> link failure # ("undefined reference to get_battery_power_draw"). Add the same # "not implemented" stub every other unsupported-metric function in this # file already uses (get_battery_short_status, get_acpi_fan, ...). cat >> src/data/os/solaris.cc <<'EOF' void get_battery_power_draw(char *buffer, unsigned int n, const char *bat) { /* Not implemented - illumos/Solaris kstat has no standard battery * power-draw metric; real servers rarely have batteries. */ (void)bat; if (buffer && n > 0) memset(buffer, 0, n); } EOF # Same Platform-module gotcha as base/tint2 and base/libjpeg-turbo: CMake # has no Platform/Hammerhead.cmake, so map it onto the (real) SunOS module # for shared-lib/UNIX conventions. mkdir -p "$SRCDIR/.cmake/Platform" echo 'include(Platform/SunOS)' > "$SRCDIR/.cmake/Platform/Hammerhead.cmake" export PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig:$PREFIX/share/pkgconfig:/usr/lib/pkgconfig:$PKG_CONFIG_PATH" # -DRELEASE=ON: cmake/Conky.cmake only shells out to `git rev-parse` (for a # -pre- dev version string) when RELEASE is unset; the tarball has no # .git and Hammerhead has no git binary yet, so this is a hard # `message(FATAL_ERROR "Unable to find program 'git'")` without it. cmake -B build -G Ninja \ -DCMAKE_MODULE_PATH="$SRCDIR/.cmake" \ -DCMAKE_PREFIX_PATH="$PREFIX" \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX="$PREFIX" \ -DCMAKE_INSTALL_RPATH="$PREFIX/lib" \ -DCMAKE_C_FLAGS="-D__EXTENSIONS__ -D_POSIX_PTHREAD_SEMANTICS -fpermissive -fcommon" \ -DCMAKE_CXX_FLAGS="-D__EXTENSIONS__ -D_POSIX_PTHREAD_SEMANTICS" \ -DBUILD_TESTING=OFF \ -DBUILD_X11=ON \ -DBUILD_LUA_CAIRO=ON \ -DBUILD_WLAN=OFF \ -DBUILD_CURL=OFF \ -DBUILD_IRC=OFF \ -DBUILD_HTTP=OFF \ -DBUILD_ICAL=OFF \ -DBUILD_NCURSES=OFF \ -DBUILD_DOCS=OFF \ -DBUILD_I18N=OFF \ -DRELEASE=ON ninja -C build -j${JOBS:-1} DESTDIR="$PKGDIR" ninja -C build install # conky - lightweight system monitor for X (via ${exec} calls to illumos # tools in the M3 config; conky's own native Solaris/kstat backend is also # enabled here since illumos already carries one - see build.sh) # https://github.com/brndnmtthws/conky [package] name = "conky" version = "1.24.2" release = 1 description = "Lightweight system monitor for X11" url = "https://github.com/brndnmtthws/conky" license = "GPL-3.0-or-later" maintainer = "Chris Tusa " arch = "x86_64" [dependencies] runtime = ["libX11", "libXext", "libXdamage", "libXinerama", "libXft", "cairo", "lua"] build = ["libX11", "libXext", "libXdamage", "libXinerama", "libXft", "cairo", "lua"] [[source]] file = "conky-1.24.2.tar.gz" urls = ["https://github.com/brndnmtthws/conky/archive/refs/tags/v1.24.2.tar.gz"] checksum = "1366b6efcee2cd2c56e5d3430c9d8a1f16d6fef76c5560ff1d8f3fc59dd23959" [build] parallel = true --- a/cmake/ConkyPlatformChecks.cmake +++ b/cmake/ConkyPlatformChecks.cmake @@ -if(CMAKE_SYSTEM_NAME MATCHES "SunOS") +if(CMAKE_SYSTEM_NAME MATCHES "SunOS" OR CMAKE_SYSTEM_NAME MATCHES "Hammerhead") set(OS_SOLARIS true) set(conky_libs ${conky_libs} -lkstat) -else(CMAKE_SYSTEM_NAME MATCHES "SunOS") +else(CMAKE_SYSTEM_NAME MATCHES "SunOS" OR CMAKE_SYSTEM_NAME MATCHES "Hammerhead") set(OS_SOLARIS false) -endif(CMAKE_SYSTEM_NAME MATCHES "SunOS") +endif(CMAKE_SYSTEM_NAME MATCHES "SunOS" OR CMAKE_SYSTEM_NAME MATCHES "Hammerhead") #!/bin/bash # Build script for Coral package manager # # Builds coral from source tarball using Reef compiler set -e # Find source directory — SRCDIR from coral, or auto-detect if [ -z "$SRCDIR" ] || [ ! -d "$SRCDIR" ]; then WORKDIR="${SRCDIR:-$(pwd)}" SRCDIR="$(cd "$WORKDIR" && ls -d */ 2>/dev/null | head -1)" SRCDIR="${WORKDIR}/${SRCDIR%/}" fi cd "$SRCDIR" # Set up Reef environment (bootstrap installs to /usr) export PATH="/usr/bin:$PATH" export LIBRARY_PATH="/usr/lib/reef/runtime/lib:/usr/lib:${LIBRARY_PATH:-}" # Build with illumos socket libraries explicitly echo "Building Coral..." reefc build -l socket -l nsl # Find the built binary (named after directory) BINARY=$(ls build/coral* 2>/dev/null | head -1) if [ -z "$BINARY" ]; then echo "Error: No binary found in build/" exit 1 fi echo "Built binary: $BINARY" # Install mkdir -p "$PKGDIR$PREFIX/bin" cp "$BINARY" "$PKGDIR$PREFIX/bin/coral" chmod +x "$PKGDIR$PREFIX/bin/coral" # Create initial config directory structure mkdir -p "$PKGDIR$SYSCONFDIR/coral" mkdir -p "$PKGDIR/var/lib/coral/installed" mkdir -p "$PKGDIR/var/lib/coral/packages" mkdir -p "$PKGDIR/var/lib/coral/sources" mkdir -p "$PKGDIR/var/lib/coral/trusted-keys" mkdir -p "$PKGDIR/var/tmp/coral/work" mkdir -p "$PKGDIR/var/tmp/coral/pkg" # Coral - Package manager for Zygaena # https://git.sharkos.one/zygaena/coral [package] name = "coral" version = "0.4.5" release = 1 description = "Package manager for Zygaena, written in Reef" url = "https://git.sharkos.one/zygaena/coral" license = "BSD-2-Clause" maintainer = "Chris Tusa " arch = "x86_64" [dependencies] runtime = ["reef"] build = ["reef"] [[source]] file = "coral-0.4.5-source.tar.xz" urls = ["coral-0.4.5-source.tar.xz"] checksum = "ea8ad5f63cbc80f939593a661aa4a9bc592f024077feb64e91a85b4cc3f1d6f1" extract = true [build] parallel = false #!/bin/bash # Build script for curl # Command line tool for transferring data with URLs set -e cd "$SRCDIR" # Ensure runtime linker can find our libraries export LD_LIBRARY_PATH="/usr/lib:$LD_LIBRARY_PATH" # Configure curl with LibreSSL ./configure \ --build=$BUILD_TRIPLE \ --host=$BUILD_TRIPLE \ --prefix=$PREFIX \ --with-ssl=/usr \ --with-zlib=/usr \ --enable-ipv6 \ --enable-unix-sockets \ --disable-ldap \ --disable-ldaps \ --without-brotli \ --without-zstd \ --without-libidn2 \ --without-libpsl \ --without-nghttp2 \ --without-nghttp3 \ --without-ngtcp2 \ --without-librtmp \ --without-libssh2 gmake -j${JOBS:-1} gmake install DESTDIR="$PKGDIR" # curl - Command line tool for transferring data with URLs # https://curl.se/ [package] name = "curl" version = "8.18.0" release = 1 description = "Command line tool and library for transferring data with URLs" url = "https://curl.se/" license = "MIT" maintainer = "Chris Tusa " arch = "x86_64" [dependencies] runtime = ["zlib"] build = ["zlib"] [[source]] file = "curl-8.18.0.tar.xz" urls = ["https://curl.se/download/curl-8.18.0.tar.xz"] checksum = "40df79166e74aa20149365e11ee4c798a46ad57c34e4f68fd13100e2c9a91946" [build] parallel = true jobs = 0 #!/bin/sh # Build script for dejavu-fonts (data-only, no compile). Pre-built TTF # distribution - just install the .ttf files; fc-cache picks them up. set -e cd "$SRCDIR" mkdir -p "$PKGDIR$PREFIX/share/fonts/dejavu" find . -name '*.ttf' -exec cp {} "$PKGDIR$PREFIX/share/fonts/dejavu/" \; # dejavu-fonts - DejaVu TrueType font family (pre-built .ttf distribution, # no compile step). https://dejavu-fonts.github.io/ [package] name = "dejavu-fonts" version = "2.37" release = 1 description = "DejaVu TrueType font family" url = "https://dejavu-fonts.github.io/" license = "Bitstream-Vera AND Public-Domain" maintainer = "Chris Tusa " arch = "x86_64" [dependencies] runtime = ["fontconfig"] build = [] [[source]] file = "dejavu-fonts-ttf-2.37.zip" urls = ["https://downloads.sourceforge.net/project/dejavu/dejavu/2.37/dejavu-fonts-ttf-2.37.zip"] checksum = "7576310b219e04159d35ff61dd4a4ec4cdba4f35c00e002a136f00e96a908b0a" [build] parallel = false #!/bin/sh # Build script for dmenu (suckless, plain Makefile - NOT a template build). # Deps: libX11, libXft, libXinerama, fontconfig (all ported). # # Same class of fix as base/st: dmenu's shipped config.mk hardcodes # X11INC/X11LIB to /usr/X11R6 (doesn't exist on Hammerhead) and links # -lX11/-lXinerama/-lfontconfig/-lXft directly instead of going through # pkg-config. Rewrite config.mk to resolve everything via pkg-config # against $PREFIX. set -e cd "$SRCDIR" export PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig:$PREFIX/share/pkgconfig:/usr/lib/pkgconfig:$PKG_CONFIG_PATH" # NOTE: dmenu 5.4's config.mk (unlike st's) has no PKG_CONFIG variable at # all - use the literal `pkg-config` binary name directly rather than a # $(PKG_CONFIG) make-variable reference that would expand to nothing. sed -i \ -e "s#^PREFIX = .*#PREFIX = $PREFIX#" \ -e '/^X11INC/d' -e '/^X11LIB/d' \ -e '/^XINERAMALIBS/d' -e '/^FREETYPELIBS/d' -e '/^FREETYPEINC/d' \ -e 's#^INCS = .*#INCS = `pkg-config --cflags x11 xft xinerama fontconfig`#' \ -e 's#^LIBS = .*#LIBS = `pkg-config --libs x11 xft xinerama fontconfig`#' \ config.mk # __EXTENSIONS__: hidden POSIX/SysV prototypes on illumos headers - same # gotcha as every other X11 port here. Add rpath since /usr/local/lib is # not on Hammerhead's default ld.so search path. sed -i \ -e 's#^CFLAGS = .*#CFLAGS = -std=c99 -pedantic -Wall -Os $(INCS) $(CPPFLAGS) -D__EXTENSIONS__#' \ -e "s#^LDFLAGS = .*#LDFLAGS = \$(LIBS) -Wl,-R,$PREFIX/lib#" \ config.mk gmake CC=gcc PREFIX="$PREFIX" mkdir -p "$PKGDIR$PREFIX/bin" gmake PREFIX="$PREFIX" DESTDIR="$PKGDIR" install # dmenu - dynamic menu (suckless) # https://tools.suckless.org/dmenu/ [package] name = "dmenu" version = "5.4" release = 1 description = "Dynamic menu for X, driven by dmenu_run/openbox" url = "https://tools.suckless.org/dmenu/" license = "MIT" maintainer = "Chris Tusa " arch = "x86_64" [dependencies] runtime = ["libX11", "libXft", "libXinerama", "fontconfig"] build = ["libX11", "libXft", "libXinerama", "fontconfig"] [[source]] file = "dmenu-5.4.tar.gz" urls = ["https://dl.suckless.org/tools/dmenu-5.4.tar.gz"] checksum = "8fbace2a0847aa80fe861066b118252dcc7b4ca0a0a8f3a93af02da8fb6cd453" [build] parallel = true #!/bin/sh # Build script for feh (plain Makefile - no configure, no pkg-config use). # Deps: imlib2, libX11, libXinerama, libpng - all under $PREFIX. # feh's config.mk hardcodes LDLIBS (-lm -lpng -lX11 -lImlib2) with no -I/-L # of its own, relying on the compiler's default search paths - which does # NOT include $PREFIX/include or $PREFIX/lib on Hammerhead. Supply those # via CFLAGS/LDFLAGS in the environment (config.mk's CFLAGS uses `?=`/`+=` # so an exported CFLAGS is picked up as the base and appended to). # curl=0 exif=0 per the task brief (no libcurl/libexif ports); xinerama=1 # (libXinerama is ported). # # verscmp=0: feh defaults verscmp=1 (assumes glibc's GNU strverscmp()), # but illumos libc has no strverscmp() at all (not even hidden behind # __EXTENSIONS__ - it's a pure GNU extension). With verscmp=0 feh's own # Makefile pulls in its bundled strverscmp.c fallback implementation # instead, avoiding the "implicit declaration of function 'strverscmp'" # build failure. set -e cd "$SRCDIR" export CFLAGS="-I$PREFIX/include -D__EXTENSIONS__ -D_POSIX_PTHREAD_SEMANTICS" export LDFLAGS="-L$PREFIX/lib -R$PREFIX/lib" gmake CC=gcc PREFIX="$PREFIX" curl=0 exif=0 xinerama=1 verscmp=0 gmake PREFIX="$PREFIX" DESTDIR="$PKGDIR" curl=0 exif=0 xinerama=1 verscmp=0 install # feh - fast, lightweight image viewer (also used for wallpaper-setting) # https://feh.finalrewind.org/ [package] name = "feh" version = "3.12.2" release = 1 description = "Fast, lightweight X11 image viewer" url = "https://feh.finalrewind.org/" license = "MIT" maintainer = "Chris Tusa " arch = "x86_64" [dependencies] runtime = ["imlib2", "libX11", "libXinerama", "libpng"] build = ["imlib2", "libX11", "libXinerama", "libpng"] [[source]] file = "feh-3.12.2.tar.bz2" urls = ["https://feh.finalrewind.org/feh-3.12.2.tar.bz2"] checksum = "7ce358b18a7f37bcc97a09b4efd89fdadd54cd8e7032db345f61e66dd04b1c3f" [build] parallel = true #!/bin/sh # Build script for font-util (autotools). No shared library output (build # helpers + font metadata only) - confirmed zero libtool references in the # release configure, so the Template A libtool hammerhead* sed does not # apply here. set -e cd "$SRCDIR" export PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig:$PREFIX/share/pkgconfig:$PKG_CONFIG_PATH" export CFLAGS="${CFLAGS} -D__EXTENSIONS__" ./configure \ --prefix="$PREFIX" \ --build="$BUILD_TRIPLE" \ --host="$BUILD_TRIPLE" \ --sysconfdir="$SYSCONFDIR" gmake -j${JOBS:-1} gmake install DESTDIR="$PKGDIR" # font-util - X font build helpers + encodings.dir/fonts.alias generation # https://gitlab.freedesktop.org/xorg/font/util # Direct xlibre-server DEPEND (media-fonts/font-util). [package] name = "font-util" version = "1.4.2" release = 1 description = "X.Org font build helpers and encodings" url = "https://xorg.freedesktop.org/releases/individual/font/" license = "MIT" maintainer = "Chris Tusa " arch = "x86_64" [dependencies] runtime = [] build = ["util-macros"] [[source]] file = "font-util-1.4.2.tar.xz" urls = ["https://xorg.freedesktop.org/releases/individual/font/font-util-1.4.2.tar.xz"] checksum = "02e4f8afdcf03cc8372ca9c37aa104b1e36b47722dbc79531be08f0a4c622999" [build] parallel = true #!/bin/sh # Build script for fontconfig (Meson, Template B). # Uses libxml2 as the XML backend (PRESENT in base, /usr/lib) rather than # expat, per the manifest's dependency line. gperf (devel/gperf) must be # built/installed first - fontconfig's build uses it to generate perfect # hash tables. set -e cd "$SRCDIR" export PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig:$PREFIX/share/pkgconfig:/usr/lib/pkgconfig:$PKG_CONFIG_PATH" export CFLAGS="${CFLAGS} -D__EXTENSIONS__" # GOTCHA (Task 5): Meson does not set an rpath on the fc-cache/fc-list/ # fc-match consumer binaries by default, and /usr/local/lib is NOT on # Hammerhead's default runtime ld.so search path (only /lib:/usr/lib - # confirmed via `crle`). Without this, every installed binary fails at # runtime with "libfontconfig.so.1: open failed". Force -R via LDFLAGS so # meson's link step picks it up for all targets (libs + executables). export LDFLAGS="${LDFLAGS} -Wl,-R,$PREFIX/lib" meson setup build \ --prefix="$PREFIX" \ --libdir=lib \ --sysconfdir="$SYSCONFDIR" \ --buildtype=release \ -Ddefault_library=shared \ -Ddoc=disabled \ -Dtests=disabled \ -Dnls=disabled \ -Dxml-backend=libxml2 ninja -C build -j${JOBS:-1} DESTDIR="$PKGDIR" ninja -C build install # fontconfig - font discovery and matching # https://www.freedesktop.org/wiki/Software/fontconfig/ [package] name = "fontconfig" version = "2.16.0" release = 1 description = "Font discovery and configuration library" url = "https://www.freedesktop.org/wiki/Software/fontconfig/" license = "MIT" maintainer = "Chris Tusa " arch = "x86_64" [dependencies] runtime = ["freetype"] build = ["freetype", "gperf"] [[source]] file = "fontconfig-2.16.0.tar.xz" urls = ["https://www.freedesktop.org/software/fontconfig/release/fontconfig-2.16.0.tar.xz"] checksum = "6a33dc555cc9ba8b10caf7695878ef134eeb36d0af366041f639b1da9b6ed220" [build] parallel = true #!/bin/sh # Build script for fox-toolkit / FOX 1.6.59 (autotools, Template A + C++). # Older C++ codebase (pre-C++11 idioms) - watch illumos __EXTENSIONS__ / # socket-header issues same as any client-stack C port, but this time also # apply the flags to CXXFLAGS since FOX is a C++ library. set -e cd "$SRCDIR" # MANDATORY libtool fix - see Template A. if [ -f configure ]; then sed -i -E 's/(kopensolaris\*-gnu)([^)]*\))/\1 | hammerhead*\2/' configure fi # GOTCHA #1: FOX's configure.ac does `CXXFLAGS=""` unconditionally near the # top and rebuilds it from scratch with its own hardcoded flag set - any # CXXFLAGS/CFLAGS we export before running configure is silently discarded # (confirmed by inspecting configure.ac: "CXXFLAGS=\"\"" then a chain of # CXXFLAGS="${CXXFLAGS} ..." appends, never re-adding a user value). # GOTCHA #2: within that rebuild, `XFTCFLAGS="-I/usr/include/freetype2"` is # hardcoded (no pkg-config/freetype-config probe), so is never # found under our $PREFIX=/usr/local. # WORKAROUND: src/Makefile.am declares `CXXFLAGS = @CXXFLAGS@ @X_CFLAGS@` # with no explicit CPPFLAGS reference, but automake's generated compile # rule ALWAYS appends $(CPPFLAGS) regardless (it's a standard AC_SUBST'd # variable automake wires in implicitly) - and configure.ac never touches # CPPFLAGS at all. So route our include path through CPPFLAGS instead of # CXXFLAGS/CFLAGS - it survives the configure.ac reset untouched. # GOTCHA #3: FOX's include/xincs.h has a ready-made # `#ifdef HAVE_SYS_FILIO_H #include #endif` (for FIONREAD on # Solaris/illumos) but configure.ac never actually probes for # sys/filio.h/AC_DEFINE's HAVE_SYS_FILIO_H - it's a dead branch upstream. # illumos DOES have (confirmed present on Hammerhead) so just # define the macro ourselves; FXGUISignal.cpp otherwise fails with # "'FIONREAD' was not declared in this scope". export PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig:$PREFIX/share/pkgconfig:/usr/lib/pkgconfig:$PKG_CONFIG_PATH" export CPPFLAGS="${CPPFLAGS} -I$PREFIX/include -I$PREFIX/include/freetype2 -D__EXTENSIONS__ -D_POSIX_PTHREAD_SEMANTICS -DHAVE_SYS_FILIO_H" export LDFLAGS="${LDFLAGS} -L$PREFIX/lib -R$PREFIX/lib" # No GL in this build (kernel has no DRM/KMS/GPU accel - see graphics # capability baseline memory); tiff not ported, so disabled explicitly. ./configure \ --prefix="$PREFIX" \ --build="$BUILD_TRIPLE" \ --host="$BUILD_TRIPLE" \ --sysconfdir="$SYSCONFDIR" \ --disable-static \ --with-opengl=no \ --with-xft=yes \ --with-xrandr=yes \ --with-xcursor=yes \ --with-xrender=yes \ --with-xfixes=yes \ --with-xshm=yes \ --disable-tiff gmake -j${JOBS:-1} gmake install DESTDIR="$PKGDIR" # fox-toolkit (FOX) - C++ GUI toolkit, backs the Xfe file manager # https://fox-toolkit.org/ [package] name = "fox-toolkit" version = "1.6.59" release = 1 description = "FOX C++ GUI toolkit" url = "https://fox-toolkit.org/" license = "LGPL-2.1-or-later" maintainer = "Chris Tusa " arch = "x86_64" [dependencies] runtime = ["libX11", "libXft", "freetype", "fontconfig", "libXext", "libXrandr", "libXcursor", "libpng", "libjpeg-turbo"] build = ["libX11", "libXft", "freetype", "fontconfig", "libXext", "libXrandr", "libXcursor", "libpng", "libjpeg-turbo"] [[source]] file = "fox-1.6.59.tar.gz" urls = ["http://fox-toolkit.org/ftp/fox-1.6.59.tar.gz"] checksum = "48f33d2dd5371c2d48f6518297f0ef5bbf3fcd37719e99f815dc6fc6e0f928ae" [build] parallel = true #!/bin/sh # Build script for freetype (autotools, Template A). # PASS 1: --without-harfbuzz --without-brotli - breaks the freetype<-> # harfbuzz circular dependency (see package.toml note) and avoids porting # brotli (woff2 support, not needed). zlib is PRESENT in base. set -e cd "$SRCDIR" # GOTCHA (Task 5): freetype's top-level "configure" is just a thin wrapper # that shells out to "make setup unix", which in turn runs # builds/unix/configure - THAT is the real libtool-driving script with the # kopensolaris*-gnu dynamic-linker case block, not the top-level file (the # top-level one has no such pattern at all - confirmed via grep, 0 hits). # Patch builds/unix/configure or the shared .a-only fallback bites here too. if [ -f builds/unix/configure ]; then sed -i -E 's/(kopensolaris\*-gnu)([^)]*\))/\1 | hammerhead*\2/g' builds/unix/configure fi export PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig:$PREFIX/share/pkgconfig:/usr/lib/pkgconfig:$PKG_CONFIG_PATH" export CFLAGS="${CFLAGS} -I$PREFIX/include -D__EXTENSIONS__" export LDFLAGS="${LDFLAGS} -L$PREFIX/lib -R$PREFIX/lib" ./configure \ --prefix="$PREFIX" \ --build="$BUILD_TRIPLE" \ --host="$BUILD_TRIPLE" \ --sysconfdir="$SYSCONFDIR" \ --disable-static \ --with-zlib=yes \ --with-png=yes \ --with-bzip2=no \ --with-harfbuzz=no \ --with-brotli=no gmake -j${JOBS:-1} gmake install DESTDIR="$PKGDIR" # freetype - glyph rasterizer / font rendering engine # https://freetype.org/ # # PASS 1 build: --without-harfbuzz --without-brotli. freetype and harfbuzz # have a circular dependency upstream (freetype's autohinter can use # harfbuzz for script-aware improvements, harfbuzz needs freetype to # render); breaking the cycle by building freetype without harfbuzz/brotli # first is the standard bootstrap sequence. brotli (woff2 support) is not # needed for a basic desktop and is skipped to avoid porting it at all. [package] name = "freetype" version = "2.14.3" release = 1 description = "Freetype font rendering engine (built without harfbuzz/brotli)" url = "https://freetype.org/" license = "FTL" maintainer = "Chris Tusa " arch = "x86_64" [dependencies] runtime = ["libpng"] build = ["libpng"] [[source]] file = "freetype-2.14.3.tar.xz" urls = ["https://download.savannah.gnu.org/releases/freetype/freetype-2.14.3.tar.xz"] checksum = "36bc4f1cc413335368ee656c42afca65c5a3987e8768cc28cf11ba775e785a5f" [build] parallel = true #!/bin/sh # Build script for fribidi (Meson, Template B). No deps. set -e cd "$SRCDIR" export PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig:$PREFIX/share/pkgconfig:/usr/lib/pkgconfig:$PKG_CONFIG_PATH" export CFLAGS="${CFLAGS} -D__EXTENSIONS__" export LDFLAGS="${LDFLAGS} -Wl,-R,$PREFIX/lib" meson setup build \ --prefix="$PREFIX" \ --libdir=lib \ --buildtype=release \ -Ddefault_library=shared \ -Dtests=false \ -Ddocs=false ninja -C build -j${JOBS:-1} DESTDIR="$PKGDIR" ninja -C build install # fribidi - Unicode Bidirectional Algorithm implementation (pango dep) # https://github.com/fribidi/fribidi [package] name = "fribidi" version = "1.0.16" release = 1 description = "Unicode Bidirectional Algorithm (BiDi) implementation" url = "https://github.com/fribidi/fribidi" license = "LGPL-2.1-or-later" maintainer = "Chris Tusa " arch = "x86_64" [dependencies] runtime = [] build = [] [[source]] file = "fribidi-1.0.16.tar.xz" urls = ["https://github.com/fribidi/fribidi/releases/download/v1.0.16/fribidi-1.0.16.tar.xz"] checksum = "1b1cde5b235d40479e91be2f0e88a309e3214c8ab470ec8a2744d82a5a9ea05c" [build] parallel = true #!/bin/bash # Build script for GNU awk set -e cd "$SRCDIR" # Fix illumos gnulib compatibility issues (if present) # illumos declares getlocalename_l with const char* return type for f in lib/localename-unsafe.c lib/localename.c gnulib-tests/localename.c support/localename.c; do if [ -f "$f" ]; then sed -i 's/extern char \* getlocalename_l/extern const char * getlocalename_l/' "$f" fi done ./configure \ --prefix=$PREFIX \ --disable-nls # Fix illumos memset_s false detection if present for config in lib/config.h gnulib-tests/config.h support/config.h config.h; do if [ -f "$config" ]; then sed -i 's/#define HAVE_MEMSET_S 1/\/* #undef HAVE_MEMSET_S - illumos has it as macro only *\//' "$config" fi done gmake -j${JOBS:-1} gmake install DESTDIR="$PKGDIR" # GNU Awk - Pattern scanning and processing language # https://www.gnu.org/software/gawk/ [package] name = "gawk" version = "5.3.0" release = 1 description = "GNU awk pattern scanning and processing language" url = "https://www.gnu.org/software/gawk/" license = "GPL-3.0" maintainer = "Chris Tusa " arch = "x86_64" [dependencies] runtime = [] build = [] [[source]] file = "gawk-5.3.0.tar.xz" urls = ["https://ftp.gnu.org/gnu/gawk/gawk-5.3.0.tar.xz"] checksum = "ca9c16d3d11d0ff8c69d79dc0b47267e1329a69b39b799895604ed447d3ca90b" [build] parallel = true #!/bin/bash # Build script for git set -e cd "$SRCDIR" # Git uses its own Makefile (not autotools). `uname -s` on Hammerhead is # 'Hammerhead', which config.mak.uname does not match — so it falls through # to Linux-like defaults that miss illumos-isms (strings.h declarations, # NEEDS_SOCKET, NEEDS_NSL, HAVE_ALLOCA_H, etc.). Force uname_S=SunOS to # activate the existing Solaris block, then override the two assumptions # Hammerhead doesn't satisfy: /usr/ucb/install and /usr/xpg6/bin. gmake_common() { gmake \ uname_S=SunOS \ INSTALL=install \ SANE_TOOL_PATH=/usr/xpg4/bin \ prefix=$PREFIX \ CFLAGS=-O2 \ NO_TCLTK=1 \ NO_GETTEXT=1 \ NO_PERL=1 \ NO_PYTHON=1 \ NEEDS_SSL_WITH_CURL=1 \ NEEDS_CRYPTO_WITH_SSL=1 \ CURL_LDFLAGS="-lcurl -lssl -lcrypto -lz" \ "$@" } gmake_common -j${JOBS:-1} all gmake_common DESTDIR="$PKGDIR" install # Git - Distributed version control system # https://git-scm.com/ [package] name = "git" version = "2.48.1" release = 1 description = "Distributed version control system" url = "https://git-scm.com/" license = "GPL-2.0" maintainer = "Chris Tusa " arch = "x86_64" [dependencies] runtime = ["curl", "zlib"] build = ["curl", "zlib"] [[source]] file = "git-2.48.1.tar.xz" urls = [ "https://mirrors.edge.kernel.org/pub/software/scm/git/git-2.48.1.tar.xz", "https://www.kernel.org/pub/software/scm/git/git-2.48.1.tar.xz" ] checksum = "1c5d545f5dc1eb51e95d2c50d98fdf88b1a36ba1fa30e9ae5d5385c6024f82ad" [build] parallel = true #!/bin/sh # Build script for glib2 (Meson, Template B). # Deps: pcre2 (ported, above), libffi + zlib (PRESENT in base, /usr/lib - # not ported; their .pc files are picked up via the /usr/lib/pkgconfig # entry below). iconv is provided by illumos libc - meson's builtin # dependency('iconv') probe finds it there with no extra flag needed. # # GOTCHA (Task 6): illumos ships a native Sun/illumos `msgfmt` at # /usr/bin/msgfmt that is NOT command-line compatible with GNU gettext's # msgfmt (confirmed on alpha9: `msgfmt --version` errors with "Cannot open # file --version" - it treats every arg as a filename to open, not an # option). glib's po/meson.build calls i18n.gettext(), which requires a # GNU-compatible msgfmt/xgettext. glib's own `nls` option defaults to # 'auto' and gates the entire po/ subdir behind `find_program('xgettext', # required: get_option('nls'))`, so passing -Dnls=disabled skips that # subdir entirely (no msgfmt/xgettext ever invoked) without touching any # core (non-translation) functionality. No devel/gettext port needed for # this port. # # GOTCHA (Task 6): meson's dtrace/systemtap options default to 'auto' and # both probe-detect true because /usr/sbin/dtrace exists on Hammerhead # (illumos DTrace). But glib's meson dtrace codegen step assumes the # Linux/systemtap-style two-pass workflow (compile objects with probes # first, THEN `dtrace -G` against those objects); it invokes # `dtrace -G -s glib_probes.d -o glib_probes.o` with ONLY the .d script # and no object files, which illumos dtrace rejects: "failed to link # script ...: No probe sites found for declared provider" - not an # illumos/dtrace bug, just glib's meson dtrace glue not matching how # illumos's -G-only invocation needs objects present. Static USDT probes # are optional instrumentation, not core functionality - disable # dtrace/systemtap explicitly rather than relying on 'auto' probing. set -e cd "$SRCDIR" # GOTCHA (Task 6): meson's host_machine.system() comes straight from # Python's platform.system().lower() at configure time, which on # Hammerhead reports 'hammerhead' (confirmed: `uname -s` => "Hammerhead" # post-SYSNAME_PLATFORM_RENAME), not 'sunos'. glib's meson.build has # several `host_system == 'sunos'` branches specifically for illumos/ # Solaris correctness - none of them fire for us. The one that bites at # build time: "if host_system != 'sunos': functions += ['sysinfo']" - # meson then probes cc.has_function('sysinfo') (true - illumos HAS a # sysinfo(), just the unrelated SVR4 systeminfo(2) one, not Linux's # struct-sysinfo RAM-stats one) and sets HAVE_SYSINFO, so # gio/gmemorymonitorbase.c compiles the Linux `struct sysinfo` # code path instead of its already-present Solaris sysconf(_SC_PHYS_PAGES) # fallback. Patch the guard to also exclude 'hammerhead' rather than # disabling memory-monitor functionality outright. if [ -f meson.build ]; then sed -i "s/if host_system != 'sunos'/if host_system != 'sunos' and host_system != 'hammerhead'/" meson.build fi export PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig:$PREFIX/share/pkgconfig:/usr/lib/pkgconfig:$PKG_CONFIG_PATH" # GOTCHA (Task 6): illumos libc's iconv(3) takes `const char **` for the # input-buffer argument (POSIX-conformant), but glib/gconvert.c's g_iconv() # wrapper takes plain `char **` and passes it straight through (glib has no # configure-time ICONV_CONST detection - it assumes the glibc signature). # GCC 14 promoted -Wincompatible-pointer-types from a warning to a hard # error by default in C mode, so this one call site now fails the build. # Rather than patching upstream glib source, demote it back to a warning. # GOTCHA (Task 6): illumos's (and ) gate the POSIX.1c # 5-arg reentrant getpwnam_r()/getpwuid_r() prototypes (returning int, # via a 'struct passwd **' result out-param) behind # `_POSIX_C_SOURCE >= 199506L || defined(_POSIX_PTHREAD_SEMANTICS)`. # __EXTENSIONS__ alone is NOT enough - without one of those two also # defined, the header falls back to the legacy SVR4 4-arg form (returning # 'struct passwd *' directly), which is what glib/gutils.c's # g_get_user_database_entry() gets miscompiled against ("too many # arguments to function 'getpwnam_r'"). Define _POSIX_PTHREAD_SEMANTICS # to select the POSIX form glib expects (also fixes the same class of # issue for getgrnam_r/getgrgid_r if pango/harfbuzz/cairo ever probe them). # GOTCHA (Task 6): glib's meson.build has a `host_system == 'sunos'` # block (unreached here, same host_system-name mismatch as above) that # probes and sets the highest working `_XOPEN_SOURCE` (800/700/600) plus # __EXTENSIONS__ specifically so illumos's exposes the # XPG4v2 struct msghdr fields (msg_control/msg_controllen/msg_flags - # gated behind `#if defined(_XPG4_2)`, which /usr/include/sys/ # feature_tests.h only #defines once _XOPEN_SOURCE is set to 500+). # Without it, gio/gsocket.c's msghdr-based recvmsg/sendmsg ancillary-data # code fails ("struct msghdr has no member named msg_control"). Set # _XOPEN_SOURCE=700 directly (cascades to _XPG4_2 in feature_tests.h); # __EXTENSIONS__ is still required alongside it so the XOPEN-strict mode # doesn't hide the non-standard extensions glib also needs elsewhere. export CFLAGS="${CFLAGS} -D__EXTENSIONS__ -D_XOPEN_SOURCE=700 -D_POSIX_PTHREAD_SEMANTICS -Wno-error=incompatible-pointer-types" export LDFLAGS="${LDFLAGS} -Wl,-R,$PREFIX/lib" meson setup build \ --prefix="$PREFIX" \ --libdir=lib \ --sysconfdir="$SYSCONFDIR" \ --buildtype=release \ -Ddefault_library=shared \ -Dtests=false \ -Dselinux=disabled \ -Dxattr=false \ -Dman-pages=disabled \ -Dintrospection=disabled \ -Dnls=disabled \ -Ddtrace=disabled \ -Dsystemtap=disabled ninja -C build -j${JOBS:-1} DESTDIR="$PKGDIR" ninja -C build install # glib2 - core low-level cross-platform library (Openbox render-stack dep) # https://download.gnome.org/sources/glib/ # # VERSION NOTE (Task 6): the phase1a manifest listed 2.89.2, but GNOME's # glib versioning is even-minor=stable / odd-minor=development (2.89.x is # the development cycle leading to 2.90). Verified against # download.gnome.org/sources/glib/cache.json: the highest STABLE # (even-minor) release is 2.88.2 (2.86.x and earlier are older stable # lines). Using 2.88.2. [package] name = "glib2" version = "2.88.2" release = 1 description = "Core low-level cross-platform library (GLib/GObject/GIO)" url = "https://www.gtk.org/" license = "LGPL-2.1-or-later" maintainer = "Chris Tusa " arch = "x86_64" [dependencies] runtime = ["pcre2"] build = ["pcre2"] [[source]] file = "glib-2.88.2.tar.xz" urls = ["https://download.gnome.org/sources/glib/2.88/glib-2.88.2.tar.xz"] checksum = "cf3f215a640c8a4257f14317586b8f1fdd25a10a93cb4bdda147c0f9ad88e74f" [build] parallel = true #!/bin/bash # Build script for GNU gzip set -e cd "$SRCDIR" ./configure \ --prefix=$PREFIX \ --build=$BUILD_TRIPLE \ --host=$BUILD_TRIPLE gmake -j${JOBS:-1} gmake install DESTDIR="$PKGDIR" # GNU Gzip - Compression utility # https://www.gnu.org/software/gzip/ [package] name = "gzip" version = "1.14" release = 1 description = "GNU gzip compression utility" url = "https://www.gnu.org/software/gzip/" license = "GPL-3.0" maintainer = "Chris Tusa " arch = "x86_64" [dependencies] runtime = [] build = [] [[source]] file = "gzip-1.14.tar.gz" urls = ["https://ftpmirror.gnu.org/gzip/gzip-1.14.tar.gz"] checksum = "613d6ea44f1248d7370c7ccdeee0dd0017a09e6c39de894b3c6f03f981191c6b" [build] parallel = true #!/bin/sh # Hammerhead Openbox autostart - Zygaena marine-dark identity. # Idempotent: only launch a daemon if it isn't already running, so # `openbox --restart` doesn't spawn duplicate panels. running() { ps -ef | grep -v grep | grep -q "$1"; } running "[p]icom" || picom --backend xrender -b 2>/dev/null & # tint2 finds its config live via XDG_CONFIG_DIRS; conky does NOT honor # XDG_CONFIG_DIRS, so give it the system config path explicitly (stays live). running "[t]int2" || tint2 & running "[c]onky" || conky -c @@PREFIX@@/etc/xdg/conky/conky.conf & feh --bg-fill @@PREFIX@@/share/backgrounds/hammerhead.png 2>/dev/null & #!/bin/sh # Build script for hammerhead-desktop (Zygaena marine-dark branding config). # # No upstream tarball - all inputs are local files shipped alongside this # script in the port directory. The only compiled artifact is the cairo # wallpaper generator, built and run once here (its output PNG is what # actually ships - the generator binary itself is not installed). set -e PORTDIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd) export PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig:$PREFIX/share/pkgconfig:/usr/lib/pkgconfig:$PKG_CONFIG_PATH" # --- Step 1: build + run the wallpaper generator --- gcc "$PORTDIR/wallpaper-gen.c" $(pkg-config --cflags --libs cairo) -lm -o "$PORTDIR/wg" mkdir -p "$PKGDIR$PREFIX/share/backgrounds" "$PORTDIR/wg" "$PKGDIR$PREFIX/share/backgrounds/hammerhead.png" # --- Step 2: Openbox theme --- mkdir -p "$PKGDIR$PREFIX/share/themes/Hammerhead/openbox-3" cp "$PORTDIR/themerc" "$PKGDIR$PREFIX/share/themes/Hammerhead/openbox-3/themerc" # --- Step 3: tint2 panel config --- # Matches the existing tint2 port's own default install location # ($PREFIX/etc/xdg/tint2 - tint2's cmake build doesn't honor # --sysconfdir), and what the integration step's XDG_CONFIG_DIRS # ($PREFIX/etc/xdg) resolves against. mkdir -p "$PKGDIR$PREFIX/etc/xdg/tint2" cp "$PORTDIR/tint2rc" "$PKGDIR$PREFIX/etc/xdg/tint2/tint2rc" # --- Step 4: conky config --- mkdir -p "$PKGDIR$PREFIX/etc/xdg/conky" cp "$PORTDIR/conky.conf" "$PKGDIR$PREFIX/etc/xdg/conky/conky.conf" # --- Step 5: Openbox rc.xml + menu.xml --- mkdir -p "$PKGDIR$PREFIX/etc/xdg/openbox" cp "$PORTDIR/rc.xml" "$PKGDIR$PREFIX/etc/xdg/openbox/rc.xml" cp "$PORTDIR/menu.xml" "$PKGDIR$PREFIX/etc/xdg/openbox/menu.xml" # --- Step 6: autostart (substitute the real $PREFIX) --- sed "s#@@PREFIX@@#$PREFIX#g" "$PORTDIR/autostart" \ > "$PKGDIR$PREFIX/etc/xdg/openbox/autostart" chmod 755 "$PKGDIR$PREFIX/etc/xdg/openbox/autostart" # --- Step 7: screenshot tool (hh-grab XGetImage->PNG + hh-screenshot wrapper) --- # Bound to Print in rc.xml; saves to ~/Pictures/hh-.png. mkdir -p "$PKGDIR$PREFIX/bin" gcc "$PORTDIR/hh-grab.c" -I"$PREFIX/include" -L"$PREFIX/lib" -R"$PREFIX/lib" -lX11 -lpng \ -o "$PKGDIR$PREFIX/bin/hh-grab" install -m 755 "$PORTDIR/hh-screenshot" "$PKGDIR$PREFIX/bin/hh-screenshot" # --- Step 8: PDF/image launcher wrappers + branded welcome PDF --- gcc "$PORTDIR/pdf-gen.c" $(pkg-config --cflags --libs cairo) -o "$PORTDIR/pdfgen" mkdir -p "$PKGDIR$PREFIX/share/hammerhead" "$PORTDIR/pdfgen" "$PKGDIR$PREFIX/share/hammerhead/welcome.pdf" rm -f "$PORTDIR/pdfgen" install -m 755 "$PORTDIR/hh-pdf" "$PKGDIR$PREFIX/bin/hh-pdf" install -m 755 "$PORTDIR/hh-images" "$PKGDIR$PREFIX/bin/hh-images" # --- Step 9: Openbox pipemenus (Places, Recent Files) --- # GTK-free, POSIX-sh, pattern adapted from CrunchBang++'s # cbpp-places-pipemenu / cbpp-recent-files-pipemenu; referenced from # menu.xml via execute="hh-places-pipemenu" / "hh-recent-pipemenu". install -m 755 "$PORTDIR/hh-places-pipemenu" "$PKGDIR$PREFIX/bin/hh-places-pipemenu" install -m 755 "$PORTDIR/hh-recent-pipemenu" "$PKGDIR$PREFIX/bin/hh-recent-pipemenu" # --- Step 10: branded tint2 launcher icons + .desktop entries --- # The stock launcher was illegible: st ships no icon, xnedit's png was loose, # and hicolor had no index.theme so name-lookup failed. We ship our own cairo # glyphs and point each .desktop Icon= at an ABSOLUTE path, which tint2 loads # directly (no icon theme required). tint2rc references these three by path. gcc "$PORTDIR/icon-gen.c" $(pkg-config --cflags --libs cairo) -lm -o "$PORTDIR/ig" mkdir -p "$PKGDIR$PREFIX/share/hammerhead-desktop/launcher" "$PORTDIR/ig" "$PKGDIR$PREFIX/share/hammerhead-desktop/launcher" rm -f "$PKGDIR$PREFIX/share/hammerhead-desktop/launcher/preview.png" # review-only rm -f "$PORTDIR/ig" mkdir -p "$PKGDIR$PREFIX/share/applications" cp "$PORTDIR/hh-terminal.desktop" "$PORTDIR/hh-files.desktop" \ "$PORTDIR/hh-editor.desktop" "$PKGDIR$PREFIX/share/applications/" # Clean up the transient build helper - not shipped. rm -f "$PORTDIR/wg" # --- Step 11: /etc/skel/.xsession (Task 4b) --- # New users' home dirs are seeded from /etc/skel, so this makes a fresh # account's X session default to the Openbox desktop without any manual # ~/.xsession setup. mkdir -p "$PKGDIR/etc/skel" install -m 755 "$PORTDIR/dot-xsession" "$PKGDIR/etc/skel/.xsession" # --- Step 12: hh-desktop-init (per-user ~/.config seed, CBPP-style) --- # openbox-autostart only reads ~/.config or /etc/xdg (not our /usr/local/etc/xdg), # so the X session entrypoints call this to seed ~/.config on login for new AND # existing users (copy-if-missing). install -m 755 "$PORTDIR/hh-desktop-init" "$PKGDIR$PREFIX/bin/hh-desktop-init" -- Hammerhead conky config - Zygaena marine-dark identity -- Installed to $PREFIX/etc/xdg/conky/conky.conf -- Uses conky's native illumos/kstat stat backend (no ${exec} shellouts -- needed for cpu/mem/fs/net - see task brief). -- -- Typography/layout adapted from CrunchBang++'s signature right-side -- conky (github.com/CBPP/cbpp-configs, simon-weber/crunchbang-conf): -- monospace, right-aligned, uppercase section labels over hairline -- rules, compact bars. Restyled teal-on-dark instead of CBPP's grey/red, -- and kept our native kstat vars (no CBPP-style ${exec} shellouts). conky.config = { own_window = true, own_window_type = 'desktop', own_window_transparent = true, own_window_argb_visual = true, own_window_argb_value = 200, own_window_hints = 'undecorated,below,sticky,skip_taskbar,skip_pager', alignment = 'top_right', gap_x = 24, gap_y = 40, minimum_width = 260, maximum_width = 300, update_interval = 2.0, double_buffer = true, use_xft = true, font = 'monospace:size=9', default_color = 'cfe0e0', color1 = '1fb6b6', -- headings / accents color2 = '5a7575', -- muted / rules draw_shades = false, draw_outline = false, draw_borders = false, background = false, } conky.text = [[ ${alignr}${color1}${font monospace:bold:size=14}HAMMERHEAD${font}${color} ${alignr}${color2}${nodename}${color} ${alignr}${color2}${hr 1}${color} ${alignr}${color1}SYSTEM${color} ${alignr}uptime ${color1}${uptime}${color} ${alignr}load ${color1}${loadavg}${color} ${alignr}${color1}CPU${color} ${alignr}${cpu}%${color} ${alignr}${cpubar 6,220} ${alignr}${color1}MEMORY${color} ${alignr}${mem} / ${memmax}${color} ${alignr}${membar 6,220} ${alignr}${color1}DISK (/)${color} ${alignr}${fs_used /} / ${fs_size /}${color} ${alignr}${fs_bar 6,220 /} ${alignr}${color1}NETWORK${color} ${alignr}down ${color1}${downspeed}${color} / up ${color1}${upspeed}${color} ]] #!/bin/sh # Hammerhead default X session - launch the Openbox desktop. # # Put the Hammerhead desktop config (/usr/local/etc/xdg) on the XDG search # path so openbox/tint2/conky find the branded config without ~/.config. # (xdm's Xsession also sets this; repeated here so `startx`/xinit users, who # run ~/.xsession directly, get the branded desktop too.) export XDG_CONFIG_DIRS="/usr/local/etc/xdg:${XDG_CONFIG_DIRS:-/etc/xdg}" export XDG_DATA_DIRS="/usr/local/share:${XDG_DATA_DIRS:-/usr/share}" # Seed ~/.config so openbox-autostart (which only reads ~/.config or /etc/xdg) # runs our autostart -> tint2/conky/wallpaper. See hh-desktop-init. /usr/local/bin/hh-desktop-init exec /usr/local/bin/openbox-session #!/bin/sh # hh-desktop-init - point the user's openbox autostart at the LIVE system # autostart so desktop-config updates ALWAYS take, with no per-user copies to # go stale. Called from the X session entrypoint before openbox-session. # # Why only the autostart: openbox-autostart (run by openbox-session) reads only # /etc/xdg/openbox/autostart or ~/.config/openbox/autostart -- NOT # XDG_CONFIG_DIRS -- so the autostart is the single desktop file that must live # under ~/.config. Everything else resolves live from /usr/local/etc/xdg via # XDG_CONFIG_DIRS (set by the X session): openbox rc.xml/menu.xml and tint2rc; # conky is launched by the autostart with an explicit -c path. So none of those # need a per-user copy. # # We make ~/.config/openbox/autostart a SYMLINK to the system autostart (not a # copy), so a package update to the autostart is picked up with no re-seed. # A pre-existing non-symlink here is treated as legacy seeded state and migrated # to the symlink. SYS=/usr/local/etc/xdg/openbox/autostart CFG="${XDG_CONFIG_HOME:-$HOME/.config}/openbox" mkdir -p "$CFG" 2>/dev/null || exit 0 if [ "$(readlink "$CFG/autostart" 2>/dev/null)" != "$SYS" ]; then rm -f "$CFG/autostart" 2>/dev/null ln -sf "$SYS" "$CFG/autostart" 2>/dev/null fi exit 0 [Desktop Entry] Type=Application Name=Editor Comment=XNEdit text editor Exec=/usr/local/bin/xnc -tabbed %F Icon=/usr/local/share/hammerhead-desktop/launcher/editor.png Categories=Utility;TextEditor; Terminal=false [Desktop Entry] Type=Application Name=Files Comment=Xfe file manager Exec=xfe Icon=/usr/local/share/hammerhead-desktop/launcher/files.png Categories=System;FileManager; Terminal=false #include #include #include #include #include int main(int c,char**v){Display*d=XOpenDisplay(NULL);if(!d){fprintf(stderr,"no display\n");return 1;} Window r=DefaultRootWindow(d);XWindowAttributes g;XGetWindowAttributes(d,r,&g); XImage*im=XGetImage(d,r,0,0,g.width,g.height,AllPlanes,ZPixmap);if(!im)return 1; FILE*f=fopen(c>1?v[1]:"screenshot.png","wb");png_structp p=png_create_write_struct(PNG_LIBPNG_VER_STRING,0,0,0); png_infop i=png_create_info_struct(p);png_init_io(p,f);png_set_IHDR(p,i,g.width,g.height,8,PNG_COLOR_TYPE_RGB,0,0,0); png_write_info(p,i);png_bytep row=malloc(3*g.width);for(int y=0;y>16)&0xFF;row[3*x+1]=(px>>8)&0xFF;row[3*x+2]=px&0xFF;}png_write_row(p,row);} png_write_end(p,i);fclose(f);return 0;} #!/bin/sh mkdir -p "$HOME/Pictures" exec /usr/local/bin/feh --auto-zoom --scale-down --geometry 1000x720 "$HOME/Pictures" /usr/local/share/backgrounds #!/bin/sh [ -n "$1" ] && exec /usr/local/bin/mupdf-x11 "$@" exec /usr/local/bin/mupdf-x11 /usr/local/share/hammerhead/welcome.pdf #!/bin/sh # hh-places-pipemenu - Openbox "Places" pipe menu (GTK-free) # # Pattern adapted from CrunchBang++'s cbpp-places-pipemenu # (github.com/CBPP/cbpp-pipemenus, Copyright (C) 2010 John Crawley, # ported to #!++ by Ben Young) - same idea (walk a directory, XML-escape # names, emit an ) but rewritten small/flat for our # stack: no thunar/exo-open/geany, no recursive submenus. Every entry # opens in xfe; a matching terminal entry opens st in that directory. # # Usage: # in menu.xml. Invoked with no arguments; always lists $HOME's immediate # subdirectories (dotdirs skipped). # # NB: the shell, not bash - keep this POSIX sh / dash-fast per upstream. files="xfe" xml_escape() { # $1 -> escaped on stdout printf '%s' "$1" | sed \ -e 's/&/\&/g' \ -e 's//\>/g' \ -e 's/"/\"/g' } home="${HOME:-/root}" printf '\n' printf ' \n' printf ' %s %s\n' "$files" "$(xml_escape "$home")" printf ' \n' printf ' \n' printf ' st -d %s\n' "$(xml_escape "$home")" printf ' \n' printf ' \n' # Immediate subdirectories of $HOME, skipping dotdirs, alphabetical. for d in "$home"/*/; do [ -d "$d" ] || continue d="${d%/}" base="${d##*/}" case "$base" in .*) continue ;; esac label="$(xml_escape "$base")" path="$(xml_escape "$d")" printf ' \n' "$label" printf ' %s %s\n' "$files" "$path" printf ' \n' printf ' \n' "$label" printf ' st -d %s\n' "$path" printf ' \n' done printf '\n' #!/bin/sh # hh-recent-pipemenu - Openbox "Recent Files" pipe menu (GTK-free) # # Loosely modeled on CrunchBang++'s cbpp-recent-files-pipemenu # (github.com/CBPP/cbpp-pipemenus), but that one parses GTK's # ~/.local/share/recently-used.xbel, which nothing on Hammerhead writes # (no GTK). Instead: find(1) over $HOME for recently-modified # docs/images, opened with the matching viewer. # # Usage: max_entries=12 home="${HOME:-/root}" xml_escape() { printf '%s' "$1" | sed \ -e 's/&/\&/g' \ -e 's//\>/g' \ -e 's/"/\"/g' } viewer_for() { case "$1" in *.pdf) echo "hh-pdf" ;; *.png|*.jpg|*.jpeg|*.gif|*.bmp) echo "hh-images" ;; *) echo "xnedit" ;; esac } printf '\n' count=0 find "$home" -maxdepth 3 -type f \ \( -iname '*.pdf' -o -iname '*.txt' -o -iname '*.png' -o -iname '*.jpg' -o -iname '*.jpeg' \) \ -mtime -14 -print 2>/dev/null | while IFS= read -r f; do viewer="$(viewer_for "$f")" label="$(xml_escape "${f##*/}")" path="$(xml_escape "$f")" printf ' \n' "$label" printf ' %s %s\n' "$viewer" "$path" printf ' \n' count=$((count + 1)) [ "$count" -ge "$max_entries" ] && break done printf '\n' #!/bin/sh mkdir -p "$HOME/Pictures" exec /usr/local/bin/hh-grab "$HOME/Pictures/hh-$(date +%Y%m%d-%H%M%S).png" [Desktop Entry] Type=Application Name=Terminal Comment=st terminal emulator Exec=st Icon=/usr/local/share/hammerhead-desktop/launcher/terminal.png Categories=System;TerminalEmulator; Terminal=false /* * icon-gen.c - Zygaena marine-dark launcher icon generator. * * Renders three 48x48 ARGB launcher glyphs - terminal, files, editor - in * the Hammerhead teal palette (matching wallpaper-gen.c). tint2 loads these * by ABSOLUTE path (Icon=/usr/local/share/hammerhead-desktop/launcher/*.png), * so no freedesktop icon theme / hicolor index.theme is required - which is * exactly why the stock launcher was illegible (st shipped no icon, xnedit's * png was loose, hicolor had no index.theme). * * Build: gcc icon-gen.c $(pkg-config --cflags --libs cairo) -lm -o ig * Usage: ./ig /output/dir (writes terminal.png, files.png, editor.png, * and preview.png for design review) */ #include #include #include #define S 48 /* icon canvas size */ /* palette - matches wallpaper-gen.c */ #define TILE_R 0x12/255.0 #define TILE_G 0x2e/255.0 #define TILE_B 0x34/255.0 #define TEAL_R 0x1f/255.0 #define TEAL_G 0xb6/255.0 #define TEAL_B 0xb6/255.0 #define TEALBR_R 0x54/255.0 #define TEALBR_G 0xe0/255.0 #define TEALBR_B 0xe0/255.0 #define TEXT_R 0xcf/255.0 #define TEXT_G 0xe0/255.0 #define TEXT_B 0xe0/255.0 static void rrect(cairo_t *cr, double x, double y, double w, double h, double r) { cairo_new_sub_path(cr); cairo_arc(cr, x + w - r, y + r, r, -M_PI / 2, 0); cairo_arc(cr, x + w - r, y + h - r, r, 0, M_PI / 2); cairo_arc(cr, x + r, y + h - r, r, M_PI / 2, M_PI); cairo_arc(cr, x + r, y + r, r, M_PI, 3 * M_PI / 2); cairo_close_path(cr); } /* subtle elevated chip so the three icons read as one branded set */ static void tile(cairo_t *cr) { rrect(cr, 2.5, 2.5, S - 5, S - 5, 10); cairo_set_source_rgb(cr, TILE_R, TILE_G, TILE_B); cairo_fill_preserve(cr); cairo_set_source_rgba(cr, TEAL_R, TEAL_G, TEAL_B, 0.40); cairo_set_line_width(cr, 1.5); cairo_stroke(cr); } /* Terminal: a prompt chevron ">" plus a cursor underscore "_". */ static void draw_terminal(cairo_t *cr) { tile(cr); cairo_set_line_cap(cr, CAIRO_LINE_CAP_ROUND); cairo_set_line_join(cr, CAIRO_LINE_JOIN_ROUND); cairo_set_source_rgb(cr, TEALBR_R, TEALBR_G, TEALBR_B); cairo_set_line_width(cr, 4.4); cairo_move_to(cr, 15, 16); cairo_line_to(cr, 25, 24); cairo_line_to(cr, 15, 32); cairo_stroke(cr); cairo_set_source_rgb(cr, TEXT_R, TEXT_G, TEXT_B); cairo_set_line_width(cr, 4.0); cairo_move_to(cr, 27, 33); cairo_line_to(cr, 34, 33); cairo_stroke(cr); } /* Files: a two-tone manila folder (tab + body). */ static void draw_files(cairo_t *cr) { tile(cr); cairo_set_line_join(cr, CAIRO_LINE_JOIN_ROUND); /* tab peeking above the body's top-left */ cairo_set_source_rgb(cr, TEAL_R, TEAL_G, TEAL_B); rrect(cr, 11, 14, 14, 8, 2.5); cairo_fill(cr); /* back body */ rrect(cr, 11, 18, 26, 17, 3); cairo_fill(cr); /* front pocket, lighter, slightly inset - gives the folder depth */ cairo_set_source_rgb(cr, TEALBR_R, TEALBR_G, TEALBR_B); rrect(cr, 13, 23, 22, 12, 2.5); cairo_fill(cr); } /* Editor: a pencil at 45 degrees (eraser, shaft, nib, tip). */ static void draw_editor(cairo_t *cr) { tile(cr); cairo_save(cr); cairo_translate(cr, 24, 24); cairo_rotate(cr, -M_PI / 4); double pw = 8, half = pw / 2; /* shaft */ cairo_set_source_rgb(cr, TEAL_R, TEAL_G, TEAL_B); rrect(cr, -half, -13, pw, 19, 1.5); cairo_fill(cr); /* eraser (top) */ cairo_set_source_rgb(cr, TEXT_R, TEXT_G, TEXT_B); rrect(cr, -half, -16.5, pw, 4, 1.2); cairo_fill(cr); /* nib (bottom), brighter teal */ cairo_set_source_rgb(cr, TEALBR_R, TEALBR_G, TEALBR_B); cairo_move_to(cr, -half, 6); cairo_line_to(cr, half, 6); cairo_line_to(cr, 0, 14); cairo_close_path(cr); cairo_fill(cr); /* graphite tip */ cairo_set_source_rgb(cr, TILE_R, TILE_G, TILE_B); cairo_move_to(cr, -2.2, 10.5); cairo_line_to(cr, 2.2, 10.5); cairo_line_to(cr, 0, 14); cairo_close_path(cr); cairo_fill(cr); cairo_restore(cr); } typedef void (*drawfn)(cairo_t *); static void emit(const char *dir, const char *name, drawfn fn) { char path[1024]; cairo_surface_t *s = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, S, S); cairo_t *cr = cairo_create(s); fn(cr); snprintf(path, sizeof path, "%s/%s", dir, name); cairo_surface_write_to_png(s, path); printf("wrote %s\n", path); cairo_destroy(cr); cairo_surface_destroy(s); } /* Review sheet: each glyph at 3x (detail) over the same glyph at 22px * (real launcher size) on a panel-tone strip, so legibility is judged at * the size it will actually render. */ static void emit_preview(const char *dir) { drawfn fns[3] = { draw_terminal, draw_files, draw_editor }; int cw = 160, W = cw * 3, H = 210; char path[1024]; cairo_surface_t *s = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, W, H); cairo_t *cr = cairo_create(s); cairo_set_source_rgb(cr, 0x0d / 255.0, 0x11 / 255.0, 0x17 / 255.0); cairo_paint(cr); for (int i = 0; i < 3; i++) { cairo_save(cr); cairo_translate(cr, i * cw + (cw - 144) / 2.0, 8); cairo_scale(cr, 144.0 / S, 144.0 / S); fns[i](cr); cairo_restore(cr); } /* panel strip */ cairo_set_source_rgb(cr, 0x0e / 255.0, 0x1c / 255.0, 0x1f / 255.0); cairo_rectangle(cr, 0, 168, W, 42); cairo_fill(cr); for (int i = 0; i < 3; i++) { cairo_save(cr); cairo_translate(cr, i * cw + (cw - 22) / 2.0, 178); cairo_scale(cr, 22.0 / S, 22.0 / S); fns[i](cr); cairo_restore(cr); } snprintf(path, sizeof path, "%s/preview.png", dir); cairo_surface_write_to_png(s, path); printf("wrote %s\n", path); cairo_destroy(cr); cairo_surface_destroy(s); } int main(int argc, char **argv) { const char *dir = (argc > 1) ? argv[1] : "."; emit(dir, "terminal.png", draw_terminal); emit(dir, "files.png", draw_files); emit(dir, "editor.png", draw_editor); emit_preview(dir); return 0; } xnedit st -e nvim xfe hh-images hh-pdf st st xfe dmenu_run pfexec /sbin/zygctl reboot Reboot the system? pfexec /sbin/zygctl poweroff Shut down the system? yes # hammerhead-desktop - Zygaena marine-dark desktop branding/config # (wallpaper, Openbox theme, tint2/conky configs, menu/keybinds, autostart) # # No upstream source - this port carries its own config files + a small # cairo program (wallpaper-gen.c) that renders the branded wallpaper PNG # at package-build time. See build.sh. [package] name = "hammerhead-desktop" version = "1.7.0" release = 1 description = "Zygaena marine-dark desktop branding: wallpaper, Openbox theme, tint2/conky configs, categorized menu w/ CBPP-style Places/Recent pipemenus + Shutdown/Reboot (pfexec zygctl), autostart" url = "https://git.sharkos.one/zygaena/hammerhead" license = "CDDL-1.0" maintainer = "Chris Tusa " arch = "x86_64" [dependencies] runtime = ["openbox", "tint2", "conky", "picom", "feh", "dmenu", "st", "xfe", "mupdf", "xnedit", "cairo", "libpng"] build = ["cairo", "libpng"] [build] parallel = false #include #include int main(int c,char**v){ cairo_surface_t*s=cairo_pdf_surface_create(c>1?v[1]:"welcome.pdf",612,792); cairo_t*cr=cairo_create(s); cairo_set_source_rgb(cr,0.02,0.035,0.06); cairo_paint(cr); cairo_set_source_rgb(cr,0.12,0.71,0.71); cairo_rectangle(cr,0,0,612,8); cairo_fill(cr); cairo_select_font_face(cr,"sans",CAIRO_FONT_SLANT_NORMAL,CAIRO_FONT_WEIGHT_BOLD); cairo_set_font_size(cr,40); cairo_set_source_rgb(cr,0.12,0.71,0.71); cairo_move_to(cr,60,120); cairo_show_text(cr,"HAMMERHEAD"); cairo_select_font_face(cr,"sans",CAIRO_FONT_SLANT_NORMAL,CAIRO_FONT_WEIGHT_NORMAL); cairo_set_font_size(cr,15); cairo_set_source_rgb(cr,0.55,0.68,0.68); cairo_move_to(cr,62,148); cairo_show_text(cr,"Zygaena Operating System"); const char*L[]={"Welcome to your Hammerhead desktop.","", "This document is displayed by mupdf, built from source for", "Hammerhead - a 64-bit illumos-derived OS with a modern GNU", "toolchain running an XLibre + Openbox desktop, all GTK-free.","", "Keys: Super+Return terminal Super+f files Super+e editor", " Super+Space launcher Right-click the desktop for the menu.",0}; cairo_set_font_size(cr,14); double y=210; for(int i=0;L[i];i++){cairo_set_source_rgb(cr,0.82,0.9,0.9);cairo_move_to(cr,60,y);cairo_show_text(cr,L[i]);y+=26;} cairo_show_page(cr); cairo_destroy(cr); cairo_surface_destroy(s); return 0;} 10 20 yes no yes Smart
yes
Hammerhead NLIMC yes no sans 9 Bold Normal sans 9 Normal Normal 4 1 1 2 3 4 500 st st xfe xnedit dmenu_run dmenu_run dmenu_run root-menu root-menu client-list-combined-menu hh-screenshot client-menu 0050%100% -0050%100% leftno rightno 1 2 leftno rightno 1 300 client-menu top bottom left right client-menu client-menu previous next client-list-combined-menu root-menu menu.xml 200 no 100 yes
# Hammerhead Openbox theme - Zygaena marine-dark identity # Installed to $PREFIX/share/themes/Hammerhead/openbox-3/themerc window.active.title.bg: flat solid window.active.title.bg.color: #12303a window.inactive.title.bg: flat solid window.inactive.title.bg.color: #0d1117 window.active.label.bg: parentrelative window.inactive.label.bg: parentrelative window.active.label.text.color: #cfe0e0 window.inactive.label.text.color: #5a7575 window.active.title.separator.color: #1fb6b6 window.inactive.title.separator.color: #0d1117 window.active.border.color: #1fb6b6 window.inactive.border.color: #0d1117 window.active.handle.bg: flat solid window.active.handle.bg.color: #12303a window.inactive.handle.bg: flat solid window.inactive.handle.bg.color: #0d1117 window.active.grip.bg: flat solid window.active.grip.bg.color: #1fb6b6 window.inactive.grip.bg: flat solid window.inactive.grip.bg.color: #0d1117 window.active.button.unpressed.bg: flat solid window.active.button.unpressed.bg.color: #12303a window.active.button.pressed.bg: flat solid window.active.button.pressed.bg.color: #1fb6b6 window.active.button.disabled.bg: flat solid window.active.button.disabled.bg.color: #0d1117 window.active.button.hover.bg: flat solid window.active.button.hover.bg.color: #3fd0d0 window.inactive.button.unpressed.bg: flat solid window.inactive.button.unpressed.bg.color: #0d1117 window.inactive.button.pressed.bg: flat solid window.inactive.button.pressed.bg.color: #1fb6b6 window.inactive.button.disabled.bg: flat solid window.inactive.button.disabled.bg.color: #0d1117 window.inactive.button.hover.bg: flat solid window.inactive.button.hover.bg.color: #3fd0d0 window.active.button.unpressed.image.color: #cfe0e0 window.active.button.pressed.image.color: #05080d window.active.button.disabled.image.color: #5a7575 window.active.button.hover.image.color: #05080d window.inactive.button.unpressed.image.color: #5a7575 window.inactive.button.pressed.image.color: #05080d window.inactive.button.disabled.image.color: #5a7575 window.inactive.button.hover.image.color: #05080d border.width: 2 padding.width: 2 padding.height: 2 window.client.padding.width: 0 window.handle.width: 6 window.label.text.justify: left menu.items.bg: flat solid menu.items.bg.color: #0d1117 menu.items.text.color: #cfe0e0 menu.items.disabled.text.color: #5a7575 menu.items.active.bg: flat solid menu.items.active.bg.color: #12303a menu.items.active.text.color: #3fd0d0 menu.border.color: #1fb6b6 menu.border.width: 1 menu.separator.color: #1fb6b6 menu.separator.padding.width: 6 menu.separator.padding.height: 3 menu.title.bg: flat solid menu.title.bg.color: #12303a menu.title.text.color: #cfe0e0 menu.title.text.justify: left osd.bg: flat solid osd.bg.color: #0d1117 osd.border.color: #1fb6b6 osd.border.width: 1 osd.label.bg: parentrelative osd.label.text.color: #cfe0e0 window.active.shadow: false window.inactive.shadow: false font: shadow=n font: place=ActiveWindow font: family=sans font: size=9 font: weight=bold font: slant=normal font: place=InactiveWindow font: family=sans font: size=9 font: weight=normal font: slant=normal font: place=MenuHeader font: family=sans font: size=9 font: weight=bold font: place=MenuItem font: family=sans font: size=9 font: weight=normal font: place=OnScreenDisplay font: family=sans font: size=9 font: weight=bold #--------------------------------------------- # Hammerhead tint2 panel - Zygaena marine-dark identity # Installed to $PREFIX/etc/xdg/tint2/tint2rc # # Layout adapted from CrunchBang++'s tint2rc (github.com/CBPP/cbpp-configs, # simon-weber/crunchbang-conf): bottom panel, left launcher block, centered # taskbar, right-hand systray + two-line clock, teal active-task highlight. # No battery/brightness applets (headless/Xvfb-safe). Restyled to our # marine-dark palette, not CBPP's grey. #--------------------------------------------- #------------------------------------- # Backgrounds # bg_color_0: panel background rounded = 0 border_width = 0 background_color = #0d1117 88 border_color = #1fb6b6 0 rounded = 3 border_width = 1 background_color = #12303a 100 border_color = #1fb6b6 70 rounded = 3 border_width = 0 background_color = #1fb6b6 25 border_color = #1fb6b6 0 rounded = 0 border_width = 0 background_color = #0d1117 0 border_color = #1fb6b6 0 #------------------------------------- # Panel panel_items = LTSC panel_size = 100% 30 panel_margin = 0 0 panel_padding = 6 0 8 panel_background_id = 1 panel_position = bottom center horizontal panel_layer = top panel_monitor = all autohide = 0 strut_policy = follow_size panel_dock = 0 wm_menu = 1 panel_window_name = tint2 disable_transparency = 0 mouse_effects = 1 #------------------------------------- # Launcher launcher_padding = 6 3 8 launcher_background_id = 4 launcher_icon_size = 22 launcher_icon_theme_override = 0 launcher_item_app = /usr/local/share/applications/hh-terminal.desktop launcher_item_app = /usr/local/share/applications/hh-files.desktop launcher_item_app = /usr/local/share/applications/hh-editor.desktop #------------------------------------- # Taskbar taskbar_mode = multi_desktop taskbar_hide_if_empty = 0 taskbar_padding = 4 2 4 taskbar_background_id = 0 taskbar_active_background_id = 0 taskbar_name = 1 taskbar_name_padding = 8 3 taskbar_name_background_id = 0 taskbar_name_active_background_id = 3 taskbar_name_font = sans bold 9 taskbar_name_font_color = #5a7575 100 taskbar_name_active_font_color = #1fb6b6 100 taskbar_distribute_size = 1 #------------------------------------- # Task task_text = 1 task_icon = 1 task_centered = 1 task_maximum_size = 180 28 task_padding = 6 2 task_background_id = 0 task_active_background_id = 2 task_urgent_background_id = 2 task_font = sans 9 task_font_color = #cfe0e0 100 task_active_font_color = #3fd0d0 100 task_urgent_font_color = #3fd0d0 100 task_tooltip = 1 #------------------------------------- # Clock (two-line, CBPP-style: time over date) time1_format = %H:%M time2_format = %a %d %b time1_font = sans bold 9 time2_font = sans 7 clock_font_color = #cfe0e0 100 clock_padding = 8 0 clock_background_id = 0 clock_tooltip = %A, %d %B %Y #------------------------------------- # System tray systray_padding = 4 2 8 systray_background_id = 0 systray_sort = ascending systray_icon_size = 18 systray_icon_asb = 100 0 0 #------------------------------------- # Tooltips tooltip_padding = 4 4 tooltip_show_timeout = 0.5 tooltip_hide_timeout = 0.1 tooltip_background_id = 1 tooltip_font_color = #cfe0e0 100 tooltip_font = sans 8 /* * wallpaper-gen.c - Zygaena marine-dark wallpaper generator. * * Renders a 1920x1080 PNG: deep-ocean vertical gradient, low-alpha * concentric sonar arcs from a lower-left origin, a low-alpha stylized * hammerhead-shark silhouette, and the HAMMERHEAD/ZYGAENA wordmark in * the lower-right corner. * * Build: gcc wallpaper-gen.c $(pkg-config --cflags --libs cairo) -lm -o wg * Usage: ./wg /path/to/output.png */ #include #include #include #define W 1920 #define H 1080 /* Zygaena marine-dark palette */ #define BG_TOP_R 0x05/255.0 #define BG_TOP_G 0x08/255.0 #define BG_TOP_B 0x0d/255.0 #define BG_BOT_R 0x0a/255.0 #define BG_BOT_G 0x27/255.0 #define BG_BOT_B 0x33/255.0 #define TEAL_R 0x1f/255.0 #define TEAL_G 0xb6/255.0 #define TEAL_B 0xb6/255.0 #define TEAL_BR_R 0x3f/255.0 #define TEAL_BR_G 0xd0/255.0 #define TEAL_BR_B 0xd0/255.0 #define MUTED_R 0x5a/255.0 #define MUTED_G 0x75/255.0 #define MUTED_B 0x75/255.0 static void draw_background(cairo_t *cr) { cairo_pattern_t *grad = cairo_pattern_create_linear(0, 0, 0, H); cairo_pattern_add_color_stop_rgb(grad, 0.0, BG_TOP_R, BG_TOP_G, BG_TOP_B); cairo_pattern_add_color_stop_rgb(grad, 1.0, BG_BOT_R, BG_BOT_G, BG_BOT_B); cairo_set_source(cr, grad); cairo_paint(cr); cairo_pattern_destroy(grad); } static void draw_sonar_arcs(cairo_t *cr) { /* Origin lower-left, off canvas a bit so rings sweep across the * bottom-left quadrant. */ double cx = -80, cy = H + 80; int rings = 5; double base_r = 260; double step_r = 220; for (int i = 0; i < rings; i++) { double alpha = 0.12 - (i * (0.06 / (rings - 1))); if (alpha < 0.06) alpha = 0.06; cairo_set_source_rgba(cr, TEAL_R, TEAL_G, TEAL_B, alpha); cairo_set_line_width(cr, 2.0); cairo_arc(cr, cx, cy, base_r + i * step_r, -M_PI / 2.2, 0.15); cairo_stroke(cr); } } /* * Stylized hammerhead-shark silhouette: a wide flattened "hammer" head * bar with an eye-dot at each end, a tapering dorsal body, and a * crescent tail - all in one low-alpha teal fill, large and off-center * (upper-left-of-center so it doesn't collide with the wordmark). */ static void draw_hammerhead_motif(cairo_t *cr) { double ox = 560, oy = 430; /* motif origin (center of the head bar) */ double scale = 1.55; cairo_save(cr); cairo_translate(cr, ox, oy); cairo_scale(cr, scale, scale); cairo_set_source_rgba(cr, TEAL_R, TEAL_G, TEAL_B, 0.10); /* Hammer head: a wide, slightly bowed bar. */ cairo_move_to(cr, -260, 0); cairo_curve_to(cr, -180, -34, 180, -34, 260, 0); cairo_curve_to(cr, 180, 34, -180, 34, -260, 0); cairo_close_path(cr); cairo_fill(cr); /* Tapering body/tail sweeping down-right from the head's center. */ cairo_move_to(cr, -40, 18); cairo_curve_to(cr, 120, 60, 260, 160, 360, 340); cairo_curve_to(cr, 380, 380, 340, 400, 300, 380); cairo_curve_to(cr, 220, 220, 90, 100, -40, 54); cairo_close_path(cr); cairo_fill(cr); /* Tail fluke. */ cairo_move_to(cr, 340, 320); cairo_curve_to(cr, 400, 330, 440, 300, 470, 250); cairo_curve_to(cr, 450, 310, 420, 360, 380, 400); cairo_curve_to(cr, 360, 370, 345, 345, 340, 320); cairo_close_path(cr); cairo_fill(cr); /* Eye-dots at each end of the hammer bar. */ cairo_arc(cr, -235, 0, 10, 0, 2 * M_PI); cairo_fill(cr); cairo_arc(cr, 235, 0, 10, 0, 2 * M_PI); cairo_fill(cr); cairo_restore(cr); } /* Draw text with manual letter-spacing (cairo toy text API has no * built-in tracking control). */ static void draw_tracked_text(cairo_t *cr, const char *s, double x, double y, double tracking) { cairo_text_extents_t ext; double cx = x; char buf[2] = {0, 0}; for (const char *p = s; *p; p++) { buf[0] = *p; cairo_text_extents(cr, buf, &ext); cairo_move_to(cr, cx, y); cairo_show_text(cr, buf); cx += ext.x_advance + tracking; } } static void draw_wordmark(cairo_t *cr) { cairo_text_extents_t ext; cairo_select_font_face(cr, "sans-serif", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_BOLD); cairo_set_font_size(cr, 64); cairo_set_source_rgb(cr, TEAL_R, TEAL_G, TEAL_B); /* Measure full tracked width to right-align at x = W - 120. */ const char *word = "HAMMERHEAD"; double tracking = 8.0; double total_w = 0; char buf[2] = {0, 0}; for (const char *p = word; *p; p++) { buf[0] = *p; cairo_text_extents(cr, buf, &ext); total_w += ext.x_advance + tracking; } total_w -= tracking; double x = W - 120 - total_w; double y = H - 150; draw_tracked_text(cr, word, x, y, tracking); /* Subtitle */ cairo_select_font_face(cr, "sans-serif", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL); cairo_set_font_size(cr, 22); cairo_set_source_rgb(cr, MUTED_R, MUTED_G, MUTED_B); const char *sub = "ZYGAENA"; double sub_tracking = 6.0; double sub_w = 0; for (const char *p = sub; *p; p++) { buf[0] = *p; cairo_text_extents(cr, buf, &ext); sub_w += ext.x_advance + sub_tracking; } sub_w -= sub_tracking; draw_tracked_text(cr, sub, W - 120 - sub_w, y + 40, sub_tracking); } int main(int argc, char **argv) { const char *outpath = (argc > 1) ? argv[1] : "/tmp/hammerhead.png"; cairo_surface_t *surface = cairo_image_surface_create(CAIRO_FORMAT_RGB24, W, H); cairo_t *cr = cairo_create(surface); draw_background(cr); draw_sonar_arcs(cr); draw_hammerhead_motif(cr); draw_wordmark(cr); cairo_status_t st = cairo_surface_write_to_png(surface, outpath); if (st != CAIRO_STATUS_SUCCESS) { fprintf(stderr, "write_to_png failed: %s\n", cairo_status_to_string(st)); cairo_destroy(cr); cairo_surface_destroy(surface); return 1; } printf("wrote %s (%dx%d)\n", outpath, W, H); cairo_destroy(cr); cairo_surface_destroy(surface); return 0; } #!/bin/ksh93 # Build script for hammerhead-kernel # Packages kernel modules, boot infrastructure, and CPU microcode from proto area # # Requires PROTO_AREA to be set to the hammerhead proto path, e.g.: # export PROTO_AREA=/usr/src/hammerhead-build/root_amd64 # # Optional: ROOTFS_DIR for rootfs overlay (boot archive filelist, etc.) # export ROOTFS_DIR=/usr/src/hammerhead/rootfs set -e PROTO_AREA="${PROTO_AREA:?PROTO_AREA must be set to hammerhead proto path}" # Validate required directories for dir in kernel boot; do if [ ! -d "$PROTO_AREA/$dir" ]; then printf "ERROR: %s/%s does not exist\n" "$PROTO_AREA" "$dir" printf "Has the hammerhead build completed successfully?\n" exit 1 fi done # Validate critical files for f in kernel/genunix kernel/unix boot/loader64.efi; do if [ ! -f "$PROTO_AREA/$f" ]; then printf "ERROR: %s not found in proto area\n" "$f" exit 1 fi done # --- Kernel modules (includes driver .conf files) --- printf "Packaging kernel modules...\n" mkdir -p "$PKGDIR/kernel" (cd "$PROTO_AREA/kernel" && find . | cpio -pdm "$PKGDIR/kernel" 2>/dev/null) # Set ownership: kernel modules are root:sys chown -R root:sys "$PKGDIR/kernel" # --- Boot infrastructure (loader, fonts, splash, forth scripts) --- printf "Packaging boot files...\n" mkdir -p "$PKGDIR/boot" (cd "$PROTO_AREA/boot" && find . | cpio -pdm "$PKGDIR/boot" 2>/dev/null) # Apply rootfs overlay for boot files (filelist.ramdisk, etc.) if [ -n "$ROOTFS_DIR" ] && [ -d "$ROOTFS_DIR/boot" ]; then printf "Applying rootfs overlay for boot...\n" (cd "$ROOTFS_DIR/boot" && find . | cpio -pdm "$PKGDIR/boot" 2>/dev/null) fi chown -R root:sys "$PKGDIR/boot" # --- CPU microcode --- if [ -d "$PROTO_AREA/platform/amd64/ucode" ]; then printf "Packaging CPU microcode...\n" mkdir -p "$PKGDIR/platform/amd64/ucode" (cd "$PROTO_AREA/platform/amd64/ucode" && find . | cpio -pdm "$PKGDIR/platform/amd64/ucode" 2>/dev/null) chown -R root:sys "$PKGDIR/platform/amd64/ucode" fi # --- Post-install script --- mkdir -p "$PKGDIR/.SCRIPTS" cat > "$PKGDIR/.SCRIPTS/post-install.sh" << 'SCRIPT' #!/bin/ksh93 # Update boot archive to include new kernel modules # Only run if we're on a live system (not during initial install to altroot) if [ -f /kernel/genunix ]; then # Generate boot archive using cpio method (not bootadm) if [ -f /boot/solaris/filelist.ramdisk ]; then printf "Regenerating boot archive...\n" tmpfilelist=/tmp/boot_archive_files.$$ tmparchive=/tmp/boot_archive.$$ (cd / && while IFS= read -r line; do [[ -z "$line" || "$line" = \#* ]] && continue [[ -e "$line" ]] && printf "%s\n" "$line" done < /boot/solaris/filelist.ramdisk) > "$tmpfilelist" (cd / && cpio -o -H odc < "$tmpfilelist" 2>/dev/null) > "$tmparchive" digest -a sha1 "$tmparchive" > /boot/boot_archive.hash gzip -9 -c "$tmparchive" > /boot/boot_archive rm -f "$tmpfilelist" "$tmparchive" printf "Boot archive updated.\n" fi fi printf "Kernel updated. A reboot is required to load the new kernel.\n" SCRIPT chmod 755 "$PKGDIR/.SCRIPTS/post-install.sh" # --- Summary --- MODULES=$(find "$PKGDIR/kernel" -type f | wc -l) BOOT_FILES=$(find "$PKGDIR/boot" -type f | wc -l) SIZE=$(du -sh "$PKGDIR" | cut -f1) printf "Packaged %d kernel files, %d boot files (%s total)\n" "$MODULES" "$BOOT_FILES" "$SIZE" # hammerhead-kernel - Kernel modules, boot infrastructure, and microcode # https://git.sharkos.one/zygaena/hammerhead [package] name = "hammerhead-kernel" version = "0.1.0" release = 1 description = "Hammerhead kernel modules, boot loader, and CPU microcode" url = "https://git.sharkos.one/zygaena/hammerhead" license = "CDDL-1.0" maintainer = "Chris Tusa " arch = "x86_64" conflicts = ["illumos-kernel", "illumos-platform", "illumos-boot"] [dependencies] runtime = [] build = [] [build] parallel = false #!/bin/ksh93 # Build script for hammerhead-userland # Packages commands, libraries, headers, and system configuration from proto area # # Requires PROTO_AREA to be set to the hammerhead proto path, e.g.: # export PROTO_AREA=/usr/src/hammerhead-build/root_amd64 # # Optional: ROOTFS_DIR for rootfs overlay (config files, ownership manifest) # export ROOTFS_DIR=/usr/src/hammerhead/rootfs set -e PROTO_AREA="${PROTO_AREA:?PROTO_AREA must be set to hammerhead proto path}" # Validate required directories for dir in bin sbin lib usr etc var; do if [ ! -d "$PROTO_AREA/$dir" ]; then printf "ERROR: %s/%s does not exist\n" "$PROTO_AREA" "$dir" printf "Has the hammerhead build completed successfully?\n" exit 1 fi done # Validate critical files for f in lib/libc.so.1 lib/ld.so.1 sbin/init; do if [ ! -f "$PROTO_AREA/$f" ]; then printf "ERROR: %s not found in proto area\n" "$f" exit 1 fi done # --- /bin (real directory with boot-essential commands) --- printf "Packaging bin...\n" mkdir -p "$PKGDIR/bin" (cd "$PROTO_AREA/bin" && find . | cpio -pdm "$PKGDIR/bin" 2>/dev/null) # --- /sbin (essential system commands) --- printf "Packaging sbin...\n" mkdir -p "$PKGDIR/sbin" (cd "$PROTO_AREA/sbin" && find . | cpio -pdm "$PKGDIR/sbin" 2>/dev/null) # --- /lib (essential libraries + SMF infrastructure) --- printf "Packaging lib...\n" mkdir -p "$PKGDIR/lib" (cd "$PROTO_AREA/lib" && find . | cpio -pdm "$PKGDIR/lib" 2>/dev/null) # --- /usr (commands, libraries, headers, man pages, data) --- printf "Packaging usr...\n" mkdir -p "$PKGDIR/usr" (cd "$PROTO_AREA/usr" && find . | cpio -pdm "$PKGDIR/usr" 2>/dev/null) # --- /etc (system configuration) --- # Exclude system-specific runtime files that are populated at install time # or by the kernel. These must NOT be overwritten on upgrade. printf "Packaging etc...\n" mkdir -p "$PKGDIR/etc" (cd "$PROTO_AREA/etc" && find . \ ! -name name_to_major \ ! -name path_to_inst \ ! -name driver_aliases \ ! -name driver_classes \ ! -name minor_perm \ ! -name device.tab \ ! -name devlink.tab \ ! -name dacf.conf \ ! -name iu.ap \ ! -name mnttab \ ! -name utmpx \ ! -name wtmpx \ | cpio -pdm "$PKGDIR/etc" 2>/dev/null) # --- /var (state directories — mostly empty structure) --- printf "Packaging var...\n" mkdir -p "$PKGDIR/var" (cd "$PROTO_AREA/var" && find . | cpio -pdm "$PKGDIR/var" 2>/dev/null) # --- Apply rootfs overlay --- # These are Hammerhead-specific config files that override proto defaults if [ -n "$ROOTFS_DIR" ] && [ -d "$ROOTFS_DIR" ]; then printf "Applying rootfs overlay...\n" for overlay_dir in etc lib root; do if [ -d "$ROOTFS_DIR/$overlay_dir" ]; then (cd "$ROOTFS_DIR/$overlay_dir" && find . | cpio -pdm "$PKGDIR/$overlay_dir" 2>/dev/null) fi done # Copy .zshrc for root if [ -f "$ROOTFS_DIR/root/.zshrc" ]; then mkdir -p "$PKGDIR/root" cp "$ROOTFS_DIR/root/.zshrc" "$PKGDIR/root/.zshrc" fi fi # --- Remove items that should NOT be packaged --- # Build tools rm -rf "$PKGDIR/opt/onbld" 2>/dev/null || true # Test suites (large, not needed on target) rm -rf "$PKGDIR/opt/"*-tests 2>/dev/null || true rm -rf "$PKGDIR/opt/test-runner" 2>/dev/null || true # Build system remnants rm -rf "$PKGDIR/usr/src" 2>/dev/null || true # --- Apply ownership from manifest --- if [ -n "$ROOTFS_DIR" ] && [ -f "$ROOTFS_DIR/ownership.manifest" ]; then printf "Applying ownership manifest...\n" # Phase 1: bulk defaults chown -R root:sys "$PKGDIR/" chown -R root:bin "$PKGDIR/bin" "$PKGDIR/sbin" \ "$PKGDIR/usr/bin" "$PKGDIR/usr/sbin" \ "$PKGDIR/usr/lib" "$PKGDIR/lib" 2>/dev/null || true # Phase 2: per-file overrides from manifest while IFS=' ' read -r path mode owner group; do # Skip comments and blank lines [[ -z "$path" || "$path" = \#* ]] && continue target="$PKGDIR$path" if [ -e "$target" ] || [ -L "$target" ]; then chmod "$mode" "$target" 2>/dev/null || true chown "$owner:$group" "$target" 2>/dev/null || true fi done < "$ROOTFS_DIR/ownership.manifest" else # No manifest — apply bulk defaults only printf "WARNING: No ownership manifest found, applying bulk defaults\n" chown -R root:sys "$PKGDIR/" chown -R root:bin "$PKGDIR/bin" "$PKGDIR/sbin" \ "$PKGDIR/usr/bin" "$PKGDIR/usr/sbin" \ "$PKGDIR/usr/lib" "$PKGDIR/lib" 2>/dev/null || true fi # --- Create .CONFIG (config-protected files) --- # These files will not be overwritten on upgrade if user has modified them. # New versions are installed as .pkg for manual merging. cat > "$PKGDIR/.CONFIG" << 'EOF' /etc/system /etc/vfstab /etc/passwd /etc/shadow /etc/group /etc/hosts /etc/inet/hosts /etc/nsswitch.conf /etc/resolv.conf /etc/nodename /etc/pam.conf /etc/profile /etc/zshenv /etc/zshrc /etc/zprofile /etc/default/init /etc/default/login /etc/default/useradd /etc/security/policy.conf /etc/security/crypt.conf /etc/crypto/pkcs11.conf /etc/ssh/sshd_config /etc/syslog.conf /etc/sudoers.d/zygaena /etc/svc/profile/site.xml /etc/coral/coral.conf EOF # --- Post-install script --- mkdir -p "$PKGDIR/.SCRIPTS" cat > "$PKGDIR/.SCRIPTS/post-install.sh" << 'SCRIPT' #!/bin/ksh93 # Refresh SMF repository if svc.configd is running (live system upgrade) if [ -f /lib/svc/bin/svc.configd ]; then if pgrep -x svc.configd >/dev/null 2>&1; then printf "Refreshing SMF manifests...\n" svccfg import /lib/svc/manifest 2>/dev/null || true fi fi SCRIPT chmod 755 "$PKGDIR/.SCRIPTS/post-install.sh" # --- Summary --- CMDS=0 for d in "$PKGDIR/bin" "$PKGDIR/sbin" "$PKGDIR/usr/bin" "$PKGDIR/usr/sbin"; do if [ -d "$d" ]; then n=$(find "$d" -type f | wc -l) CMDS=$((CMDS + n)) fi done LIBS=$(find "$PKGDIR/lib" "$PKGDIR/usr/lib" -name "*.so.*" -type f 2>/dev/null | wc -l) SIZE=$(du -sh "$PKGDIR" | cut -f1) printf "Packaged %d commands, %d libraries (%s total)\n" "$CMDS" "$LIBS" "$SIZE" # hammerhead-userland - Commands, libraries, headers, and system configuration # https://git.sharkos.one/zygaena/hammerhead [package] name = "hammerhead-userland" version = "0.1.0" release = 1 description = "Hammerhead userland: commands, libraries, headers, and system configuration" url = "https://git.sharkos.one/zygaena/hammerhead" license = "CDDL-1.0" maintainer = "Chris Tusa " arch = "x86_64" conflicts = ["illumos-core", "illumos-libs", "illumos-utils", "illumos-config", "illumos-smf"] [dependencies] runtime = ["hammerhead-kernel"] build = [] [build] parallel = false #!/bin/sh # Xreset - runs as root at session end on display :0. # Return console ownership to root (TakeConsole). Absolute paths. /bin/chown root /dev/console /bin/chmod 622 /dev/console exit 0 Xcursor.theme: whiteglass xlogin*login.translations: #override \ CtrlR: abort-display()\n\ F1: set-session-argument(failsafe) finish-field()\n\ Delete: delete-character()\n\ Left: move-backward-character()\n\ Right: move-forward-character()\n\ Home: move-to-begining()\n\ End: move-to-end()\n\ CtrlKP_Enter: set-session-argument(failsafe) finish-field()\n\ KP_Enter: set-session-argument() finish-field()\n\ CtrlReturn: set-session-argument(failsafe) finish-field()\n\ Return: set-session-argument() finish-field() ! `CLIENTHOST` is an xdm token replaced with the system hostname at display ! time (dynamic per machine). Show ONLY the hostname -- deliberately NO ! "Welcome"/invitation language, which has been argued in unauthorized-access ! cases to imply an invitation. Branding lives on the wallpaper wordmark. xlogin*greeting: CLIENTHOST ! The display IS access-controlled (start.sh starts Xorg with a MIT-MAGIC-COOKIE ! -auth file), but xdm does not track auth for a `foreign` display and would ! otherwise show its scary "This is an unsecure session". Use the same host text. xlogin*unsecureGreeting: CLIENTHOST xlogin*namePrompt: \040\040\040\040\040\040\040Login: xlogin*passwdPrompt: \040\040\040\040Password: ! Mask the password with '*' (keystroke feedback; only exposes length). xlogin*echoPasswd: true xlogin*echoPasswdChar: * xlogin*fail: Login incorrect or forbidden by policy #if WIDTH > 800 xlogin*greetFont: -adobe-helvetica-bold-o-normal--24-240-75-75-p-138-iso8859-1 xlogin*font: -adobe-helvetica-medium-r-normal--18-180-75-75-p-98-iso8859-1 xlogin*promptFont: -adobe-helvetica-bold-r-normal--18-180-75-75-p-103-iso8859-1 xlogin*failFont: -adobe-helvetica-bold-r-normal--18-180-75-75-p-103-iso8859-1 xlogin*greetFace: Serif-24:bold:italic xlogin*face: Helvetica-18 xlogin*promptFace: Helvetica-18:bold xlogin*failFace: Helvetica-18:bold #else xlogin*greetFont: -adobe-helvetica-bold-o-normal--17-120-100-100-p-92-iso8859-1 xlogin*font: -adobe-helvetica-medium-r-normal--12-120-75-75-p-67-iso8859-1 xlogin*promptFont: -adobe-helvetica-bold-r-normal--12-120-75-75-p-70-iso8859-1 xlogin*failFont: -adobe-helvetica-bold-o-normal--14-140-75-75-p-82-iso8859-1 xlogin*greetFace: Serif-18:bold:italic xlogin*face: Helvetica-12 xlogin*promptFace: Helvetica-12:bold xlogin*failFace: Helvetica-14:bold #endif #ifdef COLOR ! Zygaena marine-dark palette ! bg #0d1117 (deep marine) ! text #cfe0e0 (pale teal-grey) ! accent #1fb6b6 (teal - greeting/prompt/input) ! input #161b22 (slightly raised field) ! fail #ff5f56 (warning red) xlogin*borderWidth: 1 xlogin*frameWidth: 4 xlogin*innerFramesWidth: 1 xlogin*shdColor: #0a0d12 xlogin*hiColor: #1c2530 xlogin*background: #0d1117 xlogin*foreground: #cfe0e0 xlogin*inpColor: #161b22 xlogin*greetColor: #1fb6b6 xlogin*promptColor: #1fb6b6 xlogin*failColor: #ff5f56 *Foreground: #cfe0e0 *Background: #0d1117 #else xlogin*borderWidth: 3 xlogin*frameWidth: 0 xlogin*innerFramesWidth: 1 xlogin*shdColor: black xlogin*hiColor: black #endif ! Off-brand XLibre "X" logo hidden for now; a Zygaena mark (XPM) can be dropped ! in here later. No logoFileName => the greeter shows the login box only. xlogin*useShape: true xlogin*logoPadding: 10 ! hh-greeter-power: Shutdown/Reboot button bar on the greeter (Zygaena teal). HhGreeterPower*background: #0d1117 HhGreeterPower*Box.background: #0d1117 HhGreeterPower*Command.background: #12303a HhGreeterPower*Command.foreground: #54e0e0 HhGreeterPower*Command.borderColor: #1fb6b6 HhGreeterPower*Command.borderWidth: 1 HhGreeterPower*Command.internalWidth: 14 HhGreeterPower*Command.internalHeight: 8 HhGreeterPower*Command.font: -*-helvetica-bold-r-normal-*-14-*-*-*-*-*-iso8859-1 ! Confirmation dialog (Shut down? / Reboot?) HhGreeterPower*Dialog.background: #12303a HhGreeterPower*Dialog.borderColor: #1fb6b6 HhGreeterPower*Dialog.label.background: #12303a HhGreeterPower*Dialog.label.foreground: #cfe0e0 HhGreeterPower*Dialog.label.font: -*-helvetica-medium-r-normal-*-14-*-*-*-*-*-iso8859-1 XConsole.text.geometry: 480x130 XConsole.verbose: true XConsole*iconic: true XConsole*font: fixed Chooser*geometry: 700x500+300+200 Chooser*allowShellResize: false Chooser*viewport.forceBars: true Chooser*label.font: *-new century schoolbook-bold-i-normal-*-240-* Chooser*label.label: XDMCP Host Menu from CLIENTHOST Chooser*list.font: -*-*-medium-r-normal-*-*-230-*-*-c-*-iso8859-1 Chooser*Command.font: *-new century schoolbook-bold-r-normal-*-180-* # # Xservers file, Hammerhead workstation # # DECOUPLED: our zyginit start.sh launches Xorg itself (xdm-managed startup # hangs on illumos VT acquisition). xdm therefore manages only the greeter + # session on the already-running server, declared FOREIGN — xdm does not # start or stop it. See DESKTOP_XLIBRE_XDM_GREETER_PLAN.md. # :0 foreign #!/bin/sh # Xsession - runs AS the authenticated user after login (xdm sets # $USER/$HOME/$DISPLAY/$XAUTHORITY). # # Put the Hammerhead desktop config (shipped under /usr/local/etc/xdg) on the # XDG search path so openbox/tint2/conky find the BRANDED config even for a # fresh user with no ~/.config. Exported here so it is inherited by the whole # session tree (including a user's own ~/.xsession, if any). export XDG_CONFIG_DIRS="/usr/local/etc/xdg:${XDG_CONFIG_DIRS:-/etc/xdg}" export XDG_DATA_DIRS="/usr/local/share:${XDG_DATA_DIRS:-/usr/share}" # Seed ~/.config with the Hammerhead desktop defaults if absent, so the # openbox autostart (tint2/conky/wallpaper) fires even for a fresh user. /usr/local/bin/hh-desktop-init # Prefer the user's own ~/.xsession; otherwise the Hammerhead Openbox session. if [ -x "$HOME/.xsession" ]; then exec "$HOME/.xsession" fi exec /usr/local/bin/openbox-session #!/bin/sh # Xsetup_0 - branded backdrop drawn before the xlogin box appears. # Runs as root on display :0. Absolute paths only. # # HOME: xdm's setup env is minimal; feh needs a HOME to read/write its config. # XAUTHORITY: connect to the access-controlled (foreign) server started by # the zyginit start.sh with our MIT-MAGIC-COOKIE. export HOME=/root export XAUTHORITY=/var/lib/xdm/authdir/authfiles/A:0 /usr/local/bin/xsetroot -solid "#0d1117" [ -r /usr/local/share/backgrounds/hammerhead.png ] && \ /usr/local/bin/feh --bg-fill /usr/local/share/backgrounds/hammerhead.png & # Shutdown/Reboot button bar, bottom-right corner (no WM on the greeter). # Killed by Xstartup on login so it never leaks into the user's session. /usr/local/bin/hh-greeter-power -geometry -40-12 & #!/bin/sh # Xstartup - runs as root at session start on display :0. # Give console ownership to the logging-in user (GiveConsole). Absolute paths. /bin/chown "$USER" /dev/console # Remove the greeter's Shutdown/Reboot button bar so it doesn't leak into the # user's session (the foreign server is not reset on login). /usr/bin/pkill -x hh-greeter-power 2>/dev/null exit 0 #!/bin/sh # Build script for hammerhead-xdm. # # No upstream tarball - all inputs are local files shipped alongside this # script. This port overlays Hammerhead branding + X-server/session wiring # onto the stock xdm defaults (installed under $PREFIX/lib/X11/xdm by the # xdm port), and ships a DISABLED zyginit xdm service under /etc. set -e PORTDIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd) # --- A. Config overlay -> $PREFIX/lib/X11/xdm/ --- XDMDIR="$PKGDIR$PREFIX/lib/X11/xdm" mkdir -p "$XDMDIR" # Plain config files (mode 644). install -m 644 "$PORTDIR/xdm-config" "$XDMDIR/xdm-config" install -m 644 "$PORTDIR/Xservers" "$XDMDIR/Xservers" install -m 644 "$PORTDIR/Xresources" "$XDMDIR/Xresources" # Executable X* hook scripts (mode 755). install -m 755 "$PORTDIR/Xsetup_0" "$XDMDIR/Xsetup_0" install -m 755 "$PORTDIR/Xsession" "$XDMDIR/Xsession" install -m 755 "$PORTDIR/Xstartup" "$XDMDIR/Xstartup" install -m 755 "$PORTDIR/Xreset" "$XDMDIR/Xreset" # --- A2. hh-greeter-power: Xaw Shutdown/Reboot button bar for the greeter --- mkdir -p "$PKGDIR$PREFIX/bin" gcc "$PORTDIR/hh-greeter-power.c" \ -I"$PREFIX/include" -L"$PREFIX/lib" -R"$PREFIX/lib" \ -lXaw7 -lXmu -lXt -lX11 \ -o "$PKGDIR$PREFIX/bin/hh-greeter-power" # --- B. zyginit service (shipped DISABLED) -> /etc/zyginit/services/xdm/ --- # Absolute /etc, OUTSIDE $PREFIX. No enabled.d symlink is created. SVCDIR="$PKGDIR/etc/zyginit/services/xdm" mkdir -p "$SVCDIR" install -m 644 "$PORTDIR/service.toml" "$SVCDIR/service.toml" install -m 755 "$PORTDIR/start.sh" "$SVCDIR/start.sh" /* * hh-greeter-power.c - a tiny Athena (Xaw) button bar with Shutdown and * Reboot buttons for the xdm greeter, each guarded by a confirmation popup. * * xdm's classic xlogin greeter has no power buttons, and the greeter display * runs with no window manager. This standalone client is launched by * Xsetup_0 (as root, so `zygctl poweroff`/`reboot` have the privilege to run) * and killed by Xstartup when a session begins, so it never leaks into the * user's desktop. Styling comes from the HhGreeterPower* resources in * Xresources (loaded by xrdb); placement from the -geometry Xsetup_0 passes. * * Build: cc hh-greeter-power.c -I$PREFIX/include -L$PREFIX/lib -R$PREFIX/lib \ * -lXaw7 -lXmu -lXt -lX11 -o hh-greeter-power */ #include #include #include #include #include #include #include static Widget toplevel; static Widget confirm_popup = NULL; static const char *pending_cmd = NULL; static void dismiss(void) { if (confirm_popup != NULL) { XtPopdown(confirm_popup); XtDestroyWidget(confirm_popup); confirm_popup = NULL; } } static void do_it(Widget w, XtPointer client, XtPointer call) { (void) w; (void) client; (void) call; if (pending_cmd != NULL) (void) system(pending_cmd); /* machine goes down; no return expected */ dismiss(); } static void cancel(Widget w, XtPointer client, XtPointer call) { (void) w; (void) client; (void) call; dismiss(); } /* Pop a centered confirmation dialog for a power action. */ static void confirm(const char *prompt, const char *cmd, const char *okLabel) { Widget dlg; Dimension pw, ph; Position px, py; int sw, sh; dismiss(); /* only one popup at a time */ pending_cmd = cmd; confirm_popup = XtVaCreatePopupShell("confirm", transientShellWidgetClass, toplevel, (char *)NULL); dlg = XtVaCreateManagedWidget("dialog", dialogWidgetClass, confirm_popup, XtNlabel, prompt, (char *)NULL); XawDialogAddButton(dlg, okLabel, do_it, NULL); XawDialogAddButton(dlg, "Cancel", cancel, NULL); /* Center on screen (no window manager to place it). */ XtRealizeWidget(confirm_popup); XtVaGetValues(confirm_popup, XtNwidth, &pw, XtNheight, &ph, (char *)NULL); sw = WidthOfScreen(XtScreen(toplevel)); sh = HeightOfScreen(XtScreen(toplevel)); px = (Position)((sw - (int)pw) / 2); py = (Position)((sh - (int)ph) / 2); XtVaSetValues(confirm_popup, XtNx, px, XtNy, py, (char *)NULL); XtPopup(confirm_popup, XtGrabExclusive); } static void shutdown_cb(Widget w, XtPointer client, XtPointer call) { (void) w; (void) client; (void) call; confirm("Shut down this system?", "/sbin/zygctl poweroff", "Shut down"); } static void reboot_cb(Widget w, XtPointer client, XtPointer call) { (void) w; (void) client; (void) call; confirm("Reboot this system?", "/sbin/zygctl reboot", "Reboot"); } int main(int argc, char **argv) { XtAppContext app; Widget box, sd, rb; toplevel = XtOpenApplication(&app, "HhGreeterPower", NULL, 0, &argc, argv, NULL, applicationShellWidgetClass, NULL, 0); box = XtVaCreateManagedWidget("box", boxWidgetClass, toplevel, XtNorientation, XtorientHorizontal, (char *)NULL); sd = XtVaCreateManagedWidget("Shutdown", commandWidgetClass, box, (char *)NULL); XtAddCallback(sd, XtNcallback, shutdown_cb, NULL); rb = XtVaCreateManagedWidget("Reboot", commandWidgetClass, box, (char *)NULL); XtAddCallback(rb, XtNcallback, reboot_cb, NULL); XtRealizeWidget(toplevel); XtAppMainLoop(app); return 0; } # hammerhead-xdm - Zygaena branding + X-server/session wiring overlaid onto # xdm's installed default config, plus Hammerhead's first port-provided # zyginit service (shipped DISABLED). # # No upstream source: all inputs are local config files shipped alongside # build.sh. This port depends on xdm (which installs the stock defaults we # overlay) and hammerhead-desktop (Openbox session + branded backdrop). # See build.sh and docs/roadmap/DESKTOP_XLIBRE_XDM_GREETER_PLAN.md. [package] name = "hammerhead-xdm" version = "1.0.0" release = 12 description = "Zygaena marine-dark xdm greeter branding, system Xsession/Xservers wiring, and a disabled zyginit xdm service" url = "https://git.sharkos.one/zygaena/hammerhead" license = "CDDL-1.0" maintainer = "Chris Tusa " arch = "x86_64" [dependencies] # xsetroot: Xsetup_0 paints a solid backdrop; xrdb: xdm loads the branded # Xresources onto the greeter; xauth: start.sh sets the MIT-MAGIC-COOKIE for # the decoupled (foreign) server (release 3). runtime = ["xdm", "hammerhead-desktop", "xsetroot", "xrdb", "xauth"] # libXaw/libXt/libXmu: to compile hh-greeter-power (the greeter's Xaw # Shutdown/Reboot button bar). build = ["libXaw", "libXt", "libXmu", "libX11"] [build] parallel = false # Hammerhead's first port-provided zyginit service. # Graphical login via xdm on the console framebuffer. Runs as ROOT (xdm # itself drops privileges per session), so NO `user` field. Shipped # DISABLED: this port creates no /etc/zyginit/enabled.d/xdm symlink. # # Coexists with console-login: the decoupled X server lives on its own VT # (vtdaemon holds vt1, X gets vt2), so it does NOT contend for /dev/console. # Ctrl-Alt-F# switches between the greeter (vt2) and the text consoles. [service] name = "xdm" description = "Graphical login (xdm on the console framebuffer)" type = "daemon" [exec] start = "/etc/zyginit/services/xdm/start.sh" [dependencies] # vtdaemon MUST be up first: it configures the kernel VT subsystem, without # which Xorg's VT_WAITACTIVE bring-up hangs (started with no ctty by zyginit). requires = ["utmpd", "filesystem", "vtdaemon"] after = ["devfs"] [contract] param = ["inherit", "noorphan"] fatal = ["hwerr"] [restart] on = "failure" delay = 5 max_retries = 3 #!/bin/zsh # zyginit start hook for the Hammerhead xdm graphical login. # # DECOUPLED server model: xdm-managed X-server startup hangs on illumos VT # acquisition ("using VT number 2" never completes) — while a separately # started server works fine. So we start our own Xorg here (the proven M2/M3 # launch), then run xdm against it as a FOREIGN display (xdm draws only the # greeter + runs the session; it does not start/stop the server). See # docs/roadmap/DESKTOP_XLIBRE_XDM_GREETER_PLAN.md. # # MIT-MAGIC-COOKIE-1 access control so the display is authorized (no # "unsecure session" warning). Absolute paths only (zyginit convention). set -u XAUTHDIR=/var/lib/xdm/authdir/authfiles XAUTH="$XAUTHDIR/A:0" # Robustness: a crashed prior instance (or a zyginit restart whose # backgrounded Xorg orphaned past the contract teardown) can leave a stale # server, X lock, or xdm pid file. Clear them first so a restart does NOT # accumulate X servers. We are still zsh here (xdm is exec'd at the end), so # pkill xdm cannot hit this script. /usr/bin/pkill -9 -x Xorg 2>/dev/null /usr/bin/pkill -9 -x xdm 2>/dev/null /bin/sleep 1 /bin/mkdir -p "$XAUTHDIR" /bin/rm -f "$XAUTH" /var/run/xdm.pid /tmp/.X0-lock /tmp/.X11-unix/X0 2>/dev/null # Fresh cookie, shared between the server (-auth) and every X client via # XAUTHORITY (xdm greeter, Xsetup, and the user session all inherit it). COOKIE=$(/usr/bin/openssl rand -hex 16) /usr/local/bin/xauth -f "$XAUTH" add :0 . "$COOKIE" export XAUTHORITY="$XAUTH" # Start Xorg with auth, in the background (the launch that works on our console). /usr/local/bin/Xorg :0 -nolisten tcp -auth "$XAUTH" -config /etc/X11/xorg.conf & # Wait for the server socket (illumos has no seq/timeout(1)). i=0 while [ ! -S /tmp/.X11-unix/X0 ] && [ "$i" -lt 60 ]; do /bin/sleep 0.25; i=$((i + 1)); done /bin/sleep 1 # Run xdm on the foreign, authorized server. exec so zyginit supervises xdm; # Xorg is in the same process contract and is torn down with the service. exec /usr/local/bin/xdm -nodaemon -config /usr/local/lib/X11/xdm/xdm-config ! ! Hammerhead xdm-config: overlaid onto the stock xdm default. Only the ! display-:0 startup/reset hooks are re-pointed at our Xstartup/Xreset ! (GiveConsole/TakeConsole console-ownership handling); the setup, session, ! and resources hooks already reference the paths we ship. XDMCP stays OFF. ! DisplayManager.authDir: /var/lib/xdm DisplayManager.errorLogFile: /var/log/xdm.log DisplayManager.pidFile: /var/run/xdm.pid DisplayManager.keyFile: /usr/local/lib/X11/xdm/xdm-keys DisplayManager.servers: /usr/local/lib/X11/xdm/Xservers DisplayManager.accessFile: /usr/local/lib/X11/xdm/Xaccess DisplayManager*resources: /usr/local/lib/X11/xdm/Xresources DisplayManager.willing: su nobody -s /bin/sh -c /usr/local/lib/X11/xdm/Xwilling ! All displays should use authorization, but we cannot be sure ! X terminals may not be configured that way, so they will require ! individual resource settings. DisplayManager*authorize: true ! DisplayManager*chooser: /usr/local/lib/X11/xdm/chooser DisplayManager*startup: /usr/local/lib/X11/xdm/Xstartup DisplayManager*session: /usr/local/lib/X11/xdm/Xsession DisplayManager*reset: /usr/local/lib/X11/xdm/Xreset DisplayManager*authComplain: true ! The following resources set up display :0 as the console. DisplayManager._0.setup: /usr/local/lib/X11/xdm/Xsetup_0 DisplayManager._0.startup: /usr/local/lib/X11/xdm/Xstartup DisplayManager._0.reset: /usr/local/lib/X11/xdm/Xreset DisplayManager._0.session: /usr/local/lib/X11/xdm/Xsession DisplayManager*loginmoveInterval: 10 ! SECURITY: do not listen for XDMCP or Chooser requests ! Comment out this line if you want to manage X terminals with xdm DisplayManager.requestPort: 0 #!/bin/sh # Build script for harfbuzz (Meson, Template B). # Deps: freetype, glib2 (both ported). cairo/icu support disabled (cairo # isn't built yet at this point in the order, and ICU isn't ported/needed). set -e cd "$SRCDIR" export PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig:$PREFIX/share/pkgconfig:/usr/lib/pkgconfig:$PKG_CONFIG_PATH" export CFLAGS="${CFLAGS} -D__EXTENSIONS__" export LDFLAGS="${LDFLAGS} -Wl,-R,$PREFIX/lib" meson setup build \ --prefix="$PREFIX" \ --libdir=lib \ --buildtype=release \ -Ddefault_library=shared \ -Dtests=disabled \ -Ddocs=disabled \ -Dfreetype=enabled \ -Dglib=enabled \ -Dcairo=disabled \ -Dicu=disabled ninja -C build -j${JOBS:-1} DESTDIR="$PKGDIR" ninja -C build install # harfbuzz - text shaping engine (pango dep) # https://github.com/harfbuzz/harfbuzz # # NOTE: freetype was built WITHOUT harfbuzz (Task 5, --with-harfbuzz=no) # to break the freetype<->harfbuzz circular dependency at bootstrap. # harfbuzz->freetype is the one-way edge here; do NOT rebuild freetype. [package] name = "harfbuzz" version = "14.2.1" release = 1 description = "Text shaping engine" url = "https://harfbuzz.github.io/" license = "MIT" maintainer = "Chris Tusa " arch = "x86_64" [dependencies] runtime = ["freetype", "glib2"] build = ["freetype", "glib2"] [[source]] file = "harfbuzz-14.2.1.tar.xz" urls = ["https://github.com/harfbuzz/harfbuzz/releases/download/14.2.1/harfbuzz-14.2.1.tar.xz"] checksum = "a54a5d8e9380a41fbb762ce367bcbf7704792dfca0d93f1bbca86c5a57902e0e" [build] parallel = true #!/bin/sh # Build script for imlib2 (autotools, Template A). # NOTE: imlib2's optional loaders (gif/tiff/webp/heif/jxl/...) are each # auto-probed via AC_CHECK_LIB/pkg-config in configure.ac - there are no # --without- flags to pass. Since none of those libs are ported to # Hammerhead yet, the loaders auto-disable and only png/jpeg (both present) # get built. # # REVISED (Task 1b-3, 2026-07-22): originally built --without-x on the # assumption that "X11 client apps link libX11 themselves" - WRONG. imlib2's # X11 support (gated by AC_PATH_XTRA/BUILD_X11) is not just SHM plumbing; it # ships the imlib_context_set_{display,visual,colormap,drawable}() / # imlib_render_image_on_drawable*() / imlib_create_image_from_drawable() API # that feh (wallpaper-setting) and other imlib2 consumers (tint2's # IMLIB2>=1.4.2 dep) call directly. --without-x drops those symbols entirely, # so feh failed to link ("undefined reference to imlib_context_set_drawable" # etc). Enable X11 support instead (needs no explicit flag - AC_PATH_XTRA # auto-detects libX11 under $PREFIX via the CFLAGS/LDFLAGS -I/-L already # exported below). set -e cd "$SRCDIR" # MANDATORY libtool fix - see Template A comment in DESKTOP_XLIBRE_PHASE1A_PLAN.md. if [ -f configure ]; then sed -i -E 's/(kopensolaris\*-gnu)([^)]*\))/\1 | hammerhead*\2/' configure fi export PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig:$PREFIX/share/pkgconfig:/usr/lib/pkgconfig:$PKG_CONFIG_PATH" export CFLAGS="${CFLAGS} -I$PREFIX/include -D__EXTENSIONS__ -D_POSIX_PTHREAD_SEMANTICS" export LDFLAGS="${LDFLAGS} -L$PREFIX/lib -R$PREFIX/lib" ./configure \ --prefix="$PREFIX" \ --build="$BUILD_TRIPLE" \ --host="$BUILD_TRIPLE" \ --sysconfdir="$SYSCONFDIR" \ --disable-static \ --with-x gmake -j${JOBS:-1} gmake install DESTDIR="$PKGDIR" # imlib2 - image loading/rendering library (tint2, feh, conky) # https://docs.enlightenment.org/api/imlib2/html/ [package] name = "imlib2" version = "1.12.6" release = 1 description = "Image loading, saving, rendering and manipulation library" url = "https://sourceforge.net/projects/enlightenment/files/imlib2-src/" license = "MIT" maintainer = "Chris Tusa " arch = "x86_64" [dependencies] runtime = ["libpng", "libjpeg-turbo", "freetype"] build = ["libpng", "libjpeg-turbo", "freetype"] [[source]] file = "imlib2-1.12.6.tar.xz" urls = ["https://downloads.sourceforge.net/enlightenment/imlib2-1.12.6.tar.xz"] checksum = "250f9752f69dc522e529a81aaa9395705f7fc312ff2453e5de59ac2ba1f2858f" [build] parallel = true #!/bin/sh set -e cd "$SRCDIR" export CFLAGS="${CFLAGS} -I/usr/local/include" export LDFLAGS="${LDFLAGS} -L/usr/local/lib -R/usr/local/lib" ./configure \ --prefix=$PREFIX \ --build=$BUILD_TRIPLE \ --host=$BUILD_TRIPLE \ --sysconfdir=$SYSCONFDIR \ --with-regex=posix gmake -j${JOBS:-1} gmake install DESTDIR="$PKGDIR" # less - Terminal pager program # https://www.greenwoodsoftware.com/less/ [package] name = "less" version = "692" release = 1 description = "Terminal pager program similar to more" url = "https://www.greenwoodsoftware.com/less/" license = "GPL-3.0" maintainer = "Chris Tusa " arch = "x86_64" [dependencies] runtime = ["ncurses"] build = ["ncurses"] [[source]] file = "less-692.tar.gz" urls = ["https://greenwoodsoftware.com/less/less-692.tar.gz"] checksum = "61300f603798ecf1d7786570789f0ff3f5a1acf075a6fb9f756837d166e37d14" [build] parallel = true #!/bin/sh # Build script for libICE (autotools, Template A + custom). # illumos note (brief/manifest): if configure/link fails on socket symbols # (socket/connect/etc.), add -lsocket -lnsl to LDFLAGS. Added defensively # up front (same pattern as libX11's build.sh in Task 4a) since ICE opens # raw sockets directly. set -e cd "$SRCDIR" # GOTCHA (found 2026-07-22, Task 4a): this release's libtool-generated # `configure` has no solaris/illumos/hammerhead arm in its dynamic-linker # detection `case $host_os in ...` block - unmatched OS falls through to # `*) dynamic_linker=no ;;` which forces can_build_shared=no (static-only # .a, no .so). Patch the case arm to add hammerhead* alongside the generic # glibc/ELF branch (same SONAME/.so.N convention applies). if [ -f configure ]; then sed -i -E 's/(kopensolaris\*-gnu)([^)]*\))/\1 | hammerhead*\2/' configure fi export PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig:$PREFIX/share/pkgconfig:$PKG_CONFIG_PATH" export CFLAGS="${CFLAGS} -I$PREFIX/include" export LDFLAGS="${LDFLAGS} -L$PREFIX/lib -R$PREFIX/lib -lsocket -lnsl" ./configure \ --prefix="$PREFIX" \ --build="$BUILD_TRIPLE" \ --host="$BUILD_TRIPLE" \ --sysconfdir="$SYSCONFDIR" \ --disable-static gmake -j${JOBS:-1} gmake install DESTDIR="$PKGDIR" # libICE - Inter-Client Exchange library # https://gitlab.freedesktop.org/xorg/lib/libice [package] name = "libICE" version = "1.1.2" release = 1 description = "Inter-Client Exchange library" url = "https://xorg.freedesktop.org/releases/individual/lib/" license = "MIT" maintainer = "Chris Tusa " arch = "x86_64" [dependencies] runtime = [] build = ["xorgproto", "util-macros"] [[source]] file = "libICE-1.1.2.tar.xz" urls = ["https://xorg.freedesktop.org/releases/individual/lib/libICE-1.1.2.tar.xz"] checksum = "974e4ed414225eb3c716985df9709f4da8d22a67a2890066bc6dfc89ad298625" [build] parallel = true #!/bin/sh # Build script for libSM (autotools, Template A). set -e cd "$SRCDIR" # GOTCHA (found 2026-07-22, Task 4a): this release's libtool-generated # `configure` has no solaris/illumos/hammerhead arm in its dynamic-linker # detection `case $host_os in ...` block - unmatched OS falls through to # `*) dynamic_linker=no ;;` which forces can_build_shared=no (static-only # .a, no .so). Patch the case arm to add hammerhead* alongside the generic # glibc/ELF branch (same SONAME/.so.N convention applies). if [ -f configure ]; then sed -i -E 's/(kopensolaris\*-gnu)([^)]*\))/\1 | hammerhead*\2/' configure fi export PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig:$PREFIX/share/pkgconfig:$PKG_CONFIG_PATH" export CFLAGS="${CFLAGS} -I$PREFIX/include" export LDFLAGS="${LDFLAGS} -L$PREFIX/lib -R$PREFIX/lib" ./configure \ --prefix="$PREFIX" \ --build="$BUILD_TRIPLE" \ --host="$BUILD_TRIPLE" \ --sysconfdir="$SYSCONFDIR" \ --disable-static gmake -j${JOBS:-1} gmake install DESTDIR="$PKGDIR" # libSM - Session Management library # https://gitlab.freedesktop.org/xorg/lib/libsm [package] name = "libSM" version = "1.2.6" release = 1 description = "Session Management library" url = "https://xorg.freedesktop.org/releases/individual/lib/" license = "MIT" maintainer = "Chris Tusa " arch = "x86_64" [dependencies] runtime = ["libICE"] build = ["libICE", "xorgproto", "util-macros"] [[source]] file = "libSM-1.2.6.tar.xz" urls = ["https://xorg.freedesktop.org/releases/individual/lib/libSM-1.2.6.tar.xz"] checksum = "be7c0abdb15cbfd29ac62573c1c82e877f9d4047ad15321e7ea97d1e43d835be" [build] parallel = true #!/bin/sh # Build script for libX11 (autotools, Template A + custom). LARGE build. # Needs python3 (xcb-proto's xcbgen) for some codegen paths; --enable-xcms # --enable-xkb per Task 4a brief. illumos socket symbols (Xtrans) may need # -lsocket -lnsl - added defensively; harmless no-op if unused. set -e cd "$SRCDIR" # GOTCHA (found 2026-07-22, Task 4a): this release's libtool-generated # `configure` has no solaris/illumos/hammerhead arm in its dynamic-linker # detection `case $host_os in ...` block - unmatched OS falls through to # `*) dynamic_linker=no ;;` which forces can_build_shared=no (static-only # .a, no .so). Patch the case arm to add hammerhead* alongside the generic # glibc/ELF branch (same SONAME/.so.N convention applies). if [ -f configure ]; then sed -i -E 's/(kopensolaris\*-gnu)([^)]*\))/\1 | hammerhead*\2/' configure fi export PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig:$PREFIX/share/pkgconfig:$PKG_CONFIG_PATH" export CFLAGS="${CFLAGS} -I$PREFIX/include" export LDFLAGS="${LDFLAGS} -L$PREFIX/lib -R$PREFIX/lib -lsocket -lnsl" export PYTHON=/usr/local/bin/python3 ./configure \ --prefix="$PREFIX" \ --build="$BUILD_TRIPLE" \ --host="$BUILD_TRIPLE" \ --sysconfdir="$SYSCONFDIR" \ --disable-static \ --enable-xcms \ --enable-xkb gmake -j${JOBS:-1} gmake install DESTDIR="$PKGDIR" # libX11 - Core X11 protocol client library # https://gitlab.freedesktop.org/xorg/lib/libx11 [package] name = "libX11" version = "1.8.13" release = 1 description = "Core X11 protocol client library" url = "https://xorg.freedesktop.org/releases/individual/lib/" license = "MIT" maintainer = "Chris Tusa " arch = "x86_64" [dependencies] runtime = ["libxcb", "libXau", "libXdmcp"] build = ["libxcb", "libXau", "libXdmcp", "xtrans", "xorgproto", "xcb-proto"] [[source]] file = "libX11-1.8.13.tar.xz" urls = ["https://xorg.freedesktop.org/releases/individual/lib/libX11-1.8.13.tar.xz"] checksum = "69606f485c2c07c14ef64f75b7bb326d48587af33795d9ab3e607c0b5f94f11c" [build] parallel = true #!/bin/sh # Build script for libXau (autotools, Template A). set -e cd "$SRCDIR" # GOTCHA (found 2026-07-22, Task 4a): this release's libtool-generated # `configure` has no solaris/illumos/hammerhead arm in its dynamic-linker # detection `case $host_os in ...` block - unmatched OS falls through to # `*) dynamic_linker=no ;;` which forces can_build_shared=no (static-only # .a, no .so). Patch the case arm to add hammerhead* alongside the generic # glibc/ELF branch (same SONAME/.so.N convention applies). Verified this # alone flips "checking if libtool supports shared libraries" from no to # yes and produces a real libFoo.so.N. if [ -f configure ]; then sed -i -E 's/(kopensolaris\*-gnu)([^)]*\))/\1 | hammerhead*\2/' configure fi export PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig:$PREFIX/share/pkgconfig:$PKG_CONFIG_PATH" export CFLAGS="${CFLAGS} -I$PREFIX/include" export LDFLAGS="${LDFLAGS} -L$PREFIX/lib -R$PREFIX/lib" ./configure \ --prefix="$PREFIX" \ --build="$BUILD_TRIPLE" \ --host="$BUILD_TRIPLE" \ --sysconfdir="$SYSCONFDIR" \ --disable-static gmake -j${JOBS:-1} gmake install DESTDIR="$PKGDIR" # libXau - X Authority database library # https://gitlab.freedesktop.org/xorg/lib/libxau [package] name = "libXau" version = "1.0.12" release = 1 description = "X Authority database library" url = "https://xorg.freedesktop.org/releases/individual/lib/" license = "MIT" maintainer = "Chris Tusa " arch = "x86_64" [dependencies] runtime = [] build = ["xorgproto", "util-macros"] [[source]] file = "libXau-1.0.12.tar.xz" urls = ["https://xorg.freedesktop.org/releases/individual/lib/libXau-1.0.12.tar.xz"] checksum = "74d0e4dfa3d39ad8939e99bda37f5967aba528211076828464d2777d477fc0fb" [build] parallel = true #!/bin/sh # Build script for libXaw (autotools, Template A). set -e cd "$SRCDIR" # GOTCHA (see libXmu build.sh, Task 4a): this release's libtool-generated # `configure` has no solaris/illumos/hammerhead arm in its dynamic-linker # detection `case $host_os in ...` block - unmatched OS falls through to # `*) dynamic_linker=no ;;` which forces can_build_shared=no (static-only # .a, no .so). Patch the case arm to add hammerhead* alongside the generic # glibc/ELF branch (same SONAME/.so.N convention applies). if [ -f configure ]; then sed -i -E 's/(kopensolaris\*-gnu)([^)]*\))/\1 | hammerhead*\2/' configure fi export PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig:$PREFIX/share/pkgconfig:$PKG_CONFIG_PATH" export CFLAGS="${CFLAGS} -I$PREFIX/include -D__EXTENSIONS__ -D_POSIX_PTHREAD_SEMANTICS" export LDFLAGS="${LDFLAGS} -L$PREFIX/lib -R$PREFIX/lib" ./configure \ --prefix="$PREFIX" \ --build="$BUILD_TRIPLE" \ --host="$BUILD_TRIPLE" \ --sysconfdir="$SYSCONFDIR" \ --disable-static gmake -j${JOBS:-1} gmake install DESTDIR="$PKGDIR" # libXaw - X Athena Widget library # https://gitlab.freedesktop.org/xorg/lib/libxaw [package] name = "libXaw" version = "1.0.16" release = 1 description = "X Athena Widget library" url = "https://xorg.freedesktop.org/releases/individual/lib/" license = "MIT" maintainer = "Chris Tusa " arch = "x86_64" [dependencies] runtime = ["libXt", "libXmu", "libXpm", "libX11", "libXext"] build = ["libXt", "libXmu", "libXpm", "libX11", "libXext", "xorgproto", "util-macros"] [[source]] file = "libXaw-1.0.16.tar.xz" urls = ["https://xorg.freedesktop.org/archive/individual/lib/libXaw-1.0.16.tar.xz"] checksum = "731d572b54c708f81e197a6afa8016918e2e06dfd3025e066ca642a5b8c39c8f" [build] parallel = true #!/bin/sh # Build script for libXcomposite (autotools, Template A). set -e cd "$SRCDIR" # GOTCHA (found 2026-07-22, Task 4a): this release's libtool-generated # `configure` has no solaris/illumos/hammerhead arm in its dynamic-linker # detection `case $host_os in ...` block - unmatched OS falls through to # `*) dynamic_linker=no ;;` which forces can_build_shared=no (static-only # .a, no .so). Patch the case arm to add hammerhead* alongside the generic # glibc/ELF branch (same SONAME/.so.N convention applies). if [ -f configure ]; then sed -i -E 's/(kopensolaris\*-gnu)([^)]*\))/\1 | hammerhead*\2/' configure fi export PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig:$PREFIX/share/pkgconfig:$PKG_CONFIG_PATH" export CFLAGS="${CFLAGS} -I$PREFIX/include" export LDFLAGS="${LDFLAGS} -L$PREFIX/lib -R$PREFIX/lib" ./configure \ --prefix="$PREFIX" \ --build="$BUILD_TRIPLE" \ --host="$BUILD_TRIPLE" \ --sysconfdir="$SYSCONFDIR" \ --disable-static gmake -j${JOBS:-1} gmake install DESTDIR="$PKGDIR" # libXcomposite - X Composite extension client library # https://gitlab.freedesktop.org/xorg/lib/libxcomposite [package] name = "libXcomposite" version = "0.4.7" release = 1 description = "X Composite extension client library" url = "https://xorg.freedesktop.org/releases/individual/lib/" license = "MIT" maintainer = "Chris Tusa " arch = "x86_64" [dependencies] runtime = ["libXfixes", "libX11"] build = ["libXfixes", "libX11", "xorgproto", "util-macros"] [[source]] file = "libXcomposite-0.4.7.tar.xz" urls = ["https://xorg.freedesktop.org/releases/individual/lib/libXcomposite-0.4.7.tar.xz"] checksum = "8bdf310967f484503fa51714cf97bff0723d9b673e0eecbf92b3f97c060c8ccb" [build] parallel = true #!/bin/sh # Build script for libXcursor (autotools, Template A). set -e cd "$SRCDIR" # GOTCHA (found 2026-07-22, Task 4a): this release's libtool-generated # `configure` has no solaris/illumos/hammerhead arm in its dynamic-linker # detection `case $host_os in ...` block - unmatched OS falls through to # `*) dynamic_linker=no ;;` which forces can_build_shared=no (static-only # .a, no .so). Patch the case arm to add hammerhead* alongside the generic # glibc/ELF branch (same SONAME/.so.N convention applies). if [ -f configure ]; then sed -i -E 's/(kopensolaris\*-gnu)([^)]*\))/\1 | hammerhead*\2/' configure fi export PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig:$PREFIX/share/pkgconfig:$PKG_CONFIG_PATH" export CFLAGS="${CFLAGS} -I$PREFIX/include" export LDFLAGS="${LDFLAGS} -L$PREFIX/lib -R$PREFIX/lib" ./configure \ --prefix="$PREFIX" \ --build="$BUILD_TRIPLE" \ --host="$BUILD_TRIPLE" \ --sysconfdir="$SYSCONFDIR" \ --disable-static gmake -j${JOBS:-1} gmake install DESTDIR="$PKGDIR" # libXcursor - X client-side cursor loading library # https://gitlab.freedesktop.org/xorg/lib/libxcursor [package] name = "libXcursor" version = "1.2.3" release = 1 description = "X client-side cursor loading library" url = "https://xorg.freedesktop.org/releases/individual/lib/" license = "MIT" maintainer = "Chris Tusa " arch = "x86_64" [dependencies] runtime = ["libXrender", "libXfixes", "libX11"] build = ["libXrender", "libXfixes", "libX11", "xorgproto", "util-macros"] [[source]] file = "libXcursor-1.2.3.tar.xz" urls = ["https://xorg.freedesktop.org/releases/individual/lib/libXcursor-1.2.3.tar.xz"] checksum = "fde9402dd4cfe79da71e2d96bb980afc5e6ff4f8a7d74c159e1966afb2b2c2c0" [build] parallel = true #!/bin/sh # Build script for libXdamage (autotools, Template A). set -e cd "$SRCDIR" # GOTCHA (found 2026-07-22, Task 4a): this release's libtool-generated # `configure` has no solaris/illumos/hammerhead arm in its dynamic-linker # detection `case $host_os in ...` block - unmatched OS falls through to # `*) dynamic_linker=no ;;` which forces can_build_shared=no (static-only # .a, no .so). Patch the case arm to add hammerhead* alongside the generic # glibc/ELF branch (same SONAME/.so.N convention applies). if [ -f configure ]; then sed -i -E 's/(kopensolaris\*-gnu)([^)]*\))/\1 | hammerhead*\2/' configure fi export PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig:$PREFIX/share/pkgconfig:$PKG_CONFIG_PATH" export CFLAGS="${CFLAGS} -I$PREFIX/include" export LDFLAGS="${LDFLAGS} -L$PREFIX/lib -R$PREFIX/lib" ./configure \ --prefix="$PREFIX" \ --build="$BUILD_TRIPLE" \ --host="$BUILD_TRIPLE" \ --sysconfdir="$SYSCONFDIR" \ --disable-static gmake -j${JOBS:-1} gmake install DESTDIR="$PKGDIR" # libXdamage - X Damage extension client library # https://gitlab.freedesktop.org/xorg/lib/libxdamage [package] name = "libXdamage" version = "1.1.7" release = 1 description = "X Damage extension client library" url = "https://xorg.freedesktop.org/releases/individual/lib/" license = "MIT" maintainer = "Chris Tusa " arch = "x86_64" [dependencies] runtime = ["libX11", "libXfixes"] build = ["libX11", "libXfixes", "xorgproto", "util-macros"] [[source]] file = "libXdamage-1.1.7.tar.xz" urls = ["https://xorg.freedesktop.org/releases/individual/lib/libXdamage-1.1.7.tar.xz"] checksum = "127067f521d3ee467b97bcb145aeba1078e2454d448e8748eb984d5b397bde24" [build] parallel = true #!/bin/sh # Build script for libXdmcp (autotools, Template A). set -e cd "$SRCDIR" # GOTCHA (found 2026-07-22, Task 4a): this release's libtool-generated # `configure` has no solaris/illumos/hammerhead arm in its dynamic-linker # detection `case $host_os in ...` block - unmatched OS falls through to # `*) dynamic_linker=no ;;` which forces can_build_shared=no (static-only # .a, no .so). Patch the case arm to add hammerhead* alongside the generic # glibc/ELF branch (same SONAME/.so.N convention applies). if [ -f configure ]; then sed -i -E 's/(kopensolaris\*-gnu)([^)]*\))/\1 | hammerhead*\2/' configure fi export PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig:$PREFIX/share/pkgconfig:$PKG_CONFIG_PATH" export CFLAGS="${CFLAGS} -I$PREFIX/include" export LDFLAGS="${LDFLAGS} -L$PREFIX/lib -R$PREFIX/lib" ./configure \ --prefix="$PREFIX" \ --build="$BUILD_TRIPLE" \ --host="$BUILD_TRIPLE" \ --sysconfdir="$SYSCONFDIR" \ --disable-static gmake -j${JOBS:-1} gmake install DESTDIR="$PKGDIR" # libXdmcp - X Display Manager Control Protocol library # https://gitlab.freedesktop.org/xorg/lib/libxdmcp [package] name = "libXdmcp" version = "1.1.5" release = 1 description = "X Display Manager Control Protocol library" url = "https://xorg.freedesktop.org/releases/individual/lib/" license = "MIT" maintainer = "Chris Tusa " arch = "x86_64" [dependencies] runtime = [] build = ["xorgproto", "util-macros"] [[source]] file = "libXdmcp-1.1.5.tar.xz" urls = ["https://xorg.freedesktop.org/releases/individual/lib/libXdmcp-1.1.5.tar.xz"] checksum = "d8a5222828c3adab70adf69a5583f1d32eb5ece04304f7f8392b6a353aa2228c" [build] parallel = true #!/bin/sh # Build script for libXext (autotools, Template A). set -e cd "$SRCDIR" # GOTCHA (found 2026-07-22, Task 4a): this release's libtool-generated # `configure` has no solaris/illumos/hammerhead arm in its dynamic-linker # detection `case $host_os in ...` block - unmatched OS falls through to # `*) dynamic_linker=no ;;` which forces can_build_shared=no (static-only # .a, no .so). Patch the case arm to add hammerhead* alongside the generic # glibc/ELF branch (same SONAME/.so.N convention applies). if [ -f configure ]; then sed -i -E 's/(kopensolaris\*-gnu)([^)]*\))/\1 | hammerhead*\2/' configure fi export PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig:$PREFIX/share/pkgconfig:$PKG_CONFIG_PATH" export CFLAGS="${CFLAGS} -I$PREFIX/include" export LDFLAGS="${LDFLAGS} -L$PREFIX/lib -R$PREFIX/lib" ./configure \ --prefix="$PREFIX" \ --build="$BUILD_TRIPLE" \ --host="$BUILD_TRIPLE" \ --sysconfdir="$SYSCONFDIR" \ --disable-static gmake -j${JOBS:-1} gmake install DESTDIR="$PKGDIR" # libXext - X11 miscellaneous extension library # https://gitlab.freedesktop.org/xorg/lib/libxext [package] name = "libXext" version = "1.3.7" release = 1 description = "X11 miscellaneous extension library" url = "https://xorg.freedesktop.org/releases/individual/lib/" license = "MIT" maintainer = "Chris Tusa " arch = "x86_64" [dependencies] runtime = ["libX11"] build = ["libX11", "xorgproto", "xtrans", "util-macros"] [[source]] file = "libXext-1.3.7.tar.xz" urls = ["https://xorg.freedesktop.org/releases/individual/lib/libXext-1.3.7.tar.xz"] checksum = "6c643c7035cdacf67afd68f25d01b90ef889d546c9fcd7c0adf7c2cf91e3a32d" [build] parallel = true #!/bin/sh # Build script for libXfixes (autotools, Template A). set -e cd "$SRCDIR" # GOTCHA (found 2026-07-22, Task 4a): this release's libtool-generated # `configure` has no solaris/illumos/hammerhead arm in its dynamic-linker # detection `case $host_os in ...` block - unmatched OS falls through to # `*) dynamic_linker=no ;;` which forces can_build_shared=no (static-only # .a, no .so). Patch the case arm to add hammerhead* alongside the generic # glibc/ELF branch (same SONAME/.so.N convention applies). if [ -f configure ]; then sed -i -E 's/(kopensolaris\*-gnu)([^)]*\))/\1 | hammerhead*\2/' configure fi export PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig:$PREFIX/share/pkgconfig:$PKG_CONFIG_PATH" export CFLAGS="${CFLAGS} -I$PREFIX/include" export LDFLAGS="${LDFLAGS} -L$PREFIX/lib -R$PREFIX/lib" ./configure \ --prefix="$PREFIX" \ --build="$BUILD_TRIPLE" \ --host="$BUILD_TRIPLE" \ --sysconfdir="$SYSCONFDIR" \ --disable-static gmake -j${JOBS:-1} gmake install DESTDIR="$PKGDIR" # libXfixes - X Fixes extension client library # https://gitlab.freedesktop.org/xorg/lib/libxfixes [package] name = "libXfixes" version = "6.0.2" release = 1 description = "X Fixes extension client library" url = "https://xorg.freedesktop.org/releases/individual/lib/" license = "MIT" maintainer = "Chris Tusa " arch = "x86_64" [dependencies] runtime = ["libX11"] build = ["libX11", "xorgproto", "util-macros"] [[source]] file = "libXfixes-6.0.2.tar.xz" urls = ["https://xorg.freedesktop.org/releases/individual/lib/libXfixes-6.0.2.tar.xz"] checksum = "39f115d72d9c5f8111e4684164d3d68cc1fd21f9b27ff2401b08fddfc0f409ba" [build] parallel = true #!/bin/sh # Build script for libXfont2 (autotools, Template A). set -e cd "$SRCDIR" if [ -f configure ]; then sed -i -E 's/(kopensolaris\*-gnu)([^)]*\))/\1 | hammerhead*\2/' configure fi export PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig:$PREFIX/share/pkgconfig:/usr/lib/pkgconfig:$PKG_CONFIG_PATH" export CFLAGS="${CFLAGS} -I$PREFIX/include -D__EXTENSIONS__" export LDFLAGS="${LDFLAGS} -L$PREFIX/lib -R$PREFIX/lib" ./configure \ --prefix="$PREFIX" \ --build="$BUILD_TRIPLE" \ --host="$BUILD_TRIPLE" \ --sysconfdir="$SYSCONFDIR" \ --disable-static gmake -j${JOBS:-1} gmake install DESTDIR="$PKGDIR" # libXfont2 - X font rasterization library (xlibre-server CDEPEND >=2.0.1) # https://gitlab.freedesktop.org/xorg/lib/libxfont [package] name = "libXfont2" version = "2.0.8" release = 1 description = "X font rasterization library" url = "https://xorg.freedesktop.org/releases/individual/lib/" license = "MIT" maintainer = "Chris Tusa " arch = "x86_64" [dependencies] runtime = ["freetype", "libfontenc"] build = ["freetype", "libfontenc", "xtrans", "xorgproto", "util-macros"] [[source]] file = "libXfont2-2.0.8.tar.xz" urls = ["https://xorg.freedesktop.org/releases/individual/lib/libXfont2-2.0.8.tar.xz"] checksum = "f556c0e1093a4e6911cc90bc4b106d201902ee187fd74af206ff162f7e6a24d5" [build] parallel = true #!/bin/sh # Build script for libXft (autotools, Template A). set -e cd "$SRCDIR" if [ -f configure ]; then sed -i -E 's/(kopensolaris\*-gnu)([^)]*\))/\1 | hammerhead*\2/' configure fi export PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig:$PREFIX/share/pkgconfig:/usr/lib/pkgconfig:$PKG_CONFIG_PATH" export CFLAGS="${CFLAGS} -I$PREFIX/include -D__EXTENSIONS__" export LDFLAGS="${LDFLAGS} -L$PREFIX/lib -R$PREFIX/lib" ./configure \ --prefix="$PREFIX" \ --build="$BUILD_TRIPLE" \ --host="$BUILD_TRIPLE" \ --sysconfdir="$SYSCONFDIR" \ --disable-static gmake -j${JOBS:-1} gmake install DESTDIR="$PKGDIR" # libXft - client-side font rendering (Xft) for X11 # https://gitlab.freedesktop.org/xorg/lib/libxft [package] name = "libXft" version = "2.3.9" release = 1 description = "Xft client-side font rendering library" url = "https://xorg.freedesktop.org/releases/individual/lib/" license = "MIT" maintainer = "Chris Tusa " arch = "x86_64" [dependencies] runtime = ["libX11", "libXrender", "freetype", "fontconfig"] build = ["libX11", "libXrender", "freetype", "fontconfig", "xorgproto", "util-macros"] [[source]] file = "libXft-2.3.9.tar.xz" urls = ["https://xorg.freedesktop.org/releases/individual/lib/libXft-2.3.9.tar.xz"] checksum = "60a25b78945ed6932635b3bb1899a517d31df7456e69867ffba27f89ff3976f5" [build] parallel = true #!/bin/sh # Build script for libXi (autotools, Template A). set -e cd "$SRCDIR" # GOTCHA (found 2026-07-22, Task 4a): this release's libtool-generated # `configure` has no solaris/illumos/hammerhead arm in its dynamic-linker # detection `case $host_os in ...` block - unmatched OS falls through to # `*) dynamic_linker=no ;;` which forces can_build_shared=no (static-only # .a, no .so). Patch the case arm to add hammerhead* alongside the generic # glibc/ELF branch (same SONAME/.so.N convention applies). if [ -f configure ]; then sed -i -E 's/(kopensolaris\*-gnu)([^)]*\))/\1 | hammerhead*\2/' configure fi export PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig:$PREFIX/share/pkgconfig:$PKG_CONFIG_PATH" export CFLAGS="${CFLAGS} -I$PREFIX/include" export LDFLAGS="${LDFLAGS} -L$PREFIX/lib -R$PREFIX/lib" ./configure \ --prefix="$PREFIX" \ --build="$BUILD_TRIPLE" \ --host="$BUILD_TRIPLE" \ --sysconfdir="$SYSCONFDIR" \ --disable-static gmake -j${JOBS:-1} gmake install DESTDIR="$PKGDIR" # libXi - X Input extension client library # https://gitlab.freedesktop.org/xorg/lib/libxi [package] name = "libXi" version = "1.8.3" release = 1 description = "X Input extension client library" url = "https://xorg.freedesktop.org/releases/individual/lib/" license = "MIT" maintainer = "Chris Tusa " arch = "x86_64" [dependencies] runtime = ["libXext", "libXfixes", "libX11"] build = ["libXext", "libXfixes", "libX11", "xorgproto", "util-macros"] [[source]] file = "libXi-1.8.3.tar.xz" urls = ["https://xorg.freedesktop.org/releases/individual/lib/libXi-1.8.3.tar.xz"] checksum = "7ad60056f01af4f786cfe93b3a7707447711626fc8da2637bec71a90409babe5" [build] parallel = true #!/bin/sh # Build script for libXinerama (autotools, Template A). set -e cd "$SRCDIR" # GOTCHA (found 2026-07-22, Task 4a): this release's libtool-generated # `configure` has no solaris/illumos/hammerhead arm in its dynamic-linker # detection `case $host_os in ...` block - unmatched OS falls through to # `*) dynamic_linker=no ;;` which forces can_build_shared=no (static-only # .a, no .so). Patch the case arm to add hammerhead* alongside the generic # glibc/ELF branch (same SONAME/.so.N convention applies). if [ -f configure ]; then sed -i -E 's/(kopensolaris\*-gnu)([^)]*\))/\1 | hammerhead*\2/' configure fi export PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig:$PREFIX/share/pkgconfig:$PKG_CONFIG_PATH" export CFLAGS="${CFLAGS} -I$PREFIX/include" export LDFLAGS="${LDFLAGS} -L$PREFIX/lib -R$PREFIX/lib" ./configure \ --prefix="$PREFIX" \ --build="$BUILD_TRIPLE" \ --host="$BUILD_TRIPLE" \ --sysconfdir="$SYSCONFDIR" \ --disable-static gmake -j${JOBS:-1} gmake install DESTDIR="$PKGDIR" # libXinerama - Xinerama extension client library # https://gitlab.freedesktop.org/xorg/lib/libxinerama [package] name = "libXinerama" version = "1.1.6" release = 1 description = "Xinerama extension client library" url = "https://xorg.freedesktop.org/releases/individual/lib/" license = "MIT" maintainer = "Chris Tusa " arch = "x86_64" [dependencies] runtime = ["libXext", "libX11"] build = ["libXext", "libX11", "xorgproto", "util-macros"] [[source]] file = "libXinerama-1.1.6.tar.xz" urls = ["https://xorg.freedesktop.org/releases/individual/lib/libXinerama-1.1.6.tar.xz"] checksum = "d00fc1599c303dc5cbc122b8068bdc7405d6fcb19060f4597fc51bd3a8be51d7" [build] parallel = true #!/bin/sh # Build script for libXmu (autotools, Template A). set -e cd "$SRCDIR" # GOTCHA (found 2026-07-22, Task 4a): this release's libtool-generated # `configure` has no solaris/illumos/hammerhead arm in its dynamic-linker # detection `case $host_os in ...` block - unmatched OS falls through to # `*) dynamic_linker=no ;;` which forces can_build_shared=no (static-only # .a, no .so). Patch the case arm to add hammerhead* alongside the generic # glibc/ELF branch (same SONAME/.so.N convention applies). if [ -f configure ]; then sed -i -E 's/(kopensolaris\*-gnu)([^)]*\))/\1 | hammerhead*\2/' configure fi export PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig:$PREFIX/share/pkgconfig:$PKG_CONFIG_PATH" export CFLAGS="${CFLAGS} -I$PREFIX/include" export LDFLAGS="${LDFLAGS} -L$PREFIX/lib -R$PREFIX/lib" ./configure \ --prefix="$PREFIX" \ --build="$BUILD_TRIPLE" \ --host="$BUILD_TRIPLE" \ --sysconfdir="$SYSCONFDIR" \ --disable-static gmake -j${JOBS:-1} gmake install DESTDIR="$PKGDIR" # libXmu - X miscellaneous utility library # https://gitlab.freedesktop.org/xorg/lib/libxmu [package] name = "libXmu" version = "1.3.1" release = 1 description = "X miscellaneous utility library" url = "https://xorg.freedesktop.org/releases/individual/lib/" license = "MIT" maintainer = "Chris Tusa " arch = "x86_64" [dependencies] runtime = ["libXt", "libXext", "libX11"] build = ["libXt", "libXext", "libX11", "xorgproto", "util-macros"] [[source]] file = "libXmu-1.3.1.tar.xz" urls = ["https://xorg.freedesktop.org/releases/individual/lib/libXmu-1.3.1.tar.xz"] checksum = "81a99e94c4501e81c427cbaa4a11748b584933e94b7a156830c3621256857bc4" [build] parallel = true #!/bin/sh # Build script for libXpm (autotools, Template A + custom). # --disable-open-zfile per brief: avoids a gzip-helper-path probe in # configure that has tripped on non-Linux hosts. set -e cd "$SRCDIR" # GOTCHA (found 2026-07-22, Task 4a): this release's libtool-generated # `configure` has no solaris/illumos/hammerhead arm in its dynamic-linker # detection `case $host_os in ...` block - unmatched OS falls through to # `*) dynamic_linker=no ;;` which forces can_build_shared=no (static-only # .a, no .so). Patch the case arm to add hammerhead* alongside the generic # glibc/ELF branch (same SONAME/.so.N convention applies). if [ -f configure ]; then sed -i -E 's/(kopensolaris\*-gnu)([^)]*\))/\1 | hammerhead*\2/' configure fi export PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig:$PREFIX/share/pkgconfig:$PKG_CONFIG_PATH" export CFLAGS="${CFLAGS} -I$PREFIX/include" export LDFLAGS="${LDFLAGS} -L$PREFIX/lib -R$PREFIX/lib" ./configure \ --prefix="$PREFIX" \ --build="$BUILD_TRIPLE" \ --host="$BUILD_TRIPLE" \ --sysconfdir="$SYSCONFDIR" \ --disable-static \ --disable-open-zfile gmake -j${JOBS:-1} gmake install DESTDIR="$PKGDIR" # libXpm - X Pixmap library (Openbox theme/icon support) # https://gitlab.freedesktop.org/xorg/lib/libxpm [package] name = "libXpm" version = "3.5.19" release = 1 description = "X Pixmap library" url = "https://xorg.freedesktop.org/releases/individual/lib/" license = "MIT" maintainer = "Chris Tusa " arch = "x86_64" [dependencies] runtime = ["libX11", "libXt", "libXext"] build = ["libX11", "libXt", "libXext", "xorgproto", "util-macros"] [[source]] file = "libXpm-3.5.19.tar.xz" urls = ["https://xorg.freedesktop.org/releases/individual/lib/libXpm-3.5.19.tar.xz"] checksum = "ad3576d689221a39dc728f0e0dc02ca7bb6a0d724c9a77fd1bfa1e9af83be900" [build] parallel = true #!/bin/sh # Build script for libXrandr (autotools, Template A). set -e cd "$SRCDIR" # GOTCHA (found 2026-07-22, Task 4a): this release's libtool-generated # `configure` has no solaris/illumos/hammerhead arm in its dynamic-linker # detection `case $host_os in ...` block - unmatched OS falls through to # `*) dynamic_linker=no ;;` which forces can_build_shared=no (static-only # .a, no .so). Patch the case arm to add hammerhead* alongside the generic # glibc/ELF branch (same SONAME/.so.N convention applies). if [ -f configure ]; then sed -i -E 's/(kopensolaris\*-gnu)([^)]*\))/\1 | hammerhead*\2/' configure fi export PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig:$PREFIX/share/pkgconfig:$PKG_CONFIG_PATH" export CFLAGS="${CFLAGS} -I$PREFIX/include" export LDFLAGS="${LDFLAGS} -L$PREFIX/lib -R$PREFIX/lib" ./configure \ --prefix="$PREFIX" \ --build="$BUILD_TRIPLE" \ --host="$BUILD_TRIPLE" \ --sysconfdir="$SYSCONFDIR" \ --disable-static gmake -j${JOBS:-1} gmake install DESTDIR="$PKGDIR" # libXrandr - X Resize, Rotate and Reflection extension client library # https://gitlab.freedesktop.org/xorg/lib/libxrandr [package] name = "libXrandr" version = "1.5.5" release = 1 description = "X Resize, Rotate and Reflection extension client library" url = "https://xorg.freedesktop.org/releases/individual/lib/" license = "MIT" maintainer = "Chris Tusa " arch = "x86_64" [dependencies] runtime = ["libXrender", "libXext", "libX11"] build = ["libXrender", "libXext", "libX11", "xorgproto", "util-macros"] [[source]] file = "libXrandr-1.5.5.tar.xz" urls = ["https://xorg.freedesktop.org/releases/individual/lib/libXrandr-1.5.5.tar.xz"] checksum = "72b922c2e765434e9e9f0960148070bd4504b288263e2868a4ccce1b7cf2767a" [build] parallel = true #!/bin/sh # Build script for libXrender (autotools, Template A). set -e cd "$SRCDIR" # GOTCHA (found 2026-07-22, Task 4a): this release's libtool-generated # `configure` has no solaris/illumos/hammerhead arm in its dynamic-linker # detection `case $host_os in ...` block - unmatched OS falls through to # `*) dynamic_linker=no ;;` which forces can_build_shared=no (static-only # .a, no .so). Patch the case arm to add hammerhead* alongside the generic # glibc/ELF branch (same SONAME/.so.N convention applies). if [ -f configure ]; then sed -i -E 's/(kopensolaris\*-gnu)([^)]*\))/\1 | hammerhead*\2/' configure fi export PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig:$PREFIX/share/pkgconfig:$PKG_CONFIG_PATH" export CFLAGS="${CFLAGS} -I$PREFIX/include" export LDFLAGS="${LDFLAGS} -L$PREFIX/lib -R$PREFIX/lib" ./configure \ --prefix="$PREFIX" \ --build="$BUILD_TRIPLE" \ --host="$BUILD_TRIPLE" \ --sysconfdir="$SYSCONFDIR" \ --disable-static gmake -j${JOBS:-1} gmake install DESTDIR="$PKGDIR" # libXrender - X Rendering Extension client library # https://gitlab.freedesktop.org/xorg/lib/libxrender [package] name = "libXrender" version = "0.9.12" release = 1 description = "X Rendering Extension client library" url = "https://xorg.freedesktop.org/releases/individual/lib/" license = "MIT" maintainer = "Chris Tusa " arch = "x86_64" [dependencies] runtime = ["libX11"] build = ["libX11", "xorgproto", "util-macros"] [[source]] file = "libXrender-0.9.12.tar.xz" urls = ["https://xorg.freedesktop.org/releases/individual/lib/libXrender-0.9.12.tar.xz"] checksum = "b832128da48b39c8d608224481743403ad1691bf4e554e4be9c174df171d1b97" [build] parallel = true #!/bin/sh # Build script for libXt (autotools, Template A). set -e cd "$SRCDIR" # GOTCHA (found 2026-07-22, Task 4a): this release's libtool-generated # `configure` has no solaris/illumos/hammerhead arm in its dynamic-linker # detection `case $host_os in ...` block - unmatched OS falls through to # `*) dynamic_linker=no ;;` which forces can_build_shared=no (static-only # .a, no .so). Patch the case arm to add hammerhead* alongside the generic # glibc/ELF branch (same SONAME/.so.N convention applies). if [ -f configure ]; then sed -i -E 's/(kopensolaris\*-gnu)([^)]*\))/\1 | hammerhead*\2/' configure fi export PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig:$PREFIX/share/pkgconfig:$PKG_CONFIG_PATH" export CFLAGS="${CFLAGS} -I$PREFIX/include" export LDFLAGS="${LDFLAGS} -L$PREFIX/lib -R$PREFIX/lib" ./configure \ --prefix="$PREFIX" \ --build="$BUILD_TRIPLE" \ --host="$BUILD_TRIPLE" \ --sysconfdir="$SYSCONFDIR" \ --disable-static gmake -j${JOBS:-1} gmake install DESTDIR="$PKGDIR" # libXt - X Toolkit Intrinsics library # https://gitlab.freedesktop.org/xorg/lib/libxt [package] name = "libXt" version = "1.3.1" release = 1 description = "X Toolkit Intrinsics library" url = "https://xorg.freedesktop.org/releases/individual/lib/" license = "MIT" maintainer = "Chris Tusa " arch = "x86_64" [dependencies] runtime = ["libSM", "libICE", "libX11"] build = ["libSM", "libICE", "libX11", "xorgproto", "util-macros"] [[source]] file = "libXt-1.3.1.tar.xz" urls = ["https://xorg.freedesktop.org/releases/individual/lib/libXt-1.3.1.tar.xz"] checksum = "e0a774b33324f4d4c05b199ea45050f87206586d81655f8bef4dba434d931288" [build] parallel = true #!/bin/sh # Build script for libXtst (autotools, Template A). set -e cd "$SRCDIR" # GOTCHA (found 2026-07-22, Task 4a): this release's libtool-generated # `configure` has no solaris/illumos/hammerhead arm in its dynamic-linker # detection `case $host_os in ...` block - unmatched OS falls through to # `*) dynamic_linker=no ;;` which forces can_build_shared=no (static-only # .a, no .so). Patch the case arm to add hammerhead* alongside the generic # glibc/ELF branch (same SONAME/.so.N convention applies). if [ -f configure ]; then sed -i -E 's/(kopensolaris\*-gnu)([^)]*\))/\1 | hammerhead*\2/' configure fi export PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig:$PREFIX/share/pkgconfig:$PKG_CONFIG_PATH" export CFLAGS="${CFLAGS} -I$PREFIX/include" export LDFLAGS="${LDFLAGS} -L$PREFIX/lib -R$PREFIX/lib" ./configure \ --prefix="$PREFIX" \ --build="$BUILD_TRIPLE" \ --host="$BUILD_TRIPLE" \ --sysconfdir="$SYSCONFDIR" \ --disable-static gmake -j${JOBS:-1} gmake install DESTDIR="$PKGDIR" # libXtst - X Test extension client library (input injection, used by x11vnc) # https://gitlab.freedesktop.org/xorg/lib/libxtst [package] name = "libXtst" version = "1.2.5" release = 1 description = "X Test extension client library" url = "https://xorg.freedesktop.org/releases/individual/lib/" license = "MIT" maintainer = "Chris Tusa " arch = "x86_64" [dependencies] runtime = ["libXi", "libXext", "libX11"] build = ["libXi", "libXext", "libX11", "xorgproto", "util-macros"] [[source]] file = "libXtst-1.2.5.tar.xz" urls = ["https://xorg.freedesktop.org/releases/individual/lib/libXtst-1.2.5.tar.xz"] checksum = "b50d4c25b97009a744706c1039c598f4d8e64910c9fde381994e1cae235d9242" [build] parallel = true #!/bin/sh # Build script for libconfig (autotools, Template A). No deps. set -e cd "$SRCDIR" if [ -f configure ]; then sed -i -E 's/(kopensolaris\*-gnu)([^)]*\))/\1 | hammerhead*\2/' configure fi export PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig:$PREFIX/share/pkgconfig:/usr/lib/pkgconfig:$PKG_CONFIG_PATH" export CFLAGS="${CFLAGS} -I$PREFIX/include -D__EXTENSIONS__ -D_POSIX_PTHREAD_SEMANTICS" export LDFLAGS="${LDFLAGS} -L$PREFIX/lib -R$PREFIX/lib" ./configure \ --prefix="$PREFIX" \ --build="$BUILD_TRIPLE" \ --host="$BUILD_TRIPLE" \ --sysconfdir="$SYSCONFDIR" \ --disable-static gmake -j${JOBS:-1} gmake install DESTDIR="$PKGDIR" # libconfig - C/C++ library for structured configuration files (picom) # https://hyperrealm.github.io/libconfig/ [package] name = "libconfig" version = "1.7.3" release = 1 description = "C/C++ library for processing structured configuration files" url = "https://hyperrealm.github.io/libconfig/" license = "LGPL-2.1-or-later" maintainer = "Chris Tusa " arch = "x86_64" [dependencies] runtime = [] build = [] [[source]] file = "libconfig-1.7.3.tar.gz" urls = ["https://github.com/hyperrealm/libconfig/releases/download/v1.7.3/libconfig-1.7.3.tar.gz"] checksum = "545166d6cac037744381d1e9cc5a5405094e7bfad16a411699bcff40bbb31ee7" [build] parallel = true #!/bin/bash # Build script for libedit set -e cd "$SRCDIR" ./configure \ --prefix=$PREFIX \ --disable-static gmake -j${JOBS:-1} gmake install DESTDIR="$PKGDIR" # libedit - BSD editline library # https://thrysoee.dk/editline/ [package] name = "libedit" version = "20240808-3.1" release = 1 description = "BSD editline and history libraries" url = "https://thrysoee.dk/editline/" license = "BSD-3-Clause" maintainer = "Chris Tusa " arch = "x86_64" [dependencies] runtime = ["ncurses"] build = ["ncurses"] [[source]] file = "libedit-20240808-3.1.tar.gz" urls = ["https://thrysoee.dk/editline/libedit-20240808-3.1.tar.gz"] checksum = "5f0573349d77c4a48967191cdd6634dd7aa5f6398c6a57fe037cc02696d6099f" [build] parallel = true #!/bin/sh # Build script for libev (autotools, Template A). No deps. Ships no .pc # upstream - picom and other consumers locate it via ev.h/-lev directly. set -e cd "$SRCDIR" if [ -f configure ]; then sed -i -E 's/(kopensolaris\*-gnu)([^)]*\))/\1 | hammerhead*\2/' configure fi export CFLAGS="${CFLAGS} -I$PREFIX/include -D__EXTENSIONS__ -D_POSIX_PTHREAD_SEMANTICS" export LDFLAGS="${LDFLAGS} -L$PREFIX/lib -R$PREFIX/lib" ./configure \ --prefix="$PREFIX" \ --build="$BUILD_TRIPLE" \ --host="$BUILD_TRIPLE" \ --sysconfdir="$SYSCONFDIR" \ --disable-static gmake -j${JOBS:-1} gmake install DESTDIR="$PKGDIR" # libev - high-performance event loop library (picom) # http://software.schmorp.de/pkg/libev.html [package] name = "libev" version = "4.33" release = 1 description = "High-performance full-featured event loop" url = "http://software.schmorp.de/pkg/libev.html" license = "BSD-2-Clause OR GPL-2.0-or-later" maintainer = "Chris Tusa " arch = "x86_64" [dependencies] runtime = [] build = [] [[source]] file = "libev-4.33.tar.gz" urls = ["http://dist.schmorp.de/libev/Attic/libev-4.33.tar.gz"] checksum = "507eb7b8d1015fbec5b935f34ebed15bf346bed04a11ab82b8eee848c4205aea" [build] parallel = true #!/bin/zsh # Build script for libevent set -e cd "$SRCDIR" ./configure \ --prefix=$PREFIX \ --disable-samples \ --disable-openssl gmake -j${JOBS:-1} gmake install DESTDIR="$PKGDIR" # libevent - Event notification library # https://libevent.org/ [package] name = "libevent" version = "2.1.12" release = 1 description = "Event notification library for developing scalable network servers" url = "https://libevent.org/" license = "BSD-3-Clause" maintainer = "Chris Tusa " arch = "x86_64" [dependencies] runtime = [] build = [] [[source]] file = "libevent-2.1.12-stable.tar.gz" urls = ["https://github.com/libevent/libevent/releases/download/release-2.1.12-stable/libevent-2.1.12-stable.tar.gz"] checksum = "92e6de1be9ec176428fd2367677e61ceffc2ee1cb119035037a27d346b0403bb" [build] parallel = true #!/bin/bash # Build script for libffi set -e cd "$SRCDIR" ./configure \ --prefix=$PREFIX \ --disable-static gmake -j${JOBS:-1} gmake install DESTDIR="$PKGDIR" # libffi - Foreign Function Interface library # https://sourceware.org/libffi/ [package] name = "libffi" version = "3.4.7" release = 1 description = "Portable foreign function interface library" url = "https://sourceware.org/libffi/" license = "MIT" maintainer = "Chris Tusa " arch = "x86_64" [dependencies] runtime = [] build = [] [[source]] file = "libffi-3.4.7.tar.gz" urls = [ "https://github.com/libffi/libffi/releases/download/v3.4.7/libffi-3.4.7.tar.gz", "https://sourceware.org/pub/libffi/libffi-3.4.7.tar.gz" ] checksum = "138607dee268bdecf374adf9144c00e839e38541f75f24a1fcf18b78fda48b2d" [build] parallel = true #!/bin/sh # Build script for libfontenc (autotools, Template A). zlib is PRESENT # in base. set -e cd "$SRCDIR" if [ -f configure ]; then sed -i -E 's/(kopensolaris\*-gnu)([^)]*\))/\1 | hammerhead*\2/' configure fi export PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig:$PREFIX/share/pkgconfig:/usr/lib/pkgconfig:$PKG_CONFIG_PATH" export CFLAGS="${CFLAGS} -I$PREFIX/include -D__EXTENSIONS__" export LDFLAGS="${LDFLAGS} -L$PREFIX/lib -R$PREFIX/lib" ./configure \ --prefix="$PREFIX" \ --build="$BUILD_TRIPLE" \ --host="$BUILD_TRIPLE" \ --sysconfdir="$SYSCONFDIR" \ --disable-static gmake -j${JOBS:-1} gmake install DESTDIR="$PKGDIR" # libfontenc - X font encoding library # https://gitlab.freedesktop.org/xorg/lib/libfontenc [package] name = "libfontenc" version = "1.1.9" release = 1 description = "X font encoding library" url = "https://xorg.freedesktop.org/releases/individual/lib/" license = "MIT" maintainer = "Chris Tusa " arch = "x86_64" [dependencies] runtime = [] build = ["xorgproto", "util-macros"] [[source]] file = "libfontenc-1.1.9.tar.xz" urls = ["https://xorg.freedesktop.org/releases/individual/lib/libfontenc-1.1.9.tar.xz"] checksum = "9d8392705cb10803d5fe1d27d236cbab3f664e26841ce01916bbbe430cf273e2" [build] parallel = true #!/bin/sh # Build script for libjpeg-turbo (CMake, Ninja generator). CMake doesn't # recognize Hammerhead and won't set UNIX=TRUE / pick the right shared-lib # conventions without a Platform module (same gotcha as base/neovim's # cmake build) - map it to the SunOS platform module. set -e cd "$SRCDIR" mkdir -p "$SRCDIR/.cmake/Platform" echo 'include(Platform/SunOS)' > "$SRCDIR/.cmake/Platform/Hammerhead.cmake" cmake -B build -G Ninja \ -DCMAKE_MODULE_PATH="$SRCDIR/.cmake" \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX="$PREFIX" \ -DCMAKE_INSTALL_RPATH="$PREFIX/lib" \ -DCMAKE_C_FLAGS="-D__EXTENSIONS__" \ -DCMAKE_POSITION_INDEPENDENT_CODE=ON \ -DCMAKE_ASM_NASM_COMPILER=/usr/local/bin/nasm \ -DENABLE_STATIC=OFF \ -DWITH_TURBOJPEG=ON cmake --build build -j${JOBS:-1} DESTDIR="$PKGDIR" cmake --install build # libjpeg-turbo - JPEG image codec with SIMD acceleration # https://libjpeg-turbo.org/ [package] name = "libjpeg-turbo" version = "3.2.0" release = 1 description = "JPEG image codec with SIMD acceleration" url = "https://libjpeg-turbo.org/" license = "IJG AND BSD-3-Clause AND zlib" maintainer = "Chris Tusa " arch = "x86_64" [dependencies] runtime = [] build = [] [[source]] file = "libjpeg-turbo-3.2.0.tar.gz" urls = ["https://github.com/libjpeg-turbo/libjpeg-turbo/archive/refs/tags/3.2.0.tar.gz"] checksum = "980dd81f425082aa6d7c9e47fef27554ce7a9ffc8e2f6e863b97d263c5c50858" [build] parallel = true #!/bin/sh # Build script for libpng (autotools, Template A). zlib dependency is # PRESENT in base (/usr/lib) - not ported separately. set -e cd "$SRCDIR" # Mandatory libtool hammerhead* dynamic-linker fix (see libXrender/Task 4a # gotcha): unmatched host_os falls through to "dynamic_linker=no", forcing # static-only output without this. if [ -f configure ]; then sed -i -E 's/(kopensolaris\*-gnu)([^)]*\))/\1 | hammerhead*\2/' configure fi export PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig:$PREFIX/share/pkgconfig:/usr/lib/pkgconfig:$PKG_CONFIG_PATH" export CFLAGS="${CFLAGS} -I$PREFIX/include -D__EXTENSIONS__" export LDFLAGS="${LDFLAGS} -L$PREFIX/lib -R$PREFIX/lib" ./configure \ --prefix="$PREFIX" \ --build="$BUILD_TRIPLE" \ --host="$BUILD_TRIPLE" \ --sysconfdir="$SYSCONFDIR" \ --disable-static gmake -j${JOBS:-1} gmake install DESTDIR="$PKGDIR" # libpng - PNG reference library (freetype dependency) # http://www.libpng.org/pub/png/libpng.html [package] name = "libpng" version = "1.6.58" release = 1 description = "PNG reference library" url = "http://www.libpng.org/pub/png/libpng.html" license = "libpng-2.0" maintainer = "Chris Tusa " arch = "x86_64" [dependencies] runtime = [] build = [] [[source]] file = "libpng-1.6.58.tar.xz" urls = ["https://downloads.sourceforge.net/project/libpng/libpng16/1.6.58/libpng-1.6.58.tar.xz"] checksum = "28eb403f51f0f7405249132cecfe82ea5c0ef97f1b32c5a65828814ae0d34775" [build] parallel = true #!/bin/sh # Build script for libpthread-stubs (autotools, Template A). # NOTE: the 0.5 release tarball ships only Makefile.am/configure.ac (no # meson.build) despite some packaging docs describing it as a Meson port - # verified 2026-07-22 by inspecting the actual distfile. Header/.pc only, # no compiled library content - just satisfies libxcb's pkg-config check. set -e cd "$SRCDIR" export PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig:$PREFIX/share/pkgconfig:$PKG_CONFIG_PATH" ./configure \ --prefix="$PREFIX" \ --build="$BUILD_TRIPLE" \ --host="$BUILD_TRIPLE" \ --sysconfdir="$SYSCONFDIR" \ --disable-static gmake -j${JOBS:-1} gmake install DESTDIR="$PKGDIR" # libpthread-stubs - weak aliases for pthread functions (pkg-config-only stub) # https://gitlab.freedesktop.org/xorg/lib/libpthread-stubs # # Confirmed needed on Hammerhead 2026-07-22 (Task 4a): even though illumos # has native pthreads, libxcb's configure hard-requires the pthread-stubs # pkg-config module unconditionally (`xau >= 0.99.2 pthread-stubs`). Not a # skip candidate here. # # Build system note: the 0.5 distfile is autotools-only (Makefile.am + # configure.ac, no meson.build) - built with Template A, not Meson. [package] name = "libpthread-stubs" version = "0.5" release = 1 description = "Weak aliases for pthread functions not provided by all libc/libpthread implementations" url = "https://xorg.freedesktop.org/releases/individual/lib/" license = "MIT" maintainer = "Chris Tusa " arch = "x86_64" [dependencies] runtime = [] build = ["util-macros"] [[source]] file = "libpthread-stubs-0.5.tar.xz" urls = ["https://xorg.freedesktop.org/releases/individual/lib/libpthread-stubs-0.5.tar.xz"] checksum = "59da566decceba7c2a7970a4a03b48d9905f1262ff94410a649224e33d2442bc" [build] parallel = true #!/bin/sh # Build script for libtermkey (plain Makefile, uses the system GNU libtool # binary directly - not a generated per-project libtool script). Needs # base/unibilium built + installed first; the Makefile locates it via # pkg-config ($(call pkgconfig, ...)), so PKG_CONFIG_PATH must reach # $PREFIX/lib/pkgconfig. set -e cd "$SRCDIR" export PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig:$PREFIX/share/pkgconfig:$PKG_CONFIG_PATH" export CFLAGS="${CFLAGS} -I$PREFIX/include -D__EXTENSIONS__ -D_POSIX_PTHREAD_SEMANTICS" export LDFLAGS="${LDFLAGS} -L$PREFIX/lib -R$PREFIX/lib" gmake -j${JOBS:-1} PREFIX="$PREFIX" gmake install PREFIX="$PREFIX" DESTDIR="$PKGDIR" # libtermkey - terminal keyboard entry reading library (neovim TUI input) # http://www.leonerd.org.uk/code/libtermkey/ [package] name = "libtermkey" version = "0.22" release = 1 description = "Terminal keypress reading library" url = "http://www.leonerd.org.uk/code/libtermkey/" license = "MIT" maintainer = "Chris Tusa " arch = "x86_64" [dependencies] runtime = ["unibilium"] build = ["unibilium"] [[source]] file = "libtermkey-0.22.tar.gz" urls = ["http://www.leonerd.org.uk/code/libtermkey/libtermkey-0.22.tar.gz"] checksum = "6945bd3c4aaa83da83d80a045c5563da4edd7d0374c62c0d35aec09eb3014600" [build] parallel = true #!/bin/sh # Build script for libuv (autotools, Template A variant + autogen.sh). # # GOTCHA (1b-2): the release tarball ships NO pre-generated `configure` # (only configure.ac/Makefile.am + autogen.sh) - must autogen before the # usual libtool-fix + configure steps. Same shape as base/x11vnc's # autoreconf gotcha. # # GOTCHA (1b-2): libuv's configure.ac gates its illumos backend # (src/unix/sunos.c, `AM_CONDITIONAL([SUNOS], ...)`) on `$host_os` matching # the literal pattern `solaris*`. Our BUILD_TRIPLE's OS component is # "hammerhead" (x86_64-zygaena-hammerhead), which doesn't match, so # unpatched the port silently builds without the SunOS backend at all # (missing symbols / broken kqueue-less unix core). Patch the # AM_CONDITIONAL pattern to also match hammerhead* before autogen.sh runs # (configure.ac -> configure, so this must happen pre-generation, not as # a `sed` on the generated `configure` like the libtool fix below). set -e cd "$SRCDIR" sed -i -E '/AM_CONDITIONAL\(\[SUNOS\]/ s/\[solaris\*\]/[solaris*|hammerhead*]/' configure.ac export AUTOCONF=/usr/bin/autoconf export AUTOHEADER=/usr/bin/autoheader export ACLOCAL=/usr/bin/aclocal export AUTOMAKE=/usr/bin/automake export LIBTOOLIZE=/usr/bin/libtoolize ./autogen.sh # GOTCHA (1b-2): autogen.sh's libtoolize --install pulls in its OWN fresh # config.sub/config.guess, which do NOT carry the hammerhead patch (coral's # pre-build copy is a no-op here since neither file existed in $SRCDIR # before autogen ran). Re-copy the patched versions now, post-autogen, # same fix as base/x11vnc. cp -f /usr/share/autoconf/build-aux/config.sub config.sub 2>/dev/null || true cp -f /usr/share/autoconf/build-aux/config.guess config.guess 2>/dev/null || true # MANDATORY libtool fix (Template A): unmatched OS in libtool's # dynamic-linker case falls through to static-only. if [ -f configure ]; then sed -i -E 's/(kopensolaris\*-gnu)([^)]*\))/\1 | hammerhead*\2/' configure fi export PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig:$PREFIX/share/pkgconfig:$PKG_CONFIG_PATH" export CFLAGS="${CFLAGS} -I$PREFIX/include -D__EXTENSIONS__ -D_POSIX_PTHREAD_SEMANTICS" export LDFLAGS="${LDFLAGS} -L$PREFIX/lib -R$PREFIX/lib" ./configure \ --prefix="$PREFIX" \ --build="$BUILD_TRIPLE" \ --host="$BUILD_TRIPLE" \ --sysconfdir="$SYSCONFDIR" \ --disable-static gmake -j${JOBS:-1} gmake install DESTDIR="$PKGDIR" # libuv - multi-platform asynchronous I/O library (neovim's event loop) # https://libuv.org/ [package] name = "libuv" version = "1.52.1" release = 1 description = "Multi-platform support library with a focus on asynchronous I/O" url = "https://libuv.org/" license = "MIT" maintainer = "Chris Tusa " arch = "x86_64" [dependencies] runtime = [] build = [] [[source]] file = "libuv-1.52.1.tar.gz" urls = ["https://github.com/libuv/libuv/archive/refs/tags/v1.52.1.tar.gz"] checksum = "478baf2599bfbc882c355288c9cb6f92e0e7dda435fa04031fa5b607cf3f414c" [build] parallel = true #!/bin/sh # Build script for libvncserver (CMake + Ninja) - undocumented dependency # of x11vnc, see package.toml header for why this port exists. # # Deliberately keep the feature surface minimal / no-GTK (project toolkit # rule): no SDL/GTK/Qt example clients, no systemd, no GnuTLS/gcrypt/SASL/ # FFmpeg/websockets/libsshtunnel. zlib comes from base (/usr/lib); jpeg + # png come from the Task-5 (M3a) ports already installed at $PREFIX. # # illumos socket gotcha (per Task-7a brief + gotcha checklist): sockets.c # calls socket()/bind()/listen()/accept()/gethostbyname() unconditionally. # CMake's check_function_exists(socket ...) probe does NOT itself add # -lsocket/-lnsl to the link line the way autoconf's AC_CHECK_LIB does, so # without forcing them into the linker flags the final `ninja` link step # fails with undefined references to socket()/gethostbyname(). Force via # CMAKE_EXE_LINKER_FLAGS/CMAKE_SHARED_LINKER_FLAGS cache vars. set -e cd "$SRCDIR" export PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig:$PREFIX/share/pkgconfig:$PKG_CONFIG_PATH" mkdir -p build && cd build cmake -G Ninja \ -DCMAKE_INSTALL_PREFIX="$PREFIX" \ -DCMAKE_INSTALL_LIBDIR=lib \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_C_FLAGS="-D__EXTENSIONS__ -D_POSIX_PTHREAD_SEMANTICS -I$PREFIX/include" \ -DCMAKE_POSITION_INDEPENDENT_CODE=ON \ -DCMAKE_EXE_LINKER_FLAGS="-L$PREFIX/lib -R$PREFIX/lib -lsocket -lnsl" \ -DCMAKE_SHARED_LINKER_FLAGS="-L$PREFIX/lib -R$PREFIX/lib -lsocket -lnsl" \ -DBUILD_SHARED_LIBS=ON \ -DWITH_ZLIB=ON \ -DWITH_LZO=OFF \ -DWITH_JPEG=ON \ -DWITH_PNG=ON \ -DWITH_SDL=OFF \ -DWITH_GTK=OFF \ -DWITH_QT=OFF \ -DWITH_LIBSSHTUNNEL=OFF \ -DWITH_THREADS=ON \ -DWITH_GNUTLS=OFF \ -DWITH_OPENSSL=ON \ -DWITH_SYSTEMD=OFF \ -DWITH_GCRYPT=OFF \ -DWITH_FFMPEG=OFF \ -DWITH_TIGHTVNC_FILETRANSFER=ON \ -DWITH_24BPP=ON \ -DWITH_IPv6=ON \ -DWITH_WEBSOCKETS=OFF \ -DWITH_SASL=OFF \ -DWITH_XCB=ON \ -DWITH_EXAMPLES=OFF \ -DWITH_TESTS=OFF \ .. ninja -j${JOBS:-1} DESTDIR="$PKGDIR" ninja install # libvncserver - VNC server/client protocol library (VNC/RFB implementation) # # NOT in the Task-0/xlibre-phase1a-manifest.md port table. Discovered as a # hard build dependency of x11vnc during Task 7a (2026-07-22): x11vnc split # off from the LibVNCServer project in 2016 and its configure.ac now does # PKG_CHECK_MODULES(LIBVNCSERVER, libvncserver >= 0.9.8) + # PKG_CHECK_MODULES(LIBVNCCLIENT, libvncclient >= 0.9.8) unconditionally - # it is no longer a standalone/bundled-source VNC implementation. Added # here as a manifest gap fix so x11vnc can build at all. # https://github.com/LibVNC/libvncserver [package] name = "libvncserver" version = "0.9.15" release = 1 description = "VNC server/client protocol library (used by x11vnc)" url = "https://github.com/LibVNC/libvncserver" license = "MIT" maintainer = "Chris Tusa " arch = "x86_64" [dependencies] runtime = ["libjpeg-turbo", "libpng"] build = ["libjpeg-turbo", "libpng"] [[source]] file = "libvncserver-0.9.15.tar.gz" urls = ["https://github.com/LibVNC/libvncserver/archive/refs/tags/LibVNCServer-0.9.15.tar.gz"] checksum = "62352c7795e231dfce044beb96156065a05a05c974e5de9e023d688d8ff675d7" [build] parallel = true #!/bin/sh # Build script for libvterm (plain Makefile, uses the system GNU libtool # binary directly). No deps. # # libvterm's own Makefile only adds -D__EXTENSIONS__ -D_XPG6 # -D__XOPEN_OR_POSIX when `uname` == "SunOS"; Hammerhead's uname is # "Hammerhead" so that branch never fires - add the same flags manually # (same shape as base/libconfig/base/libev's Template A CFLAGS export). set -e cd "$SRCDIR" export PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig:$PREFIX/share/pkgconfig:$PKG_CONFIG_PATH" export CFLAGS="${CFLAGS} -I$PREFIX/include -D__EXTENSIONS__ -D_POSIX_PTHREAD_SEMANTICS -D_XPG6 -D__XOPEN_OR_POSIX" export LDFLAGS="${LDFLAGS} -L$PREFIX/lib -R$PREFIX/lib" gmake -j${JOBS:-1} PREFIX="$PREFIX" gmake install PREFIX="$PREFIX" DESTDIR="$PKGDIR" # libvterm - abstract terminal emulator library (neovim's embedded terminal) # http://www.leonerd.org.uk/code/libvterm/ [package] name = "libvterm" version = "0.3.3" release = 1 description = "Abstract library implementation of a terminal emulator" url = "http://www.leonerd.org.uk/code/libvterm/" license = "MIT" maintainer = "Chris Tusa " arch = "x86_64" [dependencies] runtime = [] build = [] [[source]] file = "libvterm-0.3.3.tar.gz" urls = ["http://www.leonerd.org.uk/code/libvterm/libvterm-0.3.3.tar.gz"] checksum = "09156f43dd2128bd347cbeebe50d9a571d32c64e0cf18d211197946aff7226e0" [build] parallel = true #!/bin/sh # Build script for libxcb (autotools, Template A + custom). # Needs python3 (xcb-proto's xcbgen module) to generate C sources from XML. # Verified 2026-07-22: configure hard-requires the pthread-stubs pkg-config # module unconditionally (`xau >= 0.99.2 pthread-stubs`), even on illumos # with native pthreads. libpthread-stubs is therefore a required build dep # (see base/libpthread-stubs). set -e cd "$SRCDIR" # GOTCHA (found 2026-07-22, Task 4a): this release's libtool-generated # `configure` has no solaris/illumos/hammerhead arm in its dynamic-linker # detection `case $host_os in ...` block - unmatched OS falls through to # `*) dynamic_linker=no ;;` which forces can_build_shared=no (static-only # .a, no .so). Patch the case arm to add hammerhead* alongside the generic # glibc/ELF branch (same SONAME/.so.N convention applies). if [ -f configure ]; then sed -i -E 's/(kopensolaris\*-gnu)([^)]*\))/\1 | hammerhead*\2/' configure fi export PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig:$PREFIX/share/pkgconfig:$PKG_CONFIG_PATH" export CFLAGS="${CFLAGS} -I$PREFIX/include" export LDFLAGS="${LDFLAGS} -L$PREFIX/lib -R$PREFIX/lib" export PYTHON=/usr/local/bin/python3 ./configure \ --prefix="$PREFIX" \ --build="$BUILD_TRIPLE" \ --host="$BUILD_TRIPLE" \ --sysconfdir="$SYSCONFDIR" \ --disable-static \ --enable-xkb gmake -j${JOBS:-1} gmake install DESTDIR="$PKGDIR" # libxcb - X protocol C-language Binding # https://gitlab.freedesktop.org/xorg/lib/libxcb [package] name = "libxcb" version = "1.17.0" release = 1 description = "X protocol C-language Binding (XCB)" url = "https://xorg.freedesktop.org/releases/individual/xcb/" license = "MIT" maintainer = "Chris Tusa " arch = "x86_64" [dependencies] runtime = ["libXau", "libXdmcp"] build = ["xcb-proto", "libXau", "libXdmcp", "libpthread-stubs"] [[source]] file = "libxcb-1.17.0.tar.xz" urls = ["https://xorg.freedesktop.org/releases/individual/xcb/libxcb-1.17.0.tar.xz"] checksum = "599ebf9996710fea71622e6e184f3a8ad5b43d0e5fa8c4e407123c88a59a6d55" [build] parallel = true #!/bin/sh # Build script for libxcvt (Meson, Template B). Dependency of # xlibre-xserver-xorg. Pure C library + `cvt` binary; no patches needed. set -e cd "$SRCDIR" export PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig:$PREFIX/share/pkgconfig:$PKG_CONFIG_PATH" # __EXTENSIONS__ + _POSIX_PTHREAD_SEMANTICS: unlock hidden POSIX/SysV prototypes # on illumos headers (meson has_function() falsely reports them present). export CFLAGS="${CFLAGS} -D__EXTENSIONS__ -D_POSIX_PTHREAD_SEMANTICS" # rpath: Meson strips rpath on install and /usr/local/lib is not on the default # ld.so path; bake -R$PREFIX/lib so installed artifacts are self-contained. export LDFLAGS="${LDFLAGS} -L$PREFIX/lib -Wl,-R,$PREFIX/lib" meson setup build \ --prefix="$PREFIX" \ --libdir=lib \ --buildtype=release \ -Ddefault_library=shared ninja -C build -j${JOBS:-1} DESTDIR="$PKGDIR" ninja -C build install # libxcvt - VESA CVT standard timing modelines generator library # Small standalone library split out of the X server; xlibre-xserver-xorg # hard-requires it (meson.build: dependency('libxcvt', required: build_xorg)). # Pure C, no illumos-isms - a plain Meson library + the `cvt` helper binary. # https://gitlab.freedesktop.org/xorg/lib/libxcvt [package] name = "libxcvt" version = "0.1.3" release = 1 description = "Library providing VESA CVT standard timing modelines" url = "https://gitlab.freedesktop.org/xorg/lib/libxcvt" license = "MIT" maintainer = "Chris Tusa " arch = "x86_64" [dependencies] runtime = [] build = [] [[source]] file = "libxcvt-0.1.3.tar.xz" urls = ["https://www.x.org/releases/individual/lib/libxcvt-0.1.3.tar.xz"] checksum = "a929998a8767de7dfa36d6da4751cdbeef34ed630714f2f4a767b351f2442e01" [build] parallel = true #!/bin/sh # Build script for libxkbfile (Meson, Template B). # NOTE (Task 4b, 2026-07-22): the 1.2.0 release tarball ships ONLY # meson.build - no configure script (autotools support was dropped # upstream by this release, despite the phase1a manifest listing # "autotools/meson" for it). Confirmed via `tar tf` on the fetched # tarball: no configure.ac/configure anywhere in the tree. Using # Template B; no libtool fix needed (Meson doesn't hit the libtool # dynamic-linker case-arm bug at all). # # GOTCHA (Task 4b, 2026-07-22): meson's cc.has_function() probe reported # flockfile/getc_unlocked/funlockfile as present (they exist in libc), so # config.h's HAVE_UNLOCKED_STDIO got set - but src/maprules.c then fails # with "implicit declaration" because illumos's stdio.h only exposes those # POSIX.1c prototypes when __EXTENSIONS__ (PLURAL - not the single-S # __EXTENSION__ used by some other illumos headers) or _REENTRANT or # _POSIX_C_SOURCE>=199506L is defined (confirmed by reading # /usr/include/stdio.h's guard directly on alpha9). Define __EXTENSIONS__. set -e cd "$SRCDIR" export PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig:$PREFIX/share/pkgconfig:$PKG_CONFIG_PATH" export CFLAGS="${CFLAGS} -D__EXTENSIONS__" meson setup build \ --prefix="$PREFIX" \ --libdir=lib \ --buildtype=release \ -Ddefault_library=shared ninja -C build -j${JOBS:-1} DESTDIR="$PKGDIR" ninja -C build install # libxkbfile - XKB file parsing library (xlibre-server CDEPEND >=1.0.4) # https://gitlab.freedesktop.org/xorg/lib/libxkbfile [package] name = "libxkbfile" version = "1.2.0" release = 1 description = "XKB file parsing library" url = "https://xorg.freedesktop.org/releases/individual/lib/" license = "MIT" maintainer = "Chris Tusa " arch = "x86_64" [dependencies] runtime = ["libX11"] build = ["libX11", "xorgproto", "util-macros"] [[source]] file = "libxkbfile-1.2.0.tar.xz" urls = ["https://xorg.freedesktop.org/releases/individual/lib/libxkbfile-1.2.0.tar.xz"] checksum = "7f71884e5faf56fb0e823f3848599cf9b5a9afce51c90982baeb64f635233ebf" [build] parallel = true #!/bin/sh # Build script for Lua 5.4 (plain uname-keyed Makefile - NOT autotools). # # Lua's src/Makefile only has a "guess"/named-platform target dispatch (no # dedicated Hammerhead/illumos entry) and its "posix"/"solaris" targets only # ever produce a STATIC liblua.a - there is no shared-library target at all # upstream, on any platform. So this build.sh does two passes: # 1. `gmake posix` - the generic POSIX target (illumos has no dedicated # target; "solaris"/"SunOS" exists but drags in Solaris-specific # readline assumptions we don't want) - gives us liblua.a + lua/luac # binaries, and validates the objects build cleanly. # 2. Manually recompile the library objects -fPIC and link them into a # real liblua.so.5.4 - conky/neovim need a *shared* liblua, which # upstream never ships, so this has to be done by hand. # Finally we write a lua.pc by hand (upstream Lua ships NO pkg-config file # at all) so consumers (conky, neovim) can find it via pkg-config. set -e cd "$SRCDIR/src" export CC=gcc # --- Pass 1: static build (also produces the lua/luac binaries) --- gmake MYCFLAGS="-D__EXTENSIONS__ -DLUA_USE_POSIX -DLUA_USE_DLOPEN -fPIC" \ MYLIBS="-ldl" \ CC="$CC" \ posix # --- Pass 2: shared liblua.so.5.4 --- # CORE_O/LIB_O objects were already compiled -fPIC above (MYCFLAGS carried # -fPIC into SYSCFLAGS via MYCFLAGS), so relink into a shared object rather # than recompiling. lua.o/luac.o are excluded (those are the standalone # interpreter/compiler mains, not part of the library). # NOTE: coral invokes build.sh via `zsh script.sh` (not `sh script.sh`), so # the shebang is not honored and zsh's default (no word-splitting on # unquoted variable expansion) applies - an "$CORE_O $LIB_O" variable # reference collapses to a single argument and breaks the link. Inline the # object list literally (plain script tokens, not a variable) to sidestep # the shell-dependent splitting behavior entirely. gcc -shared -Wl,-soname,liblua.so.5 -o liblua.so.5.4 \ lapi.o lcode.o lctype.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o \ lmem.o lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o \ ltm.o lundump.o lvm.o lzio.o \ lauxlib.o lbaselib.o lcorolib.o ldblib.o liolib.o lmathlib.o \ loadlib.o loslib.o lstrlib.o ltablib.o lutf8lib.o linit.o \ -lm -ldl ln -sf liblua.so.5.4 liblua.so.5 ln -sf liblua.so.5 liblua.so # --- Install (static lib + binaries + headers via upstream install target) --- cd "$SRCDIR" gmake install INSTALL_TOP="$PKGDIR$PREFIX" # --- Stage the shared lib alongside the static one --- # NOTE: illumos cp(1) has no GNU/BSD-style -P (no-dereference) flag - copy # only the real regular file, then recreate the two symlinks in place with # ln -sf so they land as symlinks (not dereferenced copies). mkdir -p "$PKGDIR$PREFIX/lib" cp -f src/liblua.so.5.4 "$PKGDIR$PREFIX/lib/" ( cd "$PKGDIR$PREFIX/lib" && ln -sf liblua.so.5.4 liblua.so.5 && ln -sf liblua.so.5 liblua.so ) # --- Write lua.pc (upstream ships none) --- mkdir -p "$PKGDIR$PREFIX/lib/pkgconfig" cat > "$PKGDIR$PREFIX/lib/pkgconfig/lua.pc" <` - a real X.Org bitmap from the standalone # xbitmaps package, NOT one of motif's own bitmaps/. Needs base/xbitmaps # built+installed to $PREFIX/include first (see zports base/xbitmaps). set -e # Resolve the port dir (holds patches/) BEFORE cd'ing into the extracted source. PORTDIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd) cd "$SRCDIR" # MANDATORY libtool fix - see Template A (confirmed 4 kopensolaris hits # in this configure). if [ -f configure ]; then sed -i -E 's/(kopensolaris\*-gnu)([^)]*\))/\1 | hammerhead*\2/' configure fi # GOTCHA: lib/Xm/Xmfuncs.h #defines bcopy/bzero/bcmp as function-like # macros (for pre-ANSI systems) BEFORE illumos's X11/Xos.h later does its # own (normally-safe, guarded) `#include `. Since strings.h # hasn't been seen yet at that point, its `extern int bcmp(const void *, # ...)` etc. prototypes get macro-substituted into invalid syntax # ("expected declaration specifiers ... before '(' token"). Fixed by # patching Xmfuncs.h to pull in itself before defining the # macros, so strings.h's own include guard makes Xos.h's later include a # no-op. See patches/0001-xmfuncs-strings-h-macro-mangling.patch. for p in "$PORTDIR"/patches/*.patch; do [ -f "$p" ] || continue echo "==> Applying patch: $(basename "$p")" patch -p1 < "$p" done # GOTCHA: ResEncod.c casts its iconv() 2nd arg to (char **) - matching # illumos's non-POSIX-conformant iconv(3C) prototype, which /usr/include/ # iconv.h only exposes when _XPG6 is defined (otherwise it exposes the # `const char **` prototype instead, and the explicit (char **) cast in the # old motif source becomes an incompatible-pointer-type error under GCC 14's # now-stricter default). Define _XPG6 to select the signature the existing # cast already expects, rather than patching upstream source. export PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig:$PREFIX/share/pkgconfig:/usr/lib/pkgconfig:$PKG_CONFIG_PATH" export CFLAGS="${CFLAGS} -I$PREFIX/include -D__EXTENSIONS__ -D_POSIX_PTHREAD_SEMANTICS -D_XPG6 -fpermissive -fcommon" export LDFLAGS="${LDFLAGS} -L$PREFIX/lib -R$PREFIX/lib" # GOTCHA: ac_find_xft.m4's Xrender probe does # `XRENDER_LIBS="-L$x_libraries -lXft -lXrender"` unconditionally once # $have_x=yes, with NO fallback if $x_libraries came back empty (which it # does here since AC_PATH_XTRA never needed to search - X11 is already on # the default $PREFIX/lib path) - producing a malformed literal "-L -lXft" # that trips libtool ("require no space between '-L' and '-lXft'"). # Force --x-libraries/--x-includes explicitly so $x_libraries is non-empty. ./configure \ --prefix="$PREFIX" \ --build="$BUILD_TRIPLE" \ --host="$BUILD_TRIPLE" \ --sysconfdir="$SYSCONFDIR" \ --disable-static \ --enable-xft \ --disable-printing \ --x-includes="$PREFIX/include" \ --x-libraries="$PREFIX/lib" gmake -j${JOBS:-1} gmake install DESTDIR="$PKGDIR" # motif (OpenMotif) - X11 widget toolkit, backs the XNEdit editor # https://sourceforge.net/projects/motif/ [package] name = "motif" version = "2.3.8" release = 1 description = "OpenMotif X11 widget toolkit" url = "https://sourceforge.net/projects/motif/" license = "LGPL-2.1-or-later" maintainer = "Chris Tusa " arch = "x86_64" [dependencies] runtime = ["libX11", "libXext", "libXt", "libXft", "libXpm", "freetype"] build = ["libX11", "libXext", "libXt", "libXft", "libXpm", "freetype", "xbitmaps"] [[source]] file = "motif-2.3.8.tar.gz" urls = ["https://downloads.sourceforge.net/project/motif/Motif%202.3.8%20Source%20Code/motif-2.3.8.tar.gz"] checksum = "859b723666eeac7df018209d66045c9853b50b4218cecadb794e2359619ebce7" [build] parallel = true --- a/lib/Xm/Xmfuncs.h +++ b/lib/Xm/Xmfuncs.h @@ -41,6 +41,16 @@ #else #if (__STDC__ && !defined(X_NOT_STDC_ENV) && !defined(sun) && !defined(macII) && !defined(apollo)) || defined(SVR4) || defined(hpux) || defined(_IBMR2) || defined(_SEQUENT_) #include +/* HAMMERHEAD: pull in here, BEFORE bcopy/bzero/bcmp become + * function-like macros below. Otherwise X11/Xos.h's later (guarded, so + * normally a no-op) `#include ` is the FIRST time these + * prototypes are seen, and the macro substitution mangles the illumos + * `extern int bcmp(const void *, const void *, size_t);` declarations + * into invalid syntax ("expected declaration specifiers ... before '(' + * token"). Pre-including here means strings.h's own guard (_STRINGS_H) + * makes X11/Xos.h's later include a safe no-op. + */ +#include #define _XFUNCS_H_INCLUDED_STRING_H #define bcopy(b1,b2,len) memmove(b2, b1, (size_t)(len)) #define bzero(b,len) memset(b, 0, (size_t)(len)) #!/bin/sh # Build script for msgpack-c (CMake, Ninja generator). CMake doesn't # recognize Hammerhead and won't set UNIX=TRUE / pick the right shared-lib # conventions without a Platform module (same gotcha as base/neovim's and # base/libjpeg-turbo's cmake builds) - map it to the SunOS platform module. # # This is the C-only "c-" release tag (NOT the C++ "cpp-" tag), so # there is no MSGPACK_ENABLE_CXX option to disable here. set -e cd "$SRCDIR" mkdir -p "$SRCDIR/.cmake/Platform" echo 'include(Platform/SunOS)' > "$SRCDIR/.cmake/Platform/Hammerhead.cmake" export PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig:$PREFIX/share/pkgconfig:$PKG_CONFIG_PATH" cmake -B build -G Ninja \ -DCMAKE_MODULE_PATH="$SRCDIR/.cmake" \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX="$PREFIX" \ -DCMAKE_INSTALL_RPATH="$PREFIX/lib" \ -DCMAKE_C_FLAGS="-D__EXTENSIONS__ -D_POSIX_PTHREAD_SEMANTICS" \ -DCMAKE_POSITION_INDEPENDENT_CODE=ON \ -DMSGPACK_BUILD_TESTS=OFF \ -DMSGPACK_BUILD_EXAMPLES=OFF cmake --build build -j${JOBS:-1} DESTDIR="$PKGDIR" cmake --install build # msgpack-c - MessagePack binary serialization, C library (neovim RPC) # https://github.com/msgpack/msgpack-c [package] name = "msgpack-c" version = "7.0.1" release = 1 description = "MessagePack binary-based object serialization library for C" url = "https://github.com/msgpack/msgpack-c" license = "BSL-1.0" maintainer = "Chris Tusa " arch = "x86_64" [dependencies] runtime = [] build = [] [[source]] file = "msgpack-c-7.0.1.tar.gz" urls = ["https://github.com/msgpack/msgpack-c/archive/refs/tags/c-7.0.1.tar.gz"] checksum = "1a8f85d21418d118af953043146f727b9b08d78ad85ed17cd6aa0b568f60f1d7" [build] parallel = true #!/bin/sh # Build script for mupdf 1.28.0 (plain uname-keyed GNU Makefile, bundled # thirdparty). NOT Template A/B - mupdf ships its own Makerules that # selects behavior off `$(OS)` (defaulting to `uname`, which reports # "Hammerhead" - matches none of mupdf's Darwin/Linux/OpenBSD/wasm arms), # so force OS=Linux explicitly to pick up the Linux-shaped defaults # (HAVE_OBJCOPY, LIB_LDFLAGS -shared -Wl,-soname, etc.) which line up with # our GNU-ld/binutils toolchain. # # Use the BUNDLED thirdparty/ (freetype, harfbuzz, jbig2dec, openjpeg, # mujs, zlib-alt) rather than USE_SYSTEM_LIBS=yes - avoids a large, # fragile dependency reconciliation against our own freetype/harfbuzz # ports for a single consumer. Only the X11 viewer libs (libX11/libXext/ # libXrandr/libXcursor) come from the system via pkg-config. # # Old (pre-2015-idiom-heavy in thirdparty/) C - GCC 14 promotes implicit- # decl/incompatible-pointer-type/int-conversion to hard errors by default; # -fpermissive demotes them back to warnings, -fcommon undoes GCC10+'s # -fno-common default (tentative-definition multiple-definition errors). set -e PORTDIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd) cd "$SRCDIR" for p in "$PORTDIR"/patches/*.patch; do [ -f "$p" ] || continue echo "==> Applying patch: $(basename "$p")" patch -p1 < "$p" done export PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig:$PREFIX/share/pkgconfig:/usr/lib/pkgconfig:$PKG_CONFIG_PATH" # Build only first (no install target) - DESTDIR must be a make ARG on the # install step, never exported/used on a plain build, and never omitted - # an install-apps run without DESTDIR would write straight into the live # $PREFIX on the build host. gmake -j${JOBS:-1} \ OS=Linux \ build=release \ HAVE_X11=yes \ HAVE_GLUT=no \ HAVE_OBJCOPY=yes \ prefix="$PREFIX" \ XCFLAGS="-fpermissive -fcommon -D__EXTENSIONS__ -D_POSIX_PTHREAD_SEMANTICS" \ apps libs # install-apps installs mutool + the view apps (incl. mupdf-x11); # install-libs additionally ships libmupdf + headers for any future consumer. gmake \ OS=Linux \ build=release \ HAVE_X11=yes \ HAVE_GLUT=no \ HAVE_OBJCOPY=yes \ prefix="$PREFIX" \ DESTDIR="$PKGDIR" \ XCFLAGS="-fpermissive -fcommon -D__EXTENSIONS__ -D_POSIX_PTHREAD_SEMANTICS" \ install-apps install-libs # mupdf - lightweight PDF/XPS/EPUB viewer and library # https://mupdf.com/ [package] name = "mupdf" version = "1.28.0" release = 1 description = "Lightweight PDF/XPS/EPUB viewer and library (X11 viewer)" url = "https://mupdf.com/" license = "AGPL-3.0-or-later" maintainer = "Chris Tusa " arch = "x86_64" [dependencies] runtime = ["libX11", "libXext", "libXrandr", "libXcursor", "zlib"] build = ["libX11", "libXext", "libXrandr", "libXcursor", "zlib"] [[source]] file = "mupdf-1.28.0-source.tar.gz" urls = ["https://mupdf.com/downloads/archive/mupdf-1.28.0-source.tar.gz"] checksum = "21c7f064903154f1c3a7458bee81f130fc36f9b5147ea13328f9980e02d2dea2" [build] parallel = true From: Chris Tusa Subject: fitz/deskew: rename index_t (clashes with illumos sys/types.h) illumos's already typedefs index_t as 'short' (an SVR4 STREAMS-era type), which conflicts with deskew.c's own struct index_t typedef (transitively included via mupdf/fitz.h -> mupdf/memento.h -> stdlib.h -> sys/wait.h -> sys/types.h). Rename mupdf's local type to fz_deskew_index_t (deskew.c/.h only - no other file in the tree uses this name) to remove the collision rather than fighting illumos's system header. diff --git a/source/fitz/deskew.c b/source/fitz/deskew.c --- a/source/fitz/deskew.c 2026-06-25 14:05:09.000000000 -0500 +++ b/source/fitz/deskew.c 2026-07-22 21:04:17.710448696 -0500 @@ -261,7 +261,7 @@ uint8_t slow; /* Flag */ int32_t first_pixel; /* offset of first value in source data */ int32_t last_pixel; /* last pixel number */ -} index_t; +} fz_deskew_index_t; #if ARCH_HAS_NEON typedef int16_t weight_t; @@ -271,7 +271,7 @@ typedef void (zoom_y_fn)(uint8_t * dst, const uint8_t * __restrict tmp, - const index_t * __restrict index, + const fz_deskew_index_t * __restrict index, const weight_t * __restrict weights, uint32_t width, uint32_t channels, @@ -279,7 +279,7 @@ int32_t y); typedef void (zoom_x_fn)(uint8_t * __restrict tmp, const uint8_t * __restrict src, - const index_t * __restrict index, + const fz_deskew_index_t * __restrict index, const weight_t * __restrict weights, uint32_t dst_w, uint32_t src_w, @@ -317,9 +317,9 @@ uint32_t dst_h_borderless; uint32_t skip_l; uint32_t skip_t; - index_t *index_x[SUB_PIX_X]; + fz_deskew_index_t *index_x[SUB_PIX_X]; weight_t *weights_x[SUB_PIX_X]; - index_t *index_y[SUB_PIX_Y]; + fz_deskew_index_t *index_y[SUB_PIX_Y]; weight_t *weights_y[SUB_PIX_Y]; uint32_t max_y_weights[SUB_PIX_Y]; uint8_t bg[FZ_MAX_COLORS]; @@ -381,7 +381,7 @@ static void make_x_weights(fz_context *ctx, - index_t **indexp, + fz_deskew_index_t **indexp, weight_t **weightsp, uint32_t src_w, uint32_t dst_w, @@ -391,7 +391,7 @@ int sse_slow) { double squeeze; - index_t *index; + fz_deskew_index_t *index; weight_t *weights; uint32_t i; double offset = ((double)offset_f)/offset_n; @@ -419,7 +419,7 @@ weights = (weight_t *)fz_malloc_aligned(ctx, sizeof(*weights) * max_weights * dst_w + SSE_SLOP, sizeof(weight_t) * 4); memset(weights, 0, sizeof(*weights) * max_weights * dst_w); fz_try(ctx) - index = (index_t *)fz_malloc(ctx, sizeof(*index) * dst_w + SSE_SLOP); + index = (fz_deskew_index_t *)fz_malloc(ctx, sizeof(*index) * dst_w + SSE_SLOP); fz_catch(ctx) { fz_free_aligned(ctx, weights); @@ -497,7 +497,7 @@ */ static void make_y_weights(fz_context *ctx, - index_t **indexp, + fz_deskew_index_t **indexp, weight_t **weightsp, uint32_t *max_weightsp, uint32_t dst_w, @@ -508,7 +508,7 @@ uint32_t h) { double squeeze; - index_t *index; + fz_deskew_index_t *index; weight_t *weights; uint32_t i; double offset = ((double)offset_f)/offset_n; @@ -538,7 +538,7 @@ weights = (weight_t *)fz_malloc_aligned(ctx, sizeof(*weights) * max_weights * dst_w, sizeof(weight_t) * 4); fz_try(ctx) - index = (index_t *)fz_malloc(ctx, sizeof(*index) * dst_w); + index = (fz_deskew_index_t *)fz_malloc(ctx, sizeof(*index) * dst_w); fz_catch(ctx) { fz_free_aligned(ctx, weights); @@ -587,7 +587,7 @@ #ifdef DEBUG_DESKEWER static void -dump_weights(const index_t *index, +dump_weights(const fz_deskew_index_t *index, const weight_t *weights, uint32_t w, const char *str) @@ -623,7 +623,7 @@ uint32_t num_w = deskewer->dst_w; weight_t *new_weights = fz_malloc_aligned(ctx, num_w * deskewer->max_y_weights[i] * sizeof(weight_t) * 4, sizeof(weight_t) * 4); - index_t *index; + fz_deskew_index_t *index; weight_t *weights; index = deskewer->index_y[i]; diff --git a/source/fitz/deskew_c.h b/source/fitz/deskew_c.h --- a/source/fitz/deskew_c.h 2026-06-25 14:05:09.000000000 -0500 +++ b/source/fitz/deskew_c.h 2026-07-22 21:04:17.710702010 -0500 @@ -25,7 +25,7 @@ static void zoom_x(uint8_t * FZ_RESTRICT tmp, const uint8_t * FZ_RESTRICT src, - const index_t * FZ_RESTRICT index, + const fz_deskew_index_t * FZ_RESTRICT index, const weight_t * FZ_RESTRICT weights, uint32_t dst_w, uint32_t src_w, @@ -109,7 +109,7 @@ static void zoom_x1(uint8_t * FZ_RESTRICT tmp, const uint8_t * FZ_RESTRICT src, - const index_t * FZ_RESTRICT index, + const fz_deskew_index_t * FZ_RESTRICT index, const weight_t * FZ_RESTRICT weights, uint32_t dst_w, uint32_t src_w, @@ -183,7 +183,7 @@ static void zoom_x3(uint8_t * FZ_RESTRICT tmp, const uint8_t * FZ_RESTRICT src, - const index_t * FZ_RESTRICT index, + const fz_deskew_index_t * FZ_RESTRICT index, const weight_t * FZ_RESTRICT weights, uint32_t dst_w, uint32_t src_w, @@ -280,7 +280,7 @@ static void zoom_x4(uint8_t * FZ_RESTRICT tmp, const uint8_t * FZ_RESTRICT src, - const index_t * FZ_RESTRICT index, + const fz_deskew_index_t * FZ_RESTRICT index, const weight_t * FZ_RESTRICT weights, uint32_t dst_w, uint32_t src_w, @@ -388,7 +388,7 @@ static void zoom_y(uint8_t * dst, const uint8_t * FZ_RESTRICT tmp, - const index_t * FZ_RESTRICT index, + const fz_deskew_index_t * FZ_RESTRICT index, const weight_t * FZ_RESTRICT weights, uint32_t width, uint32_t channels, @@ -431,7 +431,7 @@ static void zoom_y1(uint8_t * dst, const uint8_t * FZ_RESTRICT tmp, - const index_t * FZ_RESTRICT index, + const fz_deskew_index_t * FZ_RESTRICT index, const weight_t * FZ_RESTRICT weights, uint32_t width, uint32_t channels, @@ -471,7 +471,7 @@ static void zoom_y3(uint8_t * dst, const uint8_t * FZ_RESTRICT tmp, - const index_t * FZ_RESTRICT index, + const fz_deskew_index_t * FZ_RESTRICT index, const weight_t * FZ_RESTRICT weights, uint32_t width, uint32_t channels, @@ -520,7 +520,7 @@ static void zoom_y4(uint8_t * dst, const uint8_t * FZ_RESTRICT tmp, - const index_t * FZ_RESTRICT index, + const fz_deskew_index_t * FZ_RESTRICT index, const weight_t * FZ_RESTRICT weights, uint32_t width, uint32_t channels, --- a/source/fitz/subset-cff.c +++ b/source/fitz/subset-cff.c @@ -24,6 +24,11 @@ #include +/* illumos already typedefs index_t (SVR4 STREAMS-era + * short). Rename ours to avoid the redefinition conflict - see the + * same fix in deskew.c. */ +#define index_t mu_index_t + /* For the purposes of this code, and to save my tiny brain from overload, we will adopt the following notation: #!/bin/zsh # Build script for GNU nano set -e cd "$SRCDIR" # ncurses .pc files are in $PREFIX/lib/pkgconfig export PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig:${PKG_CONFIG_PATH:-}" # Fix illumos gnulib compatibility issues for f in lib/localename.c gnulib-tests/localename.c; do if [ -f "$f" ]; then sed -i 's/extern char \* getlocalename_l/extern const char * getlocalename_l/' "$f" fi done ./configure --build=$BUILD_TRIPLE \ --prefix=$PREFIX \ --sysconfdir=$SYSCONFDIR \ --disable-nls # Fix illumos memset_s false detection if present for config in lib/config.h gnulib-tests/config.h config.h; do if [ -f "$config" ]; then sed -i 's/#define HAVE_MEMSET_S 1/\/* #undef HAVE_MEMSET_S - illumos has it as macro only *\//' "$config" fi done gmake -j${JOBS:-1} gmake install DESTDIR="$PKGDIR" # GNU nano - Simple text editor # https://www.nano-editor.org/ [package] name = "nano" version = "8.2" release = 1 description = "GNU nano - Simple text editor" url = "https://www.nano-editor.org/" license = "GPL-3.0" maintainer = "Chris Tusa " arch = "x86_64" [dependencies] runtime = ["ncurses"] build = ["ncurses"] [[source]] file = "nano-8.2.tar.xz" urls = ["https://www.nano-editor.org/dist/v8/nano-8.2.tar.xz"] checksum = "d5ad07dd862facae03051c54c6535e54c7ed7407318783fcad1ad2d7076fffeb" [build] parallel = true #!/bin/zsh set -e cd "$SRCDIR" ./configure \ --prefix=$PREFIX \ --build=$BUILD_TRIPLE \ --host=$BUILD_TRIPLE \ --with-shared \ --with-cxx-shared \ --without-debug \ --without-ada \ --enable-widec \ --enable-pc-files \ --with-pkg-config-libdir=$PREFIX/lib/pkgconfig \ --with-termlib \ --with-ticlib gmake -j${JOBS:-1} gmake install DESTDIR="$PKGDIR" # Create non-wide symlinks (libncurses.so -> libncursesw.so etc.) # Many programs look for -lncurses not -lncursesw cd "$PKGDIR$PREFIX/lib" for lib in ncurses form panel menu tinfo tic; do if [ -f "lib${lib}w.so" ]; then ln -sf "lib${lib}w.so" "lib${lib}.so" fi # Also link the .a files if [ -f "lib${lib}w.a" ]; then ln -sf "lib${lib}w.a" "lib${lib}.a" fi done # Symlink ncursesw headers as ncurses headers cd "$PKGDIR$PREFIX/include" if [ -d ncursesw ]; then ln -sf ncursesw ncurses # Also link headers directly for programs that use -I$PREFIX/include for h in ncursesw/*.h; do ln -sf "$h" . done fi --- configure.orig +++ configure @@ -6457,7 +6457,7 @@ (osf*|mls+*) LD_RPATH_OPT="-rpath " ;; - (solaris2*) + (solaris2*|hammerhead*) LD_RPATH_OPT="-R" ;; (*) @@ -7066,7 +7066,7 @@ MK_SHARED_LIB='${LD} ${LDFLAGS} -assert pure-text -o $@' test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel ;; - (solaris2*) + (solaris2*|hammerhead*) # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3 if test "$DFT_LWR_MODEL" = "shared" ; then @@ -26948,7 +26948,7 @@ (sco3.2v5*) CXXLDFLAGS="-u main" ;; - (solaris2*) + (solaris2*|hammerhead*) if test "$GXX" != yes ; then CXX_AR='$(CXX)' CXX_ARFLAGS='-xar -o' @@ -28833,7 +28833,7 @@ LDFLAGS_STATIC=-noso LDFLAGS_SHARED=-so_archive ;; - (solaris2*) + (solaris2*|hammerhead*) LDFLAGS_STATIC=-Bstatic LDFLAGS_SHARED=-Bdynamic ;; @@ -29284,7 +29284,7 @@ # workaround for g++ versus Solaris (20131116) case "$cf_cv_system_name" in -(solaris2*) +(solaris2*|hammerhead*) case "x$CPPFLAGS" in (*-D_XOPEN_SOURCE_EXTENDED*) test -n "$verbose" && echo " moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6 # ncurses - Terminal handling library # https://invisible-island.net/ncurses/ [package] name = "ncurses" version = "6.5" release = 1 description = "Terminal handling library with terminfo support" url = "https://invisible-island.net/ncurses/" license = "MIT" maintainer = "Chris Tusa " arch = "x86_64" [dependencies] runtime = [] build = [] [[source]] file = "ncurses-6.5.tar.gz" urls = ["https://invisible-island.net/archives/ncurses/ncurses-6.5.tar.gz"] checksum = "136d91bc269a9a5785e5f9e980bc76ab57428f604ce3e5a5a90cebc767971cc6" [patches] files = ["hammerhead-solaris-compat.patch"] strip = 0 [build] parallel = true #!/bin/zsh # Build script for neovim # # Task 1b-4 (M2): attempted USE_BUNDLED=OFF + PREFER_LUA=ON (consume our # system libuv/msgpack-c/unibilium/libtermkey/libvterm/tree-sitter + lua). # That failed: neovim's cmake.deps subproject requires an EXACT Lua 5.1 # (find_package(Lua 5.1 EXACT)) to link against for either the "prefer lua" # path (real PUC Lua 5.1) OR the default LuaJIT path - and our system `lua` # port is 5.4.8 (no 5.1-ABI package exists in zports). Per task brief # fallback: keep USE_BUNDLED=ON (neovim builds its own private copies of # these deps, using the bundled LuaJIT engine) rather than sink more time # chasing a Lua 5.1 system package that doesn't exist yet. tree-sitter # parsers were already being pre-staged this way regardless of the flag. # # cmake on Hammerhead has no HTTPS support, so every ExternalProject source # tarball cmake.deps would otherwise fetch itself must be pre-staged with # curl into .deps/build/downloads// first. set -e PORTDIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd) cd "$SRCDIR" # LuaJIT's own Makefile probes whether $(TARGET_CC) emits eh_frame/ # __unwind_info sections in a bare test compile (no -funwind-tables) to # decide whether to auto-define -DLUAJIT_UNWIND_EXTERNAL. GCC 14 on # Hammerhead doesn't default to -fasynchronous-unwind-tables the way # glibc/Linux x86_64 GCC does, so the probe comes back empty and # lj_err.c's LJ_TARGET_X64 unwind path hits its # "#error Broken build system" guard. Patch cmake.deps' BuildLuajit.cmake # to force -DLUAJIT_UNWIND_EXTERNAL directly instead of relying on the # probe. for p in "$PORTDIR"/patches/*.patch; do [ -f "$p" ] || continue echo "==> Applying patch: $(basename "$p")" patch -p1 < "$p" done # Create cmake Platform module for Hammerhead (illumos derivative) # cmake doesn't recognize Hammerhead and won't set UNIX=TRUE without this mkdir -p "$SRCDIR/.cmake/Platform" echo 'include(Platform/SunOS)' > "$SRCDIR/.cmake/Platform/Hammerhead.cmake" MODPATH="$SRCDIR/.cmake" export PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig:$PREFIX/share/pkgconfig:/usr/lib/pkgconfig:$PKG_CONFIG_PATH" export CMAKE_PREFIX_PATH="$PREFIX:$CMAKE_PREFIX_PATH" # -D__illumos__: bundled tree-sitter (and possibly other deps) gate their # #include on __linux__/__illumos__/*BSD/etc; our GCC 14 # toolchain defines __sun/__SVR4 but not __illumos__, tripping # "#error platform not supported" even though Hammerhead's libc DOES ship # a POSIX-style with le16toh/be16toh (verified at # /usr/include/endian.h). Each dep in cmake.deps is its own fresh # ExternalProject_Add cmake invocation (only CMAKE_BUILD_TYPE is # propagated via DEPS_CMAKE_ARGS - CMAKE_C_FLAGS passed to the outer # `cmake -S cmake.deps -B .deps` configure does NOT flow down to # sub-projects), so export it via the CFLAGS env var instead: cmake's # project() seeds CMAKE_C_FLAGS from $CFLAGS on first configure, and # ExternalProject_Add's cmake subprocess inherits our environment. export CFLAGS="${CFLAGS:-} -D__illumos__" # coral's build wrapper exports DESTDIR=$PKGDIR globally so a package's # own `make install`/`cmake --install` stages into the pkg dir. That # environment variable bleeds into cmake.deps's bundled sub-builds too # (e.g. LuaJIT's Makefile does `DPREFIX = $(DESTDIR)$(PREFIX)`), so # instead of installing into .deps/usr as intended, luajit/libuv/etc were # silently installing under $PKGDIR/ - meaning # .deps/usr never got populated and every downstream dep # (lpeg/luv - "lua.h: No such file", "missing LUAJIT_LIBRARIES") failed to # find them. Unset it for the whole cmake.deps phase; it gets re-exported # below just before neovim's own `cmake --install build`, which is the # only step that should honor it. unset DESTDIR # Pre-download every bundled dependency cmake.deps will build with # USE_BUNDLED=ON (default LuaJIT engine): libuv, luajit, lpeg, unibilium, # luv, utf8proc, plus the tree-sitter runtime + parsers used for # :checkhealth/help/runtime syntax. GETTEXT/LIBICONV are MSVC-only and # WASMTIME/UNCRUSTIFY/LUA_DEV_DEPS/XXD/WIN32YANK are Windows- or # lint/test-only - not needed for a plain Unix build, so they are skipped. DLDIR="$SRCDIR/.deps/build/downloads" echo "Pre-downloading bundled dependencies..." while IFS=' ' read -r name url; do [[ -z "$name" || -z "$url" ]] && continue local subdir="" case "$name" in LIBUV_URL) subdir="libuv" ;; LUAJIT_URL) subdir="luajit" ;; LPEG_URL) subdir="lpeg" ;; UNIBILIUM_URL) subdir="unibilium" ;; LUV_URL) subdir="luv" ;; LUA_COMPAT53_URL) subdir="lua_compat53" ;; UTF8PROC_URL) subdir="utf8proc" ;; TREESITTER_URL) subdir="treesitter" ;; TREESITTER_C_URL) subdir="treesitter_c" ;; TREESITTER_LUA_URL) subdir="treesitter_lua" ;; TREESITTER_VIM_URL) subdir="treesitter_vim" ;; TREESITTER_VIMDOC_URL) subdir="treesitter_vimdoc" ;; TREESITTER_QUERY_URL) subdir="treesitter_query" ;; TREESITTER_MARKDOWN_URL) subdir="treesitter_markdown" ;; *) continue ;; esac local fname="${url##*/}" mkdir -p "$DLDIR/$subdir" if [[ ! -f "$DLDIR/$subdir/$fname" ]]; then echo " Downloading $subdir/$fname ..." curl -fsSL -o "$DLDIR/$subdir/$fname" "$url" fi done < cmake.deps/deps.txt # Build the cmake.deps subproject with the default USE_BUNDLED=ON (private # copies of libuv/luajit/lpeg/unibilium/luv/utf8proc/tree-sitter, all # statically linked into nvim - no system Lua 5.1 required). # -D__illumos__: bundled tree-sitter's portable/endian.h gates its # `#include ` branch on __linux__/__illumos__/*BSD/etc; our GCC # 14 toolchain defines __sun/__SVR4 but not __illumos__, so it falls # through to "#error platform not supported" even though Hammerhead's # libc DOES ship a POSIX-style with le16toh/be16toh (verified # at /usr/include/endian.h). Define the macro ourselves rather than patch # every upstream file that checks for it. cmake -S cmake.deps -B .deps -G Ninja \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_MODULE_PATH="$MODPATH" \ -DCMAKE_C_COMPILER=/usr/bin/cc \ -DCMAKE_C_FLAGS="-D__illumos__" cmake --build .deps # Build neovim against the bundled deps just built above. cmake -B build -G Ninja \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DCMAKE_MODULE_PATH="$MODPATH" \ -DCMAKE_C_COMPILER=/usr/bin/cc \ -DCMAKE_C_FLAGS="-D__illumos__" \ -DCMAKE_INSTALL_PREFIX=$PREFIX \ -DCMAKE_INSTALL_RPATH=$PREFIX/lib \ -DENABLE_JEMALLOC=OFF cmake --build build # Install - restore DESTDIR (unset above for the cmake.deps phase) so this # final install stages into $PKGDIR as coral expects. export DESTDIR="$PKGDIR" cmake --install build # Create vi/vim symlinks ln -sf nvim "$PKGDIR$PREFIX/bin/vim" ln -sf nvim "$PKGDIR$PREFIX/bin/vi" [package] name = "neovim" version = "0.11.6" release = 1 description = "Hyperextensible Vim-based text editor" url = "https://neovim.io/" license = "Apache-2.0" maintainer = "Chris Tusa " arch = "x86_64" [dependencies] runtime = ["ncurses"] build = ["ninja"] [[source]] file = "neovim-0.11.6.tar.gz" urls = ["https://github.com/neovim/neovim/archive/refs/tags/v0.11.6.tar.gz"] checksum = "d1c8e3f484ed1e231fd5f48f53b7345b628e52263d5eef489bb8b73ca8d90fca" [build] parallel = true --- a/cmake.deps/cmake/BuildLuajit.cmake +++ b/cmake.deps/cmake/BuildLuajit.cmake @@ -30,6 +30,8 @@ set(BUILDCMD_UNIX ${MAKE_PRG} -j CFLAGS=-fPIC CFLAGS+=-DLUA_USE_APICHECK CFLAGS+=-funwind-tables + CFLAGS+=-DLUAJIT_UNWIND_EXTERNAL + BUILDMODE=static ${NO_STACK_CHECK} ${AMD64_ABI} CCDEBUG+=-g --- a/src/nvim/lib/queue_defs.h +++ b/src/nvim/lib/queue_defs.h @@ -21,9 +21,9 @@ #include -typedef struct queue { - struct queue *next; - struct queue *prev; +typedef struct nvim_queue { + struct nvim_queue *next; + struct nvim_queue *prev; } QUEUE; #ifdef INCLUDE_GENERATED_DECLARATIONS #!/bin/sh # Build script for openbox (autotools, Template A). # Deps: glib2, pango, cairo, libxml2 (BASE - /usr/lib), libX11, libXext, # libXrender, libXrandr, libXinerama, libXcursor, libSM, libICE. # Optionals disabled to stay minimal (no imlib2/librsvg/startup-notification # ports exist). set -e cd "$SRCDIR" # GOTCHA (Template A, standard): this release's libtool-generated `configure` # has no solaris/illumos/hammerhead arm in its dynamic-linker detection # `case $host_os in ...` block - unmatched OS falls through to # `*) dynamic_linker=no ;;` which forces can_build_shared=no (static-only # .a, no .so). Patch the case arm to add hammerhead* alongside the generic # glibc/ELF branch (same SONAME/.so.N convention applies). if [ -f configure ]; then sed -i -E 's/(kopensolaris\*-gnu)([^)]*\))/\1 | hammerhead*\2/' configure fi # libxml2 ships in base (/usr/lib), not under $PREFIX - make sure its .pc # is on the search path alongside the usual $PREFIX locations. export PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig:$PREFIX/share/pkgconfig:/usr/lib/pkgconfig:$PKG_CONFIG_PATH" export CFLAGS="${CFLAGS} -D__EXTENSIONS__ -D_POSIX_PTHREAD_SEMANTICS -I$PREFIX/include" export LDFLAGS="${LDFLAGS} -L$PREFIX/lib -Wl,-R,$PREFIX/lib -lsocket -lnsl" ./configure \ --prefix="$PREFIX" \ --build="$BUILD_TRIPLE" \ --host="$BUILD_TRIPLE" \ --sysconfdir="$SYSCONFDIR" \ --disable-static \ --disable-nls \ --disable-imlib2 \ --disable-librsvg \ --disable-startup-notification gmake -j${JOBS:-1} # GOTCHA: openbox's automake-generated install-recursive races under a # parallel MAKEFLAGS inherited from the environment - two subdirectory # installs both `install-sh -c -d .../libexec` at once and the loser's # mkdir sees EEXIST as a hard error (not the usual -p tolerant case). # Force the install step serial regardless of inherited -j. gmake -j1 install DESTDIR="$PKGDIR" # openbox - lightweight, standards-compliant X11 window manager # https://openbox.org/ [package] name = "openbox" version = "3.6.1" release = 1 description = "Lightweight X11 window manager" url = "http://openbox.org/" license = "GPL-2.0-or-later" maintainer = "Chris Tusa " arch = "x86_64" [dependencies] runtime = ["glib2", "pango", "cairo", "libxml2", "libX11", "libXext", "libXrender", "libXrandr", "libXinerama", "libXcursor", "libSM", "libICE"] build = ["glib2", "pango", "cairo", "libxml2", "libX11", "libXext", "libXrender", "libXrandr", "libXinerama", "libXcursor", "libSM", "libICE", "xorgproto", "util-macros"] [[source]] file = "openbox-3.6.1.tar.gz" urls = ["http://openbox.org/dist/openbox/openbox-3.6.1.tar.gz"] checksum = "8b4ac0760018c77c0044fab06a4f0c510ba87eae934d9983b10878483bde7ef7" [build] parallel = true #!/bin/sh # Build script for pango (Meson, Template B). # Deps: glib2, harfbuzz, fribidi, cairo, fontconfig, freetype (all ported). # No gettext/nls dependency - confirmed via source inspection (no # meson.build/meson.options reference to nls, gettext, or msgfmt anywhere # in the 1.58.0 tree). set -e cd "$SRCDIR" export PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig:$PREFIX/share/pkgconfig:/usr/lib/pkgconfig:$PKG_CONFIG_PATH" export CFLAGS="${CFLAGS} -D__EXTENSIONS__" export LDFLAGS="${LDFLAGS} -Wl,-R,$PREFIX/lib" meson setup build \ --prefix="$PREFIX" \ --libdir=lib \ --buildtype=release \ -Ddefault_library=shared \ -Dintrospection=disabled \ -Dgtk_doc=false \ -Dbuild-testsuite=false ninja -C build -j${JOBS:-1} DESTDIR="$PKGDIR" ninja -C build install # pango - text layout and rendering (Openbox dep) # https://download.gnome.org/sources/pango/ [package] name = "pango" version = "1.58.0" release = 1 description = "Text layout and rendering library" url = "https://www.pango.org/" license = "LGPL-2.1-or-later" maintainer = "Chris Tusa " arch = "x86_64" [dependencies] runtime = ["glib2", "harfbuzz", "fribidi", "cairo", "fontconfig", "freetype"] build = ["glib2", "harfbuzz", "fribidi", "cairo", "fontconfig", "freetype"] [[source]] file = "pango-1.58.0.tar.xz" urls = ["https://download.gnome.org/sources/pango/1.58/pango-1.58.0.tar.xz"] checksum = "bc5bad6213ad4886a47d1e80292fd850b64159b50db67917a43d9ea80ee2298a" [build] parallel = true #!/bin/bash # Build script for GNU patch set -e cd "$SRCDIR" # Fix illumos gnulib compatibility issues for f in lib/localename.c gnulib-tests/localename.c; do if [ -f "$f" ]; then sed -i 's/extern char \* getlocalename_l/extern const char * getlocalename_l/' "$f" fi done ./configure \ --build=$BUILD_TRIPLE \ --host=$BUILD_TRIPLE \ --prefix=$PREFIX # Fix illumos memset_s false detection if present for config in lib/config.h gnulib-tests/config.h config.h; do if [ -f "$config" ]; then sed -i 's/#define HAVE_MEMSET_S 1/\/* #undef HAVE_MEMSET_S - illumos has it as macro only *\//' "$config" fi done gmake -j${JOBS:-1} gmake install DESTDIR="$PKGDIR" # GNU patch - Apply diff files # https://www.gnu.org/software/patch/ [package] name = "patch" version = "2.7.6" release = 1 description = "GNU patch - Apply diff files to originals" url = "https://www.gnu.org/software/patch/" license = "GPL-3.0" maintainer = "Chris Tusa " arch = "x86_64" [dependencies] runtime = [] build = [] [[source]] file = "patch-2.7.6.tar.xz" urls = ["https://ftp.gnu.org/gnu/patch/patch-2.7.6.tar.xz"] checksum = "ac610bda97abe0d9f6b7c963255a11dcb196c25e337c61f94e4778d632f1d8fd" [build] parallel = true #!/bin/sh # Build script for pcre2 (autotools, Template A). No deps (zlib/bz2 not # needed - pcre2grep's compressed-file support is optional and skipped). set -e cd "$SRCDIR" # Mandatory libtool hammerhead* dynamic-linker fix (see libXrender/Task 4a # gotcha): unmatched host_os falls through to "dynamic_linker=no", forcing # static-only output without this. if [ -f configure ]; then sed -i -E 's/(kopensolaris\*-gnu)([^)]*\))/\1 | hammerhead*\2/' configure fi export PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig:$PREFIX/share/pkgconfig:/usr/lib/pkgconfig:$PKG_CONFIG_PATH" export CFLAGS="${CFLAGS} -I$PREFIX/include -D__EXTENSIONS__" export LDFLAGS="${LDFLAGS} -L$PREFIX/lib -R$PREFIX/lib" ./configure \ --prefix="$PREFIX" \ --build="$BUILD_TRIPLE" \ --host="$BUILD_TRIPLE" \ --sysconfdir="$SYSCONFDIR" \ --disable-static \ --enable-pcre2-16 \ --enable-pcre2-32 gmake -j${JOBS:-1} gmake install DESTDIR="$PKGDIR" # pcre2 - Perl Compatible Regular Expressions (glib2 dependency) # https://github.com/PCRE2Project/pcre2 # # glib requires libpcre2-8 >= 10.32 and probes for the 16/32-bit-code # variants too (pcre2-16, pcre2-32) even though it only links libpcre2-8 - # build all three widths so no glib feature silently degrades. [package] name = "pcre2" version = "10.47" release = 1 description = "Perl Compatible Regular Expressions library, version 2" url = "https://github.com/PCRE2Project/pcre2" license = "BSD-3-Clause" maintainer = "Chris Tusa " arch = "x86_64" [dependencies] runtime = [] build = [] [[source]] file = "pcre2-10.47.tar.gz" urls = ["https://github.com/PCRE2Project/pcre2/releases/download/pcre2-10.47/pcre2-10.47.tar.gz"] checksum = "c08ae2388ef333e8403e670ad70c0a11f1eed021fd88308d7e02f596fcd9dc16" [build] parallel = true #!/bin/sh # Build script for picom (Meson, Template B). RISKY per task brief. # # xrender backend ONLY: -Dopengl=false (no Mesa/GL on Hammerhead) skips the # epoxy dependency entirely (src/meson.build only calls # `dependency('epoxy')` inside `if get_option('opengl')`). -Ddbus=false # skips dbus-1 (not needed for a plain compositor). # # picom's src/meson.build unconditionally requires several xcb-util family # pkg-config modules that were NOT yet in zports: xcb-image, xcb-renderutil, # xcb-util (base). Added as base/xcb-util, base/xcb-util-image, # base/xcb-util-renderutil (small fd.o autotools ports, built first). # It also does `cc.has_header('uthash.h')` - not shipped anywhere in the # tree, so added base/uthash (header-only, build-dep only). set -e cd "$SRCDIR" export PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig:$PREFIX/share/pkgconfig:/usr/lib/pkgconfig:$PKG_CONFIG_PATH" export CFLAGS="${CFLAGS} -I$PREFIX/include -D__EXTENSIONS__ -D_POSIX_PTHREAD_SEMANTICS" export LDFLAGS="${LDFLAGS} -L$PREFIX/lib -Wl,-R,$PREFIX/lib" meson setup build \ --prefix="$PREFIX" \ --libdir=lib \ --buildtype=release \ -Ddefault_library=shared \ -Dopengl=false \ -Ddbus=false \ -Dwith_docs=false \ -Dunittest=false ninja -C build -j${JOBS:-1} DESTDIR="$PKGDIR" ninja -C build install # picom - X11 compositor (xrender backend only - no OpenGL/Mesa on Hammerhead) # https://github.com/yshui/picom [package] name = "picom" version = "13" release = 1 description = "X11 compositor (xrender backend)" url = "https://github.com/yshui/picom" license = "MIT" maintainer = "Chris Tusa " arch = "x86_64" [dependencies] runtime = ["libconfig", "libev", "pcre2", "pixman", "libX11", "libxcb", "xcb-util", "xcb-util-image", "xcb-util-renderutil", "libXext", "libXrender", "libXfixes", "libXdamage", "libXcomposite", "libXrandr"] build = ["libconfig", "libev", "pcre2", "pixman", "libX11", "libxcb", "xcb-util", "xcb-util-image", "xcb-util-renderutil", "libXext", "libXrender", "libXfixes", "libXdamage", "libXcomposite", "libXrandr", "uthash"] [[source]] file = "picom-13.tar.gz" urls = ["https://github.com/yshui/picom/archive/refs/tags/v13.tar.gz"] checksum = "db9791a54255742c924ef82a6a882042636d61de0fa61bc14c5e56279cf5791c" [build] parallel = true #!/bin/sh # Build script for pixman (Meson, Template B). No X deps; no libtool fix # needed (Meson doesn't use libtool's dynamic-linker case block). set -e cd "$SRCDIR" export PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig:$PKG_CONFIG_PATH" meson setup build \ --prefix="$PREFIX" \ --libdir=lib \ --buildtype=release \ -Ddefault_library=shared \ -Dtests=disabled ninja -C build -j${JOBS:-1} DESTDIR="$PKGDIR" ninja -C build install # pixman - low-level pixel manipulation library (cairo + Xvfb rasterizer dep) # https://www.cairographics.org/releases/ (also mirrored on xorg.freedesktop.org) [package] name = "pixman" version = "0.46.4" release = 1 description = "Low-level pixel manipulation library" url = "https://www.cairographics.org/releases/" license = "MIT" maintainer = "Chris Tusa " arch = "x86_64" [dependencies] runtime = [] build = [] [[source]] file = "pixman-0.46.4.tar.gz" urls = ["https://www.cairographics.org/releases/pixman-0.46.4.tar.gz"] checksum = "d09c44ebc3bd5bee7021c79f922fe8fb2fb57f7320f55e97ff9914d2346a591c" [build] parallel = true #!/bin/bash # Build script for readline # GNU readline library for command line editing set -e cd "$SRCDIR" # Set library path for ncurses (installed under $PREFIX, not /usr) # Note: no tputs cast needed — readline depends on ncurses (build dep), which # uses `int(*)(int)`, matching _rl_output_character_function's signature. export LDFLAGS="-L$PREFIX/lib -R$PREFIX/lib -lncurses" export CPPFLAGS="-I$PREFIX/include -I$PREFIX/include/ncurses" export SHLIB_LIBS="-L$PREFIX/lib -lncursesw" # Configure readline with shared library support ./configure \ --build=$BUILD_TRIPLE \ --host=$BUILD_TRIPLE \ --prefix=$PREFIX \ --libdir=$PREFIX/lib \ --with-curses \ --enable-shared gmake -j${JOBS:-1} gmake install DESTDIR="$PKGDIR" # readline's shobj-conf for illumos installs only libreadline.so.8 with no # libreadline.so symlink, so `-lreadline` falls through to the static archive # (which then needs explicit -lncurses/-ltermcap to resolve tputs/tgetent). # Add the canonical .so → .so.8 symlinks so consumers link dynamically. ln -sf libreadline.so.8 "$PKGDIR$PREFIX/lib/libreadline.so" ln -sf libhistory.so.8 "$PKGDIR$PREFIX/lib/libhistory.so" # readline - GNU readline library # https://tiswww.case.edu/php/chet/readline/rltop.html [package] name = "readline" version = "8.2" release = 1 description = "GNU readline library for command line editing" url = "https://tiswww.case.edu/php/chet/readline/rltop.html" license = "GPL-3.0" maintainer = "Chris Tusa " arch = "x86_64" [dependencies] runtime = ["ncurses"] build = ["ncurses"] [[source]] file = "readline-8.2.tar.gz" urls = ["https://ftp.gnu.org/gnu/readline/readline-8.2.tar.gz"] checksum = "3feb7171f16a84ee82ca18a36d7b9be109a52c04f492a053331d7d1095007c35" [build] parallel = true jobs = 0 #!/bin/sh # Build script for st (suckless, plain Makefile - NO configure, NOT a # template build). Deps: libX11, libXft, fontconfig, freetype. # # st's shipped config.mk hardcodes X11INC/X11LIB to /usr/X11R6 (doesn't # exist on Hammerhead) and links -lX11/-lXft directly instead of going # through pkg-config. Rewrite config.mk to resolve everything via # pkg-config against $PREFIX (falls back cleanly since x11/xft/ # fontconfig/freetype2 .pc files all live under $PREFIX/lib/pkgconfig). set -e cd "$SRCDIR" # GOTCHA: st.c's openpty() header selection is an #if/#elif chain keyed on # __linux / __OpenBSD__ / __NetBSD__ / __APPLE__ / __FreeBSD__ / # __DragonFly__ - none of which match illumos-derived GCC (which defines # __sun / __SVR4 instead), so no header gets included at all and openpty() # is an implicit (and on this GCC, fatal-by-default) declaration. openpty() # lives in libutil.h on illumos, same as the FreeBSD/DragonFly branch - # add a __sun arm alongside it. sed -i \ -e 's/#elif defined(__FreeBSD__) || defined(__DragonFly__)/#elif defined(__FreeBSD__) || defined(__DragonFly__) || defined(__sun)/' \ st.c export PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig:$PREFIX/share/pkgconfig:/usr/lib/pkgconfig:$PKG_CONFIG_PATH" sed -i \ -e "s#^PREFIX = .*#PREFIX = $PREFIX#" \ -e '/^X11INC/d' -e '/^X11LIB/d' \ -e 's#^INCS = .*#INCS = `$(PKG_CONFIG) --cflags x11 xft fontconfig freetype2`#' \ -e '/PKG_CONFIG.*--cflags fontconfig/d' \ -e '/PKG_CONFIG.*--cflags freetype2/d' \ -e 's#^LIBS = .*#LIBS = -lm -lrt -lutil `$(PKG_CONFIG) --libs x11 xft fontconfig freetype2`#' \ -e '/PKG_CONFIG.*--libs fontconfig/d' \ -e '/PKG_CONFIG.*--libs freetype2/d' \ config.mk # Hidden POSIX prototypes (readv/writev/etc.) on illumos-derived headers - # same __EXTENSIONS__ gotcha as every other X11 port here. Add rpath too # since /usr/local/lib is not on Hammerhead's default ld.so search path. sed -i \ -e 's#^STCFLAGS = .*#STCFLAGS = $(INCS) $(STCPPFLAGS) $(CPPFLAGS) $(CFLAGS) -D__EXTENSIONS__#' \ -e "s#^STLDFLAGS = .*#STLDFLAGS = \$(LIBS) \$(LDFLAGS) -Wl,-R,$PREFIX/lib#" \ config.mk # st's Makefile defaults CC to `c99`, which doesn't exist on Hammerhead # (GCC 14 toolchain only) - the shipped config.mk has this commented out # expecting the user to override it, but we're non-interactive so force # it on the make command line too (belt-and-suspenders with the sed above). gmake CC=gcc PREFIX="$PREFIX" # GOTCHA: the Makefile's `install` target ends with `tic -sx st.info` to # register st's terminfo entry. That's GNU-ncurses tic syntax; Hammerhead # only ships illumos' native SVR4 /usr/bin/tic, which doesn't understand # -s/-x and errors out ("Unknown option"), taking `gmake install` down # with it even though the binary+man install (the two steps before it) # already succeeded. Do the bin/man install ourselves and treat terminfo # registration as best-effort (harmless if it's a no-op - st still runs # fine falling back to $TERM=xterm-compatible entries already present). mkdir -p "$PKGDIR$PREFIX/bin" cp -f st "$PKGDIR$PREFIX/bin/st" chmod 755 "$PKGDIR$PREFIX/bin/st" mkdir -p "$PKGDIR$PREFIX/share/man/man1" sed "s/VERSION/0.9.3/g" < st.1 > "$PKGDIR$PREFIX/share/man/man1/st.1" chmod 644 "$PKGDIR$PREFIX/share/man/man1/st.1" tic st.info 2>/dev/null || true # st - simple suckless terminal emulator for X # https://st.suckless.org/ [package] name = "st" version = "0.9.3" release = 1 description = "Simple suckless terminal emulator for X" url = "https://st.suckless.org/" license = "MIT" maintainer = "Chris Tusa " arch = "x86_64" [dependencies] runtime = ["libX11", "libXft", "fontconfig", "freetype"] build = ["libX11", "libXft", "fontconfig", "freetype"] [[source]] file = "st-0.9.3.tar.gz" urls = ["https://dl.suckless.org/st/st-0.9.3.tar.gz"] checksum = "9ed9feabcded713d4ded38c8cebf36a3b08f0042ef7934a0e2b2409da56e649b" [build] parallel = true #!/bin/bash # Build script for GNU tar set -e cd "$SRCDIR" # GNU tar configure refuses to run as root by default export FORCE_UNSAFE_CONFIGURE=1 ./configure \ --build=$BUILD_TRIPLE \ --host=$BUILD_TRIPLE \ --prefix=$PREFIX \ --disable-nls gmake -j${JOBS:-1} gmake install DESTDIR="$PKGDIR" # GNU Tar - Tape archiver # https://www.gnu.org/software/tar/ [package] name = "tar" version = "1.35" release = 1 description = "GNU tar archiving utility" url = "https://www.gnu.org/software/tar/" license = "GPL-3.0" maintainer = "Chris Tusa " arch = "x86_64" [dependencies] runtime = [] build = [] [[source]] file = "tar-1.35.tar.xz" urls = ["https://ftp.gnu.org/gnu/tar/tar-1.35.tar.xz"] checksum = "4d62ff37342ec7aed748535323930c7cf94acf71c3591882b26a7ea50f3edc16" [build] parallel = true #!/bin/sh # Build script for tint2 (CMake, Ninja generator). # Deps: cairo, pango, glib2, libX11, libXinerama, libXrandr, libXrender, # libXcomposite, libXdamage, imlib2 (all ported). # # CMake doesn't recognize Hammerhead and won't set UNIX=TRUE / pick the # right shared-lib conventions without a Platform module (same gotcha as # base/libjpeg-turbo's cmake build) - map it to the SunOS platform module. # # ENABLE_BATTERY=OFF: no battery in a VM (task brief). # ENABLE_TINT2CONF=OFF: tint2conf is a GTK+2 theme configurator - NO GTK # anywhere per the toolkit-durability decision, and GTK+2 isn't ported. # ENABLE_RSVG=OFF / ENABLE_SN=OFF: librsvg / libstartup-notification are # not ported; both are optional (launcher SVG icons / startup-notification # only) and tint2's CMakeLists gates them cleanly behind these options. set -e cd "$SRCDIR" # GOTCHA (found 2026-07-22): src/util/window.c and src/util/timer.c use the # BSD u_int32_t/u_int64_t typedefs, which illumos's does NOT # provide (unlike glibc, which defines them unconditionally) - not even # behind __EXTENSIONS__. window.c already includes , so just # swap the type names to their POSIX/C99 uintNN_t equivalents; timer.c # needs the #include added too. sed -i -e 's/u_int64_t/uint64_t/g' -e 's/u_int32_t/uint32_t/g' src/util/window.c sed -i -e 's/u_int64_t/uint64_t/g' src/util/timer.c { printf '#include \n'; cat src/util/timer.c; } > src/util/timer.c.new mv src/util/timer.c.new src/util/timer.c # bzero() lives in illumos's (BSD legacy function, not # ) - several tint2 files call it without including that header, # an implicit-declaration error under GCC 14. Prepend the include to every # file that uses bzero() but doesn't already pull in strings.h. for f in src/util/common.c src/util/area.c src/util/timer.c \ src/util/gradient.c src/battery/battery.c; do if grep -q 'bzero(' "$f" && ! grep -q 'strings\.h' "$f"; then { printf '#include \n'; cat "$f"; } > "$f.new" mv "$f.new" "$f" fi done mkdir -p "$SRCDIR/.cmake/Platform" echo 'include(Platform/SunOS)' > "$SRCDIR/.cmake/Platform/Hammerhead.cmake" export PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig:$PREFIX/share/pkgconfig:/usr/lib/pkgconfig:$PKG_CONFIG_PATH" cmake -B build -G Ninja \ -DCMAKE_MODULE_PATH="$SRCDIR/.cmake" \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX="$PREFIX" \ -DCMAKE_INSTALL_RPATH="$PREFIX/lib" \ -DCMAKE_C_FLAGS="-D__EXTENSIONS__ -D_POSIX_PTHREAD_SEMANTICS" \ -DENABLE_BATTERY=OFF \ -DENABLE_TINT2CONF=OFF \ -DENABLE_RSVG=OFF \ -DENABLE_SN=OFF cmake --build build -j${JOBS:-1} DESTDIR="$PKGDIR" cmake --install build # tint2 - lightweight X11 panel/taskbar/systray # https://gitlab.com/o9000/tint2 (mirror: https://github.com/o9000/tint2) [package] name = "tint2" version = "16.2" release = 1 description = "Lightweight panel/taskbar for X11 window managers" url = "https://github.com/o9000/tint2" license = "GPL-2.0-or-later" maintainer = "Chris Tusa " arch = "x86_64" [dependencies] runtime = ["cairo", "pango", "glib2", "libX11", "libXinerama", "libXrandr", "libXrender", "libXcomposite", "libXdamage", "imlib2"] build = ["cairo", "pango", "glib2", "libX11", "libXinerama", "libXrandr", "libXrender", "libXcomposite", "libXdamage", "imlib2"] [[source]] file = "tint2-16.2.tar.gz" urls = ["https://github.com/o9000/tint2/archive/refs/tags/v16.2.tar.gz"] checksum = "a95c8a22d4cc117335b3157c7de48da91c8721fc97f86d0353c545eed2598ce8" [build] parallel = true #!/bin/zsh # Build script for tmux set -e cd "$SRCDIR" export PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig:${PKG_CONFIG_PATH:-}" export CPPFLAGS="-I$PREFIX/include" export LDFLAGS="-L$PREFIX/lib -R$PREFIX/lib" export LIBS="-lsendfile" ./configure \ --prefix=$PREFIX gmake -j${JOBS:-1} gmake install DESTDIR="$PKGDIR" # tmux - Terminal multiplexer # https://github.com/tmux/tmux [package] name = "tmux" version = "3.3a" release = 1 description = "Terminal multiplexer allowing multiple terminals in a single window" url = "https://github.com/tmux/tmux" license = "ISC" maintainer = "Chris Tusa " arch = "x86_64" [dependencies] runtime = ["libevent", "ncurses"] build = ["libevent", "ncurses"] [[source]] file = "tmux-3.3a.tar.gz" urls = ["https://github.com/tmux/tmux/releases/download/3.3a/tmux-3.3a.tar.gz"] checksum = "e4fd347843bd0772c4f48d6dde625b0b109b7a380ff15db21e97c11a4dcdf93f" [build] parallel = true #!/bin/sh # Build script for tree-sitter (plain Makefile, no deps, no libtool - links # the shared object directly via $(CC) -shared, gated on `$(CC) -dumpmachine` # rather than `uname`, so it already falls through cleanly to the generic # ELF .so branch on Hammerhead). # # GOTCHA (1b-2): lib/src/portable/endian.h picks its `#include ` # branch only when __illumos__ (or __linux__/etc) is defined; Hammerhead's # GCC predefines __sun/__sun__, not __illumos__, so unpatched it falls to # the final `#error platform not supported`. illumos's own # /usr/include/endian.h already declares htobe16/le16toh/etc as libc # externs (confirmed present) - just needs the macro to select that arm. set -e cd "$SRCDIR" export CFLAGS="${CFLAGS} -D__EXTENSIONS__ -D_POSIX_PTHREAD_SEMANTICS -D__illumos__" gmake -j${JOBS:-1} PREFIX="$PREFIX" gmake install PREFIX="$PREFIX" DESTDIR="$PKGDIR" # tree-sitter - incremental parsing library (neovim's syntax/highlight engine) # https://tree-sitter.github.io/tree-sitter/ [package] name = "tree-sitter" version = "0.26.11" release = 1 description = "An incremental parsing system for programming tools" url = "https://tree-sitter.github.io/tree-sitter/" license = "MIT" maintainer = "Chris Tusa " arch = "x86_64" [dependencies] runtime = [] build = [] [[source]] file = "tree-sitter-0.26.11.tar.gz" urls = ["https://github.com/tree-sitter/tree-sitter/archive/refs/tags/v0.26.11.tar.gz"] checksum = "1bab01ed21464f3272665b9c60e39ee79f68da1333e80b23f2c9356569d06971" [build] parallel = true #!/bin/bash # Build script for tree # Directory listing utility - no external dependencies set -e cd "$SRCDIR" # illumos fix: rename 'struct comment' to avoid conflict with /usr/include/pwd.h # which also defines struct comment for f in *.h *.c; do sed -i 's/struct comment/struct tree_comment/g' "$f" done # tree uses a simple Makefile, needs some adjustments for illumos # Override Linux-specific flags gmake -j${JOBS:-1} \ CC=gcc \ CFLAGS="-O2 -Wall -fomit-frame-pointer -DSOLARIS" \ LDFLAGS="" \ prefix=$PREFIX \ MANDIR=$PREFIX/share/man # Manual install since Makefile doesn't properly support DESTDIR mkdir -p "$PKGDIR$PREFIX/bin" mkdir -p "$PKGDIR$PREFIX/share/man/man1" install -m 755 tree "$PKGDIR$PREFIX/bin/tree" install -m 644 doc/tree.1 "$PKGDIR$PREFIX/share/man/man1/tree.1" # tree - List directory contents in a tree-like format # https://oldmanprogrammer.net/source.php?dir=projects/tree [package] name = "tree" version = "2.1.1" release = 1 description = "List directory contents in a tree-like format" url = "https://oldmanprogrammer.net/source.php?dir=projects/tree" license = "GPL-2.0" maintainer = "Chris Tusa " arch = "x86_64" [dependencies] runtime = [] build = [] [[source]] file = "2.1.1.tar.gz" urls = ["https://github.com/Old-Man-Programmer/tree/archive/refs/tags/2.1.1.tar.gz"] checksum = "1b70253994dca48a59d6ed99390132f4d55c486bf0658468f8520e7e63666a06" [build] parallel = true jobs = 0 --- a/tree.h 2023-11-12 00:00:00.000000000 +0000 +++ b/tree.h 2024-01-24 00:00:00.000000000 +0000 @@ -173,12 +173,12 @@ #define SORT_SIZE 8192 /* Comment file parsing (via .info files) */ -struct comment { +struct tree_comment { char *filename; int isdir; - struct comment *next; + struct tree_comment *next; }; struct _info { - struct comment *comments; + struct tree_comment *comments; }; /* For ANSI terminals */ @@ -300,7 +300,7 @@ void htmldir(char *dirname, int level, char *newdir); void html_encode(FILE *fd, char *s); -struct comment *infocheck(char *path, char *name, int top, int isdir); +struct tree_comment *infocheck(char *path, char *name, int top, int isdir); struct _info *getinfo(char *name, struct _info *dir); void switch_on(char *opt); void switch_off(char *opt); --- a/info.c 2023-11-12 00:00:00.000000000 +0000 +++ b/info.c 2024-01-24 00:00:00.000000000 +0000 @@ -31,7 +31,7 @@ * Returns NULL if path/name is not found in the .info file. * The returned comment structure is in the given cwd _info structure. */ -struct comment *infocheck(char *path, char *name, int top, int isdir) +struct tree_comment *infocheck(char *path, char *name, int top, int isdir) { static struct _info cwd = {NULL}; static char *cpath = NULL; @@ -39,7 +39,7 @@ char *file, *ptr, *ent; FILE *fp; size_t flen = 0; - struct comment *com, *cp, *cpprev = NULL; + struct tree_comment *com, *cp, *cpprev = NULL; bool iscomment = false; if (cwd.comments != NULL && cpath != NULL && strcmp(path, cpath) == 0) { @@ -68,7 +68,7 @@ while (getdelim(&file, &flen, '\n', fp) > 0) { ptr = trim(file); if (!ptr[0]) continue; - if (ptr[0] == '#') { if (com) com = (struct comment *)1; continue; } + if (ptr[0] == '#') { if (com) com = (struct tree_comment *)1; continue; } if (ptr[0] == '[') { char *q = strchr(ptr,']'); if (q) { @@ -85,7 +85,7 @@ } com = NULL; } - } else if (com == (struct comment *)1) { + } else if (com == (struct tree_comment *)1) { com = xmalloc(sizeof(*com)); com->filename = scopy(ent); com->isdir = (*ent && ent[strlen(ent)-1] == '/'); #!/bin/sh # Build script for unibilium (autotools, Template A variant + autoreconf). # # GOTCHA (1b-2): the release tarball ships configure.ac + a hand-written # Makefile.in (no Makefile.am, no pre-generated `configure`) - must # autoreconf before the usual libtool-fix + configure steps, same shape as # base/x11vnc's autoreconf gotcha. autoreconf pulls in its OWN fresh # config.sub/config.guess (coral's pre-build copy is a no-op here since # neither file existed in $SRCDIR yet), so they must be re-copied # post-autoreconf. set -e cd "$SRCDIR" export AUTOCONF=/usr/bin/autoconf export AUTOHEADER=/usr/bin/autoheader export ACLOCAL=/usr/bin/aclocal export AUTOM4TE=/usr/bin/autom4te export LIBTOOLIZE=/usr/bin/libtoolize autoreconf -v --install cp -f /usr/share/autoconf/build-aux/config.sub config.sub 2>/dev/null || true cp -f /usr/share/autoconf/build-aux/config.guess config.guess 2>/dev/null || true # MANDATORY libtool fix (Template A): unmatched OS in libtool's # dynamic-linker case falls through to static-only. if [ -f configure ]; then sed -i -E 's/(kopensolaris\*-gnu)([^)]*\))/\1 | hammerhead*\2/' configure fi export PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig:$PREFIX/share/pkgconfig:$PKG_CONFIG_PATH" export CFLAGS="${CFLAGS} -I$PREFIX/include -D__EXTENSIONS__ -D_POSIX_PTHREAD_SEMANTICS" export LDFLAGS="${LDFLAGS} -L$PREFIX/lib -R$PREFIX/lib" ./configure \ --prefix="$PREFIX" \ --build="$BUILD_TRIPLE" \ --host="$BUILD_TRIPLE" \ --sysconfdir="$SYSCONFDIR" \ --disable-static gmake -j${JOBS:-1} gmake install DESTDIR="$PKGDIR" # unibilium - terminfo parser and utility functions (neovim/libtermkey) # https://github.com/neovim/unibilium [package] name = "unibilium" version = "2.1.2" release = 1 description = "Terminfo parser library, without any curses dependencies" url = "https://github.com/neovim/unibilium" license = "LGPL-3.0-or-later" maintainer = "Chris Tusa " arch = "x86_64" [dependencies] runtime = [] build = [] [[source]] file = "unibilium-2.1.2.tar.gz" urls = ["https://github.com/neovim/unibilium/archive/refs/tags/v2.1.2.tar.gz"] checksum = "370ecb07fbbc20d91d1b350c55f1c806b06bf86797e164081ccc977fc9b3af7a" [build] parallel = true #!/bin/sh # Build script for uthash (header-only, no build system - just stage headers). # NOTE: headers live under src/, not the tarball root (verified 2026-07-22). set -e cd "$SRCDIR/src" mkdir -p "$PKGDIR$PREFIX/include" cp -f *.h "$PKGDIR$PREFIX/include/" # uthash - header-only C hash table / list / array macros (picom build dep) # https://troydhanson.github.io/uthash/ [package] name = "uthash" version = "2.4.0" release = 1 description = "Header-only C macros for hash tables, lists, arrays and strings" url = "https://troydhanson.github.io/uthash/" license = "BSD-1-Clause" maintainer = "Chris Tusa " arch = "x86_64" [dependencies] runtime = [] build = [] [[source]] file = "uthash-2.4.0.tar.gz" urls = ["https://github.com/troydhanson/uthash/archive/refs/tags/v2.4.0.tar.gz"] checksum = "387ba027946d7c64e9aa19cc53b2edcd714f8f9dca9fa8e3aaef17e0e8e3d736" [build] parallel = true #!/bin/sh set -e cd "$SRCDIR" export PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig:$PKG_CONFIG_PATH" ./configure \ --prefix="$PREFIX" \ --build="$BUILD_TRIPLE" \ --host="$BUILD_TRIPLE" \ --sysconfdir="$SYSCONFDIR" gmake -j${JOBS:-1} gmake install DESTDIR="$PKGDIR" # util-macros - X.Org autoconf macros # https://gitlab.freedesktop.org/xorg/util/macros [package] name = "util-macros" version = "1.20.2" release = 1 description = "Autoconf macros used by the X.Org build system" url = "https://xorg.freedesktop.org/releases/individual/util/" license = "MIT" maintainer = "Chris Tusa " arch = "x86_64" [dependencies] runtime = [] build = [] [[source]] file = "util-macros-1.20.2.tar.xz" urls = ["https://xorg.freedesktop.org/releases/individual/util/util-macros-1.20.2.tar.xz"] checksum = "9ac269eba24f672d7d7b3574e4be5f333d13f04a7712303b1821b2a51ac82e8e" [build] parallel = true #!/bin/bash # Build script for vim # Vi IMproved text editor set -e cd "$SRCDIR" # Go directly into src/ to bypass the wrapper script # (ksh93 has a built-in SRCDIR that causes infinite loops with the wrapper) cd src # Configure vim - minimal build, disable NLS to avoid locale issues on illumos # Use bash explicitly due to ksh93 compatibility issues CONFIG_SHELL=/usr/bin/bash /usr/bin/bash ./configure \ --prefix=$PREFIX \ --with-features=huge \ --enable-multibyte \ --disable-gui \ --without-x \ --disable-gpm \ --disable-sysmouse \ --disable-nls gmake -j${JOBS:-1} gmake install DESTDIR="$PKGDIR" # Create vi symlink ln -sf vim "$PKGDIR$PREFIX/bin/vi" # vim - Vi IMproved text editor # https://www.vim.org/ [package] name = "vim" version = "9.1.0" release = 1 description = "Vi IMproved - highly configurable text editor" url = "https://www.vim.org/" license = "Vim" maintainer = "Chris Tusa " arch = "x86_64" [dependencies] runtime = ["ncurses"] build = ["ncurses"] [[source]] file = "v9.1.0.tar.gz" urls = ["https://github.com/vim/vim/archive/refs/tags/v9.1.0.tar.gz"] checksum = "SKIP" [build] parallel = true jobs = 0 #!/bin/bash # Build script for GNU wget set -e cd "$SRCDIR" # Fix illumos gnulib compatibility issues for f in lib/localename.c gnulib-tests/localename.c; do if [ -f "$f" ]; then sed -i 's/extern char \* getlocalename_l/extern const char * getlocalename_l/' "$f" fi done ./configure \ --prefix=$PREFIX \ --sysconfdir=$SYSCONFDIR \ --with-ssl=openssl \ --disable-nls \ --disable-pcre2 # Fix illumos memset_s false detection if present for config in lib/config.h gnulib-tests/config.h config.h; do if [ -f "$config" ]; then sed -i 's/#define HAVE_MEMSET_S 1/\/* #undef HAVE_MEMSET_S - illumos has it as macro only *\//' "$config" fi done gmake -j${JOBS:-1} gmake install DESTDIR="$PKGDIR" # GNU Wget - Network downloader # https://www.gnu.org/software/wget/ [package] name = "wget" version = "1.25.0" release = 1 description = "GNU Wget - Network downloader supporting HTTP, HTTPS and FTP" url = "https://www.gnu.org/software/wget/" license = "GPL-3.0" maintainer = "Chris Tusa " arch = "x86_64" [dependencies] runtime = ["zlib"] build = ["zlib"] [[source]] file = "wget-1.25.0.tar.gz" urls = ["https://mirrors.kernel.org/gnu/wget/wget-1.25.0.tar.gz"] checksum = "766e48423e79359ea31e41db9e5c289675947a7fcf2efdcedb726ac9d0da3784" [build] parallel = true #!/bin/sh # Build script for x11vnc (autotools, Template A variant). # # GOTCHA (Task 7a, 2026-07-22): the GitHub tag tarball ships ONLY # configure.ac/Makefile.am - no pre-generated `configure` at all (confirmed # via `tar tf`: configure.ac + autogen.sh present, no top-level `configure`, # no Makefile.in). Must autoreconf before the usual libtool-fix + configure # steps; the libtool `kopensolaris*-gnu` sed fix is applied to the # autoreconf-GENERATED configure, same as every other port. # # GOTCHA (Task 7a): x11vnc's own configure.ac hard PKG_CHECK_MODULES()s for # `libvncserver >= 0.9.8` and `libvncclient >= 0.9.8` - this project split # off the LibVNCServer repo in 2016 and is no longer a bundled/standalone # VNC codebase (see base/libvncserver/package.toml header). Both must be # built+installed first (base/libvncserver, this task). # # illumos socket libs: configure.ac already does # AC_CHECK_LIB(nsl,gethostbyname) / AC_CHECK_LIB(socket,socket) # unconditionally, so -lsocket/-lnsl get added to LIBS automatically by # autoconf's own probe - no manual LDFLAGS needed for those (unlike the # CMake-based libvncserver, which required them explicitly). # # No --with-jpeg option exists in this x11vnc release's configure.ac (only # libvncserver's own jpeg support matters - already baked in via # WITH_JPEG=ON there); the brief's "--with-jpeg=/usr/local" suggestion does # not apply here and is intentionally omitted. # # GOTCHA (Task 7a): autoreconf's internal `automake --add-missing --copy # --no-force` step reads autoconf's macro trace via `$ENV{AUTOCONF} || # 'true'` (automake's scan_autoconf_traces, /usr/bin/automake ~line 5308) # - when run non-interactively over ssh AUTOCONF is unset, so automake # silently traces with the no-op `true` command instead of real autoconf, # sees zero AM_INIT_AUTOMAKE/AC_CONFIG_FILES hits, and fails with the # misleading "no proper invocation of AM_INIT_AUTOMAKE was found" / # "no Makefile.am found for any configure output" errors - even though # configure.ac is completely correct. Fix: export AUTOCONF explicitly # before autoreconf so it propagates to automake's sub-invocation. set -e cd "$SRCDIR" export AUTOCONF=/usr/bin/autoconf export AUTOHEADER=/usr/bin/autoheader export ACLOCAL=/usr/bin/aclocal export AUTOM4TE=/usr/bin/autom4te export PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig:$PREFIX/share/pkgconfig:$PKG_CONFIG_PATH" export CFLAGS="${CFLAGS} -I$PREFIX/include -D__EXTENSIONS__ -D_POSIX_PTHREAD_SEMANTICS" export LDFLAGS="${LDFLAGS} -L$PREFIX/lib -R$PREFIX/lib" test -d m4 || mkdir m4 autoreconf -v --install # GOTCHA (Task 7a): coral's pre-build step copies the hammerhead-patched # config.sub/config.guess into any config.sub/config.guess ALREADY present # in $SRCDIR before build.sh runs - but this port ships NEITHER file (no # pre-generated configure at all), so that copy is a no-op. autoreconf # --install then generates its OWN fresh config.sub/config.guess (pulled # from automake's install-missing machinery), which do NOT carry the # hammerhead patch, causing `configure: error: ... OS 'hammerhead' not # recognized`. Re-copy the patched versions here, post-autoreconf. cp -f /usr/share/autoconf/build-aux/config.sub config.sub 2>/dev/null || true cp -f /usr/share/autoconf/build-aux/config.guess config.guess 2>/dev/null || true if [ -f configure ]; then sed -i -E 's/(kopensolaris\*-gnu)([^)]*\))/\1 | hammerhead*\2/' configure fi ./configure \ --prefix="$PREFIX" \ --build="$BUILD_TRIPLE" \ --host="$BUILD_TRIPLE" \ --sysconfdir="$SYSCONFDIR" \ --disable-static \ --with-x \ --x-includes="$PREFIX/include" \ --x-libraries="$PREFIX/lib" \ --without-avahi \ --with-ssl="/usr" gmake -j${JOBS:-1} gmake install DESTDIR="$PKGDIR" # x11vnc - VNC server for real (or virtual/Xvfb) X displays # THE VNC bridge for the headless XLibre/Xvfb desktop. # https://github.com/LibVNC/x11vnc [package] name = "x11vnc" version = "0.9.17" release = 1 description = "VNC server for X11 displays" url = "https://github.com/LibVNC/x11vnc" license = "GPL-2.0-or-later" maintainer = "Chris Tusa " arch = "x86_64" [dependencies] runtime = ["libX11", "libXext", "libXtst", "libXdamage", "libXfixes", "libXrandr", "libXinerama", "libjpeg-turbo", "libvncserver"] build = ["libX11", "libXext", "libXtst", "libXdamage", "libXfixes", "libXrandr", "libXinerama", "libjpeg-turbo", "libvncserver", "xorgproto", "util-macros"] [[source]] file = "x11vnc-0.9.17.tar.gz" urls = ["https://github.com/LibVNC/x11vnc/archive/refs/tags/0.9.17.tar.gz"] checksum = "3ab47c042bc1c33f00c7e9273ab674665b85ab10592a8e0425589fe7f3eb1a69" [build] parallel = true #!/bin/sh # Build script for xauth (autotools, Template A verbatim). # Note: configure.ac's PKG_CHECK_MODULES(XAUTH, x11 xau xext xmuu ...) wants # the "xmuu" pkg-config module, which the libXmu port already ships # alongside libXmu itself (upstream libXmu builds both libXmu.so and the # thinner libXmuu.so + xmuu.pc) - no extra dependency needed. set -e cd "$SRCDIR" if [ -f configure ]; then sed -i -E 's/(kopensolaris\*-gnu)([^)]*\))/\1 | hammerhead*\2/' configure fi export PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig:$PREFIX/share/pkgconfig:$PKG_CONFIG_PATH" export CFLAGS="${CFLAGS} -I$PREFIX/include -D__EXTENSIONS__ -D_POSIX_PTHREAD_SEMANTICS" export LDFLAGS="${LDFLAGS} -L$PREFIX/lib -R$PREFIX/lib" ./configure \ --prefix="$PREFIX" \ --build="$BUILD_TRIPLE" \ --host="$BUILD_TRIPLE" \ --sysconfdir="$SYSCONFDIR" \ --disable-static gmake -j${JOBS:-1} gmake install DESTDIR="$PKGDIR" # xauth - X authority file (cookie) manipulation tool # Direct xlibre-server CDEPEND (>=x11-apps/xauth-1.0.3) # https://gitlab.freedesktop.org/xorg/app/xauth [package] name = "xauth" version = "1.1.5" release = 1 description = "X authority file utility" url = "https://xorg.freedesktop.org/releases/individual/app/" license = "MIT" maintainer = "Chris Tusa " arch = "x86_64" [dependencies] runtime = ["libX11", "libXau", "libXext", "libXmu"] build = ["libX11", "libXau", "libXext", "libXmu", "xorgproto", "util-macros"] [[source]] file = "xauth-1.1.5.tar.xz" urls = ["https://xorg.freedesktop.org/releases/individual/app/xauth-1.1.5.tar.xz"] checksum = "a4000e2f441facebf569026bedecc23ba262cc6927be52070abe0002625cfbe0" [build] parallel = true #!/bin/sh # Build script for xbitmaps (autotools, Template A). Data-only (X11/bitmaps/* # bitmap files) - no compiled code, just install(1) via the generated # Makefile. Ships a pre-generated ./configure, so no xorg-macros/autoreconf # needed. Pulled in as a motif build dependency: lib/Xm/I18List.c does # `#include ` (a real X.Org bitmap, unrelated to motif's # own in-tree bitmaps/ subdir). set -e cd "$SRCDIR" # MANDATORY libtool/config.sub fix - see Template A. if [ -f configure ]; then sed -i -E 's/(kopensolaris\*-gnu)([^)]*\))/\1 | hammerhead*\2/' configure fi export PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig:$PREFIX/share/pkgconfig:$PKG_CONFIG_PATH" ./configure \ --prefix="$PREFIX" \ --build="$BUILD_TRIPLE" \ --host="$BUILD_TRIPLE" \ --sysconfdir="$SYSCONFDIR" gmake -j${JOBS:-1} gmake install DESTDIR="$PKGDIR" # xbitmaps - X.Org bitmaps (legacy X11 bitmap data), needed by motif's lib/Xm # https://gitlab.freedesktop.org/xorg/data/bitmaps [package] name = "xbitmaps" version = "1.1.2" release = 1 description = "X.Org bitmaps (X11/bitmaps/* data files)" url = "https://xorg.freedesktop.org/releases/individual/data/" license = "MIT" maintainer = "Chris Tusa " arch = "x86_64" [dependencies] runtime = [] build = [] [[source]] file = "xbitmaps-1.1.2.tar.gz" urls = ["https://xorg.freedesktop.org/releases/individual/data/xbitmaps-1.1.2.tar.gz"] checksum = "27e700e8ee02c43f7206f4eca8f1953ad15236cac95d7a0f08505c3f7d99c265" [build] parallel = true #!/bin/sh # Build script for xcb-proto (autotools + python, Template A). # Installs XML protocol descriptions + the xcbgen python module libxcb needs. set -e cd "$SRCDIR" export PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig:$PREFIX/share/pkgconfig:$PKG_CONFIG_PATH" export PYTHON=/usr/local/bin/python3 ./configure \ --prefix="$PREFIX" \ --build="$BUILD_TRIPLE" \ --host="$BUILD_TRIPLE" \ --sysconfdir="$SYSCONFDIR" gmake -j${JOBS:-1} gmake install DESTDIR="$PKGDIR" # xcb-proto - XCB protocol descriptions (XML) + xcbgen python codegen module # https://gitlab.freedesktop.org/xorg/proto/xcbproto [package] name = "xcb-proto" version = "1.17.0" release = 1 description = "XML-XCB protocol descriptions and the xcbgen Python code generator used by libxcb" url = "https://xorg.freedesktop.org/releases/individual/xcb/" license = "MIT" maintainer = "Chris Tusa " arch = "x86_64" [dependencies] runtime = ["python"] build = ["python"] [[source]] file = "xcb-proto-1.17.0.tar.xz" urls = ["https://xorg.freedesktop.org/releases/individual/xcb/xcb-proto-1.17.0.tar.xz"] checksum = "2c1bacd2110f4799f74de6ebb714b94cf6f80fb112316b1219480fd22562148c" [build] parallel = true #!/bin/sh # Build script for xcb-util-image (autotools, Template A). # Needs xcb-shm (part of libxcb's default extension set) + xcb-util (base module). set -e cd "$SRCDIR" if [ -f configure ]; then sed -i -E 's/(kopensolaris\*-gnu)([^)]*\))/\1 | hammerhead*\2/' configure fi export PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig:$PREFIX/share/pkgconfig:/usr/lib/pkgconfig:$PKG_CONFIG_PATH" export CFLAGS="${CFLAGS} -I$PREFIX/include -D__EXTENSIONS__ -D_POSIX_PTHREAD_SEMANTICS" export LDFLAGS="${LDFLAGS} -L$PREFIX/lib -R$PREFIX/lib" ./configure \ --prefix="$PREFIX" \ --build="$BUILD_TRIPLE" \ --host="$BUILD_TRIPLE" \ --sysconfdir="$SYSCONFDIR" \ --disable-static gmake -j${JOBS:-1} gmake install DESTDIR="$PKGDIR" # xcb-util-image - port of Xlib's XImage and XShmImage functions to XCB # https://xcb.freedesktop.org/ [package] name = "xcb-util-image" version = "0.4.1" release = 1 description = "XCB port of Xlib's XImage and XShmImage functions" url = "https://xcb.freedesktop.org/" license = "MIT" maintainer = "Chris Tusa " arch = "x86_64" [dependencies] runtime = ["libxcb", "xcb-util"] build = ["libxcb", "xcb-util", "xorgproto"] [[source]] file = "xcb-util-image-0.4.1.tar.xz" urls = ["https://xorg.freedesktop.org/releases/individual/xcb/xcb-util-image-0.4.1.tar.xz"] checksum = "ccad8ee5dadb1271fd4727ad14d9bd77a64e505608766c4e98267d9aede40d3d" [build] parallel = true #!/bin/sh # Build script for xcb-util-renderutil (autotools, Template A). set -e cd "$SRCDIR" if [ -f configure ]; then sed -i -E 's/(kopensolaris\*-gnu)([^)]*\))/\1 | hammerhead*\2/' configure fi export PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig:$PREFIX/share/pkgconfig:/usr/lib/pkgconfig:$PKG_CONFIG_PATH" export CFLAGS="${CFLAGS} -I$PREFIX/include -D__EXTENSIONS__ -D_POSIX_PTHREAD_SEMANTICS" export LDFLAGS="${LDFLAGS} -L$PREFIX/lib -R$PREFIX/lib" ./configure \ --prefix="$PREFIX" \ --build="$BUILD_TRIPLE" \ --host="$BUILD_TRIPLE" \ --sysconfdir="$SYSCONFDIR" \ --disable-static gmake -j${JOBS:-1} gmake install DESTDIR="$PKGDIR" # xcb-util-renderutil - convenience functions for the Render extension # https://xcb.freedesktop.org/ [package] name = "xcb-util-renderutil" version = "0.3.10" release = 1 description = "Convenience functions for the Render extension (XCB)" url = "https://xcb.freedesktop.org/" license = "MIT" maintainer = "Chris Tusa " arch = "x86_64" [dependencies] runtime = ["libxcb"] build = ["libxcb", "xorgproto"] [[source]] file = "xcb-util-renderutil-0.3.10.tar.xz" urls = ["https://xorg.freedesktop.org/releases/individual/xcb/xcb-util-renderutil-0.3.10.tar.xz"] checksum = "3e15d4f0e22d8ddbfbb9f5d77db43eacd7a304029bf25a6166cc63caa96d04ba" [build] parallel = true #!/bin/sh # Build script for xcb-util (autotools, Template A). set -e cd "$SRCDIR" # MANDATORY libtool fix - see Template A comment in DESKTOP_XLIBRE_PHASE1A_PLAN.md. if [ -f configure ]; then sed -i -E 's/(kopensolaris\*-gnu)([^)]*\))/\1 | hammerhead*\2/' configure fi export PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig:$PREFIX/share/pkgconfig:/usr/lib/pkgconfig:$PKG_CONFIG_PATH" export CFLAGS="${CFLAGS} -I$PREFIX/include -D__EXTENSIONS__ -D_POSIX_PTHREAD_SEMANTICS" export LDFLAGS="${LDFLAGS} -L$PREFIX/lib -R$PREFIX/lib" ./configure \ --prefix="$PREFIX" \ --build="$BUILD_TRIPLE" \ --host="$BUILD_TRIPLE" \ --sysconfdir="$SYSCONFDIR" \ --disable-static gmake -j${JOBS:-1} gmake install DESTDIR="$PKGDIR" # xcb-util - base XCB utility functions (atom cache, etc.) # https://xcb.freedesktop.org/ [package] name = "xcb-util" version = "0.4.1" release = 1 description = "Utility libraries for the XCB library (base module)" url = "https://xcb.freedesktop.org/" license = "MIT" maintainer = "Chris Tusa " arch = "x86_64" [dependencies] runtime = ["libxcb"] build = ["libxcb", "xorgproto"] [[source]] file = "xcb-util-0.4.1.tar.xz" urls = ["https://xorg.freedesktop.org/releases/individual/xcb/xcb-util-0.4.1.tar.xz"] checksum = "5abe3bbbd8e54f0fa3ec945291b7e8fa8cfd3cccc43718f8758430f94126e512" [build] parallel = true #!/bin/sh # Build script for xdm (autotools, Template A). # # xdm authenticates via PAM (illumos + -lpam, both in # base). configure autodetects PAM but we pass --with-pam to make it a hard # requirement (fail loudly rather than silently building a crypt(3)-only xdm). # # XDMCP: no --without-xdmcp exists in 1.1.17 (PKG_CHECK_MODULES(DMCP, xdmcp) # is unconditional). The UDP listener is disabled at runtime instead via the # shipped config's `DisplayManager.requestPort: 0` (see package.toml). # # Patches (patches/, applied -p1 below): illumos portability fixes discovered # during the alpha10 build. See each patch header for the specific reason. set -e # Resolve the port dir (holds patches/) BEFORE cd'ing into the extracted source. PORTDIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd) cd "$SRCDIR" # --- Hammerhead/illumos portability patches --- # coral runs this script under zsh; an unmatched glob is a hard error there, # so enable NULL_GLOB (empty expansion) when running under zsh. The [ -f ] # guard covers the /bin/sh case (glob stays literal). if [ -n "$ZSH_VERSION" ]; then setopt NULL_GLOB 2>/dev/null || true; fi for p in "$PORTDIR"/patches/*.patch; do [ -f "$p" ] || continue echo "==> Applying patch: $(basename "$p")" patch -p1 < "$p" done # MANDATORY libtool fix (Task 4a): this release's libtool-generated # `configure` has no illumos/hammerhead arm in its dynamic-linker detection # `case $host_os in ...` block; unmatched OS falls through to # `*) dynamic_linker=no ;;` forcing static-only. Piggyback hammerhead onto # the kopensolaris arm. if [ -f configure ]; then sed -i -E 's/(kopensolaris\*-gnu)([^)]*\))/\1 | hammerhead*\2/' configure fi export PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig:$PREFIX/share/pkgconfig:$PKG_CONFIG_PATH" export CFLAGS="${CFLAGS} -I$PREFIX/include -D__EXTENSIONS__ -D_POSIX_PTHREAD_SEMANTICS" export LDFLAGS="${LDFLAGS} -L$PREFIX/lib -R$PREFIX/lib" ./configure \ --prefix="$PREFIX" \ --build="$BUILD_TRIPLE" \ --host="$BUILD_TRIPLE" \ --sysconfdir="$SYSCONFDIR" \ --disable-static \ --with-pam \ --with-xdmconfigdir="$PREFIX/lib/X11/xdm" gmake -j${JOBS:-1} gmake install DESTDIR="$PKGDIR" # xdm - X Display Manager (X.Org) # The classic X11 display manager: starts a local X server on the console # VT and presents a graphical Xaw login greeter, authenticating via PAM. # Second task of the XLibre/xdm greeter plan # (docs/roadmap/DESKTOP_XLIBRE_XDM_GREETER_PLAN.md). # # XDMCP note: this release has no --without-xdmcp configure toggle # (PKG_CHECK_MODULES(DMCP, xdmcp) is unconditional, so libXdmcp is a hard # build dep). The remote-login/chooser UDP listener is instead disabled at # runtime by the shipped default config: config/xdm-config sets # `DisplayManager.requestPort: 0`, so xdm does not open the XDMCP socket. # # https://gitlab.freedesktop.org/xorg/app/xdm [package] name = "xdm" version = "1.1.17" release = 1 description = "X Display Manager (login greeter, PAM auth)" url = "https://xorg.freedesktop.org/releases/individual/app/" license = "MIT" maintainer = "Chris Tusa " arch = "x86_64" [dependencies] runtime = ["libXaw", "libXt", "libXmu", "libXpm", "libX11", "libXdmcp", "libXau", "libXext", "libXinerama"] build = ["libXaw", "libXt", "libXmu", "libXpm", "libX11", "libXdmcp", "libXau", "libXext", "libXinerama", "xorgproto", "util-macros"] [[source]] file = "xdm-1.1.17.tar.xz" urls = ["https://xorg.freedesktop.org/archive/individual/app/xdm-1.1.17.tar.xz"] checksum = "9494aef0911a031c53670725b5c8c9bb9d3f7c5ea7318b1f72ddd9dcbbeceb6a" [build] parallel = true Fix PAM const-qualifier detection for Hammerhead/illumos. xdm keys the `XDM_PAM_QUAL` const qualifier (used on the pam_conv callback and pam_get_item() arguments) on `#ifdef __sun`, assuming any __sun target uses the classic Solaris non-const PAM prototypes. Hammerhead's GCC defines __sun, but its defaults to the CONST-qualified form (int (*conv)(int, const struct pam_message **, ...) and pam_get_item(..., const void **)) unless _PAM_LEGACY_NONCONST is defined. With __sun alone, XDM_PAM_QUAL expands empty (non-const) and greet.c fails to compile under GCC 14 with -Wincompatible-pointer-types (now a hard error): greet.c:496: initialization of 'int (*)(int, const struct pam_message **,...)' from incompatible pointer type 'int (*)(int, struct pam_message **,...)' greet.c:588/613/735: passing argument 3 of 'pam_get_item' from incompatible pointer type Gate the non-const branch on _PAM_LEGACY_NONCONST as well, so the qualifier matches whichever prototype form the PAM headers actually present. On Hammerhead this selects `const`, matching the default headers; on a legacy Solaris that defines _PAM_LEGACY_NONCONST it stays empty as before. --- a/greeter/greet.c +++ b/greeter/greet.c @@ -152,9 +152,13 @@ static XtIntervalId pingTimeout; #ifdef USE_PAM -#ifdef __sun -/* Solaris does not const qualify arguments to pam_get_item() or the - PAM conversation function that Linux-PAM and others do. */ +#if defined(__sun) && defined(_PAM_LEGACY_NONCONST) +/* Classic Solaris did not const qualify arguments to pam_get_item() or the + PAM conversation function that Linux-PAM and others do. Hammerhead's + defaults to the const-qualified (non-legacy) form + unless _PAM_LEGACY_NONCONST is defined, and Hammerhead's GCC also defines + __sun, so key the qualifier on _PAM_LEGACY_NONCONST rather than on __sun + alone. */ # define XDM_PAM_QUAL /**/ #else # define XDM_PAM_QUAL const #!/bin/sh # Build script for xf86-input-keyboard (autotools, Template A). # # Phase 2 Task 4 (M3). Ships a pre-generated `configure` (standard fd.o # release tarball, unlike xf86-video-illumosfb's git-commit-archive), so no # autogen.sh/autoreconf step is needed - straight Template A. # # Patches (patches/, applied below): # 01-sun-kbd-headers.patch - add sys/param.h, unistd.h, stropts.h includes # to src/sun_kbd.c (missing-header compile fix # on GCC 14 / illumos headers). Equivalent of # OI's 01-sun-kbd.patch. # # Module install dir: like xf86-video-illumosfb, this driver's configure.ac # computes inputdir=${moduledir}/input, and moduledir defaults from # --with-xorg-module-dir. The XLibre Xorg server (base/xlibre-xserver-xorg) # advertises input_drivers_dir=${exec_prefix}/lib/xorg/modules/xlibre-25/drivers/input # in its xorg-server.pc, so pass # --with-xorg-module-dir="$PREFIX/lib/xorg/modules/xlibre-25/drivers" # (NOT ".../xlibre-25" as the video driver used - video's own Makefile.am # appends "/drivers" itself, whereas ours appends "/input" directly) so the # built .../input subdir lines up with where Xorg actually looks. set -e # Resolve the port dir (holds patches/) BEFORE cd'ing into the extracted source. PORTDIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd) cd "$SRCDIR" # --- Hammerhead/illumos portability patches --- for p in "$PORTDIR"/patches/*.patch; do [ -f "$p" ] || continue echo "==> Applying patch: $(basename "$p")" patch -p1 < "$p" done export PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig:$PREFIX/share/pkgconfig:$PKG_CONFIG_PATH" export CFLAGS="${CFLAGS} -I$PREFIX/include -D__EXTENSIONS__ -D_POSIX_PTHREAD_SEMANTICS" export LDFLAGS="${LDFLAGS} -L$PREFIX/lib -R$PREFIX/lib" # MANDATORY libtool fix (Template A) - piggyback hammerhead onto the # kopensolaris arm in configure's dynamic-linker case block. if [ -f configure ]; then sed -i -E 's/(kopensolaris\*-gnu)([^)]*\))/\1 | hammerhead*\2/' configure fi # OS-detection fix: sun_kbd.c (the VUID /dev/kbd backend) is only selected # when configure's `case $host_os in ... solaris*) IS_SOLARIS="yes" ;;` # matches - our host_os is "hammerhead", not "solaris*", so the generated # configure's unmatched `*)` arm hard-errors with "Your operating system is # not supported by the kbd driver." Piggyback hammerhead* onto the solaris* # arm (same VUID/STREAMS ioctl convention) in the *generated* configure # (this tarball ships one; there is no configure.ac regen step here). if [ -f configure ]; then sed -i -E 's/^ solaris\*\)$/ solaris* | hammerhead*)/' configure fi ./configure \ --prefix="$PREFIX" \ --build="$BUILD_TRIPLE" \ --host="$BUILD_TRIPLE" \ --sysconfdir="$SYSCONFDIR" \ --disable-static \ --with-xorg-module-dir="$PREFIX/lib/xorg/modules/xlibre-25/drivers" gmake -j${JOBS:-1} gmake install DESTDIR="$PKGDIR" # xf86-input-keyboard - X.Org keyboard input driver # # Phase 2 Task 4 (M3): the VUID /dev/kbd STREAMS backend (src/sun_kbd.c) is # already upstream (uses sys/vuid_event.h, sys/kbd.h). One local patch adds # a few missing header includes needed to compile against GCC 14 / illumos # headers (see patches/01-sun-kbd-headers.patch). [package] name = "xf86-input-keyboard" version = "1.9.0" release = 1 description = "X.Org keyboard input driver (illumos /dev/kbd VUID backend)" url = "https://gitlab.freedesktop.org/xorg/driver/xf86-input-keyboard" license = "MIT" maintainer = "Chris Tusa " arch = "x86_64" [dependencies] runtime = ["xlibre-xserver-xorg"] build = ["xlibre-xserver-xorg", "util-macros"] [[source]] file = "xf86-input-keyboard-1.9.0.tar.gz" urls = ["https://www.x.org/archive/individual/driver/xf86-input-keyboard-1.9.0.tar.gz"] checksum = "407cf742246708843126617feee85b30a8b7b7567b3bc507a6cfda7443a8d9ac" extract = true [build] parallel = true --- a/src/sun_kbd.c 2026-07-23 13:55:22.652012681 -0500 +++ b/src/sun_kbd.c 2026-07-23 13:59:47.345032786 -0500 @@ -56,9 +56,21 @@ #include "xf86OSKbd.h" #include "sun_kbd.h" -#include +/* OI fix (missing-header build failure on illumos/GCC 14): pull in + * sys/param.h, unistd.h, stropts.h explicitly - sun_kbd.c uses + * usleep()/ioctl() and STREAMS ioctl constants (I_PUSH/I_POP/I_FIND) + * that are not reliably pulled in transitively on this toolchain. + * sys/kbio.h is ALSO required (not just sys/kbd.h): Hammerhead's + * does not transitively include it, and it is the header + * that actually defines the KIOC* keyboard ioctl constants + * (KIOCSLED/KIOCGLED/KIOCTYPE/KIOCLAYOUT/KIOCGDIRECT/KIOCSDIRECT/ + * KIOCCMD/KIOCMKTONE/...) this driver uses throughout. */ +#include +#include +#include #include #include +#include #include /* needed before including older versions of hid.h */ #include #!/bin/sh # Build script for xf86-input-mouse (autotools, Template A). # # Phase 2 Task 4 (M3). Ships a pre-generated `configure` - straight Template A, # same shape as xf86-input-keyboard. # # Patches (patches/, applied below): # 01-6892799-mouse-fd-persist.patch - reorder DEVICE_ON/DEVICE_OFF/ # DEVICE_CLOSE in src/mouse.c so the /dev/mouse fd (+ Xisb buffer) is # opened once and closed only at DEVICE_CLOSE, surviving console mode # switches (VT enter/leave otherwise churns close()/open() on the VUID # stream on every switch). Equivalent of OI's 01-6892799.patch. # # Module install dir: same reasoning as xf86-input-keyboard - configure.ac # computes inputdir=${moduledir}/input, so pass --with-xorg-module-dir # pointing at .../xlibre-25/drivers so the result lands at # .../xlibre-25/drivers/input, matching xorg-server.pc's input_drivers_dir. set -e # Resolve the port dir (holds patches/) BEFORE cd'ing into the extracted source. PORTDIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd) cd "$SRCDIR" # --- Hammerhead/illumos portability patches --- for p in "$PORTDIR"/patches/*.patch; do [ -f "$p" ] || continue echo "==> Applying patch: $(basename "$p")" patch -p1 < "$p" done export PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig:$PREFIX/share/pkgconfig:$PKG_CONFIG_PATH" export CFLAGS="${CFLAGS} -I$PREFIX/include -D__EXTENSIONS__ -D_POSIX_PTHREAD_SEMANTICS" export LDFLAGS="${LDFLAGS} -L$PREFIX/lib -R$PREFIX/lib" # sun_mouse.c's CheckRelToAbs() calls libdevinfo's di_init()/di_walk_node() # under HAVE_ABSOLUTE_MOUSE_SCALING (on by default), but neither # configure.ac nor src/Makefile.am declares the libdevinfo dependency # anywhere - a genuine upstream build-system gap for the Solaris/illumos # path, not something a source patch fixes. automake's generated link line # includes $(LIBS), so just set it before configure so it gets baked into # mouse_drv.la's link command. Found at Xorg startup (ld.so.1 relocation # error: symbol di_init not found), not at compile time - configure/gmake # both succeed without this; only actually loading the .so into Xorg fails. export LIBS="${LIBS} -ldevinfo" # MANDATORY libtool fix (Template A) - piggyback hammerhead onto the # kopensolaris arm in configure's dynamic-linker case block. if [ -f configure ]; then sed -i -E 's/(kopensolaris\*-gnu)([^)]*\))/\1 | hammerhead*\2/' configure fi # OS-detection fix: the generated configure picks the source file to build # via `case $host_os in ... solaris*) OS_MOUSE_NAME=sun ;; ... esac`, then # src/Makefile.am uses @OS_MOUSE_NAME@_mouse.c. Our host_os is "hammerhead", # not "solaris*", so OS_MOUSE_NAME is left empty and the build tries to # compile a literal "_mouse.c" (missing file). Piggyback hammerhead* onto # the solaris* arm so OS_MOUSE_NAME=sun selects sun_mouse.c (the VUID # /dev/mouse backend this task is porting). if [ -f configure ]; then sed -i -E 's/^ solaris\*\)$/ solaris* | hammerhead*)/' configure fi ./configure \ --prefix="$PREFIX" \ --build="$BUILD_TRIPLE" \ --host="$BUILD_TRIPLE" \ --sysconfdir="$SYSCONFDIR" \ --disable-static \ --with-xorg-module-dir="$PREFIX/lib/xorg/modules/xlibre-25/drivers" gmake -j${JOBS:-1} gmake install DESTDIR="$PKGDIR" # xf86-input-mouse - X.Org mouse input driver # # Phase 2 Task 4 (M3): the VUID /dev/mouse backend (src/mouse.c / # src/sun_mouse.c) is already upstream. One local patch reorders the # DEVICE_ON/DEVICE_OFF/DEVICE_CLOSE handling in src/mouse.c so the # /dev/mouse fd is opened once (at first DEVICE_ON) and closed only at # DEVICE_CLOSE, instead of being closed/reopened on every console mode # switch (see patches/01-6892799-mouse-fd-persist.patch). That same patch # also defines a local `sign()` macro fallback in src/mouse.c: this old # (2019-era) driver relies on the X server's misc.h `sign()` macro, which # the XLibre 25.1.8 SDK no longer provides - an SDK-drift build failure # unrelated to the VUID port itself, found on first alpha10 build attempt. [package] name = "xf86-input-mouse" version = "1.9.5" release = 1 description = "X.Org mouse input driver (illumos /dev/mouse VUID backend)" url = "https://gitlab.freedesktop.org/xorg/driver/xf86-input-mouse" license = "MIT" maintainer = "Chris Tusa " arch = "x86_64" [dependencies] runtime = ["xlibre-xserver-xorg"] build = ["xlibre-xserver-xorg", "util-macros"] [[source]] file = "xf86-input-mouse-1.9.5.tar.gz" urls = ["https://www.x.org/archive/individual/driver/xf86-input-mouse-1.9.5.tar.gz"] checksum = "dc75c9e97f269b5edf80b3bb17ecac7f31c093cd27f74b5220b9d07ee63e0b25" extract = true [build] parallel = true --- a/src/mouse.c 2026-07-23 13:55:22.649216163 -0500 +++ b/src/mouse.c 2026-07-23 14:01:32.777853582 -0500 @@ -1772,6 +1772,26 @@ break; case DEVICE_ON: + /* + * illumos/Solaris CR 6892799 fix: the VUID /dev/mouse stream + * (unlike a plain serial line) does not tolerate being closed + * and reopened across every console mode switch (X VT + * enter/leave toggles DEVICE_OFF/DEVICE_ON around each + * switch). Keep the fd + Xisb buffer alive once opened; only + * (re)open here on the very first DEVICE_ON, or if a prior + * open attempt failed. DEVICE_OFF no longer closes the fd - + * the real close now happens once, in DEVICE_CLOSE. + */ + if (pInfo->fd != -1) { + /* Already open from a previous DEVICE_ON - just re-enable. */ + xf86FlushInput(pInfo->fd); + xf86AddEnabledDevice(pInfo); + if (pMse->emulate3Buttons || pMse->emulate3ButtonsSoft) { + RegisterBlockAndWakeupHandlers (MouseBlockHandler, + MouseWakeupHandler, + (pointer) pInfo); + } + } else { pInfo->fd = xf86OpenSerial(pInfo->options); if (pInfo->fd == -1) xf86Msg(X_WARNING, "%s: cannot open input device\n", pInfo->name); @@ -1820,6 +1840,7 @@ } } } + } pMse->lastButtons = 0; pMse->lastMappedButtons = 0; pMse->emulateState = 0; @@ -1832,12 +1853,11 @@ case DEVICE_OFF: if (pInfo->fd != -1) { xf86RemoveEnabledDevice(pInfo); - if (pMse->buffer) { - XisbFree(pMse->buffer); - pMse->buffer = NULL; - } - xf86CloseSerial(pInfo->fd); - pInfo->fd = -1; + /* + * 6892799: do NOT close/free the buffer or fd here - the + * VUID /dev/mouse stream must survive the mode switch. + * Actual teardown is deferred to DEVICE_CLOSE. + */ if (pMse->emulate3Buttons || pMse->emulate3ButtonsSoft) { RemoveBlockAndWakeupHandlers (MouseBlockHandler, @@ -1848,6 +1868,16 @@ device->public.on = FALSE; break; case DEVICE_CLOSE: + /* 6892799: the fd/buffer were kept open across DEVICE_OFF/ON + * cycles; do the real close here, once, at final teardown. */ + if (pInfo->fd != -1) { + if (pMse->buffer) { + XisbFree(pMse->buffer); + pMse->buffer = NULL; + } + xf86CloseSerial(pInfo->fd); + pInfo->fd = -1; + } free(pMse->mousePriv); pMse->mousePriv = NULL; break; @@ -3738,6 +3768,16 @@ #define VAL_THRESHOLD 40 /* + * SDK-drift compat fix: mouse.c relies on the X server's misc.h `sign()` + * macro, which the XLibre 25.1.8 SDK this port builds against no longer + * provides (dropped upstream). Define the historical semantics locally if + * it is not already defined by the SDK. + */ +#ifndef sign +#define sign(x) ((x) > 0 ? 1 : ((x) < 0 ? -1 : 0)) +#endif + +/* * checkForErraticMovements() -- check if mouse 'jumps around'. */ static void #!/bin/sh # Build script for xf86-video-illumosfb (autotools, Template A variant). # # Phase 2 Task 3 (M2). This port ships NO pre-generated `configure` - only # configure.ac/Makefile.am + its own autogen.sh (confirmed via `tar tf` on the # git-commit-archive tarball). Must run `NOCONFIGURE=1 ./autogen.sh` (which is # just `autoreconf -v --install` under the hood) before the usual # libtool/config.sub fix + configure, same shape as base/x11vnc (Task 7a). # # configure.ac requires xorg-macros (XORG_MACROS_VERSION/XORG_DEFAULT_OPTIONS) # at aclocal time. base/util-macros installs xorg-macros.m4 under # $PREFIX/share/aclocal (/usr/local/share/aclocal), which is NOT on aclocal's # default search path (/usr/share/aclocal) - export ACLOCAL_PATH so the # autoreconf inside autogen.sh finds it. # # Module install dir: configure.ac defaults --with-xorg-module-dir to # "$libdir/xorg/modules", but this XLibre build (base/xlibre-xserver-xorg) # uses a versioned moduledir, $libdir/xorg/modules/xlibre-25 (see that port's # xorg-server.pc: moduledir=${exec_prefix}/lib/xorg/modules/xlibre-25). The # driver's own Makefile.am appends "/drivers" to @moduledir@, so pass # --with-xorg-module-dir="$PREFIX/lib/xorg/modules/xlibre-25" here to land # illumosfb_drv.so where Xorg's video_drivers_dir actually points. # # ABI: illumosfb_driver.c's XF86ModuleVersionInfo uses the SDK's # ABI_VIDEODRV_VERSION macro directly (no hardcoded ABI number) - building # against xorg-server.pc's SDK headers means the ABI always matches the # server it's paired with. No ABI patch expected/needed. set -e cd "$SRCDIR" export AUTOCONF=/usr/bin/autoconf export AUTOHEADER=/usr/bin/autoheader export ACLOCAL=/usr/bin/aclocal export AUTOM4TE=/usr/bin/autom4te export ACLOCAL_PATH="$PREFIX/share/aclocal:$ACLOCAL_PATH" export PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig:$PREFIX/share/pkgconfig:$PKG_CONFIG_PATH" export CFLAGS="${CFLAGS} -I$PREFIX/include -D__EXTENSIONS__ -D_POSIX_PTHREAD_SEMANTICS" export LDFLAGS="${LDFLAGS} -L$PREFIX/lib -R$PREFIX/lib" NOCONFIGURE=1 ./autogen.sh # GOTCHA (same as x11vnc, Task 7a): autoreconf --install generates its OWN # fresh config.sub/config.guess which do NOT carry the hammerhead patch. # Re-copy the patched versions post-autoreconf, before configure runs. cp -f /usr/share/autoconf/build-aux/config.sub config.sub 2>/dev/null || true cp -f /usr/share/autoconf/build-aux/config.guess config.guess 2>/dev/null || true # MANDATORY libtool fix (Template A) - piggyback hammerhead onto the # kopensolaris arm in the generated configure's dynamic-linker case block. if [ -f configure ]; then sed -i -E 's/(kopensolaris\*-gnu)([^)]*\))/\1 | hammerhead*\2/' configure fi ./configure \ --prefix="$PREFIX" \ --build="$BUILD_TRIPLE" \ --host="$BUILD_TRIPLE" \ --sysconfdir="$SYSCONFDIR" \ --disable-static \ --with-xorg-module-dir="$PREFIX/lib/xorg/modules/xlibre-25" gmake -j${JOBS:-1} gmake install DESTDIR="$PKGDIR" # xf86-video-illumosfb - illumos native framebuffer video driver for XLibre/Xorg # https://github.com/LuminousMonkey/xf86-video-illumosfb # # Phase 2 Task 3 (M2): the DDX driver that makes the XLibre Xorg server # (base/xlibre-xserver-xorg, M1) render on Hammerhead's console framebuffer. # Opens /dev/fb0, validates VIS_GETIDENTIFIER == "illumos_fb", FBIOGATTR + # mmap + KDSETMODE(KD_GRAPHICS) — the exact path M0's fbtest proved works. # # Pinned at git commit 8ad57812ca2e99be6281f5142101811482026c55 (upstream tag # v0.5, matches the version oi-userland ships). No release tarball exists # upstream, so the source is a GitHub commit-archive tarball. [package] name = "xf86-video-illumosfb" version = "0.5" release = 1 description = "illumos native framebuffer video driver for the XLibre/Xorg X server" url = "https://github.com/LuminousMonkey/xf86-video-illumosfb" license = "MIT" maintainer = "Chris Tusa " arch = "x86_64" [dependencies] runtime = ["xlibre-xserver-xorg"] build = ["xlibre-xserver-xorg", "pixman", "util-macros"] [[source]] file = "xf86-video-illumosfb-8ad57812ca2e99be6281f5142101811482026c55.tar.gz" urls = ["https://github.com/LuminousMonkey/xf86-video-illumosfb/archive/8ad57812ca2e99be6281f5142101811482026c55.tar.gz"] checksum = "f601e824c7a08189656d77515d9df0c302b669e79f990684527b5e75865c3355" extract = true [build] parallel = true #!/bin/sh # Build script for Xfe 2.1.8 (autotools, Template A + CXXFLAGS - C++ port). # Consumes fox-toolkit via pkg-config (fox.pc, installed to $PREFIX by # base/fox-toolkit). startup-notification is not ported, so it's disabled. set -e PORTDIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd) cd "$SRCDIR" for p in "$PORTDIR"/patches/*.patch; do [ -f "$p" ] || continue echo "==> Applying patch: $(basename "$p")" patch -p1 < "$p" done # MANDATORY libtool fix - see Template A. if [ -f configure ]; then sed -i -E 's/(kopensolaris\*-gnu)([^)]*\))/\1 | hammerhead*\2/' configure fi export PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig:$PREFIX/share/pkgconfig:/usr/lib/pkgconfig:$PKG_CONFIG_PATH" # Xfe's configure finds FOX via `pkg-config fox` (fox.pc) and also probes # fox-config as a fallback - make sure both resolve under $PREFIX. export PATH="$PREFIX/bin:$PATH" export CFLAGS="${CFLAGS} -I$PREFIX/include -D__EXTENSIONS__ -D_POSIX_PTHREAD_SEMANTICS" export CXXFLAGS="${CXXFLAGS} -I$PREFIX/include -I$PREFIX/include/fox-1.6 -D__EXTENSIONS__ -D_POSIX_PTHREAD_SEMANTICS" export LDFLAGS="${LDFLAGS} -L$PREFIX/lib -R$PREFIX/lib" ./configure \ --prefix="$PREFIX" \ --build="$BUILD_TRIPLE" \ --host="$BUILD_TRIPLE" \ --sysconfdir="$SYSCONFDIR" \ --disable-static # GOTCHA: --disable-nls (tried first) has a bad side effect - it makes # configure skip probing MSGFMT entirely and hardcode it to ":", which # ALSO breaks `xfe.desktop: xfe.desktop.in` (Makefile.am's rule is # literally `$(MSGFMT) --desktop -d po --template $< -o $@` - msgfmt has # a `--desktop` mode used for both translation AND desktop-file # generation). msgfmt itself IS present on Hammerhead and works fine; # it's msgmerge (used only inside po/'s own stamp-po recipe, to refresh # each lang's .po against the .pot before compiling it to .gmo) that's # missing from our gettext install. So: leave NLS enabled (MSGFMT stays # real) and instead drop `po` out of SUBDIRS post-configure, skipping # recursion into the one directory that actually needs msgmerge - the # top-level `xfe.desktop` rule doesn't need po/ built, it reads the raw # .po files directly. sed -i -E 's/^(SUBDIRS[[:space:]]*=[[:space:]]*)po /\1/' Makefile # GOTCHA #2: turns out moot - Hammerhead's /usr/bin/msgfmt is itself # non-functional (`msgfmt --version` -> "Cannot open file --version", # i.e. not real GNU gettext), so configure's own functional probe # resolves MSGFMT to ":" regardless of NLS/SUBDIRS. Not something to fix # from this port (system gettext bug, not in scope for xfe/mupdf/neovim/ # XNEdit) - work around it here: since we have no translations to merge # anyway (po/ excluded above), `msgfmt --desktop`/`--xml` on an # untranslated build is equivalent to a plain copy of the .in template. sed -i -E 's#\$\(MSGFMT\) --(desktop|xml) -d \$\(top_srcdir\)/po --template \$< -o \$@#cp $< $@#' Makefile gmake -j${JOBS:-1} gmake install DESTDIR="$PKGDIR" # Xfe - X File Explorer, a lightweight file manager built on FOX # https://sourceforge.net/projects/xfe/ [package] name = "xfe" version = "2.1.8" release = 1 description = "X File Explorer - lightweight file manager (FOX toolkit)" url = "https://sourceforge.net/projects/xfe/" license = "GPL-2.0-or-later" maintainer = "Chris Tusa " arch = "x86_64" [dependencies] runtime = ["fox-toolkit", "libX11", "libXft", "freetype", "fontconfig"] build = ["fox-toolkit", "libX11", "libXft", "freetype", "fontconfig"] [[source]] file = "xfe-2.1.8.tar.xz" urls = ["https://sourceforge.net/projects/xfe/files/xfe/2.1.8/xfe-2.1.8.tar.xz/download"] checksum = "f539dd333296d91bd318ba62403bc7bee4069262df23f518e4453c80273b82be" [build] parallel = true From: Chris Tusa Subject: pkg_format/OTHER_PKG: declare on non-Linux/FreeBSD (Hammerhead) Both pkg_format (main.cpp) and the OTHER_PKG constant it's initialized to (xfedefs.h) are gated behind #if defined(__FreeBSD__) or #if defined(linux) (used later, unconditionally, to seed the "package_format" registry entry read by Xfe's open-with/install-package UI). GCC on Hammerhead (illumos derivative) predefines neither macro, so neither the constant nor the variable exist and the writeUnsignedEntry(..., pkg_format) call fails to compile. Add a Hammerhead/generic-illumos fallback in both files that just defaults to OTHER_PKG (we have no deb/rpm-equivalent to autodetect and don't want one guessed). diff --git a/src/xfedefs.h b/src/xfedefs.h --- a/src/xfedefs.h 2026-02-08 05:02:51.000000000 -0600 +++ b/src/xfedefs.h 2026-07-22 20:50:35.798811328 -0500 @@ -426,3 +426,7 @@ #define OTHER_PKG 2 #endif + +#if !defined(__FreeBSD__) && !defined(linux) +#define OTHER_PKG 2 +#endif diff --git a/src/main.cpp b/src/main.cpp --- a/src/main.cpp 2026-01-17 10:07:41.000000000 -0600 +++ b/src/main.cpp 2026-07-22 20:50:35.798910014 -0500 @@ -423,6 +423,10 @@ } #endif +#if !defined(__FreeBSD__) && !defined(linux) + FXuint pkg_format = OTHER_PKG; +#endif + // Parse basic arguments for (i = 1; i < argc; ++i) { From: Chris Tusa Subject: st/st.c: openpty() header include for Hammerhead The bundled st (simple terminal) code's openpty() include is gated on __linux / BSD-family / __APPLE__ macros only. GCC on Hammerhead (illumos derivative) predefines none of these, so (the header illumos itself ships openpty() in - confirmed present at /usr/include/libutil.h) never gets included and openpty() is an implicit (and, under GCC14, error-level) declaration. Add a fallback #else including the same illumos-native libutil.h. diff --git a/st/st.c b/st/st.c --- a/st/st.c 2026-01-17 10:07:39.000000000 -0600 +++ b/st/st.c 2026-07-22 20:52:24.005607327 -0500 @@ -31,6 +31,8 @@ #include #elif defined(__FreeBSD__) || defined(__DragonFly__) #include +#else +#include #endif /* Arbitrary sizes */ #!/bin/sh # Build script for xinit (autotools, Template A verbatim). # Not strictly required for the headless Xvfb+x11vnc launch path but it's # the standard X launcher (xinit + startx) and cheap to build. set -e cd "$SRCDIR" if [ -f configure ]; then sed -i -E 's/(kopensolaris\*-gnu)([^)]*\))/\1 | hammerhead*\2/' configure fi export PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig:$PREFIX/share/pkgconfig:$PKG_CONFIG_PATH" export CFLAGS="${CFLAGS} -I$PREFIX/include -D__EXTENSIONS__ -D_POSIX_PTHREAD_SEMANTICS" export LDFLAGS="${LDFLAGS} -L$PREFIX/lib -R$PREFIX/lib" ./configure \ --prefix="$PREFIX" \ --build="$BUILD_TRIPLE" \ --host="$BUILD_TRIPLE" \ --sysconfdir="$SYSCONFDIR" \ --disable-static gmake -j${JOBS:-1} gmake install DESTDIR="$PKGDIR" # xinit - X Window System initializer (xinit + startx) # https://gitlab.freedesktop.org/xorg/app/xinit [package] name = "xinit" version = "1.4.4" release = 1 description = "X Window System initializer (xinit/startx)" url = "https://xorg.freedesktop.org/releases/individual/app/" license = "MIT" maintainer = "Chris Tusa " arch = "x86_64" [dependencies] runtime = ["libX11"] build = ["libX11", "xorgproto", "util-macros"] [[source]] file = "xinit-1.4.4.tar.xz" urls = ["https://xorg.freedesktop.org/releases/individual/app/xinit-1.4.4.tar.xz"] checksum = "40a47c7a164c7f981ce3787b4b37f7e411fb43231dcde543d70094075dacfef9" [build] parallel = true #!/bin/sh # Build script for xkbcomp (autotools, Template A verbatim). set -e cd "$SRCDIR" # MANDATORY libtool fix (Task 4a, 2026-07-22): see libXau/build.sh for the # full explanation. Piggyback hammerhead onto the kopensolaris arm. if [ -f configure ]; then sed -i -E 's/(kopensolaris\*-gnu)([^)]*\))/\1 | hammerhead*\2/' configure fi export PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig:$PREFIX/share/pkgconfig:$PKG_CONFIG_PATH" export CFLAGS="${CFLAGS} -I$PREFIX/include -D__EXTENSIONS__ -D_POSIX_PTHREAD_SEMANTICS" export LDFLAGS="${LDFLAGS} -L$PREFIX/lib -R$PREFIX/lib" ./configure \ --prefix="$PREFIX" \ --build="$BUILD_TRIPLE" \ --host="$BUILD_TRIPLE" \ --sysconfdir="$SYSCONFDIR" \ --disable-static gmake -j${JOBS:-1} gmake install DESTDIR="$PKGDIR" # xkbcomp - X keyboard description compiler # Direct xlibre-server CDEPEND (x11-apps/xkbcomp, unconditional) - the # server execs xkbcomp to compile keymaps at runtime. # https://gitlab.freedesktop.org/xorg/app/xkbcomp [package] name = "xkbcomp" version = "1.5.0" release = 1 description = "X keyboard description compiler" url = "https://xorg.freedesktop.org/releases/individual/app/" license = "MIT" maintainer = "Chris Tusa " arch = "x86_64" [dependencies] runtime = ["libX11", "libxkbfile"] build = ["libX11", "libxkbfile", "xorgproto", "util-macros"] [[source]] file = "xkbcomp-1.5.0.tar.xz" urls = ["https://xorg.freedesktop.org/releases/individual/app/xkbcomp-1.5.0.tar.xz"] checksum = "2ac31f26600776db6d9cd79b3fcd272263faebac7eb85fb2f33c7141b8486060" [build] parallel = true #!/bin/sh # Build script for xkeyboard-config (Meson, Template B variant, DATA-only port). # # No shared library ships from this port - it's the keymap XML/rules # database the XLibre server (and xkbcomp) load/compile at runtime under # $PREFIX/share/X11/xkb (legacy path) and $PREFIX/share/xkeyboard-config-2/ # (canonical path, meson.build's dir_xkb_base). # # gettext/NLS decision (Task 7a, 2026-07-22): meson.build's po/meson.build # only runs i18n.gettext() when -Dnls is true (default true). alpha9's # /usr/bin/msgfmt is illumos-native SVR4 msgfmt, NOT GNU-gettext compatible # (same finding as Task 6's glib2 -Dnls=disabled decision - see memory # glib2 gettext prereq). Pass -Dnls=false explicitly so meson's i18n # module never invokes msgfmt/xgettext; this only disables translated # rules/model descriptions, not keymap functionality itself. # # xsltproc (man page generation) is absent on alpha9; meson.build's # find_program('xsltproc', required: false) already makes that optional, # so no flag needed - the man page subdir is silently skipped. # # rules/meson.build requires python3 >= 3.11 (alpha9 has 3.13.2, built # Task 2/M0) to run `python3 -m rules.generator` for the base/evdev rules # files, plus the in-tree rules/xml2lst.pl perl script (perl present in # base) - both resolved automatically by meson's find_program/pymod. set -e cd "$SRCDIR" export PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig:$PREFIX/share/pkgconfig:$PKG_CONFIG_PATH" export CFLAGS="${CFLAGS} -D__EXTENSIONS__ -D_POSIX_PTHREAD_SEMANTICS" export LDFLAGS="${LDFLAGS} -L$PREFIX/lib -Wl,-R,$PREFIX/lib" meson setup build \ --prefix="$PREFIX" \ --libdir=lib \ --buildtype=release \ -Dcompat-rules=true \ -Dnls=false ninja -C build -j${JOBS:-1} DESTDIR="$PKGDIR" ninja -C build install # xkeyboard-config - X keyboard configuration database (keymap XML/rules) # Direct xlibre-server CDEPEND (>=x11-misc/xkeyboard-config-2.4.1-r3) # https://gitlab.freedesktop.org/xkeyboard-config/xkeyboard-config [package] name = "xkeyboard-config" version = "2.48" release = 1 description = "X keyboard configuration database" url = "https://xorg.freedesktop.org/releases/individual/data/xkeyboard-config/" license = "MIT" maintainer = "Chris Tusa " arch = "x86_64" [dependencies] runtime = [] build = ["util-macros"] [[source]] file = "xkeyboard-config-2.48.tar.xz" urls = ["https://xorg.freedesktop.org/releases/individual/data/xkeyboard-config/xkeyboard-config-2.48.tar.xz"] checksum = "b77041324f0109f77161ee43743fe04baa485866af8460d31e476ad3f7648fd5" [build] parallel = true #!/bin/sh # Build script for xlibre-xserver-xorg (Meson, Template B) — the Xorg DDX. # # Sibling of base/xlibre-xserver (Xvfb-only). Same XLibre 25.1.8 source, same # os-layer portability patches, but -Dxorg=true so it produces # /usr/local/bin/Xorg — the server xf86-video-illumosfb (Phase-2 M2) plugs into. # # Patches (patches/, applied below): # 0001 os/meson.build - Solaris socket defines under Hammerhead sysname # 0002 os/ospoll.c - illumos event-ports listener re-arm fix # 0003 os-support/meson.build - select the solaris console backend for # Hammerhead (else it falls to the no-op stub; # the solaris arm is the load-bearing # /dev/console + VT_SETDISPINFO layer) # # Meson option notes (verified against this tree's meson_options.txt): # * -Dgbm / -Dxf86-input-null are NOT options in 25.1.8 (dropped, same as the # Xvfb port). glamor_egl is gated on gbm_dep.found(); with no gbm on # Hammerhead it's skipped. Intent preserved: Xorg on; DRM/GL/udev/hal off. # * -Dpciaccess=false: illumosfb does no PCI probing. hw/xfree86/meson.build # and os-support/meson.build gate all pciaccess use on get_option('pciaccess'), # so bus/Pci.c and the pciaccess dependency are skipped cleanly. If the DDX # turns out to hard-require it, build base/libpciaccess and flip to true. # * -Dsha1=libcrypto uses base OpenSSL libcrypto (as the Xvfb port). # * -Dglx=false: glx/meson.build hard-requires the 'gl' (libGL/Mesa) dep, # which Hammerhead has no port of. GLX is server-side OpenGL indirect # rendering; the framebuffer illumosfb driver (M2) does no GL, so GLX is # dead weight. Disabled (matches the Xvfb port). Revisit if/when Mesa lands. # * linker_export_flags: on Hammerhead host_machine.system() != 'sunos', so # hw/xfree86/meson.build falls to the GNU-ld `-Wl,--export-dynamic` branch — # which is exactly what we want so Xorg modules resolve xf86* symbols back # into the server. (The 'sunos' branch sets empty flags for the illumos ld; # we use GNU ld, so we deliberately do NOT match it here.) set -e # Resolve the port dir (holds patches/) BEFORE cd'ing into the extracted source. PORTDIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd) cd "$SRCDIR" # --- Hammerhead/illumos portability patches (rationale in each patch header) --- for p in "$PORTDIR"/patches/*.patch; do [ -f "$p" ] || continue echo "==> Applying patch: $(basename "$p")" patch -p1 < "$p" done export PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig:$PREFIX/share/pkgconfig:/usr/lib/pkgconfig:$PKG_CONFIG_PATH" # Template B illumos flags: __EXTENSIONS__ + _POSIX_PTHREAD_SEMANTICS select the # XPG/POSIX prototypes (msg_control, *_r, etc.). coral's default CFLAGS is only # "-O2 -pipe" and its LDFLAGS is just "-R$PREFIX/lib", so add the rest here. export CFLAGS="${CFLAGS} -D__EXTENSIONS__ -D_POSIX_PTHREAD_SEMANTICS" export LDFLAGS="${LDFLAGS} -L$PREFIX/lib -Wl,-R,$PREFIX/lib" meson setup build \ --prefix="$PREFIX" \ --libdir=lib \ --buildtype=release \ -Dxorg=true -Dxvfb=true \ -Dxephyr=false -Dxnest=false -Dxfbdev=false -Dxwin=false -Dxquartz=false \ -Dglamor=false -Dglx=false -Dglx_dri=false \ -Ddri1=false -Ddri2=false -Ddri3=false -Ddrm=false \ -Dudev=false -Dudev_kms=false -Dhal=false \ -Dsystemd_logind=false -Dsystemd_notify=false -Dseatd_libseat=false \ -Dsuid_wrapper=false -Dxcsecurity=false -Dxselinux=false \ -Dpciaccess=false -Dagp=false -Dint10=false -Dvgahw=false \ -Dxf86bigfont=false -Dtests=false \ -Ddocs=false -Ddevel-docs=false -Ddocs-pdf=false \ -Dxf86-input-inputtest=false \ -Ddtrace=false -Dlinux_acpi=false -Dlinux_apm=false \ -Dsha1=libcrypto \ -Dxkb_dir=/usr/local/share/X11/xkb \ -Dxkb_bin_dir=/usr/local/bin \ -Dxkb_output_dir=/var/lib/xkb ninja -C build -j${JOBS:-1} DESTDIR="$PKGDIR" ninja -C build install # xlibre-xserver-xorg - XLibre Xorg DDX (the full hardware-driver X server) # Sibling of base/xlibre-xserver (the Xvfb-only headless build). Same XLibre # 25.1.8 source tree + the same os-layer portability patches, but built with # -Dxorg=true so it produces /usr/local/bin/Xorg. This is the server the # native framebuffer driver (xf86-video-illumosfb, Phase-2 M2) plugs into. # XLibre retains hw/xfree86/os-support/solaris/ (sun_init.c: /dev/console + # VT_SETDISPINFO) - the illumos console backend, selected via patch 0003. # https://github.com/X11Libre/xserver [package] name = "xlibre-xserver-xorg" version = "25.1.8" release = 1 description = "XLibre X server (Xorg DDX for the native framebuffer console)" url = "https://github.com/X11Libre/xserver" license = "MIT" maintainer = "Chris Tusa " arch = "x86_64" [dependencies] runtime = ["pixman", "libX11", "libXfont2", "libxkbfile", "libXau", "libXdmcp", "libXext", "font-util", "xkeyboard-config", "xkbcomp", "xauth", "libxcvt"] build = ["pixman", "xorgproto", "xtrans", "libXfont2", "libxkbfile", "font-util", "util-macros", "libX11", "libXau", "libXdmcp", "libXext", "libXfixes", "libxcvt"] [[source]] file = "xlibre-xserver-25.1.8.tar.gz" urls = ["https://github.com/X11Libre/xserver/archive/refs/tags/xlibre-xserver-25.1.8.tar.gz"] checksum = "18091f53e8700801b61f0d20c30d850d1060cb31f6a0d2046249bb413809ae16" [build] parallel = true Treat Hammerhead like Solaris/illumos in the os-layer meson build. Meson derives host_machine.system() from uname sysname, which on Hammerhead is "hammerhead", not "sunos". The os/ static library's Solaris branch (which adds -lsocket/-lnsl and the _XOPEN_SOURCE/__EXTENSIONS__ defines needed for struct msghdr.msg_control and the XPG socket API) therefore never fires, producing undefined socket()/gethostbyname() symbols at link time. Hammerhead IS illumos, so extend the guard to match its sysname. --- a/os/meson.build +++ b/os/meson.build @@ -63,7 +63,7 @@ os_c_args = [] # eg. struct msghdr -> msg_control -if host_machine.system() == 'sunos' +if host_machine.system() == 'sunos' or host_machine.system() == 'hammerhead' os_c_args += '-D_XOPEN_SOURCE=1' os_c_args += '-D_XOPEN_SOURCE_EXTENDED=1' os_c_args += '-D__EXTENSIONS__' Fix inverted re-arm check in the illumos event-ports (PORT_SOURCE_FD) ospoll backend - the listening socket only ever accepted exactly one client for the lifetime of the server. Root cause (found 2026-07-22, hh-alpha9, Task 8 M5 integration test): illumos event ports are one-shot per delivered event - once port_getn() returns an event for a PORT_SOURCE_FD object, that fd is automatically dissociated from the port and MUST be re-associated (port_associate() again, done here via epoll_mod()) to keep receiving further events on it. ospoll_wait()'s PORT-backend dispatch loop re-arms level-triggered fds with: if (osfd->trigger == ospoll_trigger_level && !xorg_list_is_empty(&osfd->deleted)) { epoll_mod(ospoll, osfd); } osfd->deleted is the intrusive list node ospoll_remove() links onto ospoll->deleted when an fd is torn down (see the xorg_list_add call right after port_dissociate() in ospoll_remove()). So xorg_list_is_empty(&osfd->deleted) is true exactly when this specific fd has NOT just been removed by its own callback - i.e. it's still a live, valid fd safe to re-arm. The listening socket is a level-triggered fd that lives for the entire server lifetime and is never removed, so its deleted node is always empty. With the `!` in front, the condition only fires when the fd HAS just been deleted (backwards - re-arming an fd that's about to be freed), and never fires for the common "still alive" case. Net effect: the listen socket's single initial port_associate() (done at ospoll_add time) gets consumed by the first accept() event and is never renewed, so every connection after the first sits unnoticed in the kernel accept backlog forever. Confirmed via truss -p : after the first client's full connection setup, port_getn() goes back to sleeping and no further accept(4, ...) call is ever made, even though a second client's connect() has already completed at the socket layer (visible in `netstat -f unix` as a live but un-accepted pair). Fix: drop the negation so accepting fds get re-armed, and only skip fds that were actually just torn down. --- a/os/ospoll.c +++ b/os/ospoll.c @@ -638,7 +638,7 @@ osfd->callback(osfd->fd, xevents, osfd->data); if (osfd->trigger == ospoll_trigger_level && - !xorg_list_is_empty(&osfd->deleted)) { + xorg_list_is_empty(&osfd->deleted)) { epoll_mod(ospoll, osfd); } } Select the Solaris/illumos os-support backend for Hammerhead in the Xorg DDX. hw/xfree86/os-support/meson.build picks the per-OS console backend from host_machine.system(). On Hammerhead uname sysname is "hammerhead", not "sunos", so the `elif host_machine.system() == 'sunos'` arm never fires and the build silently falls through to the generic *stub* backend (stub_init.c, VTsw_noop, etc.). That stub is a no-op: xf86OpenConsole() does nothing, so the server never touches /dev/console / VT_SETDISPINFO and can't drive the framebuffer console the M2 illumosfb driver targets. Hammerhead IS illumos, so the solaris arm (sun_init.c: /dev/console + VT_SETDISPINFO, sun_vid.c, sun_apm/bell, solaris-amd64.S port I/O) is exactly the load-bearing console layer we need. Extend the guard to match Hammerhead's sysname, mirroring the os/meson.build sunos-sysname patch (0001). --- a/hw/xfree86/os-support/meson.build +++ b/hw/xfree86/os-support/meson.build @@ -62,7 +62,7 @@ if host_machine.system() == 'linux' srcs_xorg_os_support += 'shared/pm_noop.c' endif -elif host_machine.system() == 'sunos' +elif host_machine.system() == 'sunos' or host_machine.system() == 'hammerhead' srcs_xorg_os_support += [ 'solaris/sun_apm.c', 'solaris/sun_bell.c', Fix build of the Solaris APM os-support file: include xf86_priv.h. XLibre moved the power-management hook declarations extern int (*xf86PMGetEventFromOs)(...); extern pmWait (*xf86PMConfirmEventToOs)(...); void xf86HandlePMEvents(int fd, void *data); into hw/xfree86/common/xf86_priv.h (lowercase-underscore), and updated the Linux backend (lnx_apm.c / lnx_acpi.c include "xf86_priv.h") but NOT the Solaris backend. hw/xfree86/os-support/solaris/sun_apm.c still includes only "xf86Priv.h" (capital-P, a different header), so on Hammerhead/illumos - the only platform that still compiles sun_apm.c - xf86OSPMOpen() fails with "xf86PMGetEventFromOs undeclared" (GCC 14 hard error). This never surfaced upstream because XLibre's CI has no illumos target. Add the missing include, matching lnx_apm.c. --- a/hw/xfree86/os-support/solaris/sun_apm.c +++ b/hw/xfree86/os-support/solaris/sun_apm.c @@ -58,6 +58,7 @@ #include "os.h" #include "xf86.h" +#include "xf86_priv.h" #include "xf86Priv.h" #include "xf86_os_support.h" #include "xf86_OSproc.h" Disable the X server input thread by default on Hammerhead/illumos. XLibre's threaded input (INPUTTHREAD, default on for non-Windows) runs a separate input thread whose ospoll uses the Solaris event-ports backend (port_getn / portfs). On illumos the input->main wakeup self-pipe fd is re-armed reporting POLLIN "ready" every cycle with nothing to deliver, so the input thread and the main thread ping-pong on that pipe as fast as the CPU allows: measured ~340k portfs+write/s on [InputThread] and ~225k portfs+read/s on [MainThread] = TWO fully pegged cores at idle (conky read CPU 247%, load avg 2.0), and a sluggish pointer because the saturated main thread services real motion late. The kbd/consms device fds themselves were fine (no repeated reads, errno 0) - it is purely the threaded-input wakeup pipe. Xvfb never hit this (no real input devices, no input thread). XLibre REMOVED the historic `-noThreadedInput` command-line flag (only `-dumbSched` still sets InputThreadEnable = FALSE, but that also disables the smart scheduler). Rather than depend on a launch flag that a boot service or .xinitrc could forget - reintroducing a 200%-CPU mystery - flip the compiled default so a plain `Xorg` invocation is correct. Input is then serviced in the main dispatch loop (the pre-2016 default; fully functional). The smart scheduler is left untouched. All InputThread machinery stays compiled in, so `-dumbSched`/future flags could still toggle it. This is an illumos/Solaris-specific XLibre defect (event-ports ospoll re-arm vs. the threaded-input self-pipe); XLibre CI has no illumos target. Worth filing upstream. Complements 0002-ospoll-port-listener-rearm. --- a/os/inputthread.c +++ b/os/inputthread.c @@ -44,7 +44,7 @@ #if INPUTTHREAD -Bool InputThreadEnable = TRUE; +Bool InputThreadEnable = FALSE; /** * An input device as seen by the threaded input facility #!/bin/sh # Build script for xlibre-xserver (Meson, Template B) — Xvfb-only headless build. # # THE crux port of the desktop initiative. Builds ONLY the Xvfb DDX (headless # software framebuffer): no hardware/DRM/GL, no udev/logind, no xorg/xephyr/etc. # x11vnc (Task 7a) later bridges the Xvfb display to VNC. # # XLibre has BSD CI but no illumos/Hammerhead target, so this port carries # Hammerhead portability patches in patches/ (applied below). # # Meson option notes (verified against this tree's meson_options.txt): # * -Dgbm / -Dxf86-input-null from the original manifest capture do NOT # exist as options in 25.1.8 and are intentionally dropped (gbm is only # ever probed as required:false, and the null input driver isn't an # option here). Intent preserved: Xvfb on, all hardware/GL/DRM off. # * -Dsha1=libcrypto uses base OpenSSL's libcrypto (find_library('crypto') # resolves /usr/lib/libcrypto.so; in base /usr/include). # * libdrm/pciaccess/epoxy/gbm are all probed required:false in meson.build, # so the -D*=false switches don't trip a hard missing-dependency error on # Hammerhead (none of those libs exist here). Verified by source read. set -e # Resolve the port dir (holds patches/) BEFORE cd'ing into the extracted source. PORTDIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd) cd "$SRCDIR" # --- Hammerhead/illumos portability patches (rationale in each patch header) --- for p in "$PORTDIR"/patches/*.patch; do [ -f "$p" ] || continue echo "==> Applying patch: $(basename "$p")" patch -p1 < "$p" done export PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig:$PREFIX/share/pkgconfig:/usr/lib/pkgconfig:$PKG_CONFIG_PATH" # Template B illumos flags: __EXTENSIONS__ + _POSIX_PTHREAD_SEMANTICS select the # XPG/POSIX prototypes (msg_control, *_r, etc.). coral's default CFLAGS is only # "-O2 -pipe" and its LDFLAGS is just "-R$PREFIX/lib", so add the rest here. export CFLAGS="${CFLAGS} -D__EXTENSIONS__ -D_POSIX_PTHREAD_SEMANTICS" export LDFLAGS="${LDFLAGS} -L$PREFIX/lib -Wl,-R,$PREFIX/lib" meson setup build \ --prefix="$PREFIX" \ --libdir=lib \ --buildtype=release \ -Dxvfb=true \ -Dxorg=false -Dxephyr=false -Dxnest=false -Dxfbdev=false -Dxwin=false -Dxquartz=false \ -Dglamor=false -Dglx=false -Dglx_dri=false \ -Ddri1=false -Ddri2=false -Ddri3=false -Ddrm=false \ -Dudev=false -Dudev_kms=false -Dhal=false \ -Dsystemd_logind=false -Dsystemd_notify=false -Dseatd_libseat=false \ -Dsuid_wrapper=false -Dxcsecurity=false -Dxselinux=false \ -Dpciaccess=false -Dagp=false -Dint10=false -Dvgahw=false \ -Dxf86bigfont=false -Dtests=false \ -Ddocs=false -Ddevel-docs=false -Ddocs-pdf=false \ -Dxf86-input-inputtest=false \ -Ddtrace=false -Dlinux_acpi=false -Dlinux_apm=false \ -Dsha1=libcrypto \ -Dxkb_dir=/usr/local/share/X11/xkb \ -Dxkb_bin_dir=/usr/local/bin \ -Dxkb_output_dir=/var/lib/xkb ninja -C build -j${JOBS:-1} DESTDIR="$PKGDIR" ninja -C build install # xlibre-xserver - XLibre X server, built Xvfb-only (headless software framebuffer) # THE crux port of the desktop initiative. No hardware/DRM/GL DDX - just Xvfb, # which x11vnc then bridges to VNC. XLibre has no illumos upstream target, so # this port carries Hammerhead/illumos portability patches (see patches/). # https://github.com/X11Libre/xserver [package] name = "xlibre-xserver" version = "25.1.8" release = 1 description = "XLibre X server (Xvfb-only headless build)" url = "https://github.com/X11Libre/xserver" license = "MIT" maintainer = "Chris Tusa " arch = "x86_64" [dependencies] runtime = ["pixman", "libX11", "libXfont2", "libxkbfile", "libXau", "libXdmcp", "libXext", "font-util", "xkeyboard-config", "xkbcomp", "xauth"] build = ["pixman", "xorgproto", "xtrans", "libXfont2", "libxkbfile", "font-util", "util-macros", "libX11", "libXau", "libXdmcp", "libXext", "libXfixes"] [[source]] file = "xlibre-xserver-25.1.8.tar.gz" urls = ["https://github.com/X11Libre/xserver/archive/refs/tags/xlibre-xserver-25.1.8.tar.gz"] checksum = "18091f53e8700801b61f0d20c30d850d1060cb31f6a0d2046249bb413809ae16" [build] parallel = true Treat Hammerhead like Solaris/illumos in the os-layer meson build. Meson derives host_machine.system() from uname sysname, which on Hammerhead is "hammerhead", not "sunos". The os/ static library's Solaris branch (which adds -lsocket/-lnsl and the _XOPEN_SOURCE/__EXTENSIONS__ defines needed for struct msghdr.msg_control and the XPG socket API) therefore never fires, producing undefined socket()/gethostbyname() symbols at link time. Hammerhead IS illumos, so extend the guard to match its sysname. --- a/os/meson.build +++ b/os/meson.build @@ -63,7 +63,7 @@ os_c_args = [] # eg. struct msghdr -> msg_control -if host_machine.system() == 'sunos' +if host_machine.system() == 'sunos' or host_machine.system() == 'hammerhead' os_c_args += '-D_XOPEN_SOURCE=1' os_c_args += '-D_XOPEN_SOURCE_EXTENDED=1' os_c_args += '-D__EXTENSIONS__' Fix inverted re-arm check in the illumos event-ports (PORT_SOURCE_FD) ospoll backend - the listening socket only ever accepted exactly one client for the lifetime of the server. Root cause (found 2026-07-22, hh-alpha9, Task 8 M5 integration test): illumos event ports are one-shot per delivered event - once port_getn() returns an event for a PORT_SOURCE_FD object, that fd is automatically dissociated from the port and MUST be re-associated (port_associate() again, done here via epoll_mod()) to keep receiving further events on it. ospoll_wait()'s PORT-backend dispatch loop re-arms level-triggered fds with: if (osfd->trigger == ospoll_trigger_level && !xorg_list_is_empty(&osfd->deleted)) { epoll_mod(ospoll, osfd); } osfd->deleted is the intrusive list node ospoll_remove() links onto ospoll->deleted when an fd is torn down (see the xorg_list_add call right after port_dissociate() in ospoll_remove()). So xorg_list_is_empty(&osfd->deleted) is true exactly when this specific fd has NOT just been removed by its own callback - i.e. it's still a live, valid fd safe to re-arm. The listening socket is a level-triggered fd that lives for the entire server lifetime and is never removed, so its deleted node is always empty. With the `!` in front, the condition only fires when the fd HAS just been deleted (backwards - re-arming an fd that's about to be freed), and never fires for the common "still alive" case. Net effect: the listen socket's single initial port_associate() (done at ospoll_add time) gets consumed by the first accept() event and is never renewed, so every connection after the first sits unnoticed in the kernel accept backlog forever. Confirmed via truss -p : after the first client's full connection setup, port_getn() goes back to sleeping and no further accept(4, ...) call is ever made, even though a second client's connect() has already completed at the socket layer (visible in `netstat -f unix` as a live but un-accepted pair). Fix: drop the negation so accepting fds get re-armed, and only skip fds that were actually just torn down. --- a/os/ospoll.c +++ b/os/ospoll.c @@ -638,7 +638,7 @@ osfd->callback(osfd->fd, xevents, osfd->data); if (osfd->trigger == ospoll_trigger_level && - !xorg_list_is_empty(&osfd->deleted)) { + xorg_list_is_empty(&osfd->deleted)) { epoll_mod(ospoll, osfd); } } #!/bin/sh # Build script for XNEdit 1.6.3 (classic NEdit-style, target-keyed plain # Makefile - NOT Template A/autotools). The top-level Makefile has no # uname-autodetect: it dispatches on an explicit `make ` name to # `makefiles/Makefile.`, so we add our own # makefiles/Makefile.hammerhead (patches/0001-add-makefile-hammerhead.patch) # rather than adapting an existing OS's file in place. set -e PORTDIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd) cd "$SRCDIR" for p in "$PORTDIR"/patches/*.patch; do [ -f "$p" ] || continue echo "==> Applying patch: $(basename "$p")" patch -p1 < "$p" done export PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig:$PREFIX/share/pkgconfig:/usr/lib/pkgconfig:$PKG_CONFIG_PATH" gmake -j${JOBS:-1} hammerhead # `install:` target respects PREFIX/DESTDIR as make ARGs (not env) - # see the openssl-vendor-wrapper DESTDIR gotcha. gmake install PREFIX="$PREFIX" DESTDIR="$PKGDIR" # XNEdit - classic NEdit-style Motif text editor # https://github.com/unixwork/xnedit [package] name = "xnedit" version = "1.6.3" release = 1 description = "NEdit-style plain text editor (Motif)" url = "https://github.com/unixwork/xnedit" license = "GPL-2.0-or-later" maintainer = "Chris Tusa " arch = "x86_64" [dependencies] runtime = ["motif", "libXt", "libX11", "libXext", "libXft", "fontconfig"] build = ["motif", "libXt", "libX11", "libXext", "libXft", "fontconfig"] [[source]] file = "xnedit-1.6.3.tar.gz" urls = ["https://github.com/unixwork/xnedit/archive/refs/tags/v1.6.3.tar.gz"] checksum = "069f4d40445ef5db636975e0f268ca11ec828bbc62bf4e6d7343d57b0697ecb0" [build] parallel = false From: Chris Tusa Subject: Add makefiles/Makefile.hammerhead XNEdit's top-level Makefile is target-based (`make `, matching a file `makefiles/Makefile.`) - there is no uname-autodetect path to adapt, only per-platform templates to add to. None of the shipped templates fit Hammerhead: Makefile.solaris hardcodes illumos paths that don't exist here (/usr/openwin/include, /usr/sfw/lib/64) and links -lsocket -lnsl (not used/needed on Hammerhead's libc); the `:sh=`-based pkg-config assignment it uses is also not portable GNU make syntax. Base this instead on the shape of Makefile.linux, pointed at /usr/local (our port prefix) and using $(shell pkg-config ...) throughout, plus the GCC14 old-C flags (-fpermissive -fcommon) and the usual illumos header-gating defines. diff --git a/makefiles/Makefile.hammerhead b/makefiles/Makefile.hammerhead new file mode 100644 index 0000000..0000000 --- /dev/null +++ b/makefiles/Makefile.hammerhead @@ -0,0 +1,26 @@ +# Makefile.hammerhead - Hammerhead (illumos-derivative, GNU toolchain) port. +# Modeled on Makefile.linux: Motif/X11/Xft/fontconfig all live under +# /usr/local (our $PREFIX) rather than /usr/X11R6 or illumos's +# /usr/openwin - use pkg-config throughout instead of hardcoded paths. +# +# GCC14 old-C compat: XNEdit/Xlt/Microline are classic pre-2015-idiom C - +# -fpermissive demotes GCC14's new implicit-decl/incompatible-pointer/ +# int-conversion errors back to warnings; -fcommon undoes GCC10+'s +# -fno-common default (tentative-definition multiple-definition errors). +# -D__EXTENSIONS__ / -D_POSIX_PTHREAD_SEMANTICS unlock the usual +# illumos-hidden POSIX/SysV prototypes and _r signatures. +CC=gcc +AR=ar + +C_OPT_FLAGS?=-O + +CFLAGS=$(C_OPT_FLAGS) -std=gnu99 -I/usr/local/include -DUSE_LPR_PRINT_CMD \ + -D__EXTENSIONS__ -D_POSIX_PTHREAD_SEMANTICS -fpermissive -fcommon \ + $(shell pkg-config --cflags xft fontconfig) + +ARFLAGS=-urs + +LIBS=$(LD_OPT_FLAGS) -L/usr/local/lib -R/usr/local/lib -lXm -lXt -lX11 \ + -lXext -lXrender -lm -lpthread $(shell pkg-config --libs xft fontconfig) + +include Makefile.common #!/bin/sh # Build script for xorgproto (Meson, Template B). Headers/pkgconfig only. set -e cd "$SRCDIR" export PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig:$PREFIX/share/pkgconfig:$PKG_CONFIG_PATH" meson setup build \ --prefix="$PREFIX" \ --libdir=lib \ --buildtype=release \ -Ddefault_library=shared ninja -C build -j${JOBS:-1} DESTDIR="$PKGDIR" ninja -C build install # xorgproto - X.Org protocol headers (all X protocol/extension headers) # https://gitlab.freedesktop.org/xorg/proto/xorgproto [package] name = "xorgproto" version = "2025.1" release = 1 description = "X.Org protocol headers (xproto and all extension protocol headers)" url = "https://xorg.freedesktop.org/releases/individual/proto/" license = "MIT" maintainer = "Chris Tusa " arch = "x86_64" [dependencies] runtime = [] build = ["util-macros"] [[source]] file = "xorgproto-2025.1.tar.xz" urls = ["https://xorg.freedesktop.org/releases/individual/proto/xorgproto-2025.1.tar.xz"] checksum = "56898c716c0578df8a2d828c9c3e5c528277705c0484381a81960fe1a67668e8" [build] parallel = true #!/bin/sh # Build script for xrdb (autotools, Template A + runtime cpp pin). set -e cd "$SRCDIR" # MANDATORY libtool fix (Task 4a, 2026-07-22): see libXau/build.sh for the # full explanation. Piggyback hammerhead onto the kopensolaris arm. if [ -f configure ]; then sed -i -E 's/(kopensolaris\*-gnu)([^)]*\))/\1 | hammerhead*\2/' configure fi export PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig:$PREFIX/share/pkgconfig:/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH" export CFLAGS="${CFLAGS} -I$PREFIX/include -D__EXTENSIONS__ -D_POSIX_PTHREAD_SEMANTICS" export LDFLAGS="${LDFLAGS} -L$PREFIX/lib -R$PREFIX/lib" # xrdb pipes resource files through cpp at RUNTIME, not just build time. # configure's AC_PATH_PROG probe would find Hammerhead's /usr/bin/cpp via # PATH anyway, but pin it explicitly so the result doesn't depend on PATH # search order across build hosts. ./configure \ --prefix="$PREFIX" \ --build="$BUILD_TRIPLE" \ --host="$BUILD_TRIPLE" \ --sysconfdir="$SYSCONFDIR" \ --disable-static \ --with-cpp=/usr/bin/cpp gmake -j${JOBS:-1} gmake install DESTDIR="$PKGDIR" # xrdb - X server resource database utility # https://gitlab.freedesktop.org/xorg/app/xrdb # # hammerhead-xdm's Xsession/greeter uses xrdb to load # /usr/local/lib/X11/xdm/Xresources onto the X server's RESOURCE_MANAGER so # the xlogin greeter picks up the Zygaena teal branding + greeting instead of # the default white box. See docs/roadmap/DESKTOP_XLIBRE_XDM_GREETER_PLAN.md. # # xrdb pipes resource files through a C preprocessor at RUNTIME (not just # build time). configure's AC_PATH_PROG cpp probe searches # $PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib, # which would find Hammerhead's /usr/bin/cpp anyway, but build.sh pins # --with-cpp=/usr/bin/cpp explicitly for a deterministic, host-independent # result rather than relying on PATH search order. [package] name = "xrdb" version = "1.2.3" release = 1 description = "X server resource database utility (xdm greeter branding)" url = "https://xorg.freedesktop.org/releases/individual/app/" license = "MIT" maintainer = "Chris Tusa " arch = "x86_64" [dependencies] runtime = ["libX11", "libXmu"] build = ["libX11", "libXmu", "xorgproto", "util-macros"] [[source]] file = "xrdb-1.2.3.tar.xz" urls = ["https://xorg.freedesktop.org/releases/individual/app/xrdb-1.2.3.tar.xz"] checksum = "c88f560243278c896ce4fc92ae5a45a2b505a316ffa427fe55b02e5d5914c4e4" [build] parallel = true #!/bin/sh # Build script for xsetroot (autotools, Template A verbatim). set -e cd "$SRCDIR" # MANDATORY libtool fix (Task 4a, 2026-07-22): see libXau/build.sh for the # full explanation. Piggyback hammerhead onto the kopensolaris arm. if [ -f configure ]; then sed -i -E 's/(kopensolaris\*-gnu)([^)]*\))/\1 | hammerhead*\2/' configure fi export PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig:$PREFIX/share/pkgconfig:/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH" export CFLAGS="${CFLAGS} -I$PREFIX/include -D__EXTENSIONS__ -D_POSIX_PTHREAD_SEMANTICS" export LDFLAGS="${LDFLAGS} -L$PREFIX/lib -R$PREFIX/lib" ./configure \ --prefix="$PREFIX" \ --build="$BUILD_TRIPLE" \ --host="$BUILD_TRIPLE" \ --sysconfdir="$SYSCONFDIR" \ --disable-static gmake -j${JOBS:-1} gmake install DESTDIR="$PKGDIR" # xsetroot - X.Org root window utility (solid color / bitmap / cursor) # https://gitlab.freedesktop.org/xorg/app/xsetroot # # hammerhead-xdm's Xsetup_0 execs /usr/local/bin/xsetroot to paint a solid # backdrop before the xlogin greeter appears (Task 4 finding: binary was # referenced but never ported). See docs/roadmap/DESKTOP_XLIBRE_XDM_GREETER_PLAN.md. [package] name = "xsetroot" version = "1.1.4" release = 1 description = "X.Org root window utility (solid color / bitmap / cursor)" url = "https://xorg.freedesktop.org/releases/individual/app/" license = "MIT" maintainer = "Chris Tusa " arch = "x86_64" [dependencies] runtime = ["libX11", "libXmu", "libXcursor"] build = ["libX11", "libXmu", "libXcursor", "xbitmaps", "xorgproto", "util-macros"] [[source]] file = "xsetroot-1.1.4.tar.xz" urls = ["https://xorg.freedesktop.org/releases/individual/app/xsetroot-1.1.4.tar.xz"] checksum = "1315a3f7e9abe06357363b93461e272601f67225ce0bc075c430cce35073362b" [build] parallel = true #!/bin/sh # Build script for xtrans (autotools, Template A). Header/source only, no shared lib. set -e cd "$SRCDIR" export PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig:$PREFIX/share/pkgconfig:$PKG_CONFIG_PATH" export CFLAGS="${CFLAGS} -I$PREFIX/include" export LDFLAGS="${LDFLAGS} -L$PREFIX/lib -R$PREFIX/lib" ./configure \ --prefix="$PREFIX" \ --build="$BUILD_TRIPLE" \ --host="$BUILD_TRIPLE" \ --sysconfdir="$SYSCONFDIR" \ --disable-static gmake -j${JOBS:-1} gmake install DESTDIR="$PKGDIR" # xtrans - X transport library (header/source only, no compiled shared lib) # https://gitlab.freedesktop.org/xorg/lib/libxtrans [package] name = "xtrans" version = "1.6.0" release = 1 description = "X transport library headers used by X libs/server for network transport" url = "https://xorg.freedesktop.org/releases/individual/lib/" license = "MIT" maintainer = "Chris Tusa " arch = "x86_64" [dependencies] runtime = [] build = ["util-macros"] [[source]] file = "xtrans-1.6.0.tar.xz" urls = ["https://xorg.freedesktop.org/releases/individual/lib/xtrans-1.6.0.tar.xz"] checksum = "faafea166bf2451a173d9d593352940ec6404145c5d1da5c213423ce4d359e92" [build] parallel = true #!/bin/bash # Build script for XZ Utils set -e cd "$SRCDIR" # Fix illumos gnulib compatibility issues (if present) for f in lib/localename-unsafe.c lib/localename.c; do if [ -f "$f" ]; then sed -i 's/extern char \* getlocalename_l/extern const char * getlocalename_l/' "$f" fi done ./configure \ --prefix=$PREFIX \ --build=$BUILD_TRIPLE \ --host=$BUILD_TRIPLE \ --disable-nls # Fix illumos memset_s false detection if present for config in lib/config.h config.h; do if [ -f "$config" ]; then sed -i 's/#define HAVE_MEMSET_S 1/\/* #undef HAVE_MEMSET_S - illumos has it as macro only *\//' "$config" fi done gmake -j${JOBS:-1} gmake install DESTDIR="$PKGDIR" # XZ Utils - LZMA compression utility # https://tukaani.org/xz/ [package] name = "xz" version = "5.8.2" release = 1 description = "XZ Utils - LZMA compression utility" url = "https://tukaani.org/xz/" license = "LGPL-2.1" maintainer = "Chris Tusa " arch = "x86_64" [dependencies] runtime = [] build = [] [[source]] file = "xz-5.8.2.tar.gz" urls = ["https://github.com/tukaani-project/xz/releases/download/v5.8.2/xz-5.8.2.tar.gz"] checksum = "ce09c50a5962786b83e5da389c90dd2c15ecd0980a258dd01f70f9e7ce58a8f1" [build] parallel = true #!/bin/bash # Build script for zlib # Compression library - no external dependencies set -e cd "$SRCDIR" # zlib uses a custom configure script, not autoconf ./configure --prefix=$PREFIX --shared gmake -j${JOBS:-1} gmake install DESTDIR="$PKGDIR" # Remove static library to save space (optional) # rm -f "$PKGDIR$PREFIX/lib/libz.a" # zlib - General-purpose compression library # https://zlib.net [package] name = "zlib" version = "1.3.1" release = 1 description = "General-purpose lossless data compression library" url = "https://zlib.net" license = "Zlib" maintainer = "Chris Tusa " arch = "x86_64" [dependencies] runtime = [] build = [] [[source]] file = "zlib-1.3.1.tar.gz" urls = ["https://zlib.net/zlib-1.3.1.tar.gz"] checksum = "9a93b2b7dfdac77ceba5a558a580e74667dd6fede4585b91eefb60f03b72df23" [build] parallel = true jobs = 0