summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Jolly <kangie@gentoo.org>2024-11-04 17:24:14 +1000
committerMatt Jolly <kangie@gentoo.org>2024-11-09 16:25:41 +1000
commit01ba4dc61965ef7658a24728841c04c9a1ce4871 (patch)
treea2a6b927779e5990ff87ec4589373d1d89129a63 /media-gfx/libimagequant/libimagequant-4.3.0-r1.ebuild
parentprofiles: mask dev-lang/starlark-rust (diff)
downloadgentoo-01ba4dc61965ef7658a24728841c04c9a1ce4871.tar.gz
gentoo-01ba4dc61965ef7658a24728841c04c9a1ce4871.tar.bz2
gentoo-01ba4dc61965ef7658a24728841c04c9a1ce4871.zip
*/*: update for slotted Rust
Tidyups: - $(cargo_crate_uris) - Rust BDEPENDS come from the eclass except in very rare circumstances (RUST_OPTIONAL=1) - RUST_M{AX,IN}_VER where required. - Suboptimal crate separator (`-` -> `@`) Signed-off-by: Matt Jolly <kangie@gentoo.org> Closes: https://github.com/gentoo/gentoo/pull/39218 Signed-off-by: Matt Jolly <kangie@gentoo.org>
Diffstat (limited to 'media-gfx/libimagequant/libimagequant-4.3.0-r1.ebuild')
-rw-r--r--media-gfx/libimagequant/libimagequant-4.3.0-r1.ebuild51
1 files changed, 51 insertions, 0 deletions
diff --git a/media-gfx/libimagequant/libimagequant-4.3.0-r1.ebuild b/media-gfx/libimagequant/libimagequant-4.3.0-r1.ebuild
new file mode 100644
index 000000000000..710c7dc0634f
--- /dev/null
+++ b/media-gfx/libimagequant/libimagequant-4.3.0-r1.ebuild
@@ -0,0 +1,51 @@
+# Copyright 2023-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+CRATES="
+"
+
+inherit cargo
+
+DESCRIPTION="Palette quantization library that powers pngquant and other PNG optimizers"
+HOMEPAGE="https://pngquant.org/lib/"
+SRC_URI="https://github.com/ImageOptim/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz
+ ${CARGO_CRATE_URIS}
+ https://dev.gentoo.org/~arthurzam/distfiles/media-gfx/${PN}/imagequant-${PV}-crates.tar.xz"
+S="${WORKDIR}"/${P}/imagequant-sys
+
+LICENSE="GPL-3+"
+# Dependent crate licenses
+LICENSE+=" MIT Unicode-DFS-2016 ZLIB"
+SLOT="0/0"
+KEYWORDS="amd64 ~arm ~arm64 ~loong ppc ppc64 ~s390 sparc"
+
+BDEPEND="
+ >=dev-util/cargo-c-0.9.14
+"
+
+QA_FLAGS_IGNORED="usr/lib.*/libimagequant.so.*"
+
+src_compile() {
+ local cargoargs=(
+ --library-type=cdylib
+ --prefix=/usr
+ --libdir="/usr/$(get_libdir)"
+ $(usev !debug '--release')
+ )
+
+ cargo cbuild "${cargoargs[@]}" || die "cargo cbuild failed"
+}
+
+src_install() {
+ local cargoargs=(
+ --library-type=cdylib
+ --prefix=/usr
+ --libdir="/usr/$(get_libdir)"
+ --destdir="${ED}"
+ $(usex debug '--debug' '--release')
+ )
+
+ cargo cinstall "${cargoargs[@]}" || die "cargo cinstall failed"
+}