summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYOSHIOKA Takuma <lo48576@hard-wi.red>2024-12-01 22:39:54 +0900
committerSam James <sam@gentoo.org>2024-12-01 14:55:49 +0000
commit7542625a5493f983e6b90ba9bdb3fe427b31c374 (patch)
tree6367e7f03a5923fa490129be11bd58012ec01960 /media-gfx
parentmedia-gfx/oxipng: use app-arch/libdeflate instead of bundled one (diff)
downloadgentoo-7542625a5493f983e6b90ba9bdb3fe427b31c374.tar.gz
gentoo-7542625a5493f983e6b90ba9bdb3fe427b31c374.tar.bz2
gentoo-7542625a5493f983e6b90ba9bdb3fe427b31c374.zip
media-gfx/oxipng: relax libdeflate version requirement
Signed-off-by: YOSHIOKA Takuma <lo48576@hard-wi.red> Closes: https://github.com/gentoo/gentoo/pull/39539 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'media-gfx')
-rw-r--r--media-gfx/oxipng/files/libdeflater-1.20.0-relax-libdeflate-sys-version.patch13
-rw-r--r--media-gfx/oxipng/oxipng-9.1.2-r2.ebuild23
2 files changed, 29 insertions, 7 deletions
diff --git a/media-gfx/oxipng/files/libdeflater-1.20.0-relax-libdeflate-sys-version.patch b/media-gfx/oxipng/files/libdeflater-1.20.0-relax-libdeflate-sys-version.patch
new file mode 100644
index 000000000000..a7435085aa4f
--- /dev/null
+++ b/media-gfx/oxipng/files/libdeflater-1.20.0-relax-libdeflate-sys-version.patch
@@ -0,0 +1,13 @@
+diff --git a/build.rs b/build.rs
+index 9c5f169589aa..14f79d18d5f7 100644
+--- a/build.rs
++++ b/build.rs
+@@ -9,7 +9,7 @@ fn main() {
+ if pkg_config::Config::new()
+ .print_system_libs(false)
+ .cargo_metadata(true)
+- .exactly_version("1.20")
++ .atleast_version("1.20")
+ .probe("libdeflate")
+ .is_ok()
+ {
diff --git a/media-gfx/oxipng/oxipng-9.1.2-r2.ebuild b/media-gfx/oxipng/oxipng-9.1.2-r2.ebuild
index 5785f78a218e..d225fadafc14 100644
--- a/media-gfx/oxipng/oxipng-9.1.2-r2.ebuild
+++ b/media-gfx/oxipng/oxipng-9.1.2-r2.ebuild
@@ -110,13 +110,8 @@ SLOT="0"
KEYWORDS="~amd64 ~arm64 ~riscv ~x86"
PATCHES=( "${FILESDIR}/oxipng-9.1.2-use-system-libdeflate.patch" )
-BDEPEND="
- virtual/pkgconfig"
-# Any API/ABI-compatible versions (other than 1.20) would be ok for app-arch/libdeflate,
-# but in such case the build script of libdeflate_sys should be patched.
-# See <https://github.com/adamkewley/libdeflater/pull/32#issuecomment-1971198374>.
-DEPEND="
- ~app-arch/libdeflate-1.20"
+BDEPEND="virtual/pkgconfig"
+DEPEND=">=app-arch/libdeflate-1.20:="
RDEPEND="${DEPEND}"
# rust does not use *FLAGS from make.conf, silence portage warning
@@ -125,6 +120,20 @@ QA_FLAGS_IGNORED="usr/bin/${PN}"
QA_PRESTRIPPED="usr/bin/${PN}"
src_prepare() {
+ # Relax the version restriction of libdeflate.
+ # https://bugs.gentoo.org/944285
+ #
+ # Any API/ABI-compatible versions would be ok for app-arch/libdeflate, but
+ # in such case the build script of libdeflate_sys should be patched to pick
+ # even if the system library is newer.
+ # See <https://github.com/adamkewley/libdeflater/pull/32#issuecomment-1971198374>.
+ #
+ # Also, don't forget updating `DEPNED` and `RDEPEND` in sync, or libdeflater
+ # crate will fail to pick system library and silently use the bundled
+ # version of libdeflate.
+ ( cd "${WORKDIR}"/cargo_home/gentoo/libdeflate-sys-1.20.0 && \
+ eapply "${FILESDIR}"/libdeflater-1.20.0-relax-libdeflate-sys-version.patch )
+
# Remove the linker configs (in `.cargo/config.toml`) specific to GitHub CI.
# https://bugs.gentoo.org/924946
rm -rv "${S}/.cargo/config.toml" || die