Files
termux-packages/packages/libwebp/build.sh
termux-pacman-bot 724a6a3319 fix(main/libwebp): migrate to CMake to provide WebPConfig.cmake
- Context: similar to https://github.com/termux/termux-packages/pull/24956. This is needed as a deeply-nested dependency of a potential improved Blender package.

- Enable manpages

- New files provided after this change:

```diff
 /data/data/com.termux/files/usr/lib/pkgconfig/libwebpdemux.pc
 /data/data/com.termux/files/usr/lib/pkgconfig/libwebpmux.pc
 /data/data/com.termux/files/usr/share
+/data/data/com.termux/files/usr/share/WebP
+/data/data/com.termux/files/usr/share/WebP/cmake
+/data/data/com.termux/files/usr/share/WebP/cmake/WebPConfig.cmake
+/data/data/com.termux/files/usr/share/WebP/cmake/WebPConfigVersion.cmake
+/data/data/com.termux/files/usr/share/WebP/cmake/WebPTargets-release.cmake
+/data/data/com.termux/files/usr/share/WebP/cmake/WebPTargets.cmake
 /data/data/com.termux/files/usr/share/doc
 /data/data/com.termux/files/usr/share/doc/libwebp
 /data/data/com.termux/files/usr/share/doc/libwebp/copyright
+/data/data/com.termux/files/usr/share/man
+/data/data/com.termux/files/usr/share/man/man1
+/data/data/com.termux/files/usr/share/man/man1/cwebp.1.gz
+/data/data/com.termux/files/usr/share/man/man1/dwebp.1.gz
+/data/data/com.termux/files/usr/share/man/man1/gif2webp.1.gz
+/data/data/com.termux/files/usr/share/man/man1/img2webp.1.gz
+/data/data/com.termux/files/usr/share/man/man1/webpinfo.1.gz
+/data/data/com.termux/files/usr/share/man/man1/webpmux.1.gz
```

- Compare Arch Linux: 8aad1cd0f1/PKGBUILD
2025-06-06 08:41:53 +00:00

38 lines
1.3 KiB
Bash

TERMUX_PKG_HOMEPAGE=https://github.com/webmproject/libwebp
TERMUX_PKG_DESCRIPTION="Library to encode and decode images in WebP format"
TERMUX_PKG_LICENSE="BSD 3-Clause"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION="1.5.0"
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=https://github.com/webmproject/libwebp/archive/v$TERMUX_PKG_VERSION.tar.gz
TERMUX_PKG_SHA256=668c9aba45565e24c27e17f7aaf7060a399f7f31dba6c97a044e1feacb930f37
TERMUX_PKG_AUTO_UPDATE=true
TERMUX_PKG_UPDATE_TAG_TYPE="newest-tag"
TERMUX_PKG_DEPENDS="giflib, libjpeg-turbo, libpng, libtiff, zlib"
TERMUX_PKG_BREAKS="libwebp-dev"
TERMUX_PKG_REPLACES="libwebp-dev"
TERMUX_PKG_FORCE_CMAKE=true
# "vwebp" is an X11 program and triggers a dependency on GLUT, which is in x11-packages
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
-DBUILD_SHARED_LIBS=ON
-DWEBP_BUILD_VWEBP=OFF
-DWEBP_BUILD_CWEBP=ON
-DWEBP_BUILD_DWEBP=ON
-DWEBP_BUILD_GIF2WEBP=ON
-DWEBP_BUILD_IMG2WEBP=ON
-DWEBP_BUILD_EXTRAS=ON
-DWEBP_ENABLE_SWAP_16BIT_CSP=ON
"
termux_step_post_get_source() {
# Do not forget to bump revision of reverse dependencies and rebuild them
# after SOVERSION is changed.
local _SOVERSION=7
local e=$(sed -En 's/^libwebp_la_LDFLAGS\s*=.*\s+-version-info\s+([0-9]+):([0-9]+):([0-9]+).*/\1-\3/p' \
src/Makefile.am)
if [ ! "${e}" ] || [ "${_SOVERSION}" != "$(( "${e}" ))" ]; then
termux_error_exit "SOVERSION guard check failed."
fi
}