aboutsummaryrefslogtreecommitdiff
path: root/graphics/jbig2dec/Makefile
diff options
context:
space:
mode:
authorSunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org>2015-12-04 12:32:58 +0000
committerSunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org>2015-12-04 12:32:58 +0000
commit76bfabb776bfcc808f1662c164fca080e3fe5f80 (patch)
treeb0923e119d4aef104dd29d7ce5f76c0f2037da75 /graphics/jbig2dec/Makefile
parentbc2a4109b10e87c97f0dee9ab4b115cb4bb8d0d3 (diff)
downloadports-76bfabb776bfcc808f1662c164fca080e3fe5f80.tar.gz
ports-76bfabb776bfcc808f1662c164fca080e3fe5f80.zip
Notes
Diffstat (limited to 'graphics/jbig2dec/Makefile')
-rw-r--r--graphics/jbig2dec/Makefile67
1 files changed, 26 insertions, 41 deletions
diff --git a/graphics/jbig2dec/Makefile b/graphics/jbig2dec/Makefile
index 838da261d846..2c939e64d824 100644
--- a/graphics/jbig2dec/Makefile
+++ b/graphics/jbig2dec/Makefile
@@ -1,61 +1,46 @@
# $FreeBSD$
PORTNAME= jbig2dec
-PORTVERSION= 0.11
-PORTREVISION= 4
+PORTVERSION= 0.12
CATEGORIES= graphics devel
-MASTER_SITES= SF
+MASTER_SITES= http://downloads.ghostscript.com/public/${PORTNAME}/ \
+ LOCAL/sunpoet:tests
DISTFILES= ${DISTNAME}${EXTRACT_SUFX}
-EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX}
-MAINTAINER= ports@FreeBSD.org
+MAINTAINER= sunpoet@FreeBSD.org
COMMENT= Decoder implementation of the JBIG2 image compression format
LICENSE= GPLv3
-
-USES= tar:xz libtool
-GNU_CONFIGURE= yes
-USE_LDCONFIG= yes
-INSTALL_TARGET= install-strip
+LICENSE_FILE= ${WRKSRC}/COPYING
OPTIONS_DEFINE= PNG TESTS
-OPTIONS_DEFAULT= PNG
-
+OPTIONS_DEFAULT=PNG
TESTS_DESC= Download and use test-images for post-build testing
-EXTRACT_AFTER_ARGS+= --exclude sha1.h --exclude 'getopt*'
+CONFIGURE_ENV= ac_cv_func_getopt_long=yes
+GNU_CONFIGURE= yes
+INSTALL_TARGET= install-strip
+USE_LDCONFIG= yes
+USES= autoreconf libtool
+
+SHEBANG_FILES= test_jbig2dec.py
+python_CMD= ${PYTHON_CMD}
-PNG_LIB_DEPENDS= libpng.so:${PORTSDIR}/graphics/png
+PNG_CONFIGURE_OFF= --without-libpng
PNG_CONFIGURE_ON= --with-libpng=${LOCALBASE}
+PNG_LIB_DEPENDS= libpng.so:${PORTSDIR}/graphics/png
+TESTS_DISTFILES= jb2streams${EXTRACT_SUFX}:tests
+TESTS_TEST_TARGET= check-TESTS
+TESTS_USES= python:build shebangfix
-.include <bsd.port.options.mk>
-
-.if ${PORT_OPTIONS:MTESTS}
-MASTER_SITES+= http://jbig2dec.sourceforge.net/ubc/:tests
-DISTFILES+= jb2streams.zip:tests
-USES+= python:build
-KNOWN_BAD_JB2S= 042_11 042_13 042_14 042_24 042_25 amb_1 amb_2
+post-patch:
+ @${RM} ${WRKSRC}/getopt* ${WRKSRC}/sha1.h
+ @${REINPLACE_CMD} -E 's|SHA1_Final\( *([^,]+), *([^\)]+)\)|SHA1_Final(\2, \1)|' ${WRKSRC}/jbig2dec.c ${WRKSRC}/sha1.c
-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-PNG-on:
+ @${REINPLACE_CMD} 's|png_check_sig|png_sig_cmp|g' ${WRKSRC}/configure
-post-patch:
-.if ${PORT_OPTIONS:MPNG}
- @${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
- @${REINPLACE_CMD} -e '1 s|${SETENV} python|${PYTHON_CMD}|' \
- ${WRKSRC}/test_jbig2dec.py
-
-test check regression-test:
- ${MAKE} -C ${WRKSRC} check-TESTS
-
-post-build: test
+post-patch-TESTS-off:
+ @${REINPLACE_CMD} -e '/^TESTS = / s| test_jbig2dec.py||' ${WRKSRC}/Makefile.in
.include <bsd.port.mk>