PKGBUILDs/extra/libjpeg-turbo/PKGBUILD
2018-09-04 12:38:06 +00:00

61 lines
1.6 KiB
Bash

# $Id$
# Maintainer: Gaetan Bisson <bisson@archlinux.org>
# Contributor: Allan McRae <allan@archlinux.org>
# Contributor: Simone Sclavi 'Ito' <darkhado@gmail.com>
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - removed makedepends on nasm and java, -DWITH_JAVA=0
# - added -DWITH_SIMD=FALSE to configure for !AArch64
pkgname=libjpeg-turbo
pkgver=2.0.0
pkgrel=1
pkgdesc='JPEG image codec with accelerated baseline compression and decompression'
url='https://libjpeg-turbo.org/'
arch=('x86_64')
license=('custom')
makedepends=('cmake')
validpgpkeys=('7D6293CC6378786E1B5C496885C7044E033FDE16')
source=("https://downloads.sourceforge.net/project/${pkgname}/${pkgver}/${pkgname}-${pkgver}.tar.gz"{,.sig})
sha256sums=('778876105d0d316203c928fd2a0374c8c01f755d0a00b12a1c8934aeccff8868'
'SKIP')
provides=('libjpeg=8.2.2')
prepare() {
cd "${srcdir}/${pkgname}-${pkgver}"
sed 's/Szathmáry/Szathmary/g' -i java/org/libjpegturbo/turbojpeg/*.java
}
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
[[ $CARCH != "aarch64" ]] && CONFIG="-DWITH_SIMD=FALSE"
cmake \
-DWITH_JAVA=0 \
-DWITH_JPEG8=1 \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=/usr/lib \
$CONFIG .
make
}
check() {
cd "${srcdir}/${pkgname}-${pkgver}"
make test
}
package() {
cd "${srcdir}/${pkgname}-${pkgver}"
make \
DESTDIR="${pkgdir}" \
docdir="/usr/share/doc/${pkgname}" \
exampledir="/usr/share/doc/${pkgname}" \
install
install -d "${pkgdir}/usr/share/licenses/${pkgname}"
ln -s ../../doc/libjpeg-turbo/LICENSE.md "${pkgdir}/usr/share/licenses/${pkgname}"
install -m 644 jpegint.h "${pkgdir}/usr/include" # required by other software
}