# Copyright 2021 Maxime Sorin # Distributed under the terms of the GNU General Public License v2 require cargo [ debug=true rust_minimum_version=1.65 ] require github [ user="ImageOptim" tag=${PV} ] SUMMARY="Small, portable C library for high-quality conversion of RGBA images to 8-bit indexed-color (palette) images" HOMEPAGE="https://pngquant.org/lib/" LICENCES="GPL-3" SLOT="0" PLATFORMS="~amd64" MYOPTIONS="" DEPENDENCIES=" build: dev-rust/cargo-c " WORK="${WORKBASE}"/${PNV}/imagequant-sys src_compile() { ecargo cbuild --release --frozen \ --target $(rust_target_arch_name) \ --prefix=/usr/$(exhost --target) } src_install() { ecargo cinstall --release --frozen \ --target $(rust_target_arch_name) \ --prefix=/usr/$(exhost --target) \ --destdir="${IMAGE}" edo pushd "${WORKBASE}"/${PNV} emagicdocs edo popd }