1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
|
#!/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 <chris.tusa@leafscale.com>"
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
|