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
This commit is contained in:
Robert Clausecker 2025-01-01 16:32:57 +00:00
parent ea9360a24c
commit c48a395418
3 changed files with 34 additions and 2 deletions

View file

@ -1,5 +1,6 @@
PORTNAME= lagrange PORTNAME= lagrange
DISTVERSION= 1.17.6 DISTVERSION= 1.17.6
PORTREVISION= 1
CATEGORIES= www CATEGORIES= www
MASTER_SITES= https://git.skyjake.fi/gemini/${PORTNAME}/releases/download/v${DISTVERSION}/ 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= BSD2CLAUSE
LICENSE_FILE= ${WRKSRC}/LICENSE.md 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 \ LIB_DEPENDS= libfribidi.so:converters/fribidi \
libharfbuzz.so:print/harfbuzz \ libharfbuzz.so:print/harfbuzz \
libmpg123.so:audio/mpg123 \ libmpg123.so:audio/mpg123 \
@ -24,11 +26,18 @@ BROKEN_SSL_REASON_libressl= needs features only available in OpenSSL
USE_SDL= sdl2 USE_SDL= sdl2
USE_XORG= ice sm x11 xext USE_XORG= ice sm x11 xext
CFLAGS+= -I${LOCALBASE}/include/stb
CMAKE_ARGS+= -DTFDN_ENABLE_WARN_ERROR=OFF 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_DESC= Enable SSE4.1 support
SSE41_CMAKE_ON= -DTFDN_ENABLE_SSE41:BOOL=ON SSE41_CMAKE_ON= -DTFDN_ENABLE_SSE41:BOOL=ON
post-extract:
${RM} ${WRKSRC}/src/stb_*.h
.include <bsd.port.mk> .include <bsd.port.mk>

View file

@ -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

View file

@ -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)