aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Clausecker <fuz@FreeBSD.org>2025-01-01 16:32:57 +0000
committerRobert Clausecker <fuz@FreeBSD.org>2025-01-17 12:33:29 +0000
commitc48a3954186d2bcc77aef1586533227c9252dd28 (patch)
treeaf7d64793d2832a47a6e4e567b614ffd3a9a83f2
parentea9360a24cd8dac3162801c25e9f1441e6f9f6cb (diff)
www/lagrange: fix build on armv7, touch up
- unbundle devel/stb; this fixes the build on armv7 - define option SSE41 only on x86 platforms Approved by: lcook (maintainer timeout) PR: 283773 MFH: 2025Q1
-rw-r--r--www/lagrange/Makefile13
-rw-r--r--www/lagrange/files/patch-CMakeLists.txt12
-rw-r--r--www/lagrange/files/patch-src_ui_text__stb.c11
3 files changed, 34 insertions, 2 deletions
diff --git a/www/lagrange/Makefile b/www/lagrange/Makefile
index 4fc6a162c51f..e669252e583b 100644
--- a/www/lagrange/Makefile
+++ b/www/lagrange/Makefile
@@ -1,5 +1,6 @@
PORTNAME= lagrange
DISTVERSION= 1.17.6
+PORTREVISION= 1
CATEGORIES= www
MASTER_SITES= https://git.skyjake.fi/gemini/${PORTNAME}/releases/download/v${DISTVERSION}/
@@ -10,7 +11,8 @@ WWW= https://gmi.skyjake.fi/lagrange/
LICENSE= BSD2CLAUSE
LICENSE_FILE= ${WRKSRC}/LICENSE.md
-BUILD_DEPENDS= zip>0:archivers/zip
+BUILD_DEPENDS= zip>0:archivers/zip \
+ stb>0:devel/stb
LIB_DEPENDS= libfribidi.so:converters/fribidi \
libharfbuzz.so:print/harfbuzz \
libmpg123.so:audio/mpg123 \
@@ -24,11 +26,18 @@ BROKEN_SSL_REASON_libressl= needs features only available in OpenSSL
USE_SDL= sdl2
USE_XORG= ice sm x11 xext
+CFLAGS+= -I${LOCALBASE}/include/stb
+
CMAKE_ARGS+= -DTFDN_ENABLE_WARN_ERROR=OFF
-OPTIONS_DEFINE= SSE41
+OPTIONS_DEFINE_amd64= SSE41
+OPTIONS_DEFINE_i386= SSE41
+OPTIONS_DEFINE= ${OPTIONS_DEFINE_${ARCH}}
SSE41_DESC= Enable SSE4.1 support
SSE41_CMAKE_ON= -DTFDN_ENABLE_SSE41:BOOL=ON
+post-extract:
+ ${RM} ${WRKSRC}/src/stb_*.h
+
.include <bsd.port.mk>
diff --git a/www/lagrange/files/patch-CMakeLists.txt b/www/lagrange/files/patch-CMakeLists.txt
new file mode 100644
index 000000000000..2a5b0e59cff0
--- /dev/null
+++ b/www/lagrange/files/patch-CMakeLists.txt
@@ -0,0 +1,12 @@
+--- CMakeLists.txt.orig 2025-01-01 16:28:12 UTC
++++ CMakeLists.txt
+@@ -209,9 +209,6 @@ set (SOURCES
+ src/sitespec.h
+ src/snippets.c
+ src/snippets.h
+- src/stb_image.h
+- src/stb_image_resize2.h
+- src/stb_truetype.h
+ src/updater.h
+ src/visited.c
+ src/visited.h
diff --git a/www/lagrange/files/patch-src_ui_text__stb.c b/www/lagrange/files/patch-src_ui_text__stb.c
new file mode 100644
index 000000000000..e3bc30dc6b01
--- /dev/null
+++ b/www/lagrange/files/patch-src_ui_text__stb.c
@@ -0,0 +1,11 @@
+--- src/ui/text_stb.c.orig 2025-01-01 16:30:13 UTC
++++ src/ui/text_stb.c
+@@ -82,7 +82,7 @@ - Caching FontRuns is quite effective, but there is st
+ #endif
+
+ #define STB_TRUETYPE_IMPLEMENTATION
+-#include "../stb_truetype.h"
++#include "stb_truetype.h"
+
+ iDeclareType(Font)
+ iDeclareType(Glyph)