archrelease: copy trunk to extra-x86_64
[arch-packages.git] / libwebp / repos / extra-x86_64 / PKGBUILD
blobc90871f50bd279c07ae2139457e797fbcbe1781d
1 # Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
2 # Contributor: Alexander Rødseth <rodseth@gmail.com>
3 # Contributor: Jon Nordby <jononor@gmail.com>
5 pkgname=libwebp
6 pkgver=1.3.0
7 pkgrel=2
8 pkgdesc="WebP library and conversion tools"
9 url="https://developers.google.com/speed/webp/"
10 arch=(x86_64)
11 license=(BSD)
12 depends=(libpng libjpeg libtiff giflib)
13 makedepends=(cmake ninja)
14 provides=(libwebp{,decoder,demux,mux}.so libsharpyuv.so)
15 options=(debug)
16 source=(https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-$pkgver.tar.gz{,.asc})
17 sha256sums=('64ac4614db292ae8c5aa26de0295bf1623dbb3985054cb656c55e67431def17c'
18             'SKIP')
19 validpgpkeys=('6B0E6B70976DE303EDF2F601F9C3D6BDB8232B5D') # WebP release signing key
21 build() {
22   local cmake_options=(
23     -DCMAKE_INSTALL_PREFIX=/usr
24     -DCMAKE_BUILD_TYPE=None
25     -DCMAKE_SKIP_INSTALL_RPATH=ON
26     -DBUILD_SHARED_LIBS=ON
27     -DWEBP_BUILD_VWEBP=OFF
28     -DWEBP_BUILD_EXTRAS=OFF
29   )
31   # Mimic autotools build without --enable-asserts
32   CFLAGS+=" -DNDEBUG"
33   CXXFLAGS+=" -DNDEBUG"
35   cmake -S libwebp-$pkgver -B build -G Ninja "${cmake_options[@]}"
36   cmake --build build
39 check() {
40   cd build
41   ctest --output-on-failure --stop-on-failure -j$(nproc)
44 package() {
45   DESTDIR="$pkgdir" cmake --install build
47   install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 \
48     libwebp-$pkgver/COPYING
51 # vim:set sw=2 sts=-1 et: