libdeflate 1.8
[git/cygwin-packages/libdeflate.git] / libdeflate.cygport
CommitLineData
420d8552
LL
1################################
2NAME=libdeflate
1b9392cb 3VERSION=1.8
420d8552
LL
4RELEASE=1
5
6################################
7CATEGORY="Archive"
8SUMMARY="A library for fast, whole-buffer DEFLATE-based compression and decompression"
9DESCRIPTION="\
10libdeflate is a library for fast, whole-buffer DEFLATE-based
11compression and decompression.
12The supported formats are:
13 DEFLATE (raw),
14 zlib (a.k.a. DEFLATE with a zlib wrapper),
15 gzip (a.k.a. DEFLATE with a gzip wrapper).
16libdeflate is heavily optimized. It is significantly faster than
17the zlib library, both for compression and decompression, and
18especially on x86 processors. In addition, libdeflate provides
19optional high compression modes that provide a better compression
20ratio than the zlib's 'level 9'."
21HOMEPAGE="https://github.com/ebiggers/libdeflate"
22
23################################
24## Source from a git repository
25################################
26GIT_REPO="https://github.com/ebiggers/libdeflate"
27declare -A GIT_DATEHASH_BY_NAME=(
929d8d8a 28 # git log --date=iso-strict --format='%cd/%H' -1
1b9392cb 29 [1.8]=2021-07-15T09:31:09-05:00/v1.8
929d8d8a
LL
30 [1.7]=2020-11-09T19:29:50-08:00/v1.7
31 [1.6]=2020-05-12T19:42:04-07:00/v1.6
420d8552
LL
32)
33REV_HASH="${GIT_DATEHASH_BY_NAME[${VERSION}]#*/}"
34REV_DATE="${GIT_DATEHASH_BY_NAME[${VERSION}]%/*}"
b713e67b 35REV_DATE_SHORT="${REV_DATE%%T*}"
420d8552 36GIT_BASENAME="${GIT_REPO##*/}"
b713e67b
LL
37SRC_URI="${GIT_REPO}/archive/${REV_HASH}/${GIT_BASENAME}-${VERSION}.tar.gz"
38SRC_DIR="${GIT_BASENAME}-${REV_HASH#v}"
420d8552
LL
39
40################################
41## ABI for libdeflate
42ABI=0
43################################
44
45################################
46## Requirements for building
47################################
48BUILD_REQUIRES="\
588a73e8
LL
49 zlib-devel\
50"
51
52# Here are packages unnecessary for building but necessary for testing
53TEST_REQUIRES="\
54 zlib-devel\
420d8552
LL
55"
56
57################################
58## Patch files
59################################
60# Patch filenames are in a default style of 'git format-patch'
61PATCH_URI=$(\
62 find -maxdepth 1 -type f -name '[0-9][0-9][0-9][0-9]-*.patch' \
63 | sort \
64)
65# Additional patches, if any
66PATCH_URI+="
67"
68
69################################
70## Contents of our packages
71################################
72# main package
73THIS_PN="${NAME}-tools"
74THIS_VN=${THIS_PN//[-+\.]/_}
75PKG_NAMES+=" ${THIS_PN}"
76
77printf -v "${THIS_VN}_CONTENTS" "%s" "\
78 --exclude=*.dll\
79 usr/bin/\
80 usr/share/doc/\
81"
82printf -v "${THIS_VN}_REQUIRES" "%s" "\
83"
84
85################################
86# Runtime libraries
87THIS_PN="${NAME}${ABI}"
88THIS_VN=${THIS_PN//[-+\.]/_}
89PKG_NAMES+=" ${THIS_PN}"
90
91printf -v "${THIS_VN}_CATEGORY" "%s" "Libs ${CATEGORY}"
92printf -v "${THIS_VN}_SUMMARY" "%s" "${SUMMARY% *} (runtime)"
93printf -v "${THIS_VN}_CONTENTS" "%s" "\
94 usr/bin/*.dll\
95"
96printf -v "${THIS_VN}_REQUIRES" "%s" "\
97"
98
99################################
100# Devel
101THIS_PN="${NAME}-devel"
102THIS_VN=${THIS_PN//[-+\.]/_}
103PKG_NAMES+=" ${THIS_PN}"
104
105printf -v "${THIS_VN}_CATEGORY" "%s" "Devel Libs ${CATEGORY}"
106printf -v "${THIS_VN}_SUMMARY" "%s" "${SUMMARY% *} (devel)"
107printf -v "${THIS_VN}_CONTENTS" "%s" "\
108 usr/include/ \
109 usr/lib/lib* \
110"
111printf -v "${THIS_VN}_REQUIRES" "%s" "\
112"
113
114################################
115src_compile() {
116 lndirs
117 cd ${B}
ad2e8c2a
LL
118
119 PREFIX=/usr \
120 USE_SHARED_LIB=1 \
121 cygmake
420d8552
LL
122}
123
124################################
125src_install() {
126 cd ${B}
ad2e8c2a
LL
127
128 PREFIX=/usr \
129 USE_SHARED_LIB=1 \
130 cyginstall
420d8552
LL
131}
132
133################################
c79520ed
LL
134src_test() {
135 cd ${B}
136
137 PREFIX=/usr \
138 USE_SHARED_LIB=1 \
139 cygtest
140}
141
142################################
This page took 0.136151 seconds and 5 git commands to generate.