-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathwebp
More file actions
30 lines (25 loc) · 836 Bytes
/
webp
File metadata and controls
30 lines (25 loc) · 836 Bytes
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
# Use legacy bundle on high-sierra
if [ "x${OSTYPE:6:1}" = "x1" ]; then
bottle="https://github.com/autobrew/bundler/releases/download/webp-1.3.0_1/webp-1.1.0-high_sierra.tar.xz"
else
bottle="https://github.com/autobrew/bundler/releases/download/webp-1.3.0_1/webp-1.3.0_1-universal.tar.xz"
MORELIBS="-lsharpyuv"
fi
# Skip if disabled
if [ "$DISABLE_AUTOBREW" ]; then return 0; fi
echo "Using autobrew bundle: $(basename $bottle)"
# General setup
BREWDIR="$PWD/.deps"
mkdir -p $BREWDIR
curl -sSL $bottle -o libs.tar.xz
tar -xf libs.tar.xz --strip 1 -C $BREWDIR
rm -f libs.tar.xz
# package may look for /opt
mkdir -p $BREWDIR/opt/webp
ln -s $BREWDIR/{include,lib} $BREWDIR/opt/webp/
# Hardcoded flags
PKG_LIBS="-L$BREWDIR/lib -lwebp $MORELIBS"
PKG_CFLAGS="-I$BREWDIR/include"
# Cleanup
echo "rm -Rf .deps" >> cleanup
chmod +x cleanup