upgpkg: wordpress 6.2.1-1
[ArchLinux/community.git] / lib32-libjpeg-turbo / trunk / PKGBUILD
bloba9abb6116ed454fc68b31f5f53fd418195c29910
1 # Maintainer: David Runge <dvzrv@archlinux.org>
2 # Contributor: Gaetan Bisson <bisson@archlinux.org>
3 # Contributor: Allan McRae <allan@archlinux.org>
4 # Contributor: Simone Sclavi 'Ito' <darkhado@gmail.com>
6 _name=libjpeg-turbo
7 pkgname=lib32-$_name
8 pkgver=2.1.5.1
9 pkgrel=1
10 pkgdesc="JPEG image codec with accelerated baseline compression and decompression"
11 url="https://libjpeg-turbo.org/"
12 arch=(x86_64)
13 license=(BSD)
14 depends=(lib32-glibc "$_name=$pkgver")
15 makedepends=(cmake ninja nasm)
16 provides=(lib32-libjpeg libjpeg.so libturbojpeg.so)
17 source=(https://sourceforge.net/projects/$_name/files/$pkgver/$_name-$pkgver.tar.gz{,.sig})
18 sha512sums=('86a7248d064043b26b09755633ef4872a2a6133c9e677a9fe4be6645b2e0fde102cf01e09119967b3b6b85f4cb93f3f7c49ec4973944d5eff99b5b90ce8b0be6'
19             'SKIP')
20 b2sums=('9583a0a91e45347d651de6bf5192a23bfe4e64cef67cdbb18f5b578b424fc46fc114e5649e93a467906cf047948e43a11b6d17b48c47f879c51cff1a4ef356ff'
21         'SKIP')
22 validpgpkeys=('0338C8D8D9FDA62CF9C421BD7EC2DBB6F4DBF434') # The libjpeg-turbo Project (Signing key for official binaries) <information@libjpeg-turbo.org>
24 build() {
25   local cmake_options=(
26     -B build
27     -DCMAKE_INSTALL_PREFIX=/usr
28     -DCMAKE_INSTALL_LIBDIR=/usr/lib32
29     -DCMAKE_BUILD_TYPE=None
30     -DENABLE_STATIC=OFF
31     -DWITH_JAVA=OFF
32     -DWITH_JPEG8=ON
33     -G Ninja
34     -S $_name-$pkgver
35     -W no-dev
36   )
38   export CC="gcc -m32"
39   export CXX="g++ -m32"
40   export PKG_CONFIG="i686-pc-linux-gnu-pkg-config"
42   cmake "${cmake_options[@]}"
43   cmake --build build -v
46 check() {
47   ctest --test-dir build --output-on-failure --stop-on-failure -j$(nproc)
50 package() {
51   DESTDIR="$pkgdir" cmake --install build -v
53   # remove everything that is provided by libjpeg-turbo
54   rm -r "$pkgdir"/usr/{include,share,bin}
56   install -vDm 644 $_name-$pkgver/LICENSE.md -t "$pkgdir/usr/share/licenses/$pkgname"