diff options
author | Marek Szuba <marecki@gentoo.org> | 2020-06-18 18:26:54 +0200 |
---|---|---|
committer | Marek Szuba <marecki@gentoo.org> | 2020-06-18 18:29:21 +0200 |
commit | ba35b96b501f53471cc61bdc9d518b1f48d17ef7 (patch) | |
tree | 6c24673c79d4fd429f62cb8accc3b467af91418e /media-gfx/darktable | |
parent | media-gfx/darktable: allow installation of base-curve and noise-profile tools (diff) | |
download | gentoo-ba35b96b501f53471cc61bdc9d518b1f48d17ef7.tar.gz gentoo-ba35b96b501f53471cc61bdc9d518b1f48d17ef7.tar.bz2 gentoo-ba35b96b501f53471cc61bdc9d518b1f48d17ef7.zip |
media-gfx/darktable: prevent CMake from overriding march and mtune
Closes: https://bugs.gentoo.org/692786
Signed-off-by: Marek Szuba <marecki@gentoo.org>
Diffstat (limited to 'media-gfx/darktable')
-rw-r--r-- | media-gfx/darktable/darktable-3.0.2-r1.ebuild | 1 | ||||
-rw-r--r-- | media-gfx/darktable/files/darktable-3.0.2_cmake-march-autodetection.patch | 26 |
2 files changed, 27 insertions, 0 deletions
diff --git a/media-gfx/darktable/darktable-3.0.2-r1.ebuild b/media-gfx/darktable/darktable-3.0.2-r1.ebuild index 0fe3792386c9..23865b736e6a 100644 --- a/media-gfx/darktable/darktable-3.0.2-r1.ebuild +++ b/media-gfx/darktable/darktable-3.0.2-r1.ebuild @@ -70,6 +70,7 @@ RDEPEND="${COMMON_DEPEND} PATCHES=( "${FILESDIR}"/"${PN}"-find-opencl-header.patch + "${FILESDIR}"/${PN}-3.0.2_cmake-march-autodetection.patch "${FILESDIR}"/${PN}-3.0.2_cmake-opencl-kernel-loop.patch "${FILESDIR}"/${PN}-3.0.2_jsonschema-automagic.patch ) diff --git a/media-gfx/darktable/files/darktable-3.0.2_cmake-march-autodetection.patch b/media-gfx/darktable/files/darktable-3.0.2_cmake-march-autodetection.patch new file mode 100644 index 000000000000..8ad4f0e9329f --- /dev/null +++ b/media-gfx/darktable/files/darktable-3.0.2_cmake-march-autodetection.patch @@ -0,0 +1,26 @@ +Darktable and RawSpeed upstream support two build modes: if BINARY_PACKAGE_BUILD==1 +they pass -mtune=generic to the compiler, otherwise they use -march=native. +In either case, these options override externally set CFLAGS. + +Disable this behaviour so that the users' settings provided to the ebuild by Portage +are respected. + +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -521,7 +521,7 @@ + set(DT_REQ_INSTRUCTIONS "-msse2") + endif() + +- include(march-mtune) ++ set(MARCH "") + + #if(NOT BUILD_SSE2_CODEPATHS) + # set(MARCH "${MARCH} -mno-sse2 -D__DISABLE_SSE2__ -U__SSE2__ -D__DISABLE_SSE__ -U__SSE__") +--- a/src/external/rawspeed/cmake/compiler-flags.cmake ++++ b/src/external/rawspeed/cmake/compiler-flags.cmake +@@ -1,5 +1,4 @@ + include(CheckCXXCompilerFlag) +-include(CpuMarch) + include(CheckCXXCompilerFlagAndEnableIt) + + # yes, need to keep both the CMAKE_CXX_FLAGS and CMAKE_CXX_STANDARD. |