From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id EB50C158089 for ; Thu, 16 Nov 2023 10:06:00 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id CF1132BC023; Thu, 16 Nov 2023 10:05:59 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (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) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id B431C2BC021 for ; Thu, 16 Nov 2023 10:05:59 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (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) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id CA4F7335DB5 for ; Thu, 16 Nov 2023 10:05:58 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id E1BA71397 for ; Thu, 16 Nov 2023 10:05:56 +0000 (UTC) From: "David Roman" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "David Roman" Message-ID: <1699853714.7d9a1b2df949a03883e81d47bda176054480b14a.davidroman@gentoo> Subject: [gentoo-commits] repo/proj/guru:master commit in: games-engines/fs2_open/files/, games-engines/fs2_open/ X-VCS-Repository: repo/proj/guru X-VCS-Files: games-engines/fs2_open/files/fs2_open-23.2.1-dont-ignore-user-cflags.patch games-engines/fs2_open/fs2_open-23.2.1-r1.ebuild games-engines/fs2_open/fs2_open-23.2.1.ebuild X-VCS-Directories: games-engines/fs2_open/files/ games-engines/fs2_open/ X-VCS-Committer: davidroman X-VCS-Committer-Name: David Roman X-VCS-Revision: 7d9a1b2df949a03883e81d47bda176054480b14a X-VCS-Branch: master Date: Thu, 16 Nov 2023 10:05:56 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 8eafa531-32bd-4784-9fab-476fc7cff632 X-Archives-Hash: 805aced07a25b4422df1db1d3459064c commit: 7d9a1b2df949a03883e81d47bda176054480b14a Author: Jonas Frei pm me> AuthorDate: Mon Nov 13 05:33:31 2023 +0000 Commit: David Roman gmail com> CommitDate: Mon Nov 13 05:35:14 2023 +0000 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=7d9a1b2d games-engines/fs2_open: Added patch to respect -O flags, fixes 887671 This new patch is to be removed on the next release, it was implemented upstream. Closes: https://bugs.gentoo.org/887671 Signed-off-by: Jonas Frei pm.me> .../fs2_open-23.2.1-dont-ignore-user-cflags.patch | 117 +++++++++++++++++++++ ...pen-23.2.1.ebuild => fs2_open-23.2.1-r1.ebuild} | 1 + 2 files changed, 118 insertions(+) diff --git a/games-engines/fs2_open/files/fs2_open-23.2.1-dont-ignore-user-cflags.patch b/games-engines/fs2_open/files/fs2_open-23.2.1-dont-ignore-user-cflags.patch new file mode 100644 index 0000000000..c0f29d05f8 --- /dev/null +++ b/games-engines/fs2_open/files/fs2_open-23.2.1-dont-ignore-user-cflags.patch @@ -0,0 +1,117 @@ +From 3ebdc51c4814648c2171440484c2d429899d3ab4 Mon Sep 17 00:00:00 2001 +From: Jonas Frei +Date: Tue, 7 Nov 2023 21:21:28 +0100 +Subject: [PATCH] Don't ignore user-set -O* flags + +--- + cmake/toolchain-clang.cmake | 37 +++++++++++++++++++++++++++++-------- + cmake/toolchain-gcc.cmake | 34 ++++++++++++++++++++++++++++------ + 2 files changed, 57 insertions(+), 14 deletions(-) + +--- a/cmake/toolchain-clang.cmake ++++ b/cmake/toolchain-clang.cmake +@@ -83,20 +83,41 @@ if(SUPPORTS_SHIFT_NEGATIVE_VALUE) + set(COMPILER_FLAGS "${COMPILER_FLAGS} -Wno-shift-negative-value") + endif() + +-set(COMPILER_FLAGS_RELEASE "-O2 -Wno-unused-variable -Wno-unused-parameter") ++# Check if there is a user-set optimisation flag ++string(REGEX MATCH "-O[a-zA-Z|0-9]+" CXX_OPT_FLAG ${CXX_BASE_FLAGS}) ++string(REGEX MATCH "-O[a-zA-Z|0-9]+" C_OPT_FLAG ${C_BASE_FLAGS}) ++ ++# If no user-set opt flag, set -O2 and -Og ++if ("${CXX_OPT_FLAG}" STREQUAL "") ++ set(CXX_OPT_FLAG_RELEASE "-O2") ++ set(CXX_OPT_FLAG_DEBUG "-Og") ++else() ++ set(CXX_OPT_FLAG_RELEASE "${CXX_OPT_FLAG}") ++ set(CXX_OPT_FLAG_DEBUG "${CXX_OPT_FLAG}") ++endif() ++if ("${C_OPT_FLAG}" STREQUAL "") ++ set(C_OPT_FLAG_RELEASE "-O2") ++ set(C_OPT_FLAG_DEBUG "-Og") ++else() ++ set(C_OPT_FLAG_RELEASE "${C_OPT_FLAG}") ++ set(C_OPT_FLAG_DEBUG "${C_OPT_FLAG}") ++endif() + +-set(COMPILER_FLAGS_DEBUG "-Og -g -Wshadow") ++set(CXX_FLAGS_RELEASE "${CXX_OPT_FLAG_RELEASE} -Wno-unused-variable -Wno-unused-parameter") ++set(C_FLAGS_RELEASE "${C_OPT_FLAG_RELEASE} -Wno-unused-variable -Wno-unused-parameter") + +-# Always use the base flags and add our compiler flags at the bacl ++set(CXX_FLAGS_DEBUG "${CXX_OPT_FLAG_DEBUG} -g -Wshadow") ++set(C_FLAGS_DEBUG "${C_OPT_FLAG_DEBUG} -g -Wshadow") ++ ++# Always use the base flags and add our compiler flags at the back + set(CMAKE_CXX_FLAGS "${CXX_BASE_FLAGS} ${COMPILER_FLAGS}") + set(CMAKE_C_FLAGS "${C_BASE_FLAGS} ${COMPILER_FLAGS}") + +-set(CMAKE_CXX_FLAGS_RELEASE ${COMPILER_FLAGS_RELEASE}) +-set(CMAKE_C_FLAGS_RELEASE ${COMPILER_FLAGS_RELEASE}) +- +-set(CMAKE_CXX_FLAGS_DEBUG ${COMPILER_FLAGS_DEBUG}) +-set(CMAKE_C_FLAGS_DEBUG ${COMPILER_FLAGS_DEBUG}) ++set(CMAKE_CXX_FLAGS_RELEASE ${CXX_FLAGS_RELEASE}) ++set(CMAKE_C_FLAGS_RELEASE ${C_FLAGS_RELEASE}) + ++set(CMAKE_CXX_FLAGS_DEBUG ${CXX_FLAGS_DEBUG}) ++set(CMAKE_C_FLAGS_DEBUG ${C_FLAGS_DEBUG}) + + set(CMAKE_EXE_LINKER_FLAGS "") + +diff --git a/cmake/toolchain-gcc.cmake b/cmake/toolchain-gcc.cmake +index ca740832e..78577038c 100644 +--- a/cmake/toolchain-gcc.cmake ++++ b/cmake/toolchain-gcc.cmake +@@ -113,19 +113,41 @@ if(SUPPORTS_STRINGOP_TRUNCATION) + set(COMPILER_FLAGS "${COMPILER_FLAGS} -Wno-stringop-overflow") + endif() + +-set(COMPILER_FLAGS_RELEASE "-O2 -Wno-unused-variable -Wno-unused-but-set-variable -Wno-array-bounds -Wno-empty-body -Wno-clobbered -Wno-unused-parameter") ++# Check if there is a user-set optimisation flag ++string(REGEX MATCH "-O[a-zA-Z|0-9]+" CXX_OPT_FLAG ${CXX_BASE_FLAGS}) ++string(REGEX MATCH "-O[a-zA-Z|0-9]+" C_OPT_FLAG ${C_BASE_FLAGS}) + +-set(COMPILER_FLAGS_DEBUG "-Og -g -Wshadow") ++# If no user-set opt flag, set -O2 and -Og ++if ("${CXX_OPT_FLAG}" STREQUAL "") ++ set(CXX_OPT_FLAG_RELEASE "-O2") ++ set(CXX_OPT_FLAG_DEBUG "-Og") ++else() ++ set(CXX_OPT_FLAG_RELEASE "${CXX_OPT_FLAG}") ++ set(CXX_OPT_FLAG_DEBUG "${CXX_OPT_FLAG}") ++endif() ++if ("${C_OPT_FLAG}" STREQUAL "") ++ set(C_OPT_FLAG_RELEASE "-O2") ++ set(C_OPT_FLAG_DEBUG "-Og") ++else() ++ set(C_OPT_FLAG_RELEASE "${C_OPT_FLAG}") ++ set(C_OPT_FLAG_DEBUG "${C_OPT_FLAG}") ++endif() ++ ++set(CXX_FLAGS_RELEASE "${CXX_OPT_FLAG_RELEASE} -Wno-unused-variable -Wno-unused-but-set-variable -Wno-array-bounds -Wno-empty-body -Wno-clobbered -Wno-unused-parameter") ++set(C_FLAGS_RELEASE "${C_OPT_FLAG_RELEASE} -Wno-unused-variable -Wno-unused-but-set-variable -Wno-array-bounds -Wno-empty-body -Wno-clobbered -Wno-unused-parameter") ++ ++set(CXX_FLAGS_DEBUG "${CXX_OPT_FLAG_DEBUG} -g -Wshadow") ++set(C_FLAGS_DEBUG "${C_OPT_FLAG_DEBUG} -g -Wshadow") + + # Always use the base flags and add our compiler flags at the back + set(CMAKE_CXX_FLAGS "${CXX_BASE_FLAGS} ${COMPILER_FLAGS}") + set(CMAKE_C_FLAGS "${C_BASE_FLAGS} ${COMPILER_FLAGS}") + +-set(CMAKE_CXX_FLAGS_RELEASE ${COMPILER_FLAGS_RELEASE}) +-set(CMAKE_C_FLAGS_RELEASE ${COMPILER_FLAGS_RELEASE}) ++set(CMAKE_CXX_FLAGS_RELEASE ${CXX_FLAGS_RELEASE}) ++set(CMAKE_C_FLAGS_RELEASE ${C_FLAGS_RELEASE}) + +-set(CMAKE_CXX_FLAGS_DEBUG ${COMPILER_FLAGS_DEBUG}) +-set(CMAKE_C_FLAGS_DEBUG ${COMPILER_FLAGS_DEBUG}) ++set(CMAKE_CXX_FLAGS_DEBUG ${CXX_FLAGS_DEBUG}) ++set(CMAKE_C_FLAGS_DEBUG ${C_FLAGS_DEBUG}) + + set(CMAKE_EXE_LINKER_FLAGS "${LINKER_FLAGS}") + +-- +2.41.0 + diff --git a/games-engines/fs2_open/fs2_open-23.2.1.ebuild b/games-engines/fs2_open/fs2_open-23.2.1-r1.ebuild similarity index 98% rename from games-engines/fs2_open/fs2_open-23.2.1.ebuild rename to games-engines/fs2_open/fs2_open-23.2.1-r1.ebuild index 8c63d4680d..aa639f9588 100644 --- a/games-engines/fs2_open/fs2_open-23.2.1.ebuild +++ b/games-engines/fs2_open/fs2_open-23.2.1-r1.ebuild @@ -48,6 +48,7 @@ BDEPEND=" " PATCHES=( "${FILESDIR}/${P}-dont-build-lz4.patch" + "${FILESDIR}/${P}-dont-ignore-user-cflags.patch" "${FILESDIR}/${P}-make-arch-independent.patch" )