2020-10-18 19:39:30 +00:00
# Maintainer: David Runge <dvzrv@archlinux.org>
# Contributor: Gaetan Bisson <bisson@archlinux.org>
2013-10-22 06:34:38 +00:00
# Contributor: Allan McRae <allan@archlinux.org>
2012-02-12 17:44:45 +00:00
# Contributor: Simone Sclavi 'Ito' <darkhado@gmail.com>
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
2020-10-18 19:39:30 +00:00
# - removed makedepends on nasm and java, -DWITH_JAVA=OFF
2011-06-09 23:05:58 +00:00
2023-02-27 23:54:38 +00:00
pkgname = libjpeg-turbo
pkgver = 2.1.5.1
pkgrel = 1
2022-02-27 00:05:02 +00:00
pkgdesc = "JPEG image codec with accelerated baseline compression and decompression"
url = "https://libjpeg-turbo.org/"
2022-08-21 19:09:31 +00:00
arch = ( x86_64)
2021-11-20 20:02:02 +00:00
license = ( BSD)
depends = ( glibc)
2022-08-21 19:09:31 +00:00
makedepends = ( cmake ninja)
2021-11-20 20:02:02 +00:00
provides = ( libjpeg libjpeg.so libturbojpeg.so)
2023-02-27 23:54:38 +00:00
source = ( https://sourceforge.net/projects/$pkgname /files/$pkgver /$pkgname -$pkgver .tar.gz{ ,.sig} )
sha512sums = ( '86a7248d064043b26b09755633ef4872a2a6133c9e677a9fe4be6645b2e0fde102cf01e09119967b3b6b85f4cb93f3f7c49ec4973944d5eff99b5b90ce8b0be6'
'SKIP' )
b2sums = ( '9583a0a91e45347d651de6bf5192a23bfe4e64cef67cdbb18f5b578b424fc46fc114e5649e93a467906cf047948e43a11b6d17b48c47f879c51cff1a4ef356ff'
'SKIP' )
2020-11-21 17:27:14 +00:00
validpgpkeys = ( '0338C8D8D9FDA62CF9C421BD7EC2DBB6F4DBF434' ) # The libjpeg-turbo Project (Signing key for official binaries) <information@libjpeg-turbo.org>
2016-06-12 19:32:50 +00:00
2011-06-09 23:05:58 +00:00
build( ) {
2023-02-15 02:17:54 +00:00
local cmake_options = (
-B build
-DCMAKE_INSTALL_PREFIX= /usr
-DCMAKE_INSTALL_LIBDIR= /usr/lib
-DCMAKE_BUILD_TYPE= None
-DENABLE_STATIC= OFF
-DWITH_JAVA= OFF
-DWITH_JPEG8= ON
-G Ninja
2023-02-27 23:54:38 +00:00
-S $pkgname -$pkgver
2023-02-15 02:17:54 +00:00
-W no-dev
)
cmake " ${ cmake_options [@] } "
2022-08-21 19:09:31 +00:00
cmake --build build -v
2012-02-12 17:44:45 +00:00
}
check( ) {
2023-02-15 02:17:54 +00:00
ctest --test-dir build --output-on-failure --stop-on-failure -j$( nproc)
2011-06-09 23:05:58 +00:00
}
package( ) {
2022-08-21 19:09:31 +00:00
DESTDIR = " $pkgdir " cmake --install build -v
2020-10-18 19:39:30 +00:00
2022-08-21 19:09:31 +00:00
# header required by some dependents
2020-10-18 19:39:30 +00:00
# https://bugs.archlinux.org/task/24787
2023-02-27 23:54:38 +00:00
install -vDm 644 $pkgname -$pkgver /jpegint.h " $pkgdir /usr/include "
2022-08-21 19:09:31 +00:00
2023-02-27 23:54:38 +00:00
install -vDm 644 $pkgname -$pkgver /LICENSE.md -t " $pkgdir /usr/share/licenses/ $pkgname "
2011-06-09 23:05:58 +00:00
}