Skip to content

Commit a59ce25

Browse files
committed
Install zstd for libtiff on Linux
1 parent 35f23fb commit a59ce25

File tree

2 files changed

+40
-0
lines changed

2 files changed

+40
-0
lines changed

.github/workflows/wheels-dependencies.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ LIBPNG_VERSION=1.6.50
9999
JPEGTURBO_VERSION=3.1.1
100100
OPENJPEG_VERSION=2.5.3
101101
XZ_VERSION=5.8.1
102+
ZSTD_VERSION=1.5.7
102103
TIFF_VERSION=4.7.0
103104
LCMS2_VERSION=2.17
104105
ZLIB_VERSION=1.3.1
@@ -254,6 +255,14 @@ function build_libavif {
254255
touch libavif-stamp
255256
}
256257

258+
function build_zstd {
259+
if [ -e zstd-stamp ]; then return; fi
260+
local out_dir=$(fetch_unpack https://github.com/facebook/zstd/releases/download/v$ZSTD_VERSION/zstd-$ZSTD_VERSION.tar.gz)
261+
(cd $out_dir \
262+
&& make -j4 install)
263+
touch zstd-stamp
264+
}
265+
257266
function build {
258267
build_xz
259268
if [ -z "$IS_ALPINE" ] && [ -z "$SANITIZER" ] && [ -z "$IS_MACOS" ]; then
@@ -285,6 +294,7 @@ function build {
285294
--with-jpeg-include-dir=$BUILD_PREFIX/include --with-jpeg-lib-dir=$BUILD_PREFIX/lib \
286295
--disable-webp --disable-libdeflate --disable-zstd
287296
else
297+
build_zstd
288298
build_tiff
289299
fi
290300

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
BSD License
2+
3+
For Zstandard software
4+
5+
Copyright (c) Meta Platforms, Inc. and affiliates. All rights reserved.
6+
7+
Redistribution and use in source and binary forms, with or without modification,
8+
are permitted provided that the following conditions are met:
9+
10+
* Redistributions of source code must retain the above copyright notice, this
11+
list of conditions and the following disclaimer.
12+
13+
* Redistributions in binary form must reproduce the above copyright notice,
14+
this list of conditions and the following disclaimer in the documentation
15+
and/or other materials provided with the distribution.
16+
17+
* Neither the name Facebook, nor Meta, nor the names of its contributors may
18+
be used to endorse or promote products derived from this software without
19+
specific prior written permission.
20+
21+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
22+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
23+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
24+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
25+
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
26+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
27+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
28+
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
30+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

0 commit comments

Comments
 (0)