diff options
author | bapt <bapt@FreeBSD.org> | 2010-08-05 05:19:03 +0800 |
---|---|---|
committer | bapt <bapt@FreeBSD.org> | 2010-08-05 05:19:03 +0800 |
commit | 4fcafc5a036989d6ed6e8a854aee7d497568542c (patch) | |
tree | 61726a442f7bdfe89687d50d27e5a42ac2f3443e /graphics | |
parent | 3fca920af6be4ee4bd50f653f567c252e8c8951b (diff) | |
download | freebsd-ports-gnome-4fcafc5a036989d6ed6e8a854aee7d497568542c.tar.gz freebsd-ports-gnome-4fcafc5a036989d6ed6e8a854aee7d497568542c.tar.zst freebsd-ports-gnome-4fcafc5a036989d6ed6e8a854aee7d497568542c.zip |
- Add SF to MASTER_SITES
- Mark MAKE_JOBS_SAFE
- Use FreeBSD's SHA1-implementation
- Add TESTS option default to off
Submitted by: Mikhail T. <mi+thun _at_ aldan.algebra.com> by email
Approved by: tabthorpe@ (co-mentor)
Diffstat (limited to 'graphics')
-rw-r--r-- | graphics/jbig2dec/Makefile | 38 | ||||
-rw-r--r-- | graphics/jbig2dec/distinfo | 9 | ||||
-rw-r--r-- | graphics/jbig2dec/files/patch-native-sha | 52 | ||||
-rw-r--r-- | graphics/jbig2dec/files/patch-tests | 8 | ||||
-rw-r--r-- | graphics/jbig2dec/files/simpler-test-patch | 12 |
5 files changed, 112 insertions, 7 deletions
diff --git a/graphics/jbig2dec/Makefile b/graphics/jbig2dec/Makefile index 6556679d9afb..ccdfcef54ec1 100644 --- a/graphics/jbig2dec/Makefile +++ b/graphics/jbig2dec/Makefile @@ -8,31 +8,61 @@ PORTNAME= jbig2dec PORTVERSION= 0.11 CATEGORIES= graphics devel -MASTER_SITES= http://ghostscript.com/~giles/jbig2/jbig2dec/ +MASTER_SITES= SF \ + http://ghostscript.com/~giles/jbig2/jbig2dec/ +DISTFILES+= ${DISTNAME}${EXTRACT_SUFX} MAINTAINER= bapt@FreeBSD.org COMMENT= Decoder implementation of the JBIG2 image compression format +USE_XZ= yes:src GNU_CONFIGURE= yes USE_LDCONFIG= yes +MAKE_JOBS_SAFE= yes -OPTIONS= PNG "Enable png support" On +OPTIONS= PNG "Enable png support" On \ + TESTS "Download and use test-images for post-build testing" Off MAN1= jbig2dec.1 +MAKE_JOBS_SAFE= yes +EXTRACT_AFTER_ARGS+=|${TAR} -xpf - --exclude sha1.h --exclude 'getopt*' + LICENSE= GPLv3 LICENSE_FILE= ${WRKSRC}/COPYING .include <bsd.port.options.mk> .if defined(WITH_PNG) -LIB_DEPENDS+= png.6:${PORTSDIR}/graphics/png -CONFIGURE_ARGS+= --with-libpng=${LOCALBASE} +LIB_DEPENDS+= png:${PORTSDIR}/graphics/png +CONFIGURE_ARGS+=--with-libpng=${LOCALBASE} +.endif + +.if defined(WITH_TESTS) +MASTER_SITES+= http://jbig2dec.sourceforge.net/ubc/:tests +DISTFILES+= jb2streams.zip:tests +EXTRACT_ONLY= ${DISTFILES:M*xz} +USE_PYTHON_BUILD=yes +KNOWN_BAD_JB2S= 042_11 042_13 042_14 042_24 042_25 amb_1 amb_2 + +post-extract: + ${MKDIR} ${WRKDIR}/ubc + ${TAR} -C ${WRKDIR}/ubc/ -xpf ${DISTDIR}/jb2streams.zip \ + ${KNOWN_BAD_JB2S:S/$/.jb2/:S/^/--exclude /} +.else +EXTRA_PATCHES= ${FILESDIR}/simpler-test-patch .endif post-patch: .if defined(WITH_PNG) @${REINPLACE_CMD} 's/png_check_sig/png_sig_cmp/g' ${WRKSRC}/configure .endif + ${REINPLACE_CMD} -E 's|SHA1_Final\( *([^,]+), *([^\)]+)\)|SHA1_Final(\2, \1)|' \ + ${WRKSRC}/jbig2dec.c ${WRKSRC}/sha1.c + +test check regression-test: + ${MAKE} -C ${WRKSRC} check-TESTS + +post-build: test .include <bsd.port.mk> diff --git a/graphics/jbig2dec/distinfo b/graphics/jbig2dec/distinfo index 52414cc2828d..5b0a613781fa 100644 --- a/graphics/jbig2dec/distinfo +++ b/graphics/jbig2dec/distinfo @@ -1,3 +1,6 @@ -MD5 (jbig2dec-0.11.tar.gz) = 1f61e144852c86563fee6e5ddced63f1 -SHA256 (jbig2dec-0.11.tar.gz) = 7e2d8330b36f2765da22043d174827bee0f30db8d78c330904f363275c7dd0b9 -SIZE (jbig2dec-0.11.tar.gz) = 371499 +MD5 (jbig2dec-0.11.tar.xz) = 4cc8ab6fb7ebe6f24460ec5ce30d84d9 +SHA256 (jbig2dec-0.11.tar.xz) = 016bf8148c850736c19e5e0336c43912d98d68f90c9171912c4f67f5c060adf5 +SIZE (jbig2dec-0.11.tar.xz) = 258908 +MD5 (jb2streams.zip) = 20ee543a20557eb58d1229a60a13db80 +SHA256 (jb2streams.zip) = 3d1e5c79054b59d061cabdb1d7ba2d1b3f84700f5c517ba4306f7047660016f7 +SIZE (jb2streams.zip) = 1285838 diff --git a/graphics/jbig2dec/files/patch-native-sha b/graphics/jbig2dec/files/patch-native-sha new file mode 100644 index 000000000000..883868c06f32 --- /dev/null +++ b/graphics/jbig2dec/files/patch-native-sha @@ -0,0 +1,52 @@ +--- Makefile.in 2010-02-02 14:13:56.000000000 -0500 ++++ Makefile.in 2010-08-03 13:47:07.000000000 -0400 +@@ -214,8 +214,8 @@ + PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS) + +-am_jbig2dec_OBJECTS = jbig2dec.$(OBJEXT) sha1.$(OBJEXT) ++am_jbig2dec_OBJECTS = jbig2dec.$(OBJEXT) + jbig2dec_OBJECTS = $(am_jbig2dec_OBJECTS) + jbig2dec_DEPENDENCIES = libjbig2dec.la @LIBOBJS@ +-jbig2dec_LDFLAGS = ++jbig2dec_LDFLAGS = -lmd + am_test_arith_OBJECTS = test_arith-jbig2_arith.$(OBJEXT) + test_arith_OBJECTS = $(am_test_arith_OBJECTS) +@@ -228,5 +228,5 @@ + am_test_sha1_OBJECTS = test_sha1-sha1.$(OBJEXT) + test_sha1_OBJECTS = $(am_test_sha1_OBJECTS) +-test_sha1_LDADD = $(LDADD) ++test_sha1_LDADD = -lmd + test_sha1_DEPENDENCIES = + test_sha1_LDFLAGS = +--- jbig2dec.c 2010-02-02 14:02:55.000000000 -0500 ++++ jbig2dec.c 2010-08-03 13:36:41.000000000 -0400 +@@ -37,5 +37,8 @@ + + #include "os_types.h" +-#include "sha1.h" ++#include <sha.h> ++#ifndef SHA1_DIGEST_SIZE ++# define SHA1_DIGEST_SIZE 20 ++#endif + + #include "jbig2.h" +--- sha1.c 2009-07-16 00:44:49.000000000 -0400 ++++ sha1.c 2010-08-03 13:45:09.000000000 -0400 +@@ -87,4 +87,11 @@ + + #include "os_types.h" ++ ++#include <sha.h> ++#ifndef SHA1_DIGEST_SIZE ++# define SHA1_DIGEST_SIZE 20 ++#endif ++ ++#if 0 + #include "sha1.h" + +@@ -261,5 +268,4 @@ + /*************************************************************/ + +-#if 0 + int main(int argc, char** argv) + { diff --git a/graphics/jbig2dec/files/patch-tests b/graphics/jbig2dec/files/patch-tests new file mode 100644 index 000000000000..17d3e19cf343 --- /dev/null +++ b/graphics/jbig2dec/files/patch-tests @@ -0,0 +1,8 @@ +--- test_jbig2dec.py 2009-07-16 00:44:49.000000000 -0400 ++++ test_jbig2dec.py 2010-08-03 14:59:23.000000000 -0400 +@@ -53,4 +53,5 @@ + else: + self.stream.write('PASSED all %d tests\n' % len(self.tests)) ++ return 1 + + class KnownFileHash(SelfTest): diff --git a/graphics/jbig2dec/files/simpler-test-patch b/graphics/jbig2dec/files/simpler-test-patch new file mode 100644 index 000000000000..aaf8328ca22f --- /dev/null +++ b/graphics/jbig2dec/files/simpler-test-patch @@ -0,0 +1,12 @@ +The test_jbig2dec.py requires Python and thus not be +suitable for some installations. + +--- Makefile.in 2010-02-02 14:13:56.000000000 -0500 ++++ Makefile.in 2010-08-03 13:47:07.000000000 -0400 +@@ -182,5 +182,5 @@ + MAINTAINERCLEANFILES = config_types.h.in + +-TESTS = test_sha1 test_jbig2dec.py test_huffman test_arith ++TESTS = test_sha1 test_huffman test_arith + + test_sha1_SOURCES = sha1.c sha1.h |