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
|
#!/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 <target>` name to
# `makefiles/Makefile.<target>`, 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 <chris.tusa@leafscale.com>"
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 <chris.tusa@leafscale.com>
Subject: Add makefiles/Makefile.hammerhead
XNEdit's top-level Makefile is target-based (`make <platform>`, matching
a file `makefiles/Makefile.<platform>`) - 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
|