#!/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