-
Notifications
You must be signed in to change notification settings - Fork 80
/
zzlibrsvg.sh
executable file
·37 lines (29 loc) · 987 Bytes
/
zzlibrsvg.sh
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
#!/bin/bash
# install librsvg
set -e
ROOTDIR=${ZZROOT:-$HOME/app}
NAME="librsvg"
TYPE=".tar.xz"
FILE="$NAME$TYPE"
DOWNLOADURL="http://ftp.gnome.org/pub/gnome/sources/librsvg/2.46/librsvg-2.46.4.tar.xz"
echo $NAME will be installed in $ROOTDIR
echo Dependency: rust, cariro, cairo-png, cairo-gobject, freetype2, gdk-pixbuf-2.0, libxml, pangocairo, pangoft2, libcroco
mkdir -p $ROOTDIR/downloads
cd $ROOTDIR
if [ -f "downloads/$FILE" ]; then
echo "downloads/$FILE exist"
else
echo "$FILE does not exist, downloading from $DOWNLOADURL"
wget $DOWNLOADURL -O $FILE
mv $FILE downloads/
fi
mkdir -p src/$NAME
tar xf downloads/$FILE -C src/$NAME --strip-components 1
cd src/$NAME
export CFLAGS="-I$ROOTDIR/include"
export CPPFLAGS="-I$ROOTDIR/include"
export LDFLAGS="-L$ROOTDIR/lib"
export PKG_CONFIG_PATH="$ROOTDIR/lib/pkgconfig":"$ROOTDIR/share/pkgconfig":$PKG_CONFIG_PATH
./configure --prefix=$ROOTDIR
make -j$(nproc) && make install
echo $NAME installed on $ROOTDIR