summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO39
-rw-r--r--PKGBUILD78
-rw-r--r--jasper-1.900.1-fix-filename-buffer-overflow.patch2
3 files changed, 36 insertions, 83 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 9d630bfe7bc7..081f449a4ff6 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,44 +1,21 @@
+# Generated by mksrcinfo v8
+# Sat Feb 11 14:08:40 UTC 2017
pkgbase = mingw-w64-jasper
pkgdesc = A software-based implementation of the codec specified in the emerging JPEG-2000 Part-1 standard (mingw-w64)
- pkgver = 1.900.1
- pkgrel = 7
+ pkgver = 2.0.10
+ pkgrel = 1
url = http://www.ece.uvic.ca/~mdadams/jasper
arch = any
license = custom:JasPer2.0
- makedepends = mingw-w64-configure
- makedepends = dos2unix
+ makedepends = mingw-w64-cmake
depends = mingw-w64-libjpeg-turbo
options = staticlibs
options = !strip
options = !buildflags
- source = http://www.ece.uvic.ca/~mdadams/jasper/software/jasper-1.900.1.zip
- source = jpc_dec.c.patch
- source = patch-libjasper-stepsizes-overflow.diff
- source = jasper-1.900.1-CVE-2008-3520.patch
- source = jasper-1.900.1-CVE-2008-3522.patch
- source = jasper-1.900.1-mingw32.patch
- source = jasper-1.900.1-CVE-2011-4516-and-CVE-2011-4517.patch
- source = jasper-1.900.1-CVE-2014-8137.patch
- source = jasper-1.900.1-CVE-2014-8138.patch
- source = jasper-1.900.1-CVE-2014-8157.patch
- source = jasper-1.900.1-CVE-2014-8158.patch
- source = jasper-1.900.1-CVE-2014-9029.patch
+ source = https://github.com/mdadams/jasper/archive/version-2.0.10.tar.gz
source = jasper-1.900.1-fix-filename-buffer-overflow.patch
- source = jasper-avoid-assert-abort.diff
- sha1sums = 9c5735f773922e580bf98c7c7dfda9bbed4c5191
- sha1sums = c1a0176a15210c0af14d85e55ce566921957d780
- sha1sums = f298566fef08c8a589d072582112cd51c72c3983
- sha1sums = 2483dba925670bf29f531d85d73c4e5ada513b01
- sha1sums = 0e7b6142cd9240ffb15a1ed7297c43c76fa09ee4
- sha1sums = 18d47f342949c802665adafe05908fd5ced817c6
- sha1sums = 3bfb37a4c732caa824563bad2603fcf5f2acf7f7
- sha1sums = 437519aaaeff6076d11cdbea82125dbcac6f729b
- sha1sums = 6086e717af2f0a026f70e399e28fe115f08a8cc1
- sha1sums = aaf96946073d2ece35f3695e8cc7956b5cad9a1d
- sha1sums = e69b339de43d1dc2fbb98368cee3d20f76d35941
- sha1sums = f5fe80c8576379d34f372f6a7c6a76630ab9fdcd
- sha1sums = 577dfce40da75818c4d32eb1c4532b1370950bee
- sha1sums = 98548b610a7319e569ee0425a32dc1d31a8771d2
+ sha1sums = 4818a48d370fc04719dc236c4a9405c8e622856c
+ sha1sums = 6708fdd45d57def32d15b1343044b79c370b9584
pkgname = mingw-w64-jasper
diff --git a/PKGBUILD b/PKGBUILD
index d817168dbcd2..cd8e07b73b58 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,68 +1,41 @@
pkgname=mingw-w64-jasper
-pkgver=1.900.1
-pkgrel=7
+pkgver=2.0.10
+pkgrel=1
pkgdesc="A software-based implementation of the codec specified in the emerging JPEG-2000 Part-1 standard (mingw-w64)"
arch=(any)
url="http://www.ece.uvic.ca/~mdadams/jasper"
license=("custom:JasPer2.0")
-makedepends=(mingw-w64-configure dos2unix)
-depends=(mingw-w64-libjpeg-turbo)
+makedepends=('mingw-w64-cmake')
+depends=('mingw-w64-libjpeg-turbo')
options=(staticlibs !strip !buildflags)
-source=("http://www.ece.uvic.ca/~mdadams/jasper/software/jasper-${pkgver}.zip"
-"jpc_dec.c.patch"
-"patch-libjasper-stepsizes-overflow.diff"
-"jasper-1.900.1-CVE-2008-3520.patch"
-"jasper-1.900.1-CVE-2008-3522.patch"
-"jasper-1.900.1-mingw32.patch"
-"jasper-1.900.1-CVE-2011-4516-and-CVE-2011-4517.patch"
-"jasper-1.900.1-CVE-2014-8137.patch"
-"jasper-1.900.1-CVE-2014-8138.patch"
-"jasper-1.900.1-CVE-2014-8157.patch"
-"jasper-1.900.1-CVE-2014-8158.patch"
-"jasper-1.900.1-CVE-2014-9029.patch"
-"jasper-1.900.1-fix-filename-buffer-overflow.patch"
-"jasper-avoid-assert-abort.diff")
-sha1sums=('9c5735f773922e580bf98c7c7dfda9bbed4c5191'
- 'c1a0176a15210c0af14d85e55ce566921957d780'
- 'f298566fef08c8a589d072582112cd51c72c3983'
- '2483dba925670bf29f531d85d73c4e5ada513b01'
- '0e7b6142cd9240ffb15a1ed7297c43c76fa09ee4'
- '18d47f342949c802665adafe05908fd5ced817c6'
- '3bfb37a4c732caa824563bad2603fcf5f2acf7f7'
- '437519aaaeff6076d11cdbea82125dbcac6f729b'
- '6086e717af2f0a026f70e399e28fe115f08a8cc1'
- 'aaf96946073d2ece35f3695e8cc7956b5cad9a1d'
- 'e69b339de43d1dc2fbb98368cee3d20f76d35941'
- 'f5fe80c8576379d34f372f6a7c6a76630ab9fdcd'
- '577dfce40da75818c4d32eb1c4532b1370950bee'
- '98548b610a7319e569ee0425a32dc1d31a8771d2')
+source=("https://github.com/mdadams/jasper/archive/version-${pkgver}.tar.gz"
+"jasper-1.900.1-fix-filename-buffer-overflow.patch")
+sha1sums=('4818a48d370fc04719dc236c4a9405c8e622856c'
+ '6708fdd45d57def32d15b1343044b79c370b9584')
_architectures="i686-w64-mingw32 x86_64-w64-mingw32"
prepare() {
- cd "$srcdir/jasper-$pkgver"
- find . -type f -exec dos2unix {} \;
- patch -p1 -i "${srcdir}/jpc_dec.c.patch"
- patch -p1 -i "${srcdir}/patch-libjasper-stepsizes-overflow.diff"
- patch -p1 -i "${srcdir}/jasper-1.900.1-CVE-2008-3520.patch"
- patch -p1 -i "${srcdir}/jasper-1.900.1-CVE-2008-3522.patch"
- patch -p1 -i "${srcdir}/jasper-1.900.1-CVE-2014-9029.patch"
- patch -p1 -i "${srcdir}/jasper-1.900.1-CVE-2014-8137.patch"
- patch -p1 -i "${srcdir}/jasper-avoid-assert-abort.diff"
- patch -p1 -i "${srcdir}/jasper-1.900.1-CVE-2014-8138.patch"
- patch -p1 -i "${srcdir}/jasper-1.900.1-CVE-2011-4516-and-CVE-2011-4517.patch"
+ cd "$srcdir/jasper-version-$pkgver"
patch -p1 -i "${srcdir}/jasper-1.900.1-fix-filename-buffer-overflow.patch"
- patch -p1 -i "${srcdir}/jasper-1.900.1-CVE-2014-8157.patch"
- patch -p1 -i "${srcdir}/jasper-1.900.1-CVE-2014-8158.patch"
- autoreconf -vfi
- patch -p1 -i "$srcdir/jasper-1.900.1-mingw32.patch"
}
build() {
- cd "$srcdir/jasper-$pkgver"
+ cd "$srcdir/jasper-version-$pkgver"
+ local options=(
+ -DCMAKE_INSTALL_LIBDIR=lib
+ -DCMAKE_BUILD_TYPE=Release
+ -DJAS_ENABLE_OPENGL=OFF
+ -DJAS_ENABLE_LIBJPEG=ON
+ -DJAS_ENABLE_AUTOMATIC_DEPENDENCIES=OFF
+ )
for _arch in ${_architectures}; do
+ mkdir -p build-${_arch}-static && pushd build-${_arch}-static
+ ${_arch}-cmake ${options[@]} -DJAS_ENABLE_SHARED=OFF ..
+ make
+ popd
mkdir -p build-${_arch} && pushd build-${_arch}
- ${_arch}-configure --disable-opengl --enable-libjpeg
+ ${_arch}-cmake ${options[@]} -DJAS_ENABLE_SHARED=ON ..
make
popd
done
@@ -70,11 +43,14 @@ build() {
package() {
for _arch in ${_architectures}; do
- cd "${srcdir}/jasper-${pkgver}/build-${_arch}"
+ cd "${srcdir}/jasper-version-${pkgver}/build-${_arch}-static"
+ make DESTDIR="$pkgdir" install
+ cd "${srcdir}/jasper-version-${pkgver}/build-${_arch}"
make DESTDIR="$pkgdir" install
+ mv "$pkgdir"/usr/${_arch}/lib/*.dll "$pkgdir"/usr/${_arch}/bin/
rm "$pkgdir"/usr/${_arch}/bin/*.exe
+ rm -r "$pkgdir/usr/${_arch}/share"
${_arch}-strip --strip-unneeded "$pkgdir"/usr/${_arch}/bin/*.dll
${_arch}-strip -g "$pkgdir"/usr/${_arch}/lib/*.a
- rm -r "$pkgdir/usr/${_arch}/share"
done
}
diff --git a/jasper-1.900.1-fix-filename-buffer-overflow.patch b/jasper-1.900.1-fix-filename-buffer-overflow.patch
index eba6cbe49a8b..e95ed9cf23ba 100644
--- a/jasper-1.900.1-fix-filename-buffer-overflow.patch
+++ b/jasper-1.900.1-fix-filename-buffer-overflow.patch
@@ -10,7 +10,7 @@ Bug-Debian: http://bugs.debian.org/645118
#include <stdio.h>
+#include <limits.h>
- #if defined(HAVE_FCNTL_H)
+ #if defined(JAS_HAVE_FCNTL_H)
#include <fcntl.h>
#endif
@@ -99,6 +100,12 @@ extern "C" {