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
2023-08-07 12:36:27 +00:00
pkgver = 3.0.0
2023-02-27 23:54:38 +00:00
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)
2023-08-07 12:36:27 +00:00
makedepends = (
cmake
ninja
)
provides = (
libjpeg
libjpeg.so
libturbojpeg.so
)
source = (
https://sourceforge.net/projects/$pkgname /files/$pkgver /$pkgname -$pkgver .tar.gz{ ,.sig}
$pkgname -3.0.0-fix_test_concurrency.patch::https://github.com/libjpeg-turbo/libjpeg-turbo/commit/035ea386d1b6a99a8a1e2ab57cc1fc903569136c.patch
)
sha512sums = ( '2307a2e240faf5b3119cdc5cf6a0255813d74591d4a4201fd2374940683cb9de90cb5926367e633f3624b27edd292209c7cd3c38d64522716e83fc81361289b4'
'SKIP'
'2a9fc2b42d0e88c1d9daa80e0e3a4ee0aa669c273b58a26eac0f4e6e95b464e6d76b2b22b0de36014713d8cd03b0196b345d39b93608d77a3972286f0f93c0a2' )
b2sums = ( '9a4b74aad81c2999ab7f3cd7d8695e1132edda141f4cc8a57e671f42cad4ac16b66b0f19cf4b874b61a82c008287ad88cd81d85547c195ed30456e29cb505285'
'SKIP'
'8e04da8af51c21cc461e8373dba6d48ae0c6a28f29f4de864afadf67224aa7d4ff794b2932d063b59b707430f20f3dd6578633f86ac97c3f383ff820763a7692' )
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
2023-08-07 12:36:27 +00:00
prepare( ) {
patch -Np1 -d $pkgname -$pkgver -i ../$pkgname -3.0.0-fix_test_concurrency.patch
}
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
}