public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Marek Szuba" <marecki@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: media-gfx/darktable/files/, media-gfx/darktable/
Date: Tue, 28 Feb 2023 13:12:55 +0000 (UTC)	[thread overview]
Message-ID: <1677589960.05e28cce9d058d40e7d2001c1202b315b8a6742d.marecki@gentoo> (raw)

commit:     05e28cce9d058d40e7d2001c1202b315b8a6742d
Author:     Marek Szuba <marecki <AT> gentoo <DOT> org>
AuthorDate: Tue Feb 28 12:07:15 2023 +0000
Commit:     Marek Szuba <marecki <AT> gentoo <DOT> org>
CommitDate: Tue Feb 28 13:12:40 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=05e28cce

media-gfx/darktable: fix rawspeed CPU-property detection on musl

For page-cache size, the sys-libs/musl version currently in the tree
does support the relevant syscall so just make sure the test program
recognises this correctly.

For cache-line length, it does not presently seem to be possible to
look this up on a musl system so have CMake fall back to the hard-coded
default. It can already do so when in "build binary package" mode so it
has been a simple matter of extending one condition to check for the
ebuild-specified "am I linking against musl?" option.

Closes: https://bugs.gentoo.org/832027
Signed-off-by: Marek Szuba <marecki <AT> gentoo.org>

 media-gfx/darktable/darktable-4.2.1.ebuild         |  2 ++
 .../files/darktable-4.2.1_cmake-musl.patch         | 22 ++++++++++++++++++++++
 2 files changed, 24 insertions(+)

diff --git a/media-gfx/darktable/darktable-4.2.1.ebuild b/media-gfx/darktable/darktable-4.2.1.ebuild
index c9c57caa2f1f..aba89cc810c2 100644
--- a/media-gfx/darktable/darktable-4.2.1.ebuild
+++ b/media-gfx/darktable/darktable-4.2.1.ebuild
@@ -98,6 +98,7 @@ PATCHES=(
 	"${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
+	"${FILESDIR}"/${PN}-4.2.1_cmake-musl.patch
 )
 
 S="${WORKDIR}/${P/_/~}"
@@ -140,6 +141,7 @@ src_configure() {
 		-DDONT_USE_INTERNAL_LUA=ON
 		-DRAWSPEED_ENABLE_LTO=$(usex lto)
 		-DRAWSPEED_ENABLE_WERROR=OFF
+		-DRAWSPEED_MUSL_SYSTEM=$(usex elibc_musl)
 		-DTESTBUILD_OPENCL_PROGRAMS=OFF
 		-DUSE_AVIF=$(usex avif)
 		-DUSE_CAMERA_SUPPORT=$(usex gphoto2)

diff --git a/media-gfx/darktable/files/darktable-4.2.1_cmake-musl.patch b/media-gfx/darktable/files/darktable-4.2.1_cmake-musl.patch
new file mode 100644
index 000000000000..33ad7f647752
--- /dev/null
+++ b/media-gfx/darktable/files/darktable-4.2.1_cmake-musl.patch
@@ -0,0 +1,22 @@
+--- a/src/external/rawspeed/cmake/Modules/cpu-cache-line-size.cmake
++++ b/src/external/rawspeed/cmake/Modules/cpu-cache-line-size.cmake
+@@ -2,7 +2,7 @@
+ 
+ unset(RAWSPEED_CACHELINESIZE)
+ 
+-if(BINARY_PACKAGE_BUILD)
++if(BINARY_PACKAGE_BUILD OR RAWSPEED_MUSL_SYSTEM)
+   message(STATUS "Performing binary package build, using hardcoded value.")
+ else()
+   try_run(RAWSPEED_CACHELINESIZE_EXITCODE RAWSPEED_CACHELINESIZE_COMPILED
+--- a/src/external/rawspeed/cmake/Modules/cpu-page-size.cpp
++++ b/src/external/rawspeed/cmake/Modules/cpu-page-size.cpp
+@@ -4,7 +4,7 @@
+ #include <unistd.h> // for _POSIX_C_SOURCE, sysconf, _SC_PAGESIZE
+ #endif
+ 
+-#if (defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 1) || defined(__APPLE__)
++#if defined(_SC_PAGESIZE)
+ 
+ int main() {
+   long val = ::sysconf(_SC_PAGESIZE);


             reply	other threads:[~2023-02-28 13:12 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-28 13:12 Marek Szuba [this message]
  -- strict thread matches above, loose matches on Subject: below --
2023-10-22 11:03 [gentoo-commits] repo/gentoo:master commit in: media-gfx/darktable/files/, media-gfx/darktable/ Marek Szuba
2023-06-08 14:05 Andreas Sturmlechner
2023-03-30 11:49 Marek Szuba
2022-11-03 23:12 Marek Szuba
2021-11-20 10:37 Marek Szuba
2021-11-07 23:08 Sam James
2021-07-21 19:45 Marek Szuba
2020-12-24 13:10 Marek Szuba
2020-06-18 12:36 Marek Szuba
2019-09-15 23:06 Andreas Sturmlechner
2017-12-31 14:05 Patrice Clement

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=1677589960.05e28cce9d058d40e7d2001c1202b315b8a6742d.marecki@gentoo \
    --to=marecki@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