summaryrefslogtreecommitdiff
path: root/extra/openjpeg/PKGBUILD
blob: e3e625c5aec045272206d2dd7209955a0ddeb098 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# $Id: PKGBUILD 205844 2014-02-11 15:10:57Z jgc $
# Maintainer: Jan de Groot <jgc@archlinux.org>

pkgname=openjpeg
pkgver=1.5.1
pkgrel=2
pkgdesc="An open source JPEG 2000 codec"
arch=(i686 x86_64 'mips64el')
license=('BSD')
url="http://www.openjpeg.org"
depends=('zlib')
makedepends=('libtiff' 'lcms2' 'libpng' 'doxygen')
optdepends=('lcms2: j2k_to_image and image_to_j2k programs'
            'libpng: j2k_to_image and image_to_j2k programs')
source=(http://openjpeg.googlecode.com/files/openjpeg-${pkgver}.tar.gz
        openjpeg-1.5.1-CVE-2013-1447.patch
        openjpeg-1.5.1-CVE-2013-6045.patch
        openjpeg-1.5.1-CVE-2013-6052.patch
        openjpeg-1.5.1-CVE-2013-6053.patch
        openjpeg-1.5.1-CVE-2013-6887.patch
        openjpeg-1.5.1-doxygen_timestamp.patch
        openjpeg-1.5-r2029.patch
        openjpeg-1.5-r2031.patch
        openjpeg-1.5-r2032.patch
        openjpeg-1.5-r2033.patch)
sha1sums=('1b0b74d1af4c297fd82806a9325bb544caf9bb8b'
          'f2baf9bde105c96c7016be907cd278f2878be2b9'
          'f3764e473bd35508e83643a9257979eaa2c89c36'
          '1d600a13432b977c46a5b74bf87bf1b5a130abfb'
          '8d2da4b912d7e930abec31a956b678f62566884c'
          '038e471597decf36de0c7c78915744054704c601'
          '339677795a567c0f91b62141847b8e5dda53e763'
          '1cd97c1be5cedad136894db2b16f856a28387aeb'
          'f68108dd25c7ed278678de11d5713fba87ab6017'
          '222769c17e69022902d4e49c9dc5294361a00c85'
          '9ec5c1e0909c8946a174733a598fbe38675a0c9c')

prepare() {
  cd $pkgname-$pkgver
  patch -Np1 -i ../openjpeg-1.5.1-doxygen_timestamp.patch
  patch -Np0 -i ../openjpeg-1.5-r2029.patch
  patch -Np0 -i ../openjpeg-1.5-r2031.patch
  patch -Np0 -i ../openjpeg-1.5-r2032.patch
  patch -Np0 -i ../openjpeg-1.5-r2033.patch
  patch -Np1 -i ../openjpeg-1.5.1-CVE-2013-6052.patch
  patch -Np1 -i ../openjpeg-1.5.1-CVE-2013-6053.patch
#  patch -Np1 -i ../openjpeg-1.5.1-CVE-2013-6045.patch
  patch -Np1 -i ../openjpeg-1.5.1-CVE-2013-1447.patch
  patch -Np1 -i ../openjpeg-1.5.1-CVE-2013-6887.patch
}

build() {
  cd $pkgname-$pkgver
  autoreconf -fi
  # make sure we use system libs
  rm -rf thirdparty
  ./configure --prefix=/usr \
	--enable-shared --disable-static --disable-silent-rules
  make
}

package() {
  cd $pkgname-$pkgver
  make DESTDIR="${pkgdir}" install
  install -m755 -d "${pkgdir}/usr/share/licenses/openjpeg"
  install -m644 LICENSE "${pkgdir}/usr/share/licenses/openjpeg/LICENSE"
}