updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / libecwj2 / PKGBUILD
blob3a68f85ed52836b0985aa93e156139596d2e0c40
1 # Contributor: Homme Zwaagstra, danitool
2 pkgname=libecwj2
3 pkgver=3.3
4 pkgrel=2
5 pkgdesc="Library for both the ECW and the ISO JPEG 2000 image file formats"
6 arch=('i686' 'x86_64')
7 url="http://trac.osgeo.org/gdal/wiki/ECW"
8 license=('ECWPL')
9 depends=()
10 source=("http://mirror.ovh.net/gentoo-distfiles/distfiles/${pkgname}-${pkgver}-2006-09-06.zip"
11         'libecwj2-3.3-nolcms.patch'
12         'libecwj2-3.3-3245a.patch'
13         'libecwj2-3.3-3245b.patch'
14         'libecwj2-3.3-NCSPhysicalMemorySize-Linux.patch'
15         'libecwj2-3.3-2593.patch')
16 md5sums=('acc04e07153c2a2a6595b3e2ebf34432'
17          'e4c4cde42a8910650fe665bf7c9bbde3'
18          '7871632c8d52ceb0ac02589deaa3c347'
19          'cf23c8fbb0009905185886708d1c6de4'
20          '3018aa1e84ca64e0026c4f3d3481cac1'
21          '3ebdc31fa456f47aba6e1a3295f690d3')
23 build() {
24   cd $srcdir/$pkgname-$pkgver
26   # Memory leak patches from http://trac.osgeo.org/mapserver/ticket/3245
27   patch -p0 -i ${srcdir}/libecwj2-3.3-3245a.patch
28   patch -p0 -i ${srcdir}/libecwj2-3.3-3245b.patch
30   # Memory overflow patch from http://trac.osgeo.org/gdal/ticket/3366
31   patch -p0 -i ${srcdir}/libecwj2-3.3-NCSPhysicalMemorySize-Linux.patch
33   # Fix crash creating 16bit JP images on x86_64 from http://trac.osgeo.org/gdal/ticket/2593
34   patch -p0 -i ${srcdir}/libecwj2-3.3-2593.patch
36   # Gentoo patch
37   patch -Np 0 -i "$srcdir/${pkgname}-${pkgver}-nolcms.patch" || return 1
38   rm -rf Source/C/libjpeg Source/C/NCSEcw/lcms
40   # Gentoo bug 328075
41   sed -i -e "s:includeHEADERS_INSTALL:INSTALL_HEADER:" \
42       Source/NCSBuildGnu/Makefile.am || return 1
43   
44   autoreconf -i
46   ./configure --prefix=/usr || return 1
47   make || return 1
48   install -d "${pkgdir}/usr/include" || return 1
49   make prefix="${pkgdir}/usr" install || return 1
51   install -D -m644 SDK.pdf "${pkgdir}/usr/share/doc/${pgkname}-${pkgver}/SDK.pdf" || return 1