Ubuntu Jammy (22.04) doesn't have libwebp6
authorGlenn Adams <gasubic@gmail.com>
Sun, 25 Sep 2022 05:20:09 +0000 (00:20 -0500)
committerRafael dos Santos Silva <xfalcox@gmail.com>
Tue, 27 Sep 2022 13:59:14 +0000 (10:59 -0300)
Conditionally use libwebp7 on Jammy. N.B. This conditionalization should probably be generalized.

image/base/install-imagemagick

index 71700e159ba3ae51dd919fbc0ed48a46ca0776f9..057c168c0e2d0595771507b07caff5e9aadb1a3e 100755 (executable)
@@ -8,6 +8,9 @@ IMAGE_MAGICK_HASH="c7526ca8b341e42f026f8157632b1722555f0d015c281861d9c4d314c0c8f
 # We use debian, but GitHub CI is stuck on Ubuntu Bionic, so this must be compatible with both
 LIBJPEGTURBO=$(cat /etc/issue | grep -qi Debian && echo 'libjpeg62-turbo libjpeg62-turbo-dev' || echo 'libjpeg-turbo8 libjpeg-turbo8-dev')
 
+# Ubuntu 22.04 (Jammy) doesn't have libwebp6
+LIBWEBP=$(cat /etc/issue | grep -qi 'Ubuntu 22.04' && echo 'libwebp7' || echo 'libwebp6')
+
 PREFIX=/usr/local
 WDIR=/tmp/imagemagick
 
@@ -15,7 +18,7 @@ WDIR=/tmp/imagemagick
 apt -y -q remove imagemagick
 apt -y -q install git make gcc pkg-config autoconf curl g++ yasm cmake \
     libde265-0 libde265-dev ${LIBJPEGTURBO} x265 libx265-dev libtool \
-    libpng16-16 libpng-dev ${LIBJPEGTURBO} libwebp6 libwebp-dev libgomp1 \
+    libpng16-16 libpng-dev ${LIBJPEGTURBO} ${LIBWEBP} libwebp-dev libgomp1 \
     libwebpmux3 libwebpdemux2 ghostscript libxml2-dev libxml2-utils \
     libltdl7-dev libbz2-dev gsfonts libtiff-dev libfreetype6-dev libjpeg-dev