diff options
author | Marek Szuba <marecki@gentoo.org> | 2021-07-21 20:37:08 +0100 |
---|---|---|
committer | Marek Szuba <marecki@gentoo.org> | 2021-07-21 20:45:05 +0100 |
commit | 10f3f7f638cbe55958959df5d83597c090ba5f25 (patch) | |
tree | 48f0e9aeaab85ea2cc4cd74528bd35c034b35474 /media-gfx | |
parent | x11-drivers/nvidia-drivers: extend USE=wayland warnings a bit (diff) | |
download | gentoo-10f3f7f638cbe55958959df5d83597c090ba5f25.tar.gz gentoo-10f3f7f638cbe55958959df5d83597c090ba5f25.tar.bz2 gentoo-10f3f7f638cbe55958959df5d83597c090ba5f25.zip |
media-gfx/darktable: strip down compilation of bundled libxcf
Needed to make cmake-3.21/ninja stop trying to pass LDFLAGS to ar.
Since stripping src/external/libxcf/CMakeLists.txt to the bare minimum
results in a patch about the same size as the file itself, just inject
the necessary lines to src/external/CMakeLists.txt and ignore the one in
libxcf.
Tested on both 3.4.1 and 3.6.0, with cmake versions 3.18.5 and 3.21.0;
all combinations seem to build fine.
Closes: https://bugs.gentoo.org/803053
Signed-off-by: Marek Szuba <marecki@gentoo.org>
Diffstat (limited to 'media-gfx')
-rw-r--r-- | media-gfx/darktable/darktable-3.4.1.ebuild | 1 | ||||
-rw-r--r-- | media-gfx/darktable/darktable-3.6.0.ebuild | 1 | ||||
-rw-r--r-- | media-gfx/darktable/files/darktable-3.4.1_libxcf-cmake.patch | 20 |
3 files changed, 22 insertions, 0 deletions
diff --git a/media-gfx/darktable/darktable-3.4.1.ebuild b/media-gfx/darktable/darktable-3.4.1.ebuild index 54b4518a454b..2f4bd3209de3 100644 --- a/media-gfx/darktable/darktable-3.4.1.ebuild +++ b/media-gfx/darktable/darktable-3.4.1.ebuild @@ -79,6 +79,7 @@ PATCHES=( "${FILESDIR}"/${PN}-find-opencl-header.patch "${FILESDIR}"/${PN}-3.0.2_cmake-march-autodetection.patch "${FILESDIR}"/${PN}-3.4.0_jsonschema-automagic.patch + "${FILESDIR}"/${PN}-3.4.1_libxcf-cmake.patch ) S="${WORKDIR}/${P/_/~}" diff --git a/media-gfx/darktable/darktable-3.6.0.ebuild b/media-gfx/darktable/darktable-3.6.0.ebuild index f73844b3854e..ad4c79e2d6ea 100644 --- a/media-gfx/darktable/darktable-3.6.0.ebuild +++ b/media-gfx/darktable/darktable-3.6.0.ebuild @@ -79,6 +79,7 @@ PATCHES=( "${FILESDIR}"/${PN}-find-opencl-header.patch "${FILESDIR}"/${PN}-3.0.2_cmake-march-autodetection.patch "${FILESDIR}"/${PN}-3.4.0_jsonschema-automagic.patch + "${FILESDIR}"/${PN}-3.4.1_libxcf-cmake.patch ) S="${WORKDIR}/${P/_/~}" diff --git a/media-gfx/darktable/files/darktable-3.4.1_libxcf-cmake.patch b/media-gfx/darktable/files/darktable-3.4.1_libxcf-cmake.patch new file mode 100644 index 000000000000..72ab5aa91adf --- /dev/null +++ b/media-gfx/darktable/files/darktable-3.4.1_libxcf-cmake.patch @@ -0,0 +1,20 @@ +--- a/src/external/CMakeLists.txt ++++ b/src/external/CMakeLists.txt +@@ -1,5 +1,16 @@ + if(USE_XCF) +- add_subdirectory(libxcf) ++# find_package(ZLIB REQUIRED) ++ add_library(xcf STATIC ++ "${CMAKE_CURRENT_SOURCE_DIR}/libxcf/xcf.c" ++ "${CMAKE_CURRENT_SOURCE_DIR}/libxcf/xcf.h" ++ "${CMAKE_CURRENT_SOURCE_DIR}/libxcf/xcf_names.c" ++ "${CMAKE_CURRENT_SOURCE_DIR}/libxcf/xcf_names.h" ++ ) ++ set_property(TARGET xcf PROPERTY C_STANDARD 99) ++ target_compile_definitions(xcf PRIVATE _DEFAULT_SOURCE) # needed for htobe*() ++ target_include_directories(xcf PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/libxcf") ++# target_link_libraries(xcf PUBLIC ZLIB::ZLIB) ++# target_link_libraries(xcf PUBLIC m) + endif() + + add_library(whereami STATIC "${CMAKE_CURRENT_SOURCE_DIR}/whereami/src/whereami.c") |