summaryrefslogtreecommitdiff
path: root/media-libs/jbig2dec
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2019-10-13 22:19:36 +0100
committerV3n3RiX <venerix@redcorelinux.org>2019-10-14 23:22:23 +0100
commit4b19be30aa626b327c885dae62c559ec0e9fb935 (patch)
tree76e74807bc479502e13866b581b6bf86734ec634 /media-libs/jbig2dec
parent30d6f67c98d149508509d5e86f176d558793acc0 (diff)
gentoo resync : 13.10.2019
Diffstat (limited to 'media-libs/jbig2dec')
-rw-r--r--media-libs/jbig2dec/Manifest5
-rw-r--r--media-libs/jbig2dec/files/jbig2dec-0.17-fix-test_jbig2dec.py.patch39
-rw-r--r--media-libs/jbig2dec/jbig2dec-0.14.ebuild2
-rw-r--r--media-libs/jbig2dec/jbig2dec-0.17.ebuild67
4 files changed, 111 insertions, 2 deletions
diff --git a/media-libs/jbig2dec/Manifest b/media-libs/jbig2dec/Manifest
index 7f78a34fdd88..81e5b12ab0bb 100644
--- a/media-libs/jbig2dec/Manifest
+++ b/media-libs/jbig2dec/Manifest
@@ -1,4 +1,7 @@
+AUX jbig2dec-0.17-fix-test_jbig2dec.py.patch 1550 BLAKE2B 274b37da363b9d09ae98fdba32b9d319b8e8646cabbdcd2d48defecae6fe048dc0d909906fa6096b2c1934267c91e217d2cdd348368fadd4256801884f098acd SHA512 f098733ca2aed78f3f45b821b6eb21cf268d64e715169b2683419116f83cc293c3d38e364d8edb44db3f414e5c911d7b51af8231e332e423ac210b3b513c605f
DIST jb2streams.zip 1285838 BLAKE2B 9a2b6047a7b970439693d6f5fdefb9488019a562e7f831288b27df09bb19dec2f84854cf7fea50b5b041d331e925145f37f2f89848058ecdc074e7d6c238033f SHA512 382890b36345b8aaebb3554e776a53f3276c6d835335ce41f3f41829ff62bba7ae646602544103ba8541a7a824dca92d682b682c254ab2918c7fe45b3e358b45
DIST jbig2dec-0.14.tar.gz 463572 BLAKE2B 91351a3879bd1906fabe2620cf5379fbbc32eaae808a8c2754c661d6dc592d3c9da13c558c8f7ced30c48b73fbd9ed4631f2817298f959b59ad4dff5fce9ac1a SHA512 066bd880ac0665fc1e42b0ae0e481008b125aab6e173b7f82d61a2a30e72c90085cbded9b2a68c6836f92dea3d8d8d5c2228dba76e0d99c79c922197d215705b
-EBUILD jbig2dec-0.14.ebuild 1165 BLAKE2B 163ecbbfd28ae3b3841a710e95ce0a9b5804e0847f9d1f4ce49c054250ccfc25efe8f9ebe6d370143ec6110b8564d522620710142b33b98870e36a65dcba1a2f SHA512 c4ae7cd45d6cb46b46effb5d897feed6fcd2920381265963962355d39098bad84877d64d80a8ec8d28aa8a6a2abd67f868fd82753e48dc8ee6ee353dda9c3318
+DIST jbig2dec-0.17.tar.gz 141195 BLAKE2B 858befb59c0b943cddbc4ae2e9ffc6cdb7e1dd2185cedbffb577f0152f27a548f565548b4b0a4867e3973692b8b019a565eabe2cf672334a6b2994fd7988dcaf SHA512 79b3957186a30fc304ecd571d31c5cc421364921eb4eba242c3ea941ea111f461773f86c975657fa2ce91f2f79ff9abf760ef9bed404c7a4f35c036e5642ba0f
+EBUILD jbig2dec-0.14.ebuild 1143 BLAKE2B ff3484d4768f8b7e0f2e744732e8a82a9bd6c4630b55469b9a8da428603cfcf68e6d7cb5a1d5257936aed687fa1db52b10741783dca78ff55ae9bf6e8434d5cb SHA512 719e7b390c4f9572d2d08192468bfd3a868a2bdcaa7ce30b2aaeb169c1c012cc041990148b33d92d1128bc394788c7aee01d5bcfe717bf5054c9d2397ea876ef
+EBUILD jbig2dec-0.17.ebuild 1590 BLAKE2B f1e7607a3b5ba05ea92a1b7420a2b247c67665f4f5f3747c2b3a6ffb060d7b3c538a9e831bfa852ee9ff3b4a72051012664d8fabc8f2090b3ca6a31adfff3383 SHA512 40a6e503f715d5ed0446757edb7119c7fe28cfabbf144972c3a40b1902730eec8cf08eac3952223c710d697ddee9670e2e0c541a1948190b14d316feab52ad2a
MISC metadata.xml 473 BLAKE2B 6d374023a106375c7f5500968ed4ea2f4dd5584fb0db8f85b042844d08afb6196b7d7c019ae69b35917f43e496c9a25212aec328f0c3cf78aaa94b963de65c15 SHA512 501077ac27f5c6f8a616fa32cec23d28cb16dc0e0c19ce933cbc067494117c9c55fc3e00dfc21270892d57478a9e268f99215c8d074d6cc4114916f55a571a6f
diff --git a/media-libs/jbig2dec/files/jbig2dec-0.17-fix-test_jbig2dec.py.patch b/media-libs/jbig2dec/files/jbig2dec-0.17-fix-test_jbig2dec.py.patch
new file mode 100644
index 000000000000..e99a298f5de9
--- /dev/null
+++ b/media-libs/jbig2dec/files/jbig2dec-0.17-fix-test_jbig2dec.py.patch
@@ -0,0 +1,39 @@
+From c48d802aa6f65cc0284c8aa9824b6ae4e7dd5aa1 Mon Sep 17 00:00:00 2001
+From: Sebastian Rasmussen <sebras@gmail.com>
+Date: Fri, 14 Jun 2019 22:18:14 +0200
+Subject: [PATCH] jbig2dec: Make tests expect that some test files return white
+ image.
+
+Previously these tests would just error out and jbig2dec would not
+return any output file at all. Now, jbig2dec parses as much as
+possible, while emitting warning/error messages. In the case of a
+few of the test files the end result is a white image.
+---
+ test_jbig2dec.py | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/test_jbig2dec.py b/test_jbig2dec.py
+index a841438..33008e5 100755
+--- a/test_jbig2dec.py
++++ b/test_jbig2dec.py
+@@ -60,6 +60,7 @@ class KnownFileHash(SelfTest):
+
+ # hashes of known test inputs
+ known_NOTHING_DECODED = "da39a3ee5e6b4b0d3255bfef95601890afd80709"
++ known_WHITE_PAGE_DECODED = "28a6bd83a8a3a36910fbc1f5ce06c962e4332911"
+ known_042_DECODED = "ebfdf6e2fc5ff3ee2271c2fa19de0e52712046e8"
+ known_amb_DECODED = "3d4b7992d506894662b53415bd3d0d2a2f8b7953"
+
+@@ -103,10 +104,10 @@ class KnownFileHash(SelfTest):
+ known_042_DECODED),
+ ('../ubc/042_13.jb2',
+ "7d428bd542f58591b254d9827f554b0552c950a7",
+- known_NOTHING_DECODED),
++ known_WHITE_PAGE_DECODED),
+ ('../ubc/042_14.jb2',
+ "c40fe3a02acb6359baf9b40fc9c49bc0800be589",
+- known_NOTHING_DECODED),
++ known_WHITE_PAGE_DECODED),
+ ('../ubc/042_15.jb2',
+ "a9e39fc1ecb178aec9f05039514d75ea3246246c",
+ known_042_DECODED),
diff --git a/media-libs/jbig2dec/jbig2dec-0.14.ebuild b/media-libs/jbig2dec/jbig2dec-0.14.ebuild
index 121c9ca08430..90c837e80573 100644
--- a/media-libs/jbig2dec/jbig2dec-0.14.ebuild
+++ b/media-libs/jbig2dec/jbig2dec-0.14.ebuild
@@ -10,7 +10,7 @@ SRC_URI="http://downloads.ghostscript.com/public/${PN}/${P}.tar.gz
LICENSE="AGPL-3"
SLOT="0"
-KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~m68k ~mips ppc ppc64 s390 ~sh sparc x86 ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~m68k ~mips ppc ppc64 s390 ~sh sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
IUSE="png static-libs test"
RDEPEND="png? ( media-libs/libpng:0= )"
diff --git a/media-libs/jbig2dec/jbig2dec-0.17.ebuild b/media-libs/jbig2dec/jbig2dec-0.17.ebuild
new file mode 100644
index 000000000000..0a030167ed52
--- /dev/null
+++ b/media-libs/jbig2dec/jbig2dec-0.17.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python2_7 python3_{5,6,7} )
+
+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? ( http://jbig2dec.sourceforge.net/ubc/jb2streams.zip )"
+
+LICENSE="AGPL-3"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="png static-libs test"
+
+BDEPEND="
+ test? (
+ app-arch/unzip
+ ${PYTHON_DEPS}
+ )"
+
+RDEPEND="png? ( media-libs/libpng:0= )"
+DEPEND="${RDEPEND}"
+
+DOCS=( CHANGES README )
+
+PATCHES=( "${FILESDIR}"/${PN}-0.17-fix-test_jbig2dec.py.patch )
+
+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
+}