From: "Andreas Sturmlechner" <asturm@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: media-sound/supercollider/files/, media-sound/supercollider/
Date: Wed, 31 Jan 2024 11:16:32 +0000 (UTC) [thread overview]
Message-ID: <1706699728.c153dde590d03a7cae249141569578a253399bfb.asturm@gentoo> (raw)
commit: c153dde590d03a7cae249141569578a253399bfb
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Tue Jan 30 23:37:59 2024 +0000
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Wed Jan 31 11:15:28 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c153dde5
media-sound/supercollider: Fix ccache automagic
See also: https://github.com/supercollider/supercollider/pull/6209
Closes: https://bugs.gentoo.org/922095
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
.../files/supercollider-3.13.0-no-ccache.patch | 169 +++++++++++++++++++++
.../supercollider/supercollider-3.13.0.ebuild | 2 +
2 files changed, 171 insertions(+)
diff --git a/media-sound/supercollider/files/supercollider-3.13.0-no-ccache.patch b/media-sound/supercollider/files/supercollider-3.13.0-no-ccache.patch
new file mode 100644
index 000000000000..ad3b03509e61
--- /dev/null
+++ b/media-sound/supercollider/files/supercollider-3.13.0-no-ccache.patch
@@ -0,0 +1,169 @@
+From bab60d91bd362fd1e46b79d64aaba747fe7c60fa Mon Sep 17 00:00:00 2001
+From: Andreas Sturmlechner <asturm@gentoo.org>
+Date: Wed, 31 Jan 2024 00:31:11 +0100
+Subject: [PATCH] Make ccache detection an option
+
+Arguably it should not even be enabled by default,
+but at least it should be optional.
+
+Consolidate ccache detection in one block.
+
+Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
+---
+ CMakeLists.txt | 122 +++++++++++++++++++++++++------------------------
+ 1 file changed, 62 insertions(+), 60 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index ad5ea5b49..73411ae9e 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -46,32 +46,6 @@ CONFIGURE_FILE(
+ "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
+ IMMEDIATE @ONLY)
+
+-# workaround for using ccache with Xcode generator
+-# thanks to Craig Scott: https://crascit.com/2016/04/09/using-ccache-with-cmake/
+-get_property(RULE_LAUNCH_COMPILE GLOBAL PROPERTY RULE_LAUNCH_COMPILE)
+-if(RULE_LAUNCH_COMPILE AND CMAKE_GENERATOR STREQUAL "Xcode")
+-
+- # find ccache
+- find_program(CCACHE_PROGRAM ccache)
+-
+- message(STATUS "Xcode and ccache detected: using ccache to speed up build process")
+-
+- # Set up wrapper scripts
+- set(SC_LAUNCH_C_SCRIPT "${CMAKE_BINARY_DIR}/launch-c")
+- set(SC_LAUNCH_CXX_SCRIPT "${CMAKE_BINARY_DIR}/launch-cxx")
+-
+- configure_file("cmake_modules/launch-c.in" launch-c)
+- configure_file("cmake_modules/launch-cxx.in" launch-cxx)
+- execute_process(COMMAND chmod a+rx "${SC_LAUNCH_C_SCRIPT}" "${SC_LAUNCH_CXX_SCRIPT}")
+-
+- # Set Xcode project attributes to route compilation and linking
+- # through our scripts
+- set(CMAKE_XCODE_ATTRIBUTE_CC "${SC_LAUNCH_C_SCRIPT}")
+- set(CMAKE_XCODE_ATTRIBUTE_CXX "${SC_LAUNCH_CXX_SCRIPT}")
+- set(CMAKE_XCODE_ATTRIBUTE_LD "${SC_LAUNCH_C_SCRIPT}")
+- set(CMAKE_XCODE_ATTRIBUTE_LDPLUSPLUS "${SC_LAUNCH_CXX_SCRIPT}")
+-endif()
+-
+ ADD_CUSTOM_TARGET(uninstall
+ "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake")
+
+@@ -147,44 +121,11 @@ endif()
+
+ add_definitions(-DBOOST_CHRONO_HEADER_ONLY -DBOOST_CONFIG_SUPPRESS_OUTDATED_MESSAGE)
+
+-
+-#############################################
+-# Detect CCache
+-
+-find_program(CCacheExectuable ccache)
+-if( CCacheExectuable )
+- # only used with >=cmake-3.4
+- set( CMAKE_C_COMPILER_LAUNCHER "${CCacheExectuable}" )
+- set( CMAKE_CXX_COMPILER_LAUNCHER "${CCacheExectuable}" )
+- if(NOT CMAKE_GENERATOR MATCHES "Xcode" AND (NOT CMAKE_GENERATOR MATCHES "Visual Studio")) # we already post a message when using Xcode or MSVC
+- message(STATUS "Found ccache at ${CCacheExectuable}: using ccache to speed up build process")
+- endif()
+-
+- # fix for Visual Studio adapted from https://github.com/ccache/ccache/wiki/MS-Visual-Studio#usage
+- # NOTE: there is an issue with ccache installed from chocolatey
+- # since chocolatey puts a "shim" as opposed to the actual executable in the PATH
+- # the solution is to add the path to the actual ccache executable earlier in the path
+- # e.g. in bash: export PATH=`echo c:/ProgramData/chocolatey/lib/ccache/tools/ccache*`:$PATH
+- if (MSVC)
+- message(STATUS "Found ccache at ${CCacheExectuable}: using ccache with MSVC to speed up build process")
+- file(COPY_FILE
+- ${CCacheExectuable} ${CMAKE_BINARY_DIR}/cl.exe
+- ONLY_IF_DIFFERENT)
+-
+- set(CMAKE_VS_GLOBALS
+- "CLToolExe=cl.exe"
+- "CLToolPath=${CMAKE_BINARY_DIR}"
+- "TrackFileAccess=false"
+- "UseMultiToolTask=true"
+- "DebugInformationFormat=OldStyle"
+- )
+- endif()
+-endif()
+-
+ #############################################
+ # Options
+ option(NOVA_SIMD "Build with nova-simd support." ON)
+ option(FINAL_BUILD "Build as single source file." OFF)
++option(USE_CCACHE "Use ccache if available." ON)
+
+ option(FFT_GREEN "Use internal 'Green' FFT lib rather than FFTW. (Not recommended.)" OFF)
+
+@@ -285,6 +226,67 @@ if(APPLE)
+ option(SC_VERIFY_APP "Run verify_app on the app bundle" OFF)
+ endif()
+
++#############################################
++# Detect CCache
++
++if(USE_CCACHE)
++ # workaround for using ccache with Xcode generator
++ # thanks to Craig Scott: https://crascit.com/2016/04/09/using-ccache-with-cmake/
++ get_property(RULE_LAUNCH_COMPILE GLOBAL PROPERTY RULE_LAUNCH_COMPILE)
++ if(RULE_LAUNCH_COMPILE AND CMAKE_GENERATOR STREQUAL "Xcode")
++
++ # find ccache
++ find_program(CCACHE_PROGRAM ccache)
++
++ message(STATUS "Xcode and ccache detected: using ccache to speed up build process")
++
++ # Set up wrapper scripts
++ set(SC_LAUNCH_C_SCRIPT "${CMAKE_BINARY_DIR}/launch-c")
++ set(SC_LAUNCH_CXX_SCRIPT "${CMAKE_BINARY_DIR}/launch-cxx")
++
++ configure_file("cmake_modules/launch-c.in" launch-c)
++ configure_file("cmake_modules/launch-cxx.in" launch-cxx)
++ execute_process(COMMAND chmod a+rx "${SC_LAUNCH_C_SCRIPT}" "${SC_LAUNCH_CXX_SCRIPT}")
++
++ # Set Xcode project attributes to route compilation and linking
++ # through our scripts
++ set(CMAKE_XCODE_ATTRIBUTE_CC "${SC_LAUNCH_C_SCRIPT}")
++ set(CMAKE_XCODE_ATTRIBUTE_CXX "${SC_LAUNCH_CXX_SCRIPT}")
++ set(CMAKE_XCODE_ATTRIBUTE_LD "${SC_LAUNCH_C_SCRIPT}")
++ set(CMAKE_XCODE_ATTRIBUTE_LDPLUSPLUS "${SC_LAUNCH_CXX_SCRIPT}")
++ endif()
++
++ find_program(CCacheExectuable ccache)
++ if( CCacheExectuable )
++ # only used with >=cmake-3.4
++ set( CMAKE_C_COMPILER_LAUNCHER "${CCacheExectuable}" )
++ set( CMAKE_CXX_COMPILER_LAUNCHER "${CCacheExectuable}" )
++ if(NOT CMAKE_GENERATOR MATCHES "Xcode" AND (NOT CMAKE_GENERATOR MATCHES "Visual Studio")) # we already post a message when using Xcode or MSVC
++ message(STATUS "Found ccache at ${CCacheExectuable}: using ccache to speed up build process")
++ endif()
++
++ # fix for Visual Studio adapted from https://github.com/ccache/ccache/wiki/MS-Visual-Studio#usage
++ # NOTE: there is an issue with ccache installed from chocolatey
++ # since chocolatey puts a "shim" as opposed to the actual executable in the PATH
++ # the solution is to add the path to the actual ccache executable earlier in the path
++ # e.g. in bash: export PATH=`echo c:/ProgramData/chocolatey/lib/ccache/tools/ccache*`:$PATH
++ if (MSVC)
++ message(STATUS "Found ccache at ${CCacheExectuable}: using ccache with MSVC to speed up build process")
++ file(COPY_FILE
++ ${CCacheExectuable} ${CMAKE_BINARY_DIR}/cl.exe
++ ONLY_IF_DIFFERENT)
++
++ set(CMAKE_VS_GLOBALS
++ "CLToolExe=cl.exe"
++ "CLToolPath=${CMAKE_BINARY_DIR}"
++ "TrackFileAccess=false"
++ "UseMultiToolTask=true"
++ "DebugInformationFormat=OldStyle"
++ )
++ endif()
++ endif()
++endif()
++
+ #############################################
+ # some default libraries
+
+--
+2.43.0
+
diff --git a/media-sound/supercollider/supercollider-3.13.0.ebuild b/media-sound/supercollider/supercollider-3.13.0.ebuild
index b0e05051ca89..2b8ee8636dd3 100644
--- a/media-sound/supercollider/supercollider-3.13.0.ebuild
+++ b/media-sound/supercollider/supercollider-3.13.0.ebuild
@@ -64,6 +64,7 @@ DEPEND="${RDEPEND}
PATCHES=(
"${FILESDIR}/${P}-boost-1.84.patch" # bug 921595
"${FILESDIR}/${P}-gcc-13.patch" # bug 905127
+ "${FILESDIR}/${P}-no-ccache.patch" # bug 922095
)
src_configure() {
@@ -72,6 +73,7 @@ src_configure() {
-DINSTALL_HELP=ON
-DSYSTEM_BOOST=ON
-DSYSTEM_YAMLCPP=ON
+ -DUSE_CCACHE=OFF
-DSC_ABLETON_LINK=$(usex ableton-link)
-DSSE=$(usex cpu_flags_x86_sse)
-DSSE2=$(usex cpu_flags_x86_sse2)
next reply other threads:[~2024-01-31 11:16 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-31 11:16 Andreas Sturmlechner [this message]
-- strict thread matches above, loose matches on Subject: below --
2025-01-22 23:16 [gentoo-commits] repo/gentoo:master commit in: media-sound/supercollider/files/, media-sound/supercollider/ Andreas Sturmlechner
2024-01-31 11:16 Andreas Sturmlechner
2024-01-31 11:16 Andreas Sturmlechner
2021-01-23 17:55 Andreas Sturmlechner
2021-01-23 17:55 Andreas Sturmlechner
2019-07-16 15:57 Andreas Sturmlechner
2019-06-28 1:17 Andreas Sturmlechner
2018-01-06 2:14 Andreas Sturmlechner
2018-01-06 2:14 Andreas Sturmlechner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1706699728.c153dde590d03a7cae249141569578a253399bfb.asturm@gentoo \
--to=asturm@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox