db-move: moved gnome-weather from [staging] to [testing] (any)
[arch-packages.git] / libjpeg-turbo / repos / extra-x86_64 / PKGBUILD
blobc91701a8ac3651ef1b5fe6c2f40a4d82ce93ecca
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 pkgname=libjpeg-turbo
7 pkgver=2.1.5.1
8 pkgrel=1
9 pkgdesc="JPEG image codec with accelerated baseline compression and decompression"
10 url="https://libjpeg-turbo.org/"
11 arch=(x86_64)
12 license=(BSD)
13 depends=(glibc)
14 makedepends=(cmake ninja nasm 'java-environment>11')
15 optdepends=('java-runtime>11: for TurboJPEG Java wrapper')
16 provides=(libjpeg libjpeg.so libturbojpeg.so)
17 source=(https://sourceforge.net/projects/$pkgname/files/$pkgver/$pkgname-$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/lib
29     -DCMAKE_BUILD_TYPE=None
30     -DENABLE_STATIC=OFF
31     -DWITH_JAVA=ON
32     -DWITH_JPEG8=ON
33     -G Ninja
34     -S $pkgname-$pkgver
35     -W no-dev
36   )
38   cmake "${cmake_options[@]}"
39   cmake --build build -v
42 check() {
43   ctest --test-dir build --output-on-failure --stop-on-failure -j$(nproc)
46 package() {
47   DESTDIR="$pkgdir" cmake --install build -v
49   # header required by some dependents
50   # https://bugs.archlinux.org/task/24787
51   install -vDm 644 $pkgname-$pkgver/jpegint.h "$pkgdir/usr/include"
53   install -vDm 644 $pkgname-$pkgver/LICENSE.md -t "$pkgdir/usr/share/licenses/$pkgname"