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
2022-08-21 19:09:31 +00:00
_name = libjpeg-turbo
pkgname = $_name
2023-02-15 02:17:54 +00:00
pkgver = 2.1.5
2022-05-20 21:51:45 +00:00
pkgrel = 2
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-15 02:17:54 +00:00
source = ( https://sourceforge.net/projects/$_name /files/$pkgver /$_name -$pkgver .tar.gz{ ,.sig}
$_name -initialize-simd_support.patch::https://github.com/libjpeg-turbo/libjpeg-turbo/commit/4e028ecd63aa.patch)
sha512sums = ( 'ceab6d1c3c46d2816b06402e3b912e950d887fc8a6fb32fa6876f4aaa663b4769d8f4c50e1b967addf6704d0760ca14ed723d55e0312d7ca69e7f2a91484c0dc'
'SKIP'
'9275268b5e138ee76a7245aded05917a16c05951441d53bd1b6e65a306a75dc0d0c672c7aa5d52edce7ec197a7fba5658ffe7db0a406d83a88d55819338a5023' )
b2sums = ( 'c65de2717ddc33447064412738b2db94a92693faad18f29f14c5c368d9eb4c617fe447a6f9428d9a101458dec0c65abc527e20632571eaa727d98cd5435241d4'
'SKIP'
'9bbad32e30289951a95ebef4ce36a0045d69f50a73a72a4f4820257acabfb6e6a9234538bfcc76441885c2fccf01d44008f7795c3b85921b23cbb1e4a0c05228' )
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-02-15 02:17:54 +00:00
prepare( ) {
cd $_name -$pkgver
# https://github.com/libjpeg-turbo/libjpeg-turbo/issues/649
patch -Np1 -i ../$_name -initialize-simd_support.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
-S $_name -$pkgver
-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
2022-08-21 19:09:31 +00:00
install -vDm 644 $_name -$pkgver /jpegint.h " $pkgdir /usr/include "
install -vDm 644 $_name -$pkgver /LICENSE.md -t " $pkgdir /usr/share/licenses/ $pkgname "
2011-06-09 23:05:58 +00:00
}