Skip to content

Commit a64931c

Browse files
committed
fix(main/libwebp): migrate to CMake to provide WebPConfig.cmake
- Context: similar to #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: https://gitlab.archlinux.org/archlinux/packaging/packages/libwebp/-/blob/8aad1cd0f1748a36ffaaa1211d4b5e77463964b7/PKGBUILD
1 parent b79122f commit a64931c

File tree

2 files changed

+29
-16
lines changed

2 files changed

+29
-16
lines changed

packages/libwebp/build.sh

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,26 +3,26 @@ TERMUX_PKG_DESCRIPTION="Library to encode and decode images in WebP format"
33
TERMUX_PKG_LICENSE="BSD 3-Clause"
44
TERMUX_PKG_MAINTAINER="@termux"
55
TERMUX_PKG_VERSION="1.5.0"
6+
TERMUX_PKG_REVISION=1
67
TERMUX_PKG_SRCURL=https://github.com/webmproject/libwebp/archive/v$TERMUX_PKG_VERSION.tar.gz
78
TERMUX_PKG_SHA256=668c9aba45565e24c27e17f7aaf7060a399f7f31dba6c97a044e1feacb930f37
89
TERMUX_PKG_AUTO_UPDATE=true
910
TERMUX_PKG_UPDATE_TAG_TYPE="newest-tag"
10-
TERMUX_PKG_DEPENDS="giflib, libjpeg-turbo, libpng, libtiff"
11+
TERMUX_PKG_DEPENDS="giflib, libjpeg-turbo, libpng, libtiff, zlib"
1112
TERMUX_PKG_BREAKS="libwebp-dev"
1213
TERMUX_PKG_REPLACES="libwebp-dev"
14+
TERMUX_PKG_FORCE_CMAKE=true
15+
# "vwebp" is an X11 program and triggers a dependency on GLUT, which is in x11-packages
1316
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
14-
--enable-libwebpmux
15-
--enable-libwebpdemux
16-
--enable-libwebpdecoder
17-
--enable-libwebpextras
18-
--enable-swap-16bit-csp
19-
--enable-gif
20-
--enable-jpeg
21-
--enable-png
22-
--enable-tiff
23-
--disable-wic
17+
-DBUILD_SHARED_LIBS=ON
18+
-DWEBP_BUILD_VWEBP=OFF
19+
-DWEBP_BUILD_CWEBP=ON
20+
-DWEBP_BUILD_DWEBP=ON
21+
-DWEBP_BUILD_GIF2WEBP=ON
22+
-DWEBP_BUILD_IMG2WEBP=ON
23+
-DWEBP_BUILD_EXTRAS=ON
24+
-DWEBP_ENABLE_SWAP_16BIT_CSP=ON
2425
"
25-
TERMUX_PKG_RM_AFTER_INSTALL="share/man/man1"
2626

2727
termux_step_post_get_source() {
2828
# Do not forget to bump revision of reverse dependencies and rebuild them
@@ -35,7 +35,3 @@ termux_step_post_get_source() {
3535
termux_error_exit "SOVERSION guard check failed."
3636
fi
3737
}
38-
39-
termux_step_pre_configure() {
40-
./autogen.sh
41-
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
libcpufeatures in only used in libwebp for NEON,
2+
and all Termux's supported ARM devices support NEON
3+
(Android 5.0+ requires NEON: https://developer.android.com/ndk/guides/cpu-arm-neon)
4+
and the NEON support is already successfully detected at configure-time separately from this:
5+
-- Performing Test WEBP_HAVE_FLAG_NEON - Success
6+
7+
--- a/CMakeLists.txt
8+
+++ b/CMakeLists.txt
9+
@@ -181,7 +181,7 @@ endif()
10+
11+
# ##############################################################################
12+
# Android only.
13+
-if(ANDROID)
14+
+if(FALSE)
15+
include_directories(${ANDROID_NDK}/sources/android/cpufeatures)
16+
add_library(cpufeatures-webp STATIC
17+
${ANDROID_NDK}/sources/android/cpufeatures/cpu-features.c)

0 commit comments

Comments
 (0)