media-gfx/jpegoptim: add 1.5.6

Now has simple tests using a test.py, python is searched for either
way with USE=-test but isn't actually used for anything then.

Old workarounds obsolete:
* floor() usage was removed so the -lm patch is unneeded
* now has a cmake install target, albeit misses adding man1/
* cmake no longer adds all *.c and only adds getopt*.c if needed,
  which won't happen on musl making passing __GNU_LIBRARY__ unneeded

Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
This commit is contained in:
Ionen Wolkens 2025-09-15 03:17:48 -04:00
parent eb42e0a8c9
commit 96f62bfe26
No known key found for this signature in database
GPG Key ID: B24406B0B0AC4334
2 changed files with 50 additions and 0 deletions

View File

@ -1 +1,2 @@
DIST jpegoptim-1.5.5.tar.gz 124361 BLAKE2B eb4cd150435c07df5116fbed653b378512ada96f4ebae65f08a4ccd9418ba71bcd6e369abb5713427c1ea8983432d4f94763252b580e657960154327f9f14d8f SHA512 81009e7079713aaa65fb8ef6d92b59eb6db16a460e8394cb3ce883228157f51ec0df0798d1a62d2e16c64678fd2a51a7156a9aa20b93e51343e3187657aefb4f
DIST jpegoptim-1.5.6.tar.gz 457883 BLAKE2B 7e332641c70140b90d7da2506091d5973d7b95a649d560e5c4acf2c1b57ecdcf6e532e02553357433a97d0d61ff1b27e49ac37000125a4db28b433d4161cf51f SHA512 9501bdcdd3f56c97b649b7b8987fea3a3bd33d09368730f265a4833c0839b538fa658ad85dcf64a6ea13f8a2c919486f448e38a46fec7122b7bcf01d027c8b3a

View File

@ -0,0 +1,49 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{11..14} )
inherit cmake python-any-r1
DESCRIPTION="Utility to optimize JPEG files"
HOMEPAGE="https://www.kokkonen.net/tjko/projects.html"
SRC_URI="
https://github.com/tjko/jpegoptim/archive/refs/tags/v${PV}.tar.gz
-> ${P}.tar.gz
"
# TODO?: switch back to this if tarballs become available in a timely fashion
#SRC_URI="https://www.kokkonen.net/tjko/src/${P}.tar.gz"
LICENSE="GPL-3+"
SLOT="0"
KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux ~ppc-macos"
IUSE="test"
RESTRICT="!test? ( test )"
RDEPEND="
media-libs/libjpeg-turbo:=
"
DEPEND="${RDEPEND}"
BDEPEND="
test? ( ${PYTHON_DEPS} )
"
pkg_setup() {
use test && python-any-r1_pkg_setup
}
src_configure() {
local mycmakeargs=(
-DCMAKE_INSTALL_MANDIR="${EPREFIX}"/usr/share/man/man1
-DUSE_MOZJPEG=no
)
cmake_src_configure
}
src_install() {
cmake_src_install
rm -- "${ED}"/usr/share/doc/${PF}/LICENSE || die
}