1 # Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
2 # Maintainer: Eric BĂ©langer <eric@archlinux.org>
5 pkgname=('jasper' 'jasper-doc')
8 pkgdesc='Software-based implementation of the codec specified in the emerging JPEG-2000 Part-1 standard'
9 url='https://www.ece.uvic.ca/~frodo/jasper/'
11 license=('custom:JasPer2.0')
12 makedepends=('glibc' 'libjpeg' 'freeglut' 'libxmu' 'glu' 'cmake' 'doxygen')
14 source=(${pkgname}-${pkgver}.tar.gz::https://github.com/mdadams/jasper/archive/version-${pkgver}.tar.gz
15 jasper-1.900.1-fix-filename-buffer-overflow.patch)
16 sha512sums=('13db31df22655e37b0d82c2edc29848d51969e994d69ca6f8c60e7f43861c9d5dab91c95dbb0d6ac114ff2e6e61161225fd1165823176fd6339e1cc551024a5b'
17 'b8d798bf75523c5db263783e42c653dd0cb03deee90be32eddf878bb6893cca02abadd94de6a8c737a5b7fe76f7fb245979f010765e6a95fc520b215e3a2a7f0')
18 b2sums=('c8cd6cc7a7fe42e907893a1cdddeaf5cea1fb928d3a4822fc88e2eb631e08264797bfab74827c6f2b59d93f3deace480f5893ddf566db3a3a93829dee1aa977e'
19 '9b1927a437ed9b32491f07a210600b5a7d10711ec954dadc030a8238b67e9c6d1a8e67956fd7a5515e7060f0a1651fa86763e21d6d20592f8f00e9d3260722a1')
22 cd ${pkgbase}-version-${pkgver}
23 patch -p1 < "${srcdir}/jasper-1.900.1-fix-filename-buffer-overflow.patch"
24 sed -r 's|(CMAKE_SKIP_BUILD_RPATH) FALSE|\1 TRUE|g' -i CMakeLists.txt
28 cd ${pkgbase}-version-${pkgver}
32 -DCMAKE_INSTALL_PREFIX=/usr \
33 -DCMAKE_C_FLAGS="$CFLAGS -ffat-lto-objects" \
34 -DJAS_ENABLE_OPENGL=ON \
35 -DJAS_ENABLE_LIBJPEG=ON \
36 -DJAS_ENABLE_AUTOMATIC_DEPENDENCIES=OFF \
37 -DCMAKE_SKIP_RPATH=ON \
38 -DJAS_ENABLE_SHARED=ON
43 cd ${pkgbase}-version-${pkgver}
44 export LD_LIBRARY_PATH="$(pwd)/buildx/src/libjasper/"
45 make -C buildx -j1 test
49 depends=('glibc' 'libjpeg' 'libjpeg.so' 'freeglut' 'glu')
50 optdepends=('jasper-doc: documentation')
51 provides=('libjasper.so')
53 cd ${pkgbase}-version-${pkgver}
54 make -C buildx DESTDIR="${pkgdir}" install
55 rm -r "${pkgdir}/usr/share/doc"
57 install -Dm 644 NEWS.txt README.md -t "${pkgdir}/usr/share/doc/${pkgname}"
58 install -Dm 644 LICENSE.txt -t "${pkgdir}/usr/share/licenses/${pkgname}"
61 package_jasper-doc() {
62 pkgdesc+=' (documentation)'
65 cd ${pkgbase}-version-${pkgver}
66 make -C buildx DESTDIR="${pkgdir}" install
67 rm -rf "${pkgdir}/usr/"{bin,include,lib,share/man}
69 install -Dm 644 LICENSE.txt -t "${pkgdir}/usr/share/licenses/${pkgname}"