diff options
author | Baptiste Daroussin <bapt@FreeBSD.org> | 2010-08-04 21:19:03 +0000 |
---|---|---|
committer | Baptiste Daroussin <bapt@FreeBSD.org> | 2010-08-04 21:19:03 +0000 |
commit | 2133f1c1d532e9eb08269e584dbae0248b3dffac (patch) | |
tree | 163e21b406204b91db3ff54cc6c1ba866e9fad54 /graphics/jbig2dec/Makefile | |
parent | 762214a0af2c8ad7a8d6b5ec6f3187eac5351ba4 (diff) |
Notes
Diffstat (limited to 'graphics/jbig2dec/Makefile')
-rw-r--r-- | graphics/jbig2dec/Makefile | 38 |
1 files changed, 34 insertions, 4 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> |