From owner-dev-commits-ports-all@freebsd.org Thu Apr 22 13:04:56 2021 Return-Path: Delivered-To: dev-commits-ports-all@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 7F2CA5F21AE; Thu, 22 Apr 2021 13:04:56 +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 4FQyLw3CVyz3tb3; Thu, 22 Apr 2021 13:04:56 +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 569E71A278; Thu, 22 Apr 2021 13:04:56 +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 13MD4u3L048870; Thu, 22 Apr 2021 13:04:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13MD4uPL048869; Thu, 22 Apr 2021 13:04:56 GMT (envelope-from git) Date: Thu, 22 Apr 2021 13:04:56 GMT Message-Id: <202104221304.13MD4uPL048869@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Lewis Cook Subject: git: 6a9dfe8760c7 - main - 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/main X-Git-Reftype: branch X-Git-Commit: 6a9dfe8760c745ce1710c71c797f88c2f5416b1c Auto-Submitted: auto-generated X-BeenThere: dev-commits-ports-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the ports repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Apr 2021 13:04:56 -0000 The branch main has been updated by lcook: URL: https://cgit.FreeBSD.org/ports/commit/?id=6a9dfe8760c745ce1710c71c797f88c2f5416b1c commit 6a9dfe8760c745ce1710c71c797f88c2f5416b1c Author: Lewis Cook AuthorDate: 2021-04-22 12:59:59 +0000 Commit: Lewis Cook CommitDate: 2021-04-22 13:00:20 +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. MFH: 2021Q2 --- 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 02f0f46ca5b0..21e23681ebaf 100644 --- a/www/lagrange/Makefile +++ b/www/lagrange/Makefile @@ -1,5 +1,6 @@ PORTNAME= lagrange DISTVERSION= 1.2.2 +PORTREVISION= 1 CATEGORIES= www MASTER_SITES= https://git.skyjake.fi/skyjake/${PORTNAME}/releases/download/v${DISTVERSION}/ @@ -19,6 +20,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 ()