jbig2dec 0.19p4
[git/cygwin-packages/jbig2dec.git] / jbig2dec.cygport
CommitLineData
799f5169 1NAME="jbig2dec"
8856d060 2VERSION=0.19p4
068bc403 3RELEASE=1
799f5169
YS
4CATEGORY="Graphics"
5SUMMARY="JBIG2 image decoder"
6DESCRIPTION="jbig2dec is a decoder implementation of the JBIG2 image compression
7format. JBIG2 is designed for lossy or lossless encoding of 'bilevel' (1-bit
8monochrome) images at moderately high resolution, and in particular scanned
9paper documents. In this domain it is very efficient, offering compression
10ratios on the order of 100:1."
d79f7cf7 11HOMEPAGE="https://jbig2dec.com/"
799f5169 12
d79f7cf7
LL
13################################
14## Source from a git repository
15################################
16GIT_REPO="https://github.com/ArtifexSoftware/jbig2dec"
17declare -A GIT_DATEHASH_BY_NAME=(
18 # git log -1 --date=iso-strict --format='%cd/%H'
8856d060 19 [0.19p4]=2021-03-15T10:46:13+00:00/a6cc1dace9e08159766a45798a69fe4c4a6a881c
b4b61bc1 20 [0.19]=2020-09-10T16:14:14+01:00/0.19
d79f7cf7
LL
21)
22REV_HASH="${GIT_DATEHASH_BY_NAME[${VERSION}]#*/}"
b4b61bc1
LL
23REV_DATE="${GIT_DATEHASH_BY_NAME[${VERSION}]%%/*}"
24REV_DATE_SHORT="${REV_DATE%%T*}"
d79f7cf7 25GIT_BASENAME="${GIT_REPO##*/}"
b4b61bc1
LL
26SRC_URI="${GIT_REPO}/archive/${REV_HASH}/${GIT_BASENAME}-${VERSION}.tar.gz"
27SRC_DIR="${GIT_BASENAME}-${REV_HASH#v}"
d79f7cf7
LL
28
29################################
30## Compile
31################################
32# cf. autotools.cygclass/src_compile (autotools)
33src_compile() {
34 cd ${S}
35 ./autogen.sh
36 make distclean
37 cygautoreconf
38 cd ${B}
39 cygconf
40 cygmake
41}
42
43################################
44## Packages
45################################
4e33ec04 46PKG_NAMES="${NAME} lib${NAME}0 lib${NAME}-devel"
799f5169 47jbig2dec_CONTENTS="usr/bin/*.exe usr/share/"
4e33ec04 48libjbig2dec0_CATEGORY="Libs"
799f5169
YS
49libjbig2dec0_SUMMARY="${SUMMARY} (runtime)"
50libjbig2dec0_CONTENTS="usr/bin/cygjbig2dec-0.dll"
4e33ec04 51libjbig2dec_devel_CATEGORY="Libs"
799f5169
YS
52libjbig2dec_devel_SUMMARY="${SUMMARY} (development)"
53libjbig2dec_devel_CONTENTS="usr/include/ usr/lib/"
54
d79f7cf7 55DIFF_EXCLUDES="configure.ac"
799f5169 56KEEP_LA_FILES="none"
d79f7cf7
LL
57
58################################
59## Test
60################################
61# cf. src_test.cygpart
62src_test() {
63 prep_testdata
64 cd ${B}
65 cygtest
66}
67
68prep_testdata() {
69 cd ${top}
70 [ -f jb2streams.zip ] || wget -nv https://jbig2dec.com/tests/jb2streams.zip
71 [ -f t89-halftone.zip ] || wget -nv https://jbig2dec.com/tests/t89-halftone.zip
72
73 cd ${B}
74 local JB2_TESTDATA_DIR=tests/ubc
75 rm -rf "${JB2_TESTDATA_DIR}"
76 mkdir -p "${JB2_TESTDATA_DIR}"
77 unzip -n ${top}/jb2streams.zip -d "${JB2_TESTDATA_DIR}"
78 unzip -n ${top}/t89-halftone.zip '*.jb2' -d "${JB2_TESTDATA_DIR}"
79}
This page took 0.101637 seconds and 5 git commands to generate.