commit: 33b61c0ada2a5ec8dd041c73bb5744f9777e4e7d Author: YOSHIOKA Takuma <lo48576 <AT> hard-wi <DOT> red> AuthorDate: Sun Dec 1 13:17:49 2024 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Sun Dec 1 14:55:49 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=33b61c0a
media-gfx/oxipng: use app-arch/libdeflate instead of bundled one Closes: https://bugs.gentoo.org/944285 Signed-off-by: YOSHIOKA Takuma <lo48576 <AT> hard-wi.red> Signed-off-by: Sam James <sam <AT> gentoo.org> media-gfx/oxipng/Manifest | 1 + .../files/oxipng-9.1.2-use-system-libdeflate.patch | 38 ++++++ media-gfx/oxipng/oxipng-9.1.2-r2.ebuild | 145 +++++++++++++++++++++ 3 files changed, 184 insertions(+) diff --git a/media-gfx/oxipng/Manifest b/media-gfx/oxipng/Manifest index a8e28fb96aed..a5c70be6cfe1 100644 --- a/media-gfx/oxipng/Manifest +++ b/media-gfx/oxipng/Manifest @@ -119,6 +119,7 @@ DIST os_str_bytes-6.4.1.crate 23101 BLAKE2B 252fc826f646bbb999fa80b47f58ac9a77e4 DIST oxipng-8.0.0.tar.gz 51646362 BLAKE2B 3f2223f515d81bf7b229f3cd4cff5f26a49c8db4aef52076a0fbd5ad2bf259b3b56e83f90a9b2c2a6847e653b73910d9316cc85b00d43614c99e047dbbcfb2da SHA512 e8a45082f65c392d7c4caff10911e52958c671e86850681c281aaaadd24f50a153919cf714626326028769f3627b1664c420ba17cfc8fec86d82a8e81a7ab9ca DIST oxipng-9.0.0.tar.gz 22303586 BLAKE2B b1e5776a97ec305514393e186dba3ff4b19a6d0020182b1d1933020eb8cb6f550c0474517efbe4b9ee95ac40f867c05f5be66e7a7239eb00c2d5b7897066e980 SHA512 ac12b1e823c748b5a3d58081b86d5be69b970788fb3f2d4acc1db1f790455bd35b8b897203b1157674be83b9172bb4cb3ec1d6401538270f42a5f35f92a62f5a DIST oxipng-9.1.2.tar.gz 20940722 BLAKE2B 6067d9a222f917e9b9c7e9628461576e37cd9c51df8a0c6b1167b0c3f866dde1767804aeae48ccba5d3043fd05532754b6869ec32f9d2df919645be7d1134cbf SHA512 5e4ab6f8797bc03373c24886b105ffe79fb617342f9924f8fc416d1649bbc55cfe397889fba0a0211717f20807ef4e96c42cc3985c13009a1200ed755c5dc7eb +DIST pkg-config-0.3.31.crate 20880 BLAKE2B ab7676e810751f89639b60ae70bdebe1d57edc76319f83077c3680049a701a26e72e8cc485fe77cdc4346fe3571d32c59e7384c8c86fef17e00d7d81df5daf43 SHA512 ac3e8062ee8831a4e4fc717b5247dc7f113da7bf6d64ec95cbca7875959a2afa1497bf81d9dfc27206b5fb10027a2509d51dd9ca1c10139d7b4c78128864fdf4 DIST png-0.17.13.crate 103176 BLAKE2B 99bfd1c444f5967b715b81607e3c3266fb3b1d8110897e4c93afb5b6e0e28df262f9c9d842aefed922c38a5ff9d16e75cca065d7cc14ddadb3a7e9ea4776e787 SHA512 064a932f4c48c2243286a9b4cdec0487cc976291bc8ecf4753691afdfe43acda4b17ea8d48ec933f309d158df28f40ee93b5b32b3ab5252e2e7aa1ee1c0e4e84 DIST png-0.17.7.crate 80979 BLAKE2B 37628fa2282c7195f983a95939eda1c73745f89d772904173775d7e1906b71615e45de8f59489d6842450ed6f7c7b809b28881c84d5a3399da38013fc3062c79 SHA512 f8009925a6948d8b9c82007f31eefd18d2173274816c0329673e48ef725aec52ca3aab2b91e8fc4f776c8f7f17475a3e065835e578a632445e1bd70794b18270 DIST png-0.17.9.crate 88839 BLAKE2B b218fcaa166f142ced8ae75a47bb587015d0a449210f3cf789ef3f85eb6dec946c3744ff93a40a2e2d08de8a4973e12cc0880f8ef95c36f96c920ee47bc096fc SHA512 95c532136b7f31dc7aa3b04e721307b5a722f95cb815c885ed26a751b5c1eabd52b38aa1a1f504e610a5bc1baa6058ade1406cc833d0d2286fa7523f0c6ad5d1 diff --git a/media-gfx/oxipng/files/oxipng-9.1.2-use-system-libdeflate.patch b/media-gfx/oxipng/files/oxipng-9.1.2-use-system-libdeflate.patch new file mode 100644 index 000000000000..704916d9e08b --- /dev/null +++ b/media-gfx/oxipng/files/oxipng-9.1.2-use-system-libdeflate.patch @@ -0,0 +1,38 @@ +diff --git a/Cargo.lock b/Cargo.lock +index 2ad4fcc0f23a..b749a4311652 100644 +--- a/Cargo.lock ++++ b/Cargo.lock +@@ -325,6 +325,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "669ea17f9257bcb48c09c7ee4bef3957777504acffac557263e20c11001977bc" + dependencies = [ + "cc", ++ "pkg-config", + ] + + [[package]] +@@ -389,6 +390,12 @@ dependencies = [ + "zopfli", + ] + ++[[package]] ++name = "pkg-config" ++version = "0.3.31" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" ++ + [[package]] + name = "png" + version = "0.17.13" +diff --git a/Cargo.toml b/Cargo.toml +index 717bf26fd441..d9036c8c5255 100644 +--- a/Cargo.toml ++++ b/Cargo.toml +@@ -39,7 +39,7 @@ required-features = ["zopfli"] + zopfli = { version = "0.8.0", optional = true, default-features = false, features = ["std", "zlib"] } + rgb = "0.8.43" + indexmap = "2.2.6" +-libdeflater = "1.20.0" ++libdeflater = { version = "1.20.0", features = ["dynamic"] } + log = "0.4.21" + bitvec = "1.0.1" + rustc-hash = "1.1.0" diff --git a/media-gfx/oxipng/oxipng-9.1.2-r2.ebuild b/media-gfx/oxipng/oxipng-9.1.2-r2.ebuild new file mode 100644 index 000000000000..5785f78a218e --- /dev/null +++ b/media-gfx/oxipng/oxipng-9.1.2-r2.ebuild @@ -0,0 +1,145 @@ +# Copyright 2022-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +# Auto-Generated by cargo-ebuild 0.5.4-r1 + +EAPI=8 + +CRATES=" + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] + [email protected] +" + +RUST_MIN_VER="1.74.0" + +inherit cargo + +DESCRIPTION="Multithreaded lossless PNG compression optimizer written in Rust" +HOMEPAGE="https://github.com/shssoichiro/oxipng" +SRC_URI="https://github.com/shssoichiro/oxipng/archive/v${PV}.tar.gz -> ${P}.tar.gz" +SRC_URI+=" ${CARGO_CRATE_URIS}" + +LICENSE=" + Apache-2.0 + || ( Apache-2.0 MIT ) + || ( Apache-2.0 MIT ZLIB ) + MIT +" +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" +RDEPEND="${DEPEND}" + +# rust does not use *FLAGS from make.conf, silence portage warning +# update with proper path to binaries this crate installs, omit leading / +QA_FLAGS_IGNORED="usr/bin/${PN}" +QA_PRESTRIPPED="usr/bin/${PN}" + +src_prepare() { + # Remove the linker configs (in `.cargo/config.toml`) specific to GitHub CI. + # https://bugs.gentoo.org/924946 + rm -rv "${S}/.cargo/config.toml" || die + + default_src_prepare +} + +src_configure() { + export PKG_CONFIG_ALLOW_CROSS=1 + + cargo_src_configure +} + +src_install() { + cargo_src_install + + dodoc CHANGELOG.md README.md +}
