summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz93@gmail.com>2024-06-04 21:54:27 -0400
committerSam James <sam@gentoo.org>2024-06-06 01:44:45 +0100
commita431252a561194d616aa10a2a6623bb21c489fa0 (patch)
tree6952f106d12b8d2f7edeaf43d9b04b0af6a07f2f /media-libs/jbig2dec
parentmedia-libs/jbig2dec: update EAPI 7 -> 8 (diff)
downloadgentoo-a431252a561194d616aa10a2a6623bb21c489fa0.tar.gz
gentoo-a431252a561194d616aa10a2a6623bb21c489fa0.tar.bz2
gentoo-a431252a561194d616aa10a2a6623bb21c489fa0.zip
media-libs/jbig2dec: add 0.20
Signed-off-by: Eli Schwartz <eschwartz93@gmail.com> Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'media-libs/jbig2dec')
-rw-r--r--media-libs/jbig2dec/Manifest1
-rw-r--r--media-libs/jbig2dec/jbig2dec-0.20.ebuild67
2 files changed, 68 insertions, 0 deletions
diff --git a/media-libs/jbig2dec/Manifest b/media-libs/jbig2dec/Manifest
index 10afa8ffcdf4..8deeca6b6fa9 100644
--- a/media-libs/jbig2dec/Manifest
+++ b/media-libs/jbig2dec/Manifest
@@ -1,2 +1,3 @@
DIST jb2streams.zip 1285838 BLAKE2B 9a2b6047a7b970439693d6f5fdefb9488019a562e7f831288b27df09bb19dec2f84854cf7fea50b5b041d331e925145f37f2f89848058ecdc074e7d6c238033f SHA512 382890b36345b8aaebb3554e776a53f3276c6d835335ce41f3f41829ff62bba7ae646602544103ba8541a7a824dca92d682b682c254ab2918c7fe45b3e358b45
DIST jbig2dec-0.19.tar.gz 149134 BLAKE2B 576f3a516499b6291d25dfdefe5af62899665167526dca11435bc07e04a3feb707f82d3a8bdda774f5cfe0d792c3147e77aa94fa57feac25ba1c0a7805c5fc58 SHA512 d5a27951cc9c06c184f454e258e81b6e4d5aa2742a4da821522b9a42ecc78e7e1b78058dabc23821618e62d62d8832011f16b5ef2d66beac463da6b809fd02af
+DIST jbig2dec-0.20.tar.gz 149782 BLAKE2B 6e5a26b736bbc5dc25614e192855d74a59337f5e5aa82cd0882e42a34259295d7df7f8c7acfb88b53ac3817141459c6d6cc58c0d36c1c341e2afedbed8f7d83d SHA512 8b8a28b93b23e4284ca229e6c8935fd161ce5c597f7470a46ec06a3241d0ac23cf921aecdd4e0c1bd3c904591409054236f2ce25b6d8ae40db742559c7f4dbe9
diff --git a/media-libs/jbig2dec/jbig2dec-0.20.ebuild b/media-libs/jbig2dec/jbig2dec-0.20.ebuild
new file mode 100644
index 000000000000..32d59d523ce2
--- /dev/null
+++ b/media-libs/jbig2dec/jbig2dec-0.20.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..13} )
+inherit autotools python-any-r1
+
+DESCRIPTION="A decoder implementation of the JBIG2 image compression format"
+HOMEPAGE="https://jbig2dec.com/"
+SRC_URI="
+ https://github.com/ArtifexSoftware/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz
+ test? ( https://jbig2dec.sourceforge.net/ubc/jb2streams.zip )
+"
+
+LICENSE="AGPL-3"
+SLOT="0/$(ver_cut 1-2)" #698428
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
+IUSE="png static-libs test"
+RESTRICT="!test? ( test )"
+
+BDEPEND="
+ test? (
+ app-arch/unzip
+ ${PYTHON_DEPS}
+ )
+"
+RDEPEND="png? ( media-libs/libpng:= )"
+DEPEND="${RDEPEND}"
+
+DOCS=( CHANGES README )
+
+pkg_setup() {
+ use test && python-any-r1_pkg_setup
+}
+
+src_prepare() {
+ default
+
+ if use test; then
+ mkdir "${WORKDIR}/ubc" || die
+ mv -v "${WORKDIR}"/*.jb2 "${WORKDIR}/ubc/" || die
+ mv -v "${WORKDIR}"/*.bmp "${WORKDIR}/ubc/" || die
+ fi
+
+ # We only need configure.ac and config_types.h.in
+ sed -i \
+ -e '/^# do we need automake?/,/^autoheader/d' \
+ -e '/echo " $AUTOM.*/,$d' \
+ autogen.sh \
+ || die "failed to modify autogen.sh"
+
+ ./autogen.sh || die
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_enable static-libs static) \
+ $(use_with png libpng)
+}
+
+src_install() {
+ default
+
+ find "${ED}" -name '*.la' -exec rm {} + || die
+}