jobextra/libtiff/PKGBUILD-arch

69 lines
2.2 KiB
Plaintext

# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
# Contributor: Eric Bélanger <eric@archlinux.org>
pkgname=libtiff
pkgver=4.6.0
pkgrel=2
pkgdesc='Library for manipulation of TIFF images'
url='http://www.simplesystems.org/libtiff/'
arch=('x86_64')
license=('custom')
depends=('gcc-libs' 'glibc' 'jbigkit' 'libjpeg-turbo' 'libjpeg.so' 'zlib' 'xz' 'zstd')
makedepends=('freeglut' 'glu' 'mesa')
optdepends=('freeglut: for using tiffgt')
provides=('libtiff.so' 'libtiffxx.so')
source=("https://download.osgeo.org/libtiff/tiff-${pkgver}.tar.gz"{,.sig}
# CVE-2023-6277
"https://gitlab.com/libtiff/libtiff/-/commit/5320c9d89c054fa805d037d84c57da874470b01a.patch")
sha256sums=('88b3979e6d5c7e32b50d7ec72fb15af724f6ab2cbf7e10880c360a77e4b5d99a'
'SKIP'
'7988575f4caa27e406aee172354ec5c9ff7271813988a753c2643a9ca0825ca8')
b2sums=('aa3d51ffb7d800424a05e6a12e2eaad41adfe7d676650d2857bcc073a25627be88372410a27126e9c067692060c26bd2dec80a42a2188197f6f3ff9d8507fc8f'
'SKIP'
'f0ecae3d1b75133823aa9361caeb3123ddda72d21748552daf2bcf9c771ace743b888956d6320593e85f9b2f0fc558f21bceabf81312ed5f5845859e3f7c9199')
validpgpkeys=(
'EBDFDB21B020EE8FD151A88DE301047DE1198975' # Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
'B1FA7D81EEB8E66399178B9733EBBFC47B3DD87D' # Even Rouault <even.rouault@spatialys.com>
)
prepare() {
cd tiff-${pkgver//rc*/}
# apply patch from the source array (should be a pacman feature)
local src
for src in "${source[@]}"; do
src="${src%%::*}"
src="${src##*/}"
[[ $src = *.patch ]] || continue
echo "Applying patch $src..."
patch -Np1 < "../$src"
done
}
build() {
local configure_options=(
--prefix=/usr
--sysconfdir=/etc
--enable-ld-version-script
--mandir=/usr/share/man
--with-docdir=/usr/share/doc/${pkgname}
)
cd tiff-${pkgver//rc*/}
./configure "${configure_options[@]}"
sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
make
}
check() {
cd tiff-${pkgver//rc*/}
make check
}
package() {
cd tiff-${pkgver//rc*/}
make DESTDIR="${pkgdir}" install
install -Dm 644 LICENSE.md -t "${pkgdir}/usr/share/licenses/${pkgname}/"
}
# vim: ts=2 sw=2 et: