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')
13 source=(${pkgname}-${pkgver}.tar.gz::https://github.com/mdadams/jasper/archive/version-${pkgver}.tar.gz
14 jasper-1.900.1-fix-filename-buffer-overflow.patch)
15 sha512sums=('dc03434870e85b1fdbdf41a3e07ce5a8044c8d225717d3d7a5969d45e3bd716bfb2abc4b4e0b8cec2f4071a7520c5d3e48939dba0cabe6d192eacd593de0c563'
16 'b8d798bf75523c5db263783e42c653dd0cb03deee90be32eddf878bb6893cca02abadd94de6a8c737a5b7fe76f7fb245979f010765e6a95fc520b215e3a2a7f0')
17 b2sums=('d4d8ae3324f3753e999adee57c215b89fa0ddeb3d945f10de15459a7d6566f1de9cbcd27a418bcc3c128bc138fff7e3f1cc157b6750d2d7dc1216f8e8cbc8bea'
18 '9b1927a437ed9b32491f07a210600b5a7d10711ec954dadc030a8238b67e9c6d1a8e67956fd7a5515e7060f0a1651fa86763e21d6d20592f8f00e9d3260722a1')
21 cd ${pkgbase}-version-${pkgver}
22 patch -p1 < "${srcdir}/jasper-1.900.1-fix-filename-buffer-overflow.patch"
23 sed -r 's|(CMAKE_SKIP_BUILD_RPATH) FALSE|\1 TRUE|g' -i CMakeLists.txt
27 cd ${pkgbase}-version-${pkgver}
31 -DCMAKE_INSTALL_PREFIX=/usr \
32 -DCMAKE_C_FLAGS="$CFLAGS -ffat-lto-objects" \
33 -DJAS_ENABLE_OPENGL=ON \
34 -DJAS_ENABLE_LIBJPEG=ON \
35 -DJAS_ENABLE_AUTOMATIC_DEPENDENCIES=OFF \
36 -DCMAKE_SKIP_RPATH=ON \
37 -DJAS_ENABLE_SHARED=ON
42 cd ${pkgbase}-version-${pkgver}
43 export LD_LIBRARY_PATH="$(pwd)/buildx/src/libjasper/"
44 make -C buildx -j1 test
48 depends=('glibc' 'libjpeg' 'libjpeg.so' 'freeglut' 'glu')
49 optdepends=('jasper-doc: documentation')
50 provides=('libjasper.so')
52 cd ${pkgbase}-version-${pkgver}
53 make -C buildx DESTDIR="${pkgdir}" install
54 rm -r "${pkgdir}/usr/share/doc"
56 install -Dm 644 NEWS.txt README.md -t "${pkgdir}/usr/share/doc/${pkgname}"
57 install -Dm 644 LICENSE.txt -t "${pkgdir}/usr/share/licenses/${pkgname}"
60 package_jasper-doc() {
61 pkgdesc+=' (documentation)'
64 cd ${pkgbase}-version-${pkgver}
65 make -C buildx DESTDIR="${pkgdir}" install
66 rm -rf "${pkgdir}/usr/"{bin,include,lib,share/man}
68 install -Dm 644 LICENSE.txt -t "${pkgdir}/usr/share/licenses/${pkgname}"