From owner-dev-commits-ports-branches@freebsd.org Thu Apr 22 13:08:37 2021 Return-Path: Delivered-To: dev-commits-ports-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D81FA5F239A; Thu, 22 Apr 2021 13:08:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FQyR95nzTz3tdv; Thu, 22 Apr 2021 13:08:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BA0CB1A6D3; Thu, 22 Apr 2021 13:08:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13MD8bR2049212; Thu, 22 Apr 2021 13:08:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13MD8bNx049211; Thu, 22 Apr 2021 13:08:37 GMT (envelope-from git) Date: Thu, 22 Apr 2021 13:08:37 GMT Message-Id: <202104221308.13MD8bNx049211@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-branches@FreeBSD.org From: Lewis Cook Subject: git: d1b07b5de8ad - 2021Q2 - www/lagrange: Make SSE4.1 support optional MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: lcook X-Git-Repository: ports X-Git-Refname: refs/heads/2021Q2 X-Git-Reftype: branch X-Git-Commit: d1b07b5de8ad50283d2f748a674147c0cf36f3c2 Auto-Submitted: auto-generated X-BeenThere: dev-commits-ports-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the quarterly branches of the FreeBSD ports repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Apr 2021 13:08:37 -0000 The branch 2021Q2 has been updated by lcook: URL: https://cgit.FreeBSD.org/ports/commit/?id=d1b07b5de8ad50283d2f748a674147c0cf36f3c2 commit d1b07b5de8ad50283d2f748a674147c0cf36f3c2 Author: Lewis Cook AuthorDate: 2021-04-22 12:59:59 +0000 Commit: Lewis Cook 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 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 ()