mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-06-30 18:03:07 +03:00
Merge pull request #2305 from hugovk/refactor-dependency-install
Build: Refactor dependency installation
This commit is contained in:
commit
0600014709
12
depends/download-and-extract.sh
Executable file
12
depends/download-and-extract.sh
Executable file
|
@ -0,0 +1,12 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# Usage: ./download-and-extract.sh something.tar.gz https://example.com/something.tar.gz
|
||||||
|
|
||||||
|
archive=$1
|
||||||
|
url=$2
|
||||||
|
|
||||||
|
if [ ! -f $archive.tar.gz ]; then
|
||||||
|
wget -O $archive.tar.gz $url
|
||||||
|
fi
|
||||||
|
|
||||||
|
rm -r $archive
|
||||||
|
tar -xvzf $archive.tar.gz
|
|
@ -1,9 +1,11 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# install libimagequant
|
# install libimagequant
|
||||||
|
|
||||||
git clone -b 2.6.0 https://github.com/pornel/pngquant
|
archive=pngquant-2.6.0
|
||||||
|
|
||||||
pushd pngquant
|
./download-and-extract.sh $archive https://raw.githubusercontent.com/python-pillow/pillow-depends/master/$archive.tar.gz
|
||||||
|
|
||||||
|
pushd $archive
|
||||||
|
|
||||||
make -C lib shared
|
make -C lib shared
|
||||||
sudo cp lib/libimagequant.so* /usr/lib/
|
sudo cp lib/libimagequant.so* /usr/lib/
|
||||||
|
|
|
@ -1,19 +1,12 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# install openjpeg
|
# install openjpeg
|
||||||
|
|
||||||
|
archive=openjpeg-2.1.2
|
||||||
|
|
||||||
if [ ! -f openjpeg-2.1.2.tar.gz ]; then
|
./download-and-extract.sh $archive https://raw.githubusercontent.com/python-pillow/pillow-depends/master/$archive.tar.gz
|
||||||
wget -O 'openjpeg-2.1.2.tar.gz' 'https://github.com/python-pillow/pillow-depends/blob/master/openjpeg-2.1.2.tar.gz?raw=true'
|
|
||||||
|
|
||||||
fi
|
pushd $archive
|
||||||
|
|
||||||
rm -r openjpeg-2.1.2
|
|
||||||
tar -xvzf openjpeg-2.1.2.tar.gz
|
|
||||||
|
|
||||||
|
|
||||||
pushd openjpeg-2.1.2
|
|
||||||
|
|
||||||
cmake -DCMAKE_INSTALL_PREFIX=/usr . && make -j4 && sudo make -j4 install
|
cmake -DCMAKE_INSTALL_PREFIX=/usr . && make -j4 && sudo make -j4 install
|
||||||
|
|
||||||
popd
|
popd
|
||||||
|
|
||||||
|
|
|
@ -1,14 +1,11 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# install webp
|
# install webp
|
||||||
|
|
||||||
if [ ! -f libwebp-0.5.2.tar.gz ]; then
|
archive=libwebp-0.5.2
|
||||||
wget -O 'libwebp-0.5.2.tar.gz' 'https://github.com/python-pillow/pillow-depends/blob/master/libwebp-0.5.2.tar.gz?raw=true'
|
|
||||||
fi
|
|
||||||
|
|
||||||
rm -r libwebp-0.5.2
|
./download-and-extract.sh $archive https://raw.githubusercontent.com/python-pillow/pillow-depends/master/$archive.tar.gz
|
||||||
tar -xvzf libwebp-0.5.2.tar.gz
|
|
||||||
|
|
||||||
pushd libwebp-0.5.2
|
pushd $archive
|
||||||
|
|
||||||
./configure --prefix=/usr --enable-libwebpmux --enable-libwebpdemux && make -j4 && sudo make -j4 install
|
./configure --prefix=/usr --enable-libwebpmux --enable-libwebpdemux && make -j4 && sudo make -j4 install
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user