Date: Thu, 22 Apr 2021 13:08:37 GMT From: Lewis Cook <lcook@FreeBSD.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-branches@FreeBSD.org Subject: git: d1b07b5de8ad - 2021Q2 - www/lagrange: Make SSE4.1 support optional Message-ID: <202104221308.13MD8bNx049211@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch 2021Q2 has been updated by lcook: URL: https://cgit.FreeBSD.org/ports/commit/?id=d1b07b5de8ad50283d2f748a674147c0cf36f3c2 commit d1b07b5de8ad50283d2f748a674147c0cf36f3c2 Author: Lewis Cook <lcook@FreeBSD.org> AuthorDate: 2021-04-22 12:59:59 +0000 Commit: Lewis Cook <lcook@FreeBSD.org> CommitDate: 2021-04-22 13:07:56 +0000 www/lagrange: Make SSE4.1 support optional Older class AMD64 and i386 CPUs do not support SSE4.1, so make it opt-in instead. This is a problem since a build host may support the feature-set whilst a package consumer does not, causing an unexpected crash upon starting the application. (cherry picked from commit 6a9dfe8760c745ce1710c71c797f88c2f5416b1c) --- www/lagrange/Makefile | 6 ++++ .../files/patch-lib_the__Foundation_CheckSSE.cmake | 32 ++++++++++++++++++++++ 2 files changed, 38 insertions(+) diff --git a/www/lagrange/Makefile b/www/lagrange/Makefile index e9df8c2e494e..84d13c6409c9 100644 --- a/www/lagrange/Makefile +++ b/www/lagrange/Makefile @@ -1,6 +1,7 @@ PORTNAME= lagrange DISTVERSION= 1.2.2 +PORTREVISION= 1 CATEGORIES= www MASTER_SITES= https://git.skyjake.fi/skyjake/${PORTNAME}/releases/download/v${DISTVERSION}/ @@ -20,6 +21,11 @@ LIB_DEPENDS= libmpg123.so:audio/mpg123 \ USES= cmake compiler:c11 desktop-file-utils pkgconfig sdl ssl USE_SDL= sdl2 +OPTIONS_DEFINE= SSE41 + +SSE41_DESC= Enable SSE4.1 support +SSE41_CMAKE_ON= -DTFDN_ENABLE_SSE41:BOOL=ON + OPENSSL_LDFLAGS= -lssl -lcrypto .include <bsd.port.pre.mk> diff --git a/www/lagrange/files/patch-lib_the__Foundation_CheckSSE.cmake b/www/lagrange/files/patch-lib_the__Foundation_CheckSSE.cmake new file mode 100644 index 000000000000..20c25373b943 --- /dev/null +++ b/www/lagrange/files/patch-lib_the__Foundation_CheckSSE.cmake @@ -0,0 +1,32 @@ +Disable SSE4.1 by default and make it opt-in only. + +Older class AMD64 and i386 CPUs do not support the +feature-set, this becomes a problem when a build +hosts support it, whilst package consumers do not, +causing an instant crash upon startup. + +--- lib/the_Foundation/CheckSSE.cmake.orig 2021-04-22 10:39:48 UTC ++++ lib/the_Foundation/CheckSSE.cmake +@@ -1,22 +1 @@ + set (SSE41_FOUND NO) +-try_run ( +- sseRunCode +- sseCompiled +- ${CMAKE_CURRENT_BINARY_DIR} +- ${CMAKE_CURRENT_LIST_DIR}/ssecheck.c +- RUN_OUTPUT_VARIABLE sseOutput +-) +-string (STRIP "${sseOutput}" sseOutput) +-# message (STATUS "sseCompiled: ${sseCompiled}") +-# message (STATUS "sseRunCode: ${sseRunCode}") +-# message (STATUS "sseOutput: ${sseOutput}") +- +-if (sseCompiled AND sseOutput STREQUAL "1") +- set (SSE41_FOUND YES) +-endif () +- +-if (SSE41_FOUND) +- message (STATUS "CPU supports SSE 4.1") +-else () +- message (STATUS "CPU does not support SSE 4.1") +-endif ()
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202104221308.13MD8bNx049211>