-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjbig2dec.cygport
59 lines (55 loc) · 1.92 KB
/
jbig2dec.cygport
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
NAME="jbig2dec"
VERSION=0.20p1
RELEASE=1
CATEGORY="Graphics"
SUMMARY="JBIG2 image decoder"
DESCRIPTION="jbig2dec is a decoder implementation of the JBIG2 image compression
format. JBIG2 is designed for lossy or lossless encoding of 'bilevel' (1-bit
monochrome) images at moderately high resolution, and in particular scanned
paper documents. In this domain it is very efficient, offering compression
ratios on the order of 100:1."
HOMEPAGE="https://jbig2dec.com/"
LICENSE="AGPL-3.0-or-later"
################################
## Source from a git repository
################################
GIT_REPO="https://github.com/ArtifexSoftware/jbig2dec"
declare -A GIT_DATEHASH_BY_NAME=(
# git log -1 --date=iso-strict --format='%cd/%H'
[0.20p1]=2023-11-05T12:22:05+01:00/ee53a7e4bc7819d32e8c0b2057885bcc97586bf3
[0.20]=2023-08-30T13:34:46+02:00/0.20
[0.19p4]=2021-03-15T10:46:13+00:00/a6cc1dace9e08159766a45798a69fe4c4a6a881c
[0.19]=2020-09-10T16:14:14+01:00/0.19
)
REV_HASH="${GIT_DATEHASH_BY_NAME[${VERSION}]#*/}"
REV_DATE="${GIT_DATEHASH_BY_NAME[${VERSION}]%%/*}"
REV_DATE_SHORT="${REV_DATE%%T*}"
GIT_BASENAME="${GIT_REPO##*/}"
SRC_URI="${GIT_REPO}/archive/${REV_HASH}/${GIT_BASENAME}-${VERSION}.tar.gz"
SRC_DIR="${GIT_BASENAME}-${REV_HASH#v}"
################################
## Compile
################################
# cf. autotools.cygclass/src_compile (autotools)
src_compile() {
cd ${S}
./autogen.sh
make distclean
cygautoreconf
cd ${B}
cygconf
cygmake
}
################################
## Packages
################################
PKG_NAMES="${NAME} lib${NAME}0 lib${NAME}-devel"
jbig2dec_CONTENTS="usr/bin/*.exe usr/share/"
libjbig2dec0_CATEGORY="Libs"
libjbig2dec0_SUMMARY="${SUMMARY} (runtime)"
libjbig2dec0_CONTENTS="usr/bin/cygjbig2dec-0.dll"
libjbig2dec_devel_CATEGORY="Libs"
libjbig2dec_devel_SUMMARY="${SUMMARY} (development)"
libjbig2dec_devel_CONTENTS="usr/include/ usr/lib/"
DIFF_EXCLUDES="configure.ac"
KEEP_LA_FILES="none"