|
root / base / xnedit / patches
patches Plain Text 48 lines 2.1 KB
 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
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