summaryrefslogtreecommitdiff
path: root/testing
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2012-10-08 00:19:21 -0700
committerroot <root@rshg054.dnsready.net>2012-10-08 00:19:21 -0700
commit962d1e81a62d7259ccb686da1a44de2bb28e73a5 (patch)
tree49f656c84d602182eb10aff70c8e0cd4d202f15d /testing
parent682e4a12f537d598cb116ba394ceeae1eafc281e (diff)
Mon Oct 8 00:19:21 PDT 2012
Diffstat (limited to 'testing')
-rw-r--r--testing/asymptote/PKGBUILD43
-rw-r--r--testing/asymptote/texlive.install20
-rw-r--r--testing/bzflag/PKGBUILD10
-rw-r--r--testing/ftgl/PKGBUILD34
-rw-r--r--testing/gcc/PKGBUILD18
-rw-r--r--testing/glew/PKGBUILD6
-rw-r--r--testing/jasper/PKGBUILD36
-rw-r--r--testing/jasper/jasper-1.900.1-CVE-2008-3520.patch928
-rw-r--r--testing/jasper/jasper-1.900.1-CVE-2008-3522.patch14
-rw-r--r--testing/jasper/jpc_dec.c.patch18
-rw-r--r--testing/jasper/patch-libjasper-stepsizes-overflow.diff14
-rw-r--r--testing/kdebase-workspace/PKGBUILD22
-rw-r--r--testing/kdebase-workspace/logind-support.patch66
-rw-r--r--testing/libreoffice/PKGBUILD62
-rw-r--r--testing/libreoffice/make-pyuno-work-with-system-wide-module-install.diff44
-rw-r--r--testing/libtool/PKGBUILD6
-rw-r--r--testing/qt3/PKGBUILD124
-rw-r--r--testing/qt3/eastern_asian_languagues.diff39
-rw-r--r--testing/qt3/gcc-4.6.patch33
-rw-r--r--testing/qt3/qt-copy-kde-patches.tar.bz2bin0 -> 29688 bytes
-rw-r--r--testing/qt3/qt-odbc.patch19
-rw-r--r--testing/qt3/qt-patches.tar.bz2bin0 -> 3708 bytes
-rw-r--r--testing/qt3/qt.install12
-rw-r--r--testing/qt3/qt.profile4
-rw-r--r--testing/qt3/qt3-png15.patch212
-rw-r--r--testing/smpeg/PKGBUILD36
-rw-r--r--testing/smpeg/smpeg-0.4.4-gcc41.patch41
-rw-r--r--testing/swt/PKGBUILD56
-rw-r--r--testing/swt/build-swt.xml17
-rw-r--r--testing/xine-lib/PKGBUILD8
30 files changed, 1876 insertions, 66 deletions
diff --git a/testing/asymptote/PKGBUILD b/testing/asymptote/PKGBUILD
new file mode 100644
index 000000000..42ebbfb05
--- /dev/null
+++ b/testing/asymptote/PKGBUILD
@@ -0,0 +1,43 @@
+# $Id: PKGBUILD 168270 2012-10-07 11:20:35Z remy $
+# Maintainer: Rémy Oudompheng <remy@archlinux.org>
+# Contributor: Firmicus <francois.archlinux.org>
+# Contributor: bender02 at gmx dot com
+
+pkgname=asymptote
+pkgver=2.20
+pkgrel=1
+pkgdesc="A vector graphics language (like metapost)"
+arch=('i686' 'x86_64')
+url="http://asymptote.sourceforge.net/"
+license=("GPL3")
+depends=('texlive-core' 'gc' 'freeglut' 'glu' 'gsl' 'fftw' 'libsigsegv')
+makedepends=('ghostscript' 'imagemagick')
+optdepends=('python2: for the xasy GUI'
+ 'python-imaging: for the xasy GUI'
+ 'tix: for the xasy GUI')
+source=(http://downloads.sourceforge.net/sourceforge/${pkgname}/${pkgname}-${pkgver}.src.tgz)
+install=texlive.install
+sha1sums=('4c86ab71cff57a592944303b11d9bb6ec34f1cbd')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ ./configure --enable-gc=/usr \
+ --prefix=/usr \
+ --with-latex=/usr/share/texmf/tex/latex \
+ --with-context=/usr/share/texmf/tex/context
+ make all
+}
+
+check() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make check-all
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make -j1 DESTDIR="${pkgdir}" install-all
+ sed -i -e 's@env python@env python2@' ${pkgdir}/usr/share/asymptote/GUI/*.py
+ # this dir contains png files that are already embedded in the pdf documentation:
+ rm -rf ${pkgdir}/usr/share/info/asymptote
+}
diff --git a/testing/asymptote/texlive.install b/testing/asymptote/texlive.install
new file mode 100644
index 000000000..a7e61f209
--- /dev/null
+++ b/testing/asymptote/texlive.install
@@ -0,0 +1,20 @@
+info_dir=usr/share/info
+
+post_install() {
+ install-info ${info_dir}/asy-faq.info.gz ${info_dir}/dir
+ echo ">>> updating the filename database for texlive..."
+ mktexlsr --quiet usr/share/texmf
+}
+
+post_upgrade() {
+ post_install
+}
+
+pre_remove() {
+ install-info --delete ${info_dir}/asy-faq.info.gz ${info_dir}/dir
+}
+
+post_remove() {
+ echo ">>> updating the filename database for texlive..."
+ mktexlsr --quiet usr/share/texmf
+}
diff --git a/testing/bzflag/PKGBUILD b/testing/bzflag/PKGBUILD
index e1eb83023..6bfbcb8af 100644
--- a/testing/bzflag/PKGBUILD
+++ b/testing/bzflag/PKGBUILD
@@ -1,19 +1,19 @@
-# $Id: PKGBUILD 164278 2012-07-29 21:07:44Z eric $
+# $Id: PKGBUILD 168265 2012-10-07 09:47:30Z bisson $
# Contributor: Damir Perisa <damir.perisa@bluewin.ch>
# Contributor: Kevin Piche <kevin@archlinux.org>
# Maintainer: Gaetan Bisson <bisson@archlinux.org>
pkgname=bzflag
-pkgver=2.4.0
-pkgrel=4
+pkgver=2.4.2
+pkgrel=1
pkgdesc='Multiplayer 3D tank battle game'
url='http://bzflag.org/'
license=('LGPL')
options=('!libtool')
arch=('i686' 'x86_64')
-depends=('curl' 'glew' 'mesa' 'sdl')
+depends=('curl' 'glew' 'glu' 'sdl')
source=("http://downloads.sourceforge.net/project/bzflag/bzflag%20source/${pkgver}/bzflag-${pkgver}.tar.bz2")
-sha1sums=('af469d63af7143479176ea0ac91ce2eaa6e4561f')
+sha1sums=('36c67c0734a1318b34b39ed0da49606e05ebd291')
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
diff --git a/testing/ftgl/PKGBUILD b/testing/ftgl/PKGBUILD
new file mode 100644
index 000000000..590190dae
--- /dev/null
+++ b/testing/ftgl/PKGBUILD
@@ -0,0 +1,34 @@
+# $Id: PKGBUILD 168280 2012-10-07 17:22:30Z heftig $
+# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
+# Contributor: Alexander Baldeck <alexander@archlinux.org>
+# Contributor: tobias <tobias@archlinux.org>
+
+pkgname=ftgl
+_pkgver=2.1.3-rc5
+pkgver=${_pkgver/-/}
+pkgrel=4
+pkgdesc="OpenGL library to use arbitrary fonts"
+arch=(i686 x86_64)
+url="http://ftgl.wiki.sourceforge.net/"
+license=(MIT)
+depends=(freetype2 mesa glu)
+makedepends=(doxygen)
+options=('!libtool')
+source=("http://downloads.sourceforge.net/$pkgname/$pkgname-$_pkgver.tar.bz2")
+md5sums=('c7879018cde844059495b3029b0b6503')
+
+build() {
+ cd "$srcdir/$pkgname-${_pkgver/-/~}"
+ ./configure --prefix=/usr --with-pic --disable-static
+ make
+}
+
+package() {
+ cd "$srcdir/$pkgname-${_pkgver/-/~}"
+ make DESTDIR="$pkgdir" install
+
+ # FS#23283: install missing headers for OpenCascade
+ install -m644 src/FT{Face,Library,Size}.h "$pkgdir/usr/include/FTGL/"
+
+ install -Dm644 COPYING "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}
diff --git a/testing/gcc/PKGBUILD b/testing/gcc/PKGBUILD
index f26b1d7ca..331627a12 100644
--- a/testing/gcc/PKGBUILD
+++ b/testing/gcc/PKGBUILD
@@ -1,14 +1,14 @@
-# $Id: PKGBUILD 165238 2012-08-14 08:29:48Z allan $
+# $Id: PKGBUILD 168263 2012-10-07 08:55:23Z allan $
# Maintainer: Allan McRae <allan@archlinux.org>
# toolchain build order: linux-api-headers->glibc->binutils->gcc->binutils->glibc
# NOTE: libtool requires rebuilt with each new gcc version
pkgname=('gcc' 'gcc-libs' 'gcc-fortran' 'gcc-objc' 'gcc-ada' 'gcc-go')
-pkgver=4.7.1
-pkgrel=6
-_snapshot=4.7-20120721
-_libstdcppmanver=20120725 # Note: check source directory name when updating this
+pkgver=4.7.2
+pkgrel=1
+#_snapshot=4.7-20120721
+_libstdcppmanver=20120924 # Note: check source directory name when updating this
pkgdesc="The GNU Compiler Collection"
arch=('i686' 'x86_64')
license=('GPL' 'LGPL' 'FDL' 'custom')
@@ -16,14 +16,14 @@ url="http://gcc.gnu.org"
makedepends=('binutils>=2.22' 'libmpc' 'cloog' 'ppl' 'gcc-ada')
checkdepends=('dejagnu')
options=('!libtool' '!emptydirs')
-source=(#ftp://gcc.gnu.org/pub/gcc/releases/gcc-${pkgver}/gcc-${pkgver}.tar.bz2
- ftp://gcc.gnu.org/pub/gcc/snapshots/${_snapshot}/gcc-${_snapshot}.tar.bz2
+source=(ftp://gcc.gnu.org/pub/gcc/releases/gcc-${pkgver}/gcc-${pkgver}.tar.bz2
+ #ftp://gcc.gnu.org/pub/gcc/snapshots/${_snapshot}/gcc-${_snapshot}.tar.bz2
ftp://gcc.gnu.org/pub/gcc/libstdc++/doxygen/libstdc++-api.${_libstdcppmanver}.man.tar.bz2
gcc_pure64.patch
gcc-4.7.1-libada-pic.patch
gcc-4.7.1-libgo-write.patch)
-md5sums=('a1a53fda426bc6809cede8e85bbaf2a3'
- '79c4381f983b71868c02da3379e1e8a2'
+md5sums=('cc308a0891e778cfda7a151ab8a6e762'
+ '7f3d52515daafffb57c287f427381106'
'ced48436c1b3c981d721a829f1094de1'
'2acbc9d35cc9d72329dc71d6b1f162ef'
'df82dd175ac566c8a6d46b11ac21f14c')
diff --git a/testing/glew/PKGBUILD b/testing/glew/PKGBUILD
index fb56bab67..fe8b9d925 100644
--- a/testing/glew/PKGBUILD
+++ b/testing/glew/PKGBUILD
@@ -1,15 +1,15 @@
-# $Id: PKGBUILD 164281 2012-07-29 21:08:24Z eric $
+# $Id: PKGBUILD 168296 2012-10-08 03:48:49Z eric $
# Maintainer: Stéphane Gaudreault <stephane@archlinux.org>
# Contributor: SleepyDog
pkgname=glew
pkgver=1.8.0
-pkgrel=1
+pkgrel=2
pkgdesc="The OpenGL Extension Wrangler Library"
arch=('i686' 'x86_64')
url="http://glew.sourceforge.net"
license=('BSD' 'MIT' 'GPL')
-depends=('libxmu' 'libxi' 'mesa')
+depends=('libxmu' 'libxi' 'glu')
source=(http://downloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}.tgz)
sha1sums=('641c6bb3f924ec786e1e6cf2b1b230f594e0f0e4')
diff --git a/testing/jasper/PKGBUILD b/testing/jasper/PKGBUILD
new file mode 100644
index 000000000..dc7b9662c
--- /dev/null
+++ b/testing/jasper/PKGBUILD
@@ -0,0 +1,36 @@
+# $Id: PKGBUILD 168284 2012-10-07 21:09:20Z eric $
+# Maintainer: Eric Bélanger <eric@archlinux.org>
+
+pkgname=jasper
+pkgver=1.900.1
+pkgrel=8
+pkgdesc="A software-based implementation of the codec specified in the emerging JPEG-2000 Part-1 standard"
+arch=('i686' 'x86_64')
+url="http://www.ece.uvic.ca/~mdadams/jasper/"
+license=('custom:JasPer2.0')
+depends=('libjpeg' 'freeglut' 'libxmu' 'glu')
+options=('!libtool')
+source=(http://www.ece.uvic.ca/~mdadams/${pkgname}/software/${pkgname}-${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)
+sha1sums=('9c5735f773922e580bf98c7c7dfda9bbed4c5191'
+ 'c1a0176a15210c0af14d85e55ce566921957d780'
+ 'f298566fef08c8a589d072582112cd51c72c3983'
+ '2483dba925670bf29f531d85d73c4e5ada513b01'
+ '0e7b6142cd9240ffb15a1ed7297c43c76fa09ee4')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ 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"
+ ./configure --prefix=/usr --mandir=/usr/share/man --enable-shared
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make DESTDIR="${pkgdir}" install
+ install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+}
diff --git a/testing/jasper/jasper-1.900.1-CVE-2008-3520.patch b/testing/jasper/jasper-1.900.1-CVE-2008-3520.patch
new file mode 100644
index 000000000..0f5e3b746
--- /dev/null
+++ b/testing/jasper/jasper-1.900.1-CVE-2008-3520.patch
@@ -0,0 +1,928 @@
+https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2008-3520
+
+OpenBSD jas_malloc hardening patches
+
+diff -pruN jasper-1.900.1.orig/src/libjasper/base/jas_cm.c jasper-1.900.1/src/libjasper/base/jas_cm.c
+--- jasper-1.900.1.orig/src/libjasper/base/jas_cm.c 2007-01-19 22:43:05.000000000 +0100
++++ jasper-1.900.1/src/libjasper/base/jas_cm.c 2009-10-22 10:27:45.000000000 +0200
+@@ -704,8 +704,7 @@ static int jas_cmpxformseq_resize(jas_cm
+ {
+ jas_cmpxform_t **p;
+ assert(n >= pxformseq->numpxforms);
+- p = (!pxformseq->pxforms) ? jas_malloc(n * sizeof(jas_cmpxform_t *)) :
+- jas_realloc(pxformseq->pxforms, n * sizeof(jas_cmpxform_t *));
++ p = jas_realloc2(pxformseq->pxforms, n, sizeof(jas_cmpxform_t *));
+ if (!p) {
+ return -1;
+ }
+@@ -889,13 +888,13 @@ static int jas_cmshapmatlut_set(jas_cmsh
+ jas_cmshapmatlut_cleanup(lut);
+ if (curv->numents == 0) {
+ lut->size = 2;
+- if (!(lut->data = jas_malloc(lut->size * sizeof(jas_cmreal_t))))
++ if (!(lut->data = jas_alloc2(lut->size, sizeof(jas_cmreal_t))))
+ goto error;
+ lut->data[0] = 0.0;
+ lut->data[1] = 1.0;
+ } else if (curv->numents == 1) {
+ lut->size = 256;
+- if (!(lut->data = jas_malloc(lut->size * sizeof(jas_cmreal_t))))
++ if (!(lut->data = jas_alloc2(lut->size, sizeof(jas_cmreal_t))))
+ goto error;
+ gamma = curv->ents[0] / 256.0;
+ for (i = 0; i < lut->size; ++i) {
+@@ -903,7 +902,7 @@ static int jas_cmshapmatlut_set(jas_cmsh
+ }
+ } else {
+ lut->size = curv->numents;
+- if (!(lut->data = jas_malloc(lut->size * sizeof(jas_cmreal_t))))
++ if (!(lut->data = jas_alloc2(lut->size, sizeof(jas_cmreal_t))))
+ goto error;
+ for (i = 0; i < lut->size; ++i) {
+ lut->data[i] = curv->ents[i] / 65535.0;
+@@ -953,7 +952,7 @@ static int jas_cmshapmatlut_invert(jas_c
+ return -1;
+ }
+ }
+- if (!(invlut->data = jas_malloc(n * sizeof(jas_cmreal_t))))
++ if (!(invlut->data = jas_alloc2(n, sizeof(jas_cmreal_t))))
+ return -1;
+ invlut->size = n;
+ for (i = 0; i < invlut->size; ++i) {
+diff -pruN jasper-1.900.1.orig/src/libjasper/base/jas_icc.c jasper-1.900.1/src/libjasper/base/jas_icc.c
+--- jasper-1.900.1.orig/src/libjasper/base/jas_icc.c 2007-01-19 22:43:05.000000000 +0100
++++ jasper-1.900.1/src/libjasper/base/jas_icc.c 2009-10-22 10:27:45.000000000 +0200
+@@ -373,7 +373,7 @@ int jas_iccprof_save(jas_iccprof_t *prof
+ jas_icctagtab_t *tagtab;
+
+ tagtab = &prof->tagtab;
+- if (!(tagtab->ents = jas_malloc(prof->attrtab->numattrs *
++ if (!(tagtab->ents = jas_alloc2(prof->attrtab->numattrs,
+ sizeof(jas_icctagtabent_t))))
+ goto error;
+ tagtab->numents = prof->attrtab->numattrs;
+@@ -522,7 +522,7 @@ static int jas_iccprof_gettagtab(jas_str
+ }
+ if (jas_iccgetuint32(in, &tagtab->numents))
+ goto error;
+- if (!(tagtab->ents = jas_malloc(tagtab->numents *
++ if (!(tagtab->ents = jas_alloc2(tagtab->numents,
+ sizeof(jas_icctagtabent_t))))
+ goto error;
+ tagtabent = tagtab->ents;
+@@ -743,8 +743,7 @@ static int jas_iccattrtab_resize(jas_icc
+ {
+ jas_iccattr_t *newattrs;
+ assert(maxents >= tab->numattrs);
+- newattrs = tab->attrs ? jas_realloc(tab->attrs, maxents *
+- sizeof(jas_iccattr_t)) : jas_malloc(maxents * sizeof(jas_iccattr_t));
++ newattrs = jas_realloc2(tab->attrs, maxents, sizeof(jas_iccattr_t));
+ if (!newattrs)
+ return -1;
+ tab->attrs = newattrs;
+@@ -999,7 +998,7 @@ static int jas_icccurv_input(jas_iccattr
+
+ if (jas_iccgetuint32(in, &curv->numents))
+ goto error;
+- if (!(curv->ents = jas_malloc(curv->numents * sizeof(jas_iccuint16_t))))
++ if (!(curv->ents = jas_alloc2(curv->numents, sizeof(jas_iccuint16_t))))
+ goto error;
+ for (i = 0; i < curv->numents; ++i) {
+ if (jas_iccgetuint16(in, &curv->ents[i]))
+@@ -1100,7 +1099,7 @@ static int jas_icctxtdesc_input(jas_icca
+ if (jas_iccgetuint32(in, &txtdesc->uclangcode) ||
+ jas_iccgetuint32(in, &txtdesc->uclen))
+ goto error;
+- if (!(txtdesc->ucdata = jas_malloc(txtdesc->uclen * 2)))
++ if (!(txtdesc->ucdata = jas_alloc2(txtdesc->uclen, 2)))
+ goto error;
+ if (jas_stream_read(in, txtdesc->ucdata, txtdesc->uclen * 2) !=
+ JAS_CAST(int, txtdesc->uclen * 2))
+@@ -1292,17 +1291,17 @@ static int jas_icclut8_input(jas_iccattr
+ jas_iccgetuint16(in, &lut8->numouttabents))
+ goto error;
+ clutsize = jas_iccpowi(lut8->clutlen, lut8->numinchans) * lut8->numoutchans;
+- if (!(lut8->clut = jas_malloc(clutsize * sizeof(jas_iccuint8_t))) ||
+- !(lut8->intabsbuf = jas_malloc(lut8->numinchans *
+- lut8->numintabents * sizeof(jas_iccuint8_t))) ||
+- !(lut8->intabs = jas_malloc(lut8->numinchans *
++ if (!(lut8->clut = jas_alloc2(clutsize, sizeof(jas_iccuint8_t))) ||
++ !(lut8->intabsbuf = jas_alloc3(lut8->numinchans,
++ lut8->numintabents, sizeof(jas_iccuint8_t))) ||
++ !(lut8->intabs = jas_alloc2(lut8->numinchans,
+ sizeof(jas_iccuint8_t *))))
+ goto error;
+ for (i = 0; i < lut8->numinchans; ++i)
+ lut8->intabs[i] = &lut8->intabsbuf[i * lut8->numintabents];
+- if (!(lut8->outtabsbuf = jas_malloc(lut8->numoutchans *
+- lut8->numouttabents * sizeof(jas_iccuint8_t))) ||
+- !(lut8->outtabs = jas_malloc(lut8->numoutchans *
++ if (!(lut8->outtabsbuf = jas_alloc3(lut8->numoutchans,
++ lut8->numouttabents, sizeof(jas_iccuint8_t))) ||
++ !(lut8->outtabs = jas_alloc2(lut8->numoutchans,
+ sizeof(jas_iccuint8_t *))))
+ goto error;
+ for (i = 0; i < lut8->numoutchans; ++i)
+@@ -1461,17 +1460,17 @@ static int jas_icclut16_input(jas_iccatt
+ jas_iccgetuint16(in, &lut16->numouttabents))
+ goto error;
+ clutsize = jas_iccpowi(lut16->clutlen, lut16->numinchans) * lut16->numoutchans;
+- if (!(lut16->clut = jas_malloc(clutsize * sizeof(jas_iccuint16_t))) ||
+- !(lut16->intabsbuf = jas_malloc(lut16->numinchans *
+- lut16->numintabents * sizeof(jas_iccuint16_t))) ||
+- !(lut16->intabs = jas_malloc(lut16->numinchans *
++ if (!(lut16->clut = jas_alloc2(clutsize, sizeof(jas_iccuint16_t))) ||
++ !(lut16->intabsbuf = jas_alloc3(lut16->numinchans,
++ lut16->numintabents, sizeof(jas_iccuint16_t))) ||
++ !(lut16->intabs = jas_alloc2(lut16->numinchans,
+ sizeof(jas_iccuint16_t *))))
+ goto error;
+ for (i = 0; i < lut16->numinchans; ++i)
+ lut16->intabs[i] = &lut16->intabsbuf[i * lut16->numintabents];
+- if (!(lut16->outtabsbuf = jas_malloc(lut16->numoutchans *
+- lut16->numouttabents * sizeof(jas_iccuint16_t))) ||
+- !(lut16->outtabs = jas_malloc(lut16->numoutchans *
++ if (!(lut16->outtabsbuf = jas_alloc3(lut16->numoutchans,
++ lut16->numouttabents, sizeof(jas_iccuint16_t))) ||
++ !(lut16->outtabs = jas_alloc2(lut16->numoutchans,
+ sizeof(jas_iccuint16_t *))))
+ goto error;
+ for (i = 0; i < lut16->numoutchans; ++i)
+diff -pruN jasper-1.900.1.orig/src/libjasper/base/jas_image.c jasper-1.900.1/src/libjasper/base/jas_image.c
+--- jasper-1.900.1.orig/src/libjasper/base/jas_image.c 2007-01-19 22:43:05.000000000 +0100
++++ jasper-1.900.1/src/libjasper/base/jas_image.c 2009-10-22 10:27:45.000000000 +0200
+@@ -142,7 +142,7 @@ jas_image_t *jas_image_create(int numcmp
+ image->inmem_ = true;
+
+ /* Allocate memory for the per-component information. */
+- if (!(image->cmpts_ = jas_malloc(image->maxcmpts_ *
++ if (!(image->cmpts_ = jas_alloc2(image->maxcmpts_,
+ sizeof(jas_image_cmpt_t *)))) {
+ jas_image_destroy(image);
+ return 0;
+@@ -774,8 +774,7 @@ static int jas_image_growcmpts(jas_image
+ jas_image_cmpt_t **newcmpts;
+ int cmptno;
+
+- newcmpts = (!image->cmpts_) ? jas_malloc(maxcmpts * sizeof(jas_image_cmpt_t *)) :
+- jas_realloc(image->cmpts_, maxcmpts * sizeof(jas_image_cmpt_t *));
++ newcmpts = jas_realloc2(image->cmpts_, maxcmpts, sizeof(jas_image_cmpt_t *));
+ if (!newcmpts) {
+ return -1;
+ }
+diff -pruN jasper-1.900.1.orig/src/libjasper/base/jas_malloc.c jasper-1.900.1/src/libjasper/base/jas_malloc.c
+--- jasper-1.900.1.orig/src/libjasper/base/jas_malloc.c 2007-01-19 22:43:05.000000000 +0100
++++ jasper-1.900.1/src/libjasper/base/jas_malloc.c 2009-10-22 10:27:45.000000000 +0200
+@@ -76,6 +76,9 @@
+
+ /* We need the prototype for memset. */
+ #include <string.h>
++#include <limits.h>
++#include <errno.h>
++#include <stdint.h>
+
+ #include "jasper/jas_malloc.h"
+
+@@ -113,18 +116,50 @@ void jas_free(void *ptr)
+
+ void *jas_realloc(void *ptr, size_t size)
+ {
+- return realloc(ptr, size);
++ return ptr ? realloc(ptr, size) : malloc(size);
+ }
+
+-void *jas_calloc(size_t nmemb, size_t size)
++void *jas_realloc2(void *ptr, size_t nmemb, size_t size)
++{
++ if (!ptr)
++ return jas_alloc2(nmemb, size);
++ if (nmemb && SIZE_MAX / nmemb < size) {
++ errno = ENOMEM;
++ return NULL;
++ }
++ return jas_realloc(ptr, nmemb * size);
++
++}
++
++void *jas_alloc2(size_t nmemb, size_t size)
++{
++ if (nmemb && SIZE_MAX / nmemb < size) {
++ errno = ENOMEM;
++ return NULL;
++ }
++
++ return jas_malloc(nmemb * size);
++}
++
++void *jas_alloc3(size_t a, size_t b, size_t c)
+ {
+- void *ptr;
+ size_t n;
+- n = nmemb * size;
+- if (!(ptr = jas_malloc(n * sizeof(char)))) {
+- return 0;
++
++ if (a && SIZE_MAX / a < b) {
++ errno = ENOMEM;
++ return NULL;
+ }
+- memset(ptr, 0, n);
++
++ return jas_alloc2(a*b, c);
++}
++
++void *jas_calloc(size_t nmemb, size_t size)
++{
++ void *ptr;
++
++ ptr = jas_alloc2(nmemb, size);
++ if (ptr)
++ memset(ptr, 0, nmemb*size);
+ return ptr;
+ }
+
+diff -pruN jasper-1.900.1.orig/src/libjasper/base/jas_seq.c jasper-1.900.1/src/libjasper/base/jas_seq.c
+--- jasper-1.900.1.orig/src/libjasper/base/jas_seq.c 2007-01-19 22:43:05.000000000 +0100
++++ jasper-1.900.1/src/libjasper/base/jas_seq.c 2009-10-22 10:27:45.000000000 +0200
+@@ -114,7 +114,7 @@ jas_matrix_t *jas_matrix_create(int numr
+ matrix->datasize_ = numrows * numcols;
+
+ if (matrix->maxrows_ > 0) {
+- if (!(matrix->rows_ = jas_malloc(matrix->maxrows_ *
++ if (!(matrix->rows_ = jas_alloc2(matrix->maxrows_,
+ sizeof(jas_seqent_t *)))) {
+ jas_matrix_destroy(matrix);
+ return 0;
+@@ -122,7 +122,7 @@ jas_matrix_t *jas_matrix_create(int numr
+ }
+
+ if (matrix->datasize_ > 0) {
+- if (!(matrix->data_ = jas_malloc(matrix->datasize_ *
++ if (!(matrix->data_ = jas_alloc2(matrix->datasize_,
+ sizeof(jas_seqent_t)))) {
+ jas_matrix_destroy(matrix);
+ return 0;
+@@ -220,7 +220,7 @@ void jas_matrix_bindsub(jas_matrix_t *ma
+ mat0->numrows_ = r1 - r0 + 1;
+ mat0->numcols_ = c1 - c0 + 1;
+ mat0->maxrows_ = mat0->numrows_;
+- mat0->rows_ = jas_malloc(mat0->maxrows_ * sizeof(jas_seqent_t *));
++ mat0->rows_ = jas_alloc2(mat0->maxrows_, sizeof(jas_seqent_t *));
+ for (i = 0; i < mat0->numrows_; ++i) {
+ mat0->rows_[i] = mat1->rows_[r0 + i] + c0;
+ }
+diff -pruN jasper-1.900.1.orig/src/libjasper/base/jas_stream.c jasper-1.900.1/src/libjasper/base/jas_stream.c
+--- jasper-1.900.1.orig/src/libjasper/base/jas_stream.c 2007-01-19 22:43:05.000000000 +0100
++++ jasper-1.900.1/src/libjasper/base/jas_stream.c 2009-10-22 10:27:45.000000000 +0200
+@@ -212,7 +212,7 @@ jas_stream_t *jas_stream_memopen(char *b
+ if (buf) {
+ obj->buf_ = (unsigned char *) buf;
+ } else {
+- obj->buf_ = jas_malloc(obj->bufsize_ * sizeof(char));
++ obj->buf_ = jas_malloc(obj->bufsize_);
+ obj->myalloc_ = 1;
+ }
+ if (!obj->buf_) {
+@@ -992,7 +992,7 @@ static int mem_resize(jas_stream_memobj_
+ unsigned char *buf;
+
+ assert(m->buf_);
+- if (!(buf = jas_realloc(m->buf_, bufsize * sizeof(unsigned char)))) {
++ if (!(buf = jas_realloc(m->buf_, bufsize))) {
+ return -1;
+ }
+ m->buf_ = buf;
+diff -pruN jasper-1.900.1.orig/src/libjasper/bmp/bmp_dec.c jasper-1.900.1/src/libjasper/bmp/bmp_dec.c
+--- jasper-1.900.1.orig/src/libjasper/bmp/bmp_dec.c 2007-01-19 22:43:07.000000000 +0100
++++ jasper-1.900.1/src/libjasper/bmp/bmp_dec.c 2009-10-22 10:27:45.000000000 +0200
+@@ -283,7 +283,7 @@ static bmp_info_t *bmp_getinfo(jas_strea
+ }
+
+ if (info->numcolors > 0) {
+- if (!(info->palents = jas_malloc(info->numcolors *
++ if (!(info->palents = jas_alloc2(info->numcolors,
+ sizeof(bmp_palent_t)))) {
+ bmp_info_destroy(info);
+ return 0;
+diff -pruN jasper-1.900.1.orig/src/libjasper/include/jasper/jas_malloc.h jasper-1.900.1/src/libjasper/include/jasper/jas_malloc.h
+--- jasper-1.900.1.orig/src/libjasper/include/jasper/jas_malloc.h 2007-01-19 22:43:04.000000000 +0100
++++ jasper-1.900.1/src/libjasper/include/jasper/jas_malloc.h 2009-10-22 10:27:45.000000000 +0200
+@@ -95,6 +95,9 @@ extern "C" {
+ #define jas_free MEMFREE
+ #define jas_realloc MEMREALLOC
+ #define jas_calloc MEMCALLOC
++#define jas_alloc2(a, b) MEMALLOC((a)*(b))
++#define jas_alloc3(a, b, c) MEMALLOC((a)*(b)*(c))
++#define jas_realloc2(p, a, b) MEMREALLOC((p), (a)*(b))
+ #endif
+
+ /******************************************************************************\
+@@ -115,6 +118,12 @@ void *jas_realloc(void *ptr, size_t size
+ /* Allocate a block of memory and initialize the contents to zero. */
+ void *jas_calloc(size_t nmemb, size_t size);
+
++/* size-checked double allocation .*/
++void *jas_alloc2(size_t, size_t);
++
++void *jas_alloc3(size_t, size_t, size_t);
++
++void *jas_realloc2(void *, size_t, size_t);
+ #endif
+
+ #ifdef __cplusplus
+diff -pruN jasper-1.900.1.orig/src/libjasper/jp2/jp2_cod.c jasper-1.900.1/src/libjasper/jp2/jp2_cod.c
+--- jasper-1.900.1.orig/src/libjasper/jp2/jp2_cod.c 2007-01-19 22:43:05.000000000 +0100
++++ jasper-1.900.1/src/libjasper/jp2/jp2_cod.c 2009-10-22 10:30:24.000000000 +0200
+@@ -247,7 +247,7 @@ jp2_box_t *jp2_box_get(jas_stream_t *in)
+ box = 0;
+ tmpstream = 0;
+
+- if (!(box = jas_malloc(sizeof(jp2_box_t)))) {
++ if (!(box = jas_calloc(1, sizeof(jp2_box_t)))) {
+ goto error;
+ }
+ box->ops = &jp2_boxinfo_unk.ops;
+@@ -372,7 +372,7 @@ static int jp2_bpcc_getdata(jp2_box_t *b
+ jp2_bpcc_t *bpcc = &box->data.bpcc;
+ unsigned int i;
+ bpcc->numcmpts = box->datalen;
+- if (!(bpcc->bpcs = jas_malloc(bpcc->numcmpts * sizeof(uint_fast8_t)))) {
++ if (!(bpcc->bpcs = jas_alloc2(bpcc->numcmpts, sizeof(uint_fast8_t)))) {
+ return -1;
+ }
+ for (i = 0; i < bpcc->numcmpts; ++i) {
+@@ -416,7 +416,7 @@ static int jp2_colr_getdata(jp2_box_t *b
+ break;
+ case JP2_COLR_ICC:
+ colr->iccplen = box->datalen - 3;
+- if (!(colr->iccp = jas_malloc(colr->iccplen * sizeof(uint_fast8_t)))) {
++ if (!(colr->iccp = jas_alloc2(colr->iccplen, sizeof(uint_fast8_t)))) {
+ return -1;
+ }
+ if (jas_stream_read(in, colr->iccp, colr->iccplen) != colr->iccplen) {
+@@ -453,7 +453,7 @@ static int jp2_cdef_getdata(jp2_box_t *b
+ if (jp2_getuint16(in, &cdef->numchans)) {
+ return -1;
+ }
+- if (!(cdef->ents = jas_malloc(cdef->numchans * sizeof(jp2_cdefchan_t)))) {
++ if (!(cdef->ents = jas_alloc2(cdef->numchans, sizeof(jp2_cdefchan_t)))) {
+ return -1;
+ }
+ for (channo = 0; channo < cdef->numchans; ++channo) {
+@@ -766,7 +766,7 @@ static int jp2_cmap_getdata(jp2_box_t *b
+ unsigned int i;
+
+ cmap->numchans = (box->datalen) / 4;
+- if (!(cmap->ents = jas_malloc(cmap->numchans * sizeof(jp2_cmapent_t)))) {
++ if (!(cmap->ents = jas_alloc2(cmap->numchans, sizeof(jp2_cmapent_t)))) {
+ return -1;
+ }
+ for (i = 0; i < cmap->numchans; ++i) {
+@@ -828,10 +828,10 @@ static int jp2_pclr_getdata(jp2_box_t *b
+ return -1;
+ }
+ lutsize = pclr->numlutents * pclr->numchans;
+- if (!(pclr->lutdata = jas_malloc(lutsize * sizeof(int_fast32_t)))) {
++ if (!(pclr->lutdata = jas_alloc2(lutsize, sizeof(int_fast32_t)))) {
+ return -1;
+ }
+- if (!(pclr->bpc = jas_malloc(pclr->numchans * sizeof(uint_fast8_t)))) {
++ if (!(pclr->bpc = jas_alloc2(pclr->numchans, sizeof(uint_fast8_t)))) {
+ return -1;
+ }
+ for (i = 0; i < pclr->numchans; ++i) {
+diff -pruN jasper-1.900.1.orig/src/libjasper/jp2/jp2_dec.c jasper-1.900.1/src/libjasper/jp2/jp2_dec.c
+--- jasper-1.900.1.orig/src/libjasper/jp2/jp2_dec.c 2007-01-19 22:43:05.000000000 +0100
++++ jasper-1.900.1/src/libjasper/jp2/jp2_dec.c 2009-10-22 10:27:45.000000000 +0200
+@@ -336,7 +336,7 @@ jas_image_t *jp2_decode(jas_stream_t *in
+ }
+
+ /* Allocate space for the channel-number to component-number LUT. */
+- if (!(dec->chantocmptlut = jas_malloc(dec->numchans * sizeof(uint_fast16_t)))) {
++ if (!(dec->chantocmptlut = jas_alloc2(dec->numchans, sizeof(uint_fast16_t)))) {
+ jas_eprintf("error: no memory\n");
+ goto error;
+ }
+@@ -354,7 +354,7 @@ jas_image_t *jp2_decode(jas_stream_t *in
+ if (cmapent->map == JP2_CMAP_DIRECT) {
+ dec->chantocmptlut[channo] = channo;
+ } else if (cmapent->map == JP2_CMAP_PALETTE) {
+- lutents = jas_malloc(pclrd->numlutents * sizeof(int_fast32_t));
++ lutents = jas_alloc2(pclrd->numlutents, sizeof(int_fast32_t));
+ for (i = 0; i < pclrd->numlutents; ++i) {
+ lutents[i] = pclrd->lutdata[cmapent->pcol + i * pclrd->numchans];
+ }
+diff -pruN jasper-1.900.1.orig/src/libjasper/jp2/jp2_enc.c jasper-1.900.1/src/libjasper/jp2/jp2_enc.c
+--- jasper-1.900.1.orig/src/libjasper/jp2/jp2_enc.c 2007-01-19 22:43:05.000000000 +0100
++++ jasper-1.900.1/src/libjasper/jp2/jp2_enc.c 2009-10-22 10:27:45.000000000 +0200
+@@ -191,7 +191,7 @@ int sgnd;
+ }
+ bpcc = &box->data.bpcc;
+ bpcc->numcmpts = jas_image_numcmpts(image);
+- if (!(bpcc->bpcs = jas_malloc(bpcc->numcmpts *
++ if (!(bpcc->bpcs = jas_alloc2(bpcc->numcmpts,
+ sizeof(uint_fast8_t)))) {
+ goto error;
+ }
+@@ -285,7 +285,7 @@ int sgnd;
+ }
+ cdef = &box->data.cdef;
+ cdef->numchans = jas_image_numcmpts(image);
+- cdef->ents = jas_malloc(cdef->numchans * sizeof(jp2_cdefchan_t));
++ cdef->ents = jas_alloc2(cdef->numchans, sizeof(jp2_cdefchan_t));
+ for (i = 0; i < jas_image_numcmpts(image); ++i) {
+ cdefchanent = &cdef->ents[i];
+ cdefchanent->channo = i;
+diff -pruN jasper-1.900.1.orig/src/libjasper/jpc/jpc_cs.c jasper-1.900.1/src/libjasper/jpc/jpc_cs.c
+--- jasper-1.900.1.orig/src/libjasper/jpc/jpc_cs.c 2009-10-22 09:58:16.000000000 +0200
++++ jasper-1.900.1/src/libjasper/jpc/jpc_cs.c 2009-10-22 10:27:45.000000000 +0200
+@@ -502,7 +502,7 @@ static int jpc_siz_getparms(jpc_ms_t *ms
+ !siz->tileheight || !siz->numcomps) {
+ return -1;
+ }
+- if (!(siz->comps = jas_malloc(siz->numcomps * sizeof(jpc_sizcomp_t)))) {
++ if (!(siz->comps = jas_alloc2(siz->numcomps, sizeof(jpc_sizcomp_t)))) {
+ return -1;
+ }
+ for (i = 0; i < siz->numcomps; ++i) {
+@@ -986,7 +986,7 @@ static int jpc_qcx_getcompparms(jpc_qcxc
+ jpc_qcx_destroycompparms(compparms);
+ return -1;
+ } else if (compparms->numstepsizes > 0) {
+- compparms->stepsizes = jas_malloc(compparms->numstepsizes *
++ compparms->stepsizes = jas_alloc2(compparms->numstepsizes,
+ sizeof(uint_fast16_t));
+ assert(compparms->stepsizes);
+ for (i = 0; i < compparms->numstepsizes; ++i) {
+@@ -1094,7 +1094,7 @@ static int jpc_ppm_getparms(jpc_ms_t *ms
+
+ ppm->len = ms->len - 1;
+ if (ppm->len > 0) {
+- if (!(ppm->data = jas_malloc(ppm->len * sizeof(unsigned char)))) {
++ if (!(ppm->data = jas_malloc(ppm->len))) {
+ goto error;
+ }
+ if (JAS_CAST(uint, jas_stream_read(in, ppm->data, ppm->len)) != ppm->len) {
+@@ -1163,7 +1163,7 @@ static int jpc_ppt_getparms(jpc_ms_t *ms
+ }
+ ppt->len = ms->len - 1;
+ if (ppt->len > 0) {
+- if (!(ppt->data = jas_malloc(ppt->len * sizeof(unsigned char)))) {
++ if (!(ppt->data = jas_malloc(ppt->len))) {
+ goto error;
+ }
+ if (jas_stream_read(in, (char *) ppt->data, ppt->len) != JAS_CAST(int, ppt->len)) {
+@@ -1226,7 +1226,7 @@ static int jpc_poc_getparms(jpc_ms_t *ms
+ uint_fast8_t tmp;
+ poc->numpchgs = (cstate->numcomps > 256) ? (ms->len / 9) :
+ (ms->len / 7);
+- if (!(poc->pchgs = jas_malloc(poc->numpchgs * sizeof(jpc_pocpchg_t)))) {
++ if (!(poc->pchgs = jas_alloc2(poc->numpchgs, sizeof(jpc_pocpchg_t)))) {
+ goto error;
+ }
+ for (pchgno = 0, pchg = poc->pchgs; pchgno < poc->numpchgs; ++pchgno,
+@@ -1331,7 +1331,7 @@ static int jpc_crg_getparms(jpc_ms_t *ms
+ jpc_crgcomp_t *comp;
+ uint_fast16_t compno;
+ crg->numcomps = cstate->numcomps;
+- if (!(crg->comps = jas_malloc(cstate->numcomps * sizeof(uint_fast16_t)))) {
++ if (!(crg->comps = jas_alloc2(cstate->numcomps, sizeof(uint_fast16_t)))) {
+ return -1;
+ }
+ for (compno = 0, comp = crg->comps; compno < cstate->numcomps;
+@@ -1470,7 +1470,7 @@ static int jpc_unk_getparms(jpc_ms_t *ms
+ cstate = 0;
+
+ if (ms->len > 0) {
+- if (!(unk->data = jas_malloc(ms->len * sizeof(unsigned char)))) {
++ if (!(unk->data = jas_malloc(ms->len))) {
+ return -1;
+ }
+ if (jas_stream_read(in, (char *) unk->data, ms->len) != JAS_CAST(int, ms->len)) {
+diff -pruN jasper-1.900.1.orig/src/libjasper/jpc/jpc_dec.c jasper-1.900.1/src/libjasper/jpc/jpc_dec.c
+--- jasper-1.900.1.orig/src/libjasper/jpc/jpc_dec.c 2009-10-22 09:58:16.000000000 +0200
++++ jasper-1.900.1/src/libjasper/jpc/jpc_dec.c 2009-10-22 10:30:50.000000000 +0200
+@@ -449,7 +449,7 @@ static int jpc_dec_process_sot(jpc_dec_t
+
+ if (dec->state == JPC_MH) {
+
+- compinfos = jas_malloc(dec->numcomps * sizeof(jas_image_cmptparm_t));
++ compinfos = jas_alloc2(dec->numcomps, sizeof(jas_image_cmptparm_t));
+ assert(compinfos);
+ for (cmptno = 0, cmpt = dec->cmpts, compinfo = compinfos;
+ cmptno < dec->numcomps; ++cmptno, ++cmpt, ++compinfo) {
+@@ -692,7 +692,7 @@ static int jpc_dec_tileinit(jpc_dec_t *d
+ tile->realmode = 1;
+ }
+ tcomp->numrlvls = ccp->numrlvls;
+- if (!(tcomp->rlvls = jas_malloc(tcomp->numrlvls *
++ if (!(tcomp->rlvls = jas_alloc2(tcomp->numrlvls,
+ sizeof(jpc_dec_rlvl_t)))) {
+ return -1;
+ }
+@@ -764,7 +764,7 @@ rlvl->bands = 0;
+ rlvl->cbgheightexpn);
+
+ rlvl->numbands = (!rlvlno) ? 1 : 3;
+- if (!(rlvl->bands = jas_malloc(rlvl->numbands *
++ if (!(rlvl->bands = jas_alloc2(rlvl->numbands,
+ sizeof(jpc_dec_band_t)))) {
+ return -1;
+ }
+@@ -797,7 +797,7 @@ rlvl->bands = 0;
+
+ assert(rlvl->numprcs);
+
+- if (!(band->prcs = jas_malloc(rlvl->numprcs * sizeof(jpc_dec_prc_t)))) {
++ if (!(band->prcs = jas_alloc2(rlvl->numprcs, sizeof(jpc_dec_prc_t)))) {
+ return -1;
+ }
+
+@@ -834,7 +834,7 @@ rlvl->bands = 0;
+ if (!(prc->numimsbstagtree = jpc_tagtree_create(prc->numhcblks, prc->numvcblks))) {
+ return -1;
+ }
+- if (!(prc->cblks = jas_malloc(prc->numcblks * sizeof(jpc_dec_cblk_t)))) {
++ if (!(prc->cblks = jas_alloc2(prc->numcblks, sizeof(jpc_dec_cblk_t)))) {
+ return -1;
+ }
+
+@@ -1181,7 +1181,7 @@ static int jpc_dec_process_siz(jpc_dec_t
+ return -1;
+ }
+
+- if (!(dec->cmpts = jas_malloc(dec->numcomps * sizeof(jpc_dec_cmpt_t)))) {
++ if (!(dec->cmpts = jas_alloc2(dec->numcomps, sizeof(jpc_dec_cmpt_t)))) {
+ return -1;
+ }
+
+@@ -1204,7 +1204,7 @@ static int jpc_dec_process_siz(jpc_dec_t
+ dec->numhtiles = JPC_CEILDIV(dec->xend - dec->tilexoff, dec->tilewidth);
+ dec->numvtiles = JPC_CEILDIV(dec->yend - dec->tileyoff, dec->tileheight);
+ dec->numtiles = dec->numhtiles * dec->numvtiles;
+- if (!(dec->tiles = jas_malloc(dec->numtiles * sizeof(jpc_dec_tile_t)))) {
++ if (!(dec->tiles = jas_calloc(dec->numtiles, sizeof(jpc_dec_tile_t)))) {
+ return -1;
+ }
+
+@@ -1228,7 +1228,7 @@ static int jpc_dec_process_siz(jpc_dec_t
+ tile->pkthdrstreampos = 0;
+ tile->pptstab = 0;
+ tile->cp = 0;
+- if (!(tile->tcomps = jas_malloc(dec->numcomps *
++ if (!(tile->tcomps = jas_calloc(dec->numcomps,
+ sizeof(jpc_dec_tcomp_t)))) {
+ return -1;
+ }
+@@ -1489,7 +1489,7 @@ static jpc_dec_cp_t *jpc_dec_cp_create(u
+ cp->numlyrs = 0;
+ cp->mctid = 0;
+ cp->csty = 0;
+- if (!(cp->ccps = jas_malloc(cp->numcomps * sizeof(jpc_dec_ccp_t)))) {
++ if (!(cp->ccps = jas_alloc2(cp->numcomps, sizeof(jpc_dec_ccp_t)))) {
+ return 0;
+ }
+ if (!(cp->pchglist = jpc_pchglist_create())) {
+@@ -2048,7 +2048,7 @@ jpc_streamlist_t *jpc_streamlist_create(
+ }
+ streamlist->numstreams = 0;
+ streamlist->maxstreams = 100;
+- if (!(streamlist->streams = jas_malloc(streamlist->maxstreams *
++ if (!(streamlist->streams = jas_alloc2(streamlist->maxstreams,
+ sizeof(jas_stream_t *)))) {
+ jas_free(streamlist);
+ return 0;
+@@ -2068,8 +2068,8 @@ int jpc_streamlist_insert(jpc_streamlist
+ /* Grow the array of streams if necessary. */
+ if (streamlist->numstreams >= streamlist->maxstreams) {
+ newmaxstreams = streamlist->maxstreams + 1024;
+- if (!(newstreams = jas_realloc(streamlist->streams,
+- (newmaxstreams + 1024) * sizeof(jas_stream_t *)))) {
++ if (!(newstreams = jas_realloc2(streamlist->streams,
++ (newmaxstreams + 1024), sizeof(jas_stream_t *)))) {
+ return -1;
+ }
+ for (i = streamlist->numstreams; i < streamlist->maxstreams; ++i) {
+@@ -2155,8 +2155,7 @@ int jpc_ppxstab_grow(jpc_ppxstab_t *tab,
+ {
+ jpc_ppxstabent_t **newents;
+ if (tab->maxents < maxents) {
+- newents = (tab->ents) ? jas_realloc(tab->ents, maxents *
+- sizeof(jpc_ppxstabent_t *)) : jas_malloc(maxents * sizeof(jpc_ppxstabent_t *));
++ newents = jas_realloc2(tab->ents, maxents, sizeof(jpc_ppxstabent_t *));
+ if (!newents) {
+ return -1;
+ }
+diff -pruN jasper-1.900.1.orig/src/libjasper/jpc/jpc_enc.c jasper-1.900.1/src/libjasper/jpc/jpc_enc.c
+--- jasper-1.900.1.orig/src/libjasper/jpc/jpc_enc.c 2007-01-19 22:43:07.000000000 +0100
++++ jasper-1.900.1/src/libjasper/jpc/jpc_enc.c 2009-10-22 10:27:45.000000000 +0200
+@@ -403,7 +403,7 @@ static jpc_enc_cp_t *cp_create(char *opt
+ vsteplcm *= jas_image_cmptvstep(image, cmptno);
+ }
+
+- if (!(cp->ccps = jas_malloc(cp->numcmpts * sizeof(jpc_enc_ccp_t)))) {
++ if (!(cp->ccps = jas_alloc2(cp->numcmpts, sizeof(jpc_enc_ccp_t)))) {
+ goto error;
+ }
+ for (cmptno = 0, ccp = cp->ccps; cmptno < JAS_CAST(int, cp->numcmpts); ++cmptno,
+@@ -656,7 +656,7 @@ static jpc_enc_cp_t *cp_create(char *opt
+
+ if (ilyrrates && numilyrrates > 0) {
+ tcp->numlyrs = numilyrrates + 1;
+- if (!(tcp->ilyrrates = jas_malloc((tcp->numlyrs - 1) *
++ if (!(tcp->ilyrrates = jas_alloc2((tcp->numlyrs - 1),
+ sizeof(jpc_fix_t)))) {
+ goto error;
+ }
+@@ -940,7 +940,7 @@ startoff = jas_stream_getrwcount(enc->ou
+ siz->tilewidth = cp->tilewidth;
+ siz->tileheight = cp->tileheight;
+ siz->numcomps = cp->numcmpts;
+- siz->comps = jas_malloc(siz->numcomps * sizeof(jpc_sizcomp_t));
++ siz->comps = jas_alloc2(siz->numcomps, sizeof(jpc_sizcomp_t));
+ assert(siz->comps);
+ for (i = 0; i < JAS_CAST(int, cp->numcmpts); ++i) {
+ siz->comps[i].prec = cp->ccps[i].prec;
+@@ -977,7 +977,7 @@ startoff = jas_stream_getrwcount(enc->ou
+ return -1;
+ }
+ crg = &enc->mrk->parms.crg;
+- crg->comps = jas_malloc(crg->numcomps * sizeof(jpc_crgcomp_t));
++ crg->comps = jas_alloc2(crg->numcomps, sizeof(jpc_crgcomp_t));
+ if (jpc_putms(enc->out, enc->cstate, enc->mrk)) {
+ jas_eprintf("cannot write CRG marker\n");
+ return -1;
+@@ -1955,7 +1955,7 @@ jpc_enc_tile_t *jpc_enc_tile_create(jpc_
+ tile->mctid = cp->tcp.mctid;
+
+ tile->numlyrs = cp->tcp.numlyrs;
+- if (!(tile->lyrsizes = jas_malloc(tile->numlyrs *
++ if (!(tile->lyrsizes = jas_alloc2(tile->numlyrs,
+ sizeof(uint_fast32_t)))) {
+ goto error;
+ }
+@@ -1964,7 +1964,7 @@ jpc_enc_tile_t *jpc_enc_tile_create(jpc_
+ }
+
+ /* Allocate an array for the per-tile-component information. */
+- if (!(tile->tcmpts = jas_malloc(cp->numcmpts * sizeof(jpc_enc_tcmpt_t)))) {
++ if (!(tile->tcmpts = jas_alloc2(cp->numcmpts, sizeof(jpc_enc_tcmpt_t)))) {
+ goto error;
+ }
+ /* Initialize a few members critical for error recovery. */
+@@ -2110,7 +2110,7 @@ static jpc_enc_tcmpt_t *tcmpt_create(jpc
+ jas_seq2d_ystart(tcmpt->data), jas_seq2d_xend(tcmpt->data),
+ jas_seq2d_yend(tcmpt->data), bandinfos);
+
+- if (!(tcmpt->rlvls = jas_malloc(tcmpt->numrlvls * sizeof(jpc_enc_rlvl_t)))) {
++ if (!(tcmpt->rlvls = jas_alloc2(tcmpt->numrlvls, sizeof(jpc_enc_rlvl_t)))) {
+ goto error;
+ }
+ for (rlvlno = 0, rlvl = tcmpt->rlvls; rlvlno < tcmpt->numrlvls;
+@@ -2213,7 +2213,7 @@ static jpc_enc_rlvl_t *rlvl_create(jpc_e
+ rlvl->numvprcs = JPC_FLOORDIVPOW2(brprcbry - tlprctly, rlvl->prcheightexpn);
+ rlvl->numprcs = rlvl->numhprcs * rlvl->numvprcs;
+
+- if (!(rlvl->bands = jas_malloc(rlvl->numbands * sizeof(jpc_enc_band_t)))) {
++ if (!(rlvl->bands = jas_alloc2(rlvl->numbands, sizeof(jpc_enc_band_t)))) {
+ goto error;
+ }
+ for (bandno = 0, band = rlvl->bands; bandno < rlvl->numbands;
+@@ -2290,7 +2290,7 @@ if (bandinfo->xstart != bandinfo->xend &
+ band->synweight = bandinfo->synenergywt;
+
+ if (band->data) {
+- if (!(band->prcs = jas_malloc(rlvl->numprcs * sizeof(jpc_enc_prc_t)))) {
++ if (!(band->prcs = jas_alloc2(rlvl->numprcs, sizeof(jpc_enc_prc_t)))) {
+ goto error;
+ }
+ for (prcno = 0, prc = band->prcs; prcno < rlvl->numprcs; ++prcno,
+@@ -2422,7 +2422,7 @@ if (!rlvlno) {
+ goto error;
+ }
+
+- if (!(prc->cblks = jas_malloc(prc->numcblks * sizeof(jpc_enc_cblk_t)))) {
++ if (!(prc->cblks = jas_alloc2(prc->numcblks, sizeof(jpc_enc_cblk_t)))) {
+ goto error;
+ }
+ for (cblkno = 0, cblk = prc->cblks; cblkno < prc->numcblks;
+diff -pruN jasper-1.900.1.orig/src/libjasper/jpc/jpc_mqdec.c jasper-1.900.1/src/libjasper/jpc/jpc_mqdec.c
+--- jasper-1.900.1.orig/src/libjasper/jpc/jpc_mqdec.c 2007-01-19 22:43:07.000000000 +0100
++++ jasper-1.900.1/src/libjasper/jpc/jpc_mqdec.c 2009-10-22 10:27:45.000000000 +0200
+@@ -118,7 +118,7 @@ jpc_mqdec_t *jpc_mqdec_create(int maxctx
+ mqdec->in = in;
+ mqdec->maxctxs = maxctxs;
+ /* Allocate memory for the per-context state information. */
+- if (!(mqdec->ctxs = jas_malloc(mqdec->maxctxs * sizeof(jpc_mqstate_t *)))) {
++ if (!(mqdec->ctxs = jas_alloc2(mqdec->maxctxs, sizeof(jpc_mqstate_t *)))) {
+ goto error;
+ }
+ /* Set the current context to the first context. */
+diff -pruN jasper-1.900.1.orig/src/libjasper/jpc/jpc_mqenc.c jasper-1.900.1/src/libjasper/jpc/jpc_mqenc.c
+--- jasper-1.900.1.orig/src/libjasper/jpc/jpc_mqenc.c 2007-01-19 22:43:07.000000000 +0100
++++ jasper-1.900.1/src/libjasper/jpc/jpc_mqenc.c 2009-10-22 10:27:45.000000000 +0200
+@@ -197,7 +197,7 @@ jpc_mqenc_t *jpc_mqenc_create(int maxctx
+ mqenc->maxctxs = maxctxs;
+
+ /* Allocate memory for the per-context state information. */
+- if (!(mqenc->ctxs = jas_malloc(mqenc->maxctxs * sizeof(jpc_mqstate_t *)))) {
++ if (!(mqenc->ctxs = jas_alloc2(mqenc->maxctxs, sizeof(jpc_mqstate_t *)))) {
+ goto error;
+ }
+
+diff -pruN jasper-1.900.1.orig/src/libjasper/jpc/jpc_qmfb.c jasper-1.900.1/src/libjasper/jpc/jpc_qmfb.c
+--- jasper-1.900.1.orig/src/libjasper/jpc/jpc_qmfb.c 2007-01-19 22:43:07.000000000 +0100
++++ jasper-1.900.1/src/libjasper/jpc/jpc_qmfb.c 2009-10-22 10:27:45.000000000 +0200
+@@ -321,7 +321,7 @@ void jpc_qmfb_split_row(jpc_fix_t *a, in
+ #if !defined(HAVE_VLA)
+ /* Get a buffer. */
+ if (bufsize > QMFB_SPLITBUFSIZE) {
+- if (!(buf = jas_malloc(bufsize * sizeof(jpc_fix_t)))) {
++ if (!(buf = jas_alloc2(bufsize, sizeof(jpc_fix_t)))) {
+ /* We have no choice but to commit suicide in this case. */
+ abort();
+ }
+@@ -389,7 +389,7 @@ void jpc_qmfb_split_col(jpc_fix_t *a, in
+ #if !defined(HAVE_VLA)
+ /* Get a buffer. */
+ if (bufsize > QMFB_SPLITBUFSIZE) {
+- if (!(buf = jas_malloc(bufsize * sizeof(jpc_fix_t)))) {
++ if (!(buf = jas_alloc2(bufsize, sizeof(jpc_fix_t)))) {
+ /* We have no choice but to commit suicide in this case. */
+ abort();
+ }
+@@ -460,7 +460,7 @@ void jpc_qmfb_split_colgrp(jpc_fix_t *a,
+ #if !defined(HAVE_VLA)
+ /* Get a buffer. */
+ if (bufsize > QMFB_SPLITBUFSIZE) {
+- if (!(buf = jas_malloc(bufsize * sizeof(jpc_fix_t)))) {
++ if (!(buf = jas_alloc2(bufsize, sizeof(jpc_fix_t)))) {
+ /* We have no choice but to commit suicide in this case. */
+ abort();
+ }
+@@ -549,7 +549,7 @@ void jpc_qmfb_split_colres(jpc_fix_t *a,
+ #if !defined(HAVE_VLA)
+ /* Get a buffer. */
+ if (bufsize > QMFB_SPLITBUFSIZE) {
+- if (!(buf = jas_malloc(bufsize * sizeof(jpc_fix_t)))) {
++ if (!(buf = jas_alloc2(bufsize, sizeof(jpc_fix_t)))) {
+ /* We have no choice but to commit suicide in this case. */
+ abort();
+ }
+@@ -633,7 +633,7 @@ void jpc_qmfb_join_row(jpc_fix_t *a, int
+ #if !defined(HAVE_VLA)
+ /* Allocate memory for the join buffer from the heap. */
+ if (bufsize > QMFB_JOINBUFSIZE) {
+- if (!(buf = jas_malloc(bufsize * sizeof(jpc_fix_t)))) {
++ if (!(buf = jas_alloc2(bufsize, sizeof(jpc_fix_t)))) {
+ /* We have no choice but to commit suicide. */
+ abort();
+ }
+@@ -698,7 +698,7 @@ void jpc_qmfb_join_col(jpc_fix_t *a, int
+ #if !defined(HAVE_VLA)
+ /* Allocate memory for the join buffer from the heap. */
+ if (bufsize > QMFB_JOINBUFSIZE) {
+- if (!(buf = jas_malloc(bufsize * sizeof(jpc_fix_t)))) {
++ if (!(buf = jas_alloc2(bufsize, sizeof(jpc_fix_t)))) {
+ /* We have no choice but to commit suicide. */
+ abort();
+ }
+@@ -766,7 +766,7 @@ void jpc_qmfb_join_colgrp(jpc_fix_t *a,
+ #if !defined(HAVE_VLA)
+ /* Allocate memory for the join buffer from the heap. */
+ if (bufsize > QMFB_JOINBUFSIZE) {
+- if (!(buf = jas_malloc(bufsize * JPC_QMFB_COLGRPSIZE * sizeof(jpc_fix_t)))) {
++ if (!(buf = jas_alloc2(bufsize, JPC_QMFB_COLGRPSIZE * sizeof(jpc_fix_t)))) {
+ /* We have no choice but to commit suicide. */
+ abort();
+ }
+@@ -852,7 +852,7 @@ void jpc_qmfb_join_colres(jpc_fix_t *a,
+ #if !defined(HAVE_VLA)
+ /* Allocate memory for the join buffer from the heap. */
+ if (bufsize > QMFB_JOINBUFSIZE) {
+- if (!(buf = jas_malloc(bufsize * numcols * sizeof(jpc_fix_t)))) {
++ if (!(buf = jas_alloc3(bufsize, numcols, sizeof(jpc_fix_t)))) {
+ /* We have no choice but to commit suicide. */
+ abort();
+ }
+diff -pruN jasper-1.900.1.orig/src/libjasper/jpc/jpc_t1enc.c jasper-1.900.1/src/libjasper/jpc/jpc_t1enc.c
+--- jasper-1.900.1.orig/src/libjasper/jpc/jpc_t1enc.c 2007-01-19 22:43:07.000000000 +0100
++++ jasper-1.900.1/src/libjasper/jpc/jpc_t1enc.c 2009-10-22 10:27:45.000000000 +0200
+@@ -219,7 +219,7 @@ int jpc_enc_enccblk(jpc_enc_t *enc, jas_
+
+ cblk->numpasses = (cblk->numbps > 0) ? (3 * cblk->numbps - 2) : 0;
+ if (cblk->numpasses > 0) {
+- cblk->passes = jas_malloc(cblk->numpasses * sizeof(jpc_enc_pass_t));
++ cblk->passes = jas_alloc2(cblk->numpasses, sizeof(jpc_enc_pass_t));
+ assert(cblk->passes);
+ } else {
+ cblk->passes = 0;
+diff -pruN jasper-1.900.1.orig/src/libjasper/jpc/jpc_t2cod.c jasper-1.900.1/src/libjasper/jpc/jpc_t2cod.c
+--- jasper-1.900.1.orig/src/libjasper/jpc/jpc_t2cod.c 2007-01-19 22:43:07.000000000 +0100
++++ jasper-1.900.1/src/libjasper/jpc/jpc_t2cod.c 2009-10-22 10:27:45.000000000 +0200
+@@ -573,7 +573,7 @@ int jpc_pchglist_insert(jpc_pchglist_t *
+ }
+ if (pchglist->numpchgs >= pchglist->maxpchgs) {
+ newmaxpchgs = pchglist->maxpchgs + 128;
+- if (!(newpchgs = jas_realloc(pchglist->pchgs, newmaxpchgs * sizeof(jpc_pchg_t *)))) {
++ if (!(newpchgs = jas_realloc2(pchglist->pchgs, newmaxpchgs, sizeof(jpc_pchg_t *)))) {
+ return -1;
+ }
+ pchglist->maxpchgs = newmaxpchgs;
+diff -pruN jasper-1.900.1.orig/src/libjasper/jpc/jpc_t2dec.c jasper-1.900.1/src/libjasper/jpc/jpc_t2dec.c
+--- jasper-1.900.1.orig/src/libjasper/jpc/jpc_t2dec.c 2007-01-19 22:43:07.000000000 +0100
++++ jasper-1.900.1/src/libjasper/jpc/jpc_t2dec.c 2009-10-22 10:27:45.000000000 +0200
+@@ -478,7 +478,7 @@ jpc_pi_t *jpc_dec_pi_create(jpc_dec_t *d
+ return 0;
+ }
+ pi->numcomps = dec->numcomps;
+- if (!(pi->picomps = jas_malloc(pi->numcomps * sizeof(jpc_picomp_t)))) {
++ if (!(pi->picomps = jas_alloc2(pi->numcomps, sizeof(jpc_picomp_t)))) {
+ jpc_pi_destroy(pi);
+ return 0;
+ }
+@@ -490,7 +490,7 @@ jpc_pi_t *jpc_dec_pi_create(jpc_dec_t *d
+ for (compno = 0, tcomp = tile->tcomps, picomp = pi->picomps;
+ compno < pi->numcomps; ++compno, ++tcomp, ++picomp) {
+ picomp->numrlvls = tcomp->numrlvls;
+- if (!(picomp->pirlvls = jas_malloc(picomp->numrlvls *
++ if (!(picomp->pirlvls = jas_alloc2(picomp->numrlvls,
+ sizeof(jpc_pirlvl_t)))) {
+ jpc_pi_destroy(pi);
+ return 0;
+@@ -503,7 +503,7 @@ jpc_pi_t *jpc_dec_pi_create(jpc_dec_t *d
+ rlvlno < picomp->numrlvls; ++rlvlno, ++pirlvl, ++rlvl) {
+ /* XXX sizeof(long) should be sizeof different type */
+ pirlvl->numprcs = rlvl->numprcs;
+- if (!(pirlvl->prclyrnos = jas_malloc(pirlvl->numprcs *
++ if (!(pirlvl->prclyrnos = jas_alloc2(pirlvl->numprcs,
+ sizeof(long)))) {
+ jpc_pi_destroy(pi);
+ return 0;
+diff -pruN jasper-1.900.1.orig/src/libjasper/jpc/jpc_t2enc.c jasper-1.900.1/src/libjasper/jpc/jpc_t2enc.c
+--- jasper-1.900.1.orig/src/libjasper/jpc/jpc_t2enc.c 2007-01-19 22:43:07.000000000 +0100
++++ jasper-1.900.1/src/libjasper/jpc/jpc_t2enc.c 2009-10-22 10:27:45.000000000 +0200
+@@ -565,7 +565,7 @@ jpc_pi_t *jpc_enc_pi_create(jpc_enc_cp_t
+ }
+ pi->pktno = -1;
+ pi->numcomps = cp->numcmpts;
+- if (!(pi->picomps = jas_malloc(pi->numcomps * sizeof(jpc_picomp_t)))) {
++ if (!(pi->picomps = jas_alloc2(pi->numcomps, sizeof(jpc_picomp_t)))) {
+ jpc_pi_destroy(pi);
+ return 0;
+ }
+@@ -577,7 +577,7 @@ jpc_pi_t *jpc_enc_pi_create(jpc_enc_cp_t
+ for (compno = 0, tcomp = tile->tcmpts, picomp = pi->picomps;
+ compno < pi->numcomps; ++compno, ++tcomp, ++picomp) {
+ picomp->numrlvls = tcomp->numrlvls;
+- if (!(picomp->pirlvls = jas_malloc(picomp->numrlvls *
++ if (!(picomp->pirlvls = jas_alloc2(picomp->numrlvls,
+ sizeof(jpc_pirlvl_t)))) {
+ jpc_pi_destroy(pi);
+ return 0;
+@@ -591,7 +591,7 @@ jpc_pi_t *jpc_enc_pi_create(jpc_enc_cp_t
+ /* XXX sizeof(long) should be sizeof different type */
+ pirlvl->numprcs = rlvl->numprcs;
+ if (rlvl->numprcs) {
+- if (!(pirlvl->prclyrnos = jas_malloc(pirlvl->numprcs *
++ if (!(pirlvl->prclyrnos = jas_alloc2(pirlvl->numprcs,
+ sizeof(long)))) {
+ jpc_pi_destroy(pi);
+ return 0;
+diff -pruN jasper-1.900.1.orig/src/libjasper/jpc/jpc_tagtree.c jasper-1.900.1/src/libjasper/jpc/jpc_tagtree.c
+--- jasper-1.900.1.orig/src/libjasper/jpc/jpc_tagtree.c 2007-01-19 22:43:07.000000000 +0100
++++ jasper-1.900.1/src/libjasper/jpc/jpc_tagtree.c 2009-10-22 10:27:45.000000000 +0200
+@@ -125,7 +125,7 @@ jpc_tagtree_t *jpc_tagtree_create(int nu
+ ++numlvls;
+ } while (n > 1);
+
+- if (!(tree->nodes_ = jas_malloc(tree->numnodes_ * sizeof(jpc_tagtreenode_t)))) {
++ if (!(tree->nodes_ = jas_alloc2(tree->numnodes_, sizeof(jpc_tagtreenode_t)))) {
+ return 0;
+ }
+
+diff -pruN jasper-1.900.1.orig/src/libjasper/jpc/jpc_util.c jasper-1.900.1/src/libjasper/jpc/jpc_util.c
+--- jasper-1.900.1.orig/src/libjasper/jpc/jpc_util.c 2007-01-19 22:43:07.000000000 +0100
++++ jasper-1.900.1/src/libjasper/jpc/jpc_util.c 2009-10-22 10:27:45.000000000 +0200
+@@ -109,7 +109,7 @@ int jpc_atoaf(char *s, int *numvalues, d
+ }
+
+ if (n) {
+- if (!(vs = jas_malloc(n * sizeof(double)))) {
++ if (!(vs = jas_alloc2(n, sizeof(double)))) {
+ return -1;
+ }
+
+diff -pruN jasper-1.900.1.orig/src/libjasper/mif/mif_cod.c jasper-1.900.1/src/libjasper/mif/mif_cod.c
+--- jasper-1.900.1.orig/src/libjasper/mif/mif_cod.c 2007-01-19 22:43:05.000000000 +0100
++++ jasper-1.900.1/src/libjasper/mif/mif_cod.c 2009-10-22 10:27:45.000000000 +0200
+@@ -438,8 +438,7 @@ static int mif_hdr_growcmpts(mif_hdr_t *
+ int cmptno;
+ mif_cmpt_t **newcmpts;
+ assert(maxcmpts >= hdr->numcmpts);
+- newcmpts = (!hdr->cmpts) ? jas_malloc(maxcmpts * sizeof(mif_cmpt_t *)) :
+- jas_realloc(hdr->cmpts, maxcmpts * sizeof(mif_cmpt_t *));
++ newcmpts = jas_realloc2(hdr->cmpts, maxcmpts, sizeof(mif_cmpt_t *));
+ if (!newcmpts) {
+ return -1;
+ }
diff --git a/testing/jasper/jasper-1.900.1-CVE-2008-3522.patch b/testing/jasper/jasper-1.900.1-CVE-2008-3522.patch
new file mode 100644
index 000000000..4bf2e9b52
--- /dev/null
+++ b/testing/jasper/jasper-1.900.1-CVE-2008-3522.patch
@@ -0,0 +1,14 @@
+https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2008-3522
+
+diff -pruN jasper-1.900.1.orig/src/libjasper/base/jas_stream.c jasper-1.900.1/src/libjasper/base/jas_stream.c
+--- jasper-1.900.1.orig/src/libjasper/base/jas_stream.c 2009-10-22 10:27:45.000000000 +0200
++++ jasper-1.900.1/src/libjasper/base/jas_stream.c 2009-10-22 10:35:53.000000000 +0200
+@@ -553,7 +553,7 @@ int jas_stream_printf(jas_stream_t *stre
+ int ret;
+
+ va_start(ap, fmt);
+- ret = vsprintf(buf, fmt, ap);
++ ret = vsnprintf(buf, sizeof buf, fmt, ap);
+ jas_stream_puts(stream, buf);
+ va_end(ap);
+ return ret;
diff --git a/testing/jasper/jpc_dec.c.patch b/testing/jasper/jpc_dec.c.patch
new file mode 100644
index 000000000..ae1cd0617
--- /dev/null
+++ b/testing/jasper/jpc_dec.c.patch
@@ -0,0 +1,18 @@
+diff -urN jasper-1.900.1/src/libjasper/jpc/jpc_dec.c jasper-1.900.1-fix/src/libjasper/jpc/jpc_dec.c
+--- jasper-1.900.1/src/libjasper/jpc/jpc_dec.c 2007-01-19 14:43:07.000000000 -0700
++++ jasper-1.900.1-fix/src/libjasper/jpc/jpc_dec.c 2008-03-06 16:51:12.000000000 -0700
+@@ -1069,12 +1069,12 @@
+ /* Apply an inverse intercomponent transform if necessary. */
+ switch (tile->cp->mctid) {
+ case JPC_MCT_RCT:
+- assert(dec->numcomps == 3);
++ assert(dec->numcomps >= 3);
+ jpc_irct(tile->tcomps[0].data, tile->tcomps[1].data,
+ tile->tcomps[2].data);
+ break;
+ case JPC_MCT_ICT:
+- assert(dec->numcomps == 3);
++ assert(dec->numcomps >= 3);
+ jpc_iict(tile->tcomps[0].data, tile->tcomps[1].data,
+ tile->tcomps[2].data);
+ break;
diff --git a/testing/jasper/patch-libjasper-stepsizes-overflow.diff b/testing/jasper/patch-libjasper-stepsizes-overflow.diff
new file mode 100644
index 000000000..097559f68
--- /dev/null
+++ b/testing/jasper/patch-libjasper-stepsizes-overflow.diff
@@ -0,0 +1,14 @@
+--- jasper-1.900.1.orig/src/libjasper/jpc/jpc_cs.c 2007-01-19 22:43:07.000000000 +0100
++++ jasper-1.900.1/src/libjasper/jpc/jpc_cs.c 2007-04-06 01:29:02.000000000 +0200
+@@ -982,7 +982,10 @@ static int jpc_qcx_getcompparms(jpc_qcxc
+ compparms->numstepsizes = (len - n) / 2;
+ break;
+ }
+- if (compparms->numstepsizes > 0) {
++ if (compparms->numstepsizes > 3 * JPC_MAXRLVLS + 1) {
++ jpc_qcx_destroycompparms(compparms);
++ return -1;
++ } else if (compparms->numstepsizes > 0) {
+ compparms->stepsizes = jas_malloc(compparms->numstepsizes *
+ sizeof(uint_fast16_t));
+ assert(compparms->stepsizes);
diff --git a/testing/kdebase-workspace/PKGBUILD b/testing/kdebase-workspace/PKGBUILD
index 5f31e02e3..495c6f549 100644
--- a/testing/kdebase-workspace/PKGBUILD
+++ b/testing/kdebase-workspace/PKGBUILD
@@ -1,11 +1,11 @@
-# $Id: PKGBUILD 167577 2012-10-02 19:07:16Z andrea $
+# $Id: PKGBUILD 168268 2012-10-07 11:14:11Z andrea $
# Maintainer: Andrea Scarpino <andrea@archlinux.org>
# Contributor: Pierre Schmitz <pierre@archlinux.de>
pkgname=kdebase-workspace
_pkgname=kde-workspace
pkgver=4.9.2
-pkgrel=1
+pkgrel=3
pkgdesc="Provides the interface and basic tools for the KDE workspace"
arch=('i686' 'x86_64')
url='https://projects.kde.org/projects/kde/kde-workspace'
@@ -18,7 +18,7 @@ depends=('kdepim-runtime' 'lm_sensors' 'libraw1394' 'libqalculate'
'qimageblitz' 'polkit-kde' 'consolekit' 'xorg-xprop' 'libxdamage'
'libxklavier' 'xorg-xsetroot' 'libxcomposite' 'libxinerama'
'xorg-xrdb' 'libgles' 'libegl' 'libxres' 'xorg-xrandr'
- 'xorg-xmessage' 'libusb-compat' 'kde-base-artwork')
+ 'xorg-xmessage' 'libusb-compat' 'kde-base-artwork' 'glu')
makedepends=('cmake' 'automoc4' 'boost' 'kdebindings-python2' 'networkmanager')
optdepends=('kde-wallpapers: wallpapers for KDE Plasma Workspaces')
install="${pkgname}.install"
@@ -29,7 +29,8 @@ backup=('usr/share/config/kdm/kdmrc'
options=('emptydirs')
source=("http://download.kde.org/stable/${pkgver}/src/${_pkgname}-${pkgver}.tar.xz"
'kdm' 'kde.pam' 'kde-np.pam' 'kscreensaver.pam' 'kdm.service'
- 'fixpath.patch' 'terminate-server.patch' 'kdm-xinitrd.patch')
+ 'fixpath.patch' 'terminate-server.patch' 'kdm-xinitrd.patch'
+ 'logind-support.patch')
sha1sums=('091bec159d85db2a9a6d6b1b43a53183c23de488'
'5db3a245201bd4a50e65aa2ef583cf5490e4f646'
'712a90999bd429883dcef5dcaf288aace332ced8'
@@ -38,15 +39,20 @@ sha1sums=('091bec159d85db2a9a6d6b1b43a53183c23de488'
'b6f8e8692737b11eec1f8022ce74b5b23e247b1b'
'd7b5883f7e65c6839b1f65f94d58026673dd0226'
'ac7bc292c865bc1ab8c02e6341aa7aeaf1a3eeee'
- 'd509dac592bd8b310df27991b208c95b6d907514')
+ 'd509dac592bd8b310df27991b208c95b6d907514'
+ 'ccde71c42e19feaf40d3bd76e7396a0cb6df012f')
build() {
- cd "${srcdir}"/${_pkgname}-${pkgver}
+ cd ${_pkgname}-${pkgver}
patch -p1 -i "${srcdir}"/kdm-xinitrd.patch
patch -p0 -i "${srcdir}"/fixpath.patch
patch -p0 -i "${srcdir}"/terminate-server.patch
- cd "${srcdir}"
+ # KDEBUG 307412
+ patch -p1 -i "${srcdir}"/logind-support.patch
+
+ cd ../
+
mkdir build
cd build
cmake ../${_pkgname}-${pkgver} \
@@ -61,7 +67,7 @@ build() {
}
package() {
- cd "${srcdir}"/build
+ cd build
make DESTDIR="${pkgdir}" install
install -D -m644 "${srcdir}"/kde.pam "${pkgdir}"/etc/pam.d/kde
diff --git a/testing/kdebase-workspace/logind-support.patch b/testing/kdebase-workspace/logind-support.patch
new file mode 100644
index 000000000..9de205400
--- /dev/null
+++ b/testing/kdebase-workspace/logind-support.patch
@@ -0,0 +1,66 @@
+From: Lukas Tinkl <lukas@kde.org>
+Date: Fri, 05 Oct 2012 09:57:13 +0000
+Subject: store the filedescriptor in a member variable
+X-Git-Url: http://quickgit.kde.org/?p=kde-workspace.git&amp;a=commitdiff&amp;h=a18b78d7da8cb8d627ad2e85f666bfcf1a2721e1
+---
+store the filedescriptor in a member variable
+
+make systemd-inhibit work as intended, PowerDevil now handles
+power/sleep/lid buttons as intended
+
+BUG: 307412
+---
+
+
+--- a/powerdevil/daemon/powerdevilpolicyagent.cpp
++++ b/powerdevil/daemon/powerdevilpolicyagent.cpp
+@@ -29,7 +29,6 @@
+ #include <QtDBus/QDBusPendingReply>
+ #include <QtDBus/QDBusConnectionInterface>
+ #include <QtDBus/QDBusServiceWatcher>
+-#include <QtDBus/QDBusUnixFileDescriptor>
+
+ #include <KGlobal>
+ #include <KDebug>
+@@ -225,6 +224,9 @@
+ onActiveSessionChanged(m_activeSessionPath);
+
+ // inhibit systemd handling of power/sleep/lid buttons
++ // http://www.freedesktop.org/wiki/Software/systemd/inhibit
++ kDebug() << "fd passing available:" << bool(managerIface.connection().connectionCapabilities() & QDBusConnection::UnixFileDescriptorPassing);
++
+ QVariantList args;
+ args << "handle-power-key:handle-suspend-key:handle-hibernate-key:handle-lid-switch"; // what
+ args << "PowerDevil"; // who
+@@ -232,8 +234,9 @@
+ args << "block"; // mode
+ QDBusPendingReply<QDBusUnixFileDescriptor> desc = managerIface.asyncCallWithArgumentList("Inhibit", args);
+ desc.waitForFinished();
+- if (desc.isValid() && desc.value().isValid()) {
+- kDebug() << "systemd powersave events handling inhibited";
++ if (desc.isValid()) {
++ m_systemdInhibitFd = desc.value();
++ kDebug() << "systemd powersave events handling inhibited, descriptor:" << m_systemdInhibitFd.fileDescriptor();
+ }
+ else
+ kWarning() << "failed to inhibit systemd powersave handling";
+
+--- a/powerdevil/daemon/powerdevilpolicyagent.h
++++ b/powerdevil/daemon/powerdevilpolicyagent.h
+@@ -27,6 +27,7 @@
+ #include <QtCore/QWeakPointer>
+
+ #include <QtDBus/QDBusContext>
++#include <QtDBus/QDBusUnixFileDescriptor>
+
+ #include <kdemacros.h>
+
+@@ -108,6 +109,7 @@
+ QString m_activeSessionPath;
+ QWeakPointer< QDBusInterface > m_sdSessionInterface;
+ QWeakPointer< QDBusInterface > m_sdSeatInterface;
++ QDBusUnixFileDescriptor m_systemdInhibitFd;
+
+ // ConsoleKit support
+ bool m_ckAvailable;
+
diff --git a/testing/libreoffice/PKGBUILD b/testing/libreoffice/PKGBUILD
index 2b30c747e..fee998363 100644
--- a/testing/libreoffice/PKGBUILD
+++ b/testing/libreoffice/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 165918 2012-09-03 20:33:25Z andyrtr $
+# $Id: PKGBUILD 168274 2012-10-07 14:01:51Z andyrtr $
# Maintainer: AndyRTR <andyrtr@archlinux.org>
pkgbase="libreoffice"
@@ -23,10 +23,10 @@ pkgname=('libreoffice-common'
'libreoffice-scripting-javascript'
'libreoffice-extension-scripting-python'
'libreoffice-extension-wiki-publisher'
- 'libreoffice-extension-nlpsolver') # svn up -r 142692 (last one with all extensions built
-_LOver=3.6.1.2
-pkgver=3.6.1
-pkgrel=4
+ 'libreoffice-extension-nlpsolver') # svn up -r 142692 (last one with all extensions built)
+_LOver=3.6.2.2
+pkgver=3.6.2
+pkgrel=2
arch=('i686' 'x86_64')
license=('LGPL3')
url="http://www.libreoffice.org/"
@@ -34,8 +34,7 @@ makedepends=( # makedepends
'sane' 'perl-archive-zip' 'zip' 'unzip' 'unixodbc' 'hsqldb-java' #'boost'
'apache-ant' 'gperf' 'poppler>=0.18.0' 'kdelibs' 'gconf' 'cppunit'
'beanshell' 'vigra' 'clucene' 'junit' 'libmythes' 'libwpg' 'imagemagick'
- 'mesa' 'gstreamer0.10-base' 'java-environment' 'postgresql-libs' 'doxygen' 'clucene'
- #'saxon' - currently broken
+ 'glu' 'gstreamer0.10-base' 'java-environment' 'postgresql-libs' 'doxygen' 'clucene'
# the runtime dependencies
"curl>=7.20.0" "hunspell>=1.2.8" "python2>=2.7" 'libwpd>=0.9.2' 'libwps' 'libxaw' "neon>=0.28.6"
'pango' 'nspr' 'libjpeg' 'libxrandr' 'libgl' 'dbus-glib' 'libxslt' 'librsvg' "icu>=49.1"
@@ -81,8 +80,8 @@ source=(${_mirror}/${pkgbase}-{core,help,translations}-${_LOver}.tar.xz
${_additional_source_url}/0d2dcdfbf28d6208751b33057f5361f0-libcmis-0.2.3.tar.gz
${_additional_source_url}/ce5a1def34578b75959ac31210f031f6-libcdr-0.0.8.tar.bz2
${_additional_source_url2}/185d60944ea767075d27247c3162b3bc-unowinreg.dll
+ make-pyuno-work-with-system-wide-module-install.diff
buildfix.diff
- git_fixes.diff
libreoffice-common.sh libreoffice-common.csh)
noextract=(94e7f271e38c976462558b4278590178-libvisio-0.0.19.tar.bz2
18f577b374d60b3c760a3a3350407632-STLport-4.5.tar.gz
@@ -114,9 +113,9 @@ noextract=(94e7f271e38c976462558b4278590178-libvisio-0.0.19.tar.bz2
db60e4fde8dd6d6807523deb71ee34dc-liblayout-0.2.10.zip
ce5a1def34578b75959ac31210f031f6-libcdr-0.0.8.tar.bz2
ba2930200c9f019c2d93a8c88c651a0f-flow-engine-0.9.4.zip)
-md5sums=('3ddcf145b74daa4361e48dafe97e7d21'
- '7966e66099729d23d9ee594f526a50ed'
- '2555590c1b4395857fc5c469f7f1bd0c'
+md5sums=('ae171ba4633cc72dba4451b1bdd3385e'
+ 'cdad0734d247d91a79cb282fd851d2a7'
+ 'e9a7e3d35432b72a4603ce094deb6a67'
'18f577b374d60b3c760a3a3350407632'
'f02578f5218f217a9f20e9c30e119c6a'
'94e7f271e38c976462558b4278590178'
@@ -147,8 +146,8 @@ md5sums=('3ddcf145b74daa4361e48dafe97e7d21'
'0d2dcdfbf28d6208751b33057f5361f0'
'ce5a1def34578b75959ac31210f031f6'
'185d60944ea767075d27247c3162b3bc'
+ '97bf43dda273d79ff90c848ab53b0e3c'
'234e91ac65945ce1ab1e3839780e90f7'
- '2445aca137bdbf0cf7526e91f768a1d0'
'abcb1b0a7deaffe13ab3d7ca70becb49'
'72790a4103da259a55cadd66db931d00')
@@ -171,8 +170,10 @@ build() {
ln -s ../libreoffice-translations-$_LOver/translations .
# buildfixes & bugfixes
- patch -Np1 -i ${srcdir}/buildfix.diff
- patch -Np1 -i ${srcdir}/git_fixes.diff
+ patch -Np1 -i ${srcdir}/buildfix.diff # leaves out a broken pdfimport test
+
+ # fix not upstreamable pyuno paths - patch taken from Debian
+ patch -Np1 -i ${srcdir}/make-pyuno-work-with-system-wide-module-install.diff
#use the CFLAGS but remove the LibO overridden ones
for i in $CFLAGS; do
@@ -266,7 +267,7 @@ build() {
make
# fake installation to create split file lists
mkdir $srcdir/fakeinstall
- make DESTDIR=${srcdir}/fakeinstall distro-pack-install
+ make DESTDIR=${srcdir}/fakeinstall distro-pack-install # -o build -o check
}
#check() {
@@ -281,7 +282,6 @@ package_libreoffice-common() {
depends=('libreoffice-langpack' "hunspell>=1.2.8" "python2>=2.7" "neon>=0.28.6"
'nspr' 'libsm' 'redland' 'hyphen' 'graphite' "icu>=49.1" 'clucene' 'lcms2'
'hicolor-icon-theme' 'desktop-file-utils' 'shared-mime-info' 'xdg-utils' 'orbit2')
- #'saxon'
optdepends=('libreoffice-langpack: additional language support'
'java-runtime: adds java support'
'libcups: adds printing support'
@@ -373,27 +373,22 @@ package_libreoffice-postgresql-connector() {
groups=('libreoffice')
replaces=('libreoffice')
- # no file-list so far
- install -dm755 ${pkgdir}/usr/lib/libreoffice/program/services
- install -m644 ${srcdir}/fakeinstall/usr/lib/libreoffice/program/postgresql-sdbc.uno.so ${pkgdir}/usr/lib/libreoffice/program
- install -m644 ${srcdir}/fakeinstall/usr/lib/libreoffice/program/postgresql-sdbc-impl.uno.so ${pkgdir}/usr/lib/libreoffice/program
- install -m644 ${srcdir}/fakeinstall/usr/lib/libreoffice/program/postgresql-sdbc.ini ${pkgdir}/usr/lib/libreoffice/program
- install -m644 ${srcdir}/fakeinstall/usr/lib/libreoffice/program/services/postgresql-sdbc.rdb ${pkgdir}/usr/lib/libreoffice/program/services
- install -dm755 ${pkgdir}/usr/lib/libreoffice/share/registry
- install -m644 ${srcdir}/fakeinstall/usr/lib/libreoffice/share/registry/postgresqlsdbc.xcd ${pkgdir}/usr/lib/libreoffice/share/registry
+ # workaround double entries in the file list
+ mv ${srcdir}/libreoffice-core-$_LOver/file-lists/postgresql_list.txt ${srcdir}/libreoffice-core-$_LOver/file-lists/postgresql_list.txt.orig
+ sort ${srcdir}/libreoffice-core-$_LOver/file-lists/postgresql_list.txt.orig | uniq 1>& ${srcdir}/libreoffice-core-$_LOver/file-lists/postgresql_list.txt
# create directories from *list.txt file
-# for directory in `grep ^%dir ${srcdir}/libreoffice-core-$_LOver/file-lists/postgresql_list.txt`; do
-# install -dm755 ${pkgdir}/${directory/\%dir/}
-# done
+ for directory in `grep ^%dir ${srcdir}/libreoffice-core-$_LOver/file-lists/postgresql_list.txt`; do
+ install -dm755 ${pkgdir}/${directory/\%dir/}
+ done
# install files into the pkg from fakeinstall dir
-# for file in `grep -v ^%dir $srcdir/libreoffice-core-$_LOver/file-lists/postgresql_list.txt`; do
-# dirname=`dirname $file`
+ for file in `grep -v ^%dir $srcdir/libreoffice-core-$_LOver/file-lists/postgresql_list.txt`; do
+ dirname=`dirname $file`
# check if directory has been already been created - some are missing like manpages
-# [ -d ${pkgdir}/$dirname ] || install -dm755 ${pkgdir}/$dirname
+ [ -d ${pkgdir}/$dirname ] || install -dm755 ${pkgdir}/$dirname
# mv file from fakeinstall to pkgdir
-# mv ${srcdir}/fakeinstall${file} ${pkgdir}$file
-# done
+ mv ${srcdir}/fakeinstall${file} ${pkgdir}$file
+ done
}
package_libreoffice-calc() {
@@ -467,7 +462,7 @@ package_libreoffice-impress() {
pkgdesc="Presentation Application for LibreOffice."
install=libreoffice-impress.install
depends=('libreoffice-common')
- optdepends=('mesa: for the OGLTrans extension')
+ optdepends=('glu: for the OGLTrans extension')
backup=()
groups=('libreoffice')
replaces=('libreoffice')
@@ -550,7 +545,6 @@ package_libreoffice-sdk() {
done
# fix environment path to keep compatibility with openjdk6 and openjdk7
- #sed -i -e "s:\/usr\/lib\/jvm\/java-7-openjdk:\$J2SDKDIR:" /usr/lib/libreoffice/sdk/setsdkenv_unix.{sh,csh}
sed -i -e "s:\/usr\/lib\/jvm\/java-7-openjdk:\$J2SDKDIR:" ${pkgdir}/usr/lib/libreoffice/sdk/setsdkenv_unix.{sh,csh}
}
diff --git a/testing/libreoffice/make-pyuno-work-with-system-wide-module-install.diff b/testing/libreoffice/make-pyuno-work-with-system-wide-module-install.diff
new file mode 100644
index 000000000..e86548136
--- /dev/null
+++ b/testing/libreoffice/make-pyuno-work-with-system-wide-module-install.diff
@@ -0,0 +1,44 @@
+diff --git a/desktop/scripts/soffice.sh b/desktop/scripts/soffice.sh
+index defd7b2..ea2a809 100755
+--- a/desktop/scripts/soffice.sh
++++ b/desktop/scripts/soffice.sh
+@@ -128,6 +128,9 @@ if echo "$checks" | grep -q "cc" ; then
+ exit 1;
+ fi
+
++PYTHONPATH=$sd_prog${PYTHONPATH+:$PYTHONPATH}
++export PYTHONPATH
++
+ case "`uname -s`" in
+ NetBSD|OpenBSD|FreeBSD|DragonFly)
+ # this is a temporary hack until we can live with the default search paths
+diff --git a/pyuno/source/module/uno.py b/pyuno/source/module/uno.py
+index f93ac5e..92a2891 100644
+--- a/pyuno/source/module/uno.py
++++ b/pyuno/source/module/uno.py
+@@ -26,8 +26,12 @@
+ # for a copy of the LGPLv3 License.
+ #
+ #*************************************************************************
++import os
+ import sys
+
++sys.path.append('/usr/lib/libreoffice/program')
++if getattr(os.environ, 'URE_BOOTSTRAP', None) is None:
++ os.environ['URE_BOOTSTRAP'] = "vnd.sun.star.pathname:/usr/lib/libreoffice/program/fundamentalrc"
+ import pyuno
+
+ try:
+diff --git a/scripting/source/pyprov/officehelper.py b/scripting/source/pyprov/officehelper.py
+index 610ac5f..df243d0 100755
+--- a/scripting/source/pyprov/officehelper.py
++++ b/scripting/source/pyprov/officehelper.py
+@@ -53,7 +53,7 @@ def bootstrap():
+ if "UNO_PATH" in os.environ:
+ sOffice = os.environ["UNO_PATH"]
+ else:
+- sOffice = "" # lets hope for the best
++ sOffice = "/usr/lib/libreoffice/program"
+ sOffice = os.path.join(sOffice, "soffice")
+ if platform.startswith("win"):
+ sOffice += ".exe"
diff --git a/testing/libtool/PKGBUILD b/testing/libtool/PKGBUILD
index 51384d997..99f3d8ee4 100644
--- a/testing/libtool/PKGBUILD
+++ b/testing/libtool/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 161917 2012-06-16 14:55:31Z heftig $
+# $Id: PKGBUILD 168294 2012-10-08 01:42:04Z allan $
# Maintainer: Allan McRae <allan@archlinux.org>
# Contributor: judd <jvinet@zeroflux.org>
@@ -6,7 +6,7 @@
pkgname=('libtool' 'libltdl')
pkgver=2.4.2
-pkgrel=6
+pkgrel=7
pkgdesc="A generic library support script"
arch=('i686' 'x86_64')
url="http://www.gnu.org/software/libtool"
@@ -28,7 +28,7 @@ check() {
}
package_libtool() {
- depends=('sh' "libltdl=$pkgver" 'tar' 'gcc=4.7.1')
+ depends=('sh' "libltdl=$pkgver" 'tar' 'gcc=4.7.2')
groups=('base-devel')
install=libtool.install
diff --git a/testing/qt3/PKGBUILD b/testing/qt3/PKGBUILD
new file mode 100644
index 000000000..969cb6aba
--- /dev/null
+++ b/testing/qt3/PKGBUILD
@@ -0,0 +1,124 @@
+# $Id: PKGBUILD 168290 2012-10-07 22:25:27Z eric $
+# Maintainer: Eric Bélanger <eric@archlinux.org>
+
+pkgname=qt3
+pkgver=3.3.8b
+pkgrel=2
+epoch=1
+pkgdesc="The QT3 gui toolkit"
+arch=('i686' 'x86_64')
+url="http://www.trolltech.com/products/qt/index.html"
+license=('GPL')
+depends=('libpng' 'libxmu' 'libxcursor' 'libxinerama' 'glu' 'libxft'
+ 'libxrandr' 'libmng')
+makedepends=('mysql' 'postgresql' 'unixodbc' 'sqlite' 'mesa')
+optdepends=('libmysqlclient' 'postgresql-libs' 'unixodbc')
+options=('!libtool')
+install=qt.install
+source=(ftp://ftp.trolltech.com/qt/source/qt-x11-free-${pkgver}.tar.gz
+ qt.profile qt3-png15.patch qt-copy-kde-patches.tar.bz2 qt-patches.tar.bz2
+ eastern_asian_languagues.diff qt-odbc.patch gcc-4.6.patch)
+sha1sums=('745def6250dc7f337dbb265e20bf38dcb41fd854'
+ 'd2e257a9011208b2cb81b9cf47915b9a2f9dab83'
+ '3d19510c46016a1a211d97bf8f82b01498b1b33c'
+ '33418e5b117458af23c72cdbffc0c339bc34bdc4'
+ '116afa0e737bdf27ea27f9b3653aeb56db9ec151'
+ '40c7b8f06a21f809ddeb8b5560e9da63ccac6a17'
+ '1346320614f6f86fbeb10b9fbad721dea29f5b61'
+ 'd9b83b8f6f9c8bd98d290dc1d0e9913a00b62c3f')
+
+# qt-copy-kde-patches come from http://websvn.kde.org/trunk/qt-copy/patches/
+# other qt-patches come from fedora and gentoo
+
+build() {
+ unset QMAKESPEC
+ export QTDIR="${srcdir}"/qt-x11-free-${pkgver}
+ export PATH=${QTDIR}/bin:${PATH}
+ export LD_LIBRARY_PATH=${QTDIR}/lib:${LD_LIBRARY_PATH}
+ export QMAKESPEC=$QTDIR/mkspecs/linux-g++
+ cd "${srcdir}"/qt-x11-free-${pkgver}
+ # apply qt patches from kde.org
+ for i in ../qt-copy-kde-patches/*; do
+ patch -p0 -i $i
+ done
+ # apply other qt patches and one security fix from debian/gentoo
+ for i in ../qt-patches/*; do
+ patch -p1 -i $i
+ done
+ # fix CJK font/chars select error (FS#11245)
+ patch -p1 -i "${srcdir}"/eastern_asian_languagues.diff
+ # fix build problem against new unixODBC
+ patch -p1 -i "${srcdir}"/qt-odbc.patch
+ # fix build with gcc 4.6.0
+ patch -p1 -i "${srcdir}"/gcc-4.6.patch
+
+ patch -p0 -i "${srcdir}"/qt3-png15.patch
+ # start compiling qt
+ sed -i 's|-cp -P -f|-cp -L -f|' qmake/Makefile.unix
+ rm -rf doc/html examples tutorial
+ sed -i "s|sub-tutorial sub-examples||" Makefile
+ sed -i "s|-O2|$CXXFLAGS|" mkspecs/linux-g++/qmake.conf
+ sed -i "s|-O2|$CXXFLAGS|" mkspecs/linux-g++-32/qmake.conf
+ sed -i "s|-O2|$CXXFLAGS|" mkspecs/linux-g++-64/qmake.conf
+ sed -i "s|-I. |$CXXFLAGS -I. |" qmake/Makefile.unix
+ sed -i "s|read acceptance|acceptance=yes|" configure
+
+ # remove unwanted mkspecs
+ rm -rf mkspecs/{*aix*,*bsd*,cygwin*,dgux*,darwin*,hpux*,hurd*,irix*,lynxos*,macx*,qnx*,reliant*,sco*,solaris*,tru64*,unixware*,win32*}
+
+ if [ "$CARCH" = "x86_64" ]; then
+ export ARCH="-64"
+ else unset ARCH
+ fi
+
+ ./configure -prefix /opt/qt \
+ -platform linux-g++$ARCH \
+ -system-zlib \
+ -qt-gif \
+ -release \
+ -shared \
+ -sm \
+ -nis \
+ -thread \
+ -stl \
+ -system-lib{png,jpeg,mng} \
+ -no-g++-exceptions \
+ -plugin-sql-{mysql,psql,sqlite,odbc}
+
+ # fix /opt/qt/lib path
+ [ "$CARCH" = "x86_64" ] && sed -i "s|/opt/qt/lib64|/opt/qt/lib|g" "${srcdir}"/qt-x11-free-${pkgver}/src/Makefile
+ [ "$CARCH" = "x86_64" ] && sed -i "s|/opt/qt/lib64|/opt/qt/lib|g" "${srcdir}"/qt-x11-free-${pkgver}/tools/designer/designer/Makefile
+ [ "$CARCH" = "x86_64" ] && sed -i "s|/opt/qt/lib64|/opt/qt/lib|g" "${srcdir}"/qt-x11-free-${pkgver}/tools/designer/editor/Makefile
+ [ "$CARCH" = "x86_64" ] && sed -i "s|/opt/qt/lib64|/opt/qt/lib|g" "${srcdir}"/qt-x11-free-${pkgver}/tools/assistant/lib/Makefile
+ [ "$CARCH" = "x86_64" ] && sed -i "s|/opt/qt/lib64|/opt/qt/lib|g" "${srcdir}"/qt-x11-free-${pkgver}/tools/designer/uilib/Makefile
+
+ cd "${srcdir}"/qt-x11-free-${pkgver}
+ make -C qmake
+ cd "${srcdir}"/qt-x11-free-${pkgver}/plugins/src/sqldrivers/mysql
+ "${srcdir}"/qt-x11-free-${pkgver}/bin/qmake -o Makefile "INCPATH+=/usr/include/mysql" "LIBS+=-L/usr/lib/mysql -lmysqlclient" mysql.pro
+ cd "${srcdir}"/qt-x11-free-${pkgver}/plugins/src/sqldrivers/psql
+ "${srcdir}"/qt-x11-free-${pkgver}/bin/qmake -o Makefile "INCPATH+=/usr/src/include /usr/include/postgresql/server" "LIBS+=-L/usr/lib -lpq" psql.pro
+
+ cd "${srcdir}"/qt-x11-free-${pkgver}
+ # fix the broken makefiles
+ #sed -i 's|[[:space:]]*strip.*doc/html.*$|#|g' src/Makefile
+ make
+}
+
+package() {
+ cd "${srcdir}"/qt-x11-free-${pkgver}
+ make INSTALL_ROOT="${pkgdir}" install
+ rm -rf "${pkgdir}"/opt/qt/{phrasebooks,templates,translations}
+ sed -i "s|-L${srcdir}/qt-x11-free-${pkgver}/lib ||g" "${pkgdir}"/opt/qt/lib/*.prl
+ install -D -m755 qmake/qmake "${pkgdir}"/opt/qt/bin/qmake
+ install -D -m755 "${srcdir}"/qt.profile "${pkgdir}"/etc/profile.d/qt3.sh
+ ln -sf /opt/qt/bin/qtconfig "${pkgdir}"/opt/qt/bin/qt3config
+ rm -f "${pkgdir}"/opt/qt/mkspecs/linux-g++$ARCH/linux-g++$ARCH
+
+ # install man pages
+ install -d -m755 "${pkgdir}"/opt/qt/man
+ cp -r "${srcdir}"/qt-x11-free-${pkgver}/doc/man/{man1,man3} "${pkgdir}"/opt/qt/man/
+
+ install -d -m755 "${pkgdir}"/etc/ld.so.conf.d/
+ echo '/opt/qt/lib' > "${pkgdir}"/etc/ld.so.conf.d/qt3.conf
+}
diff --git a/testing/qt3/eastern_asian_languagues.diff b/testing/qt3/eastern_asian_languagues.diff
new file mode 100644
index 000000000..7c25eef7d
--- /dev/null
+++ b/testing/qt3/eastern_asian_languagues.diff
@@ -0,0 +1,39 @@
+--- qt-x11-free-3.3.8b/src/kernel/qfontdatabase.cpp 2008-01-15 21:09:13.000000000 +0200
++++ qt-x11-free-3.3.8b/src/kernel/qfontdatabase.cpp 2008-03-10 11:34:22.000000000 +0200
+@@ -966,20 +966,22 @@
+
+ #ifdef Q_WS_X11
+ if (script == QFont::Han) {
+- // modify script according to locale
+- static QFont::Script defaultHan = QFont::UnknownScript;
+- if (defaultHan == QFont::UnknownScript) {
+- QCString locale = setlocale(LC_ALL, NULL);
+- if (locale.contains("ko"))
+- defaultHan = QFont::Han_Korean;
+- else if (locale.contains("zh_TW") || locale.contains("zh_HK"))
+- defaultHan = QFont::Han_TraditionalChinese;
+- else if (locale.contains("zh"))
+- defaultHan = QFont::Han_SimplifiedChinese;
+- else
+- defaultHan = QFont::Han_Japanese;
+- }
+- script = defaultHan;
++ // modify script according to locale
++ static QFont::Script defaultHan;
++ QCString locale = setlocale(LC_ALL, NULL);
++
++ if (locale.contains("ko"))
++ defaultHan = QFont::Han_Korean;
++ else if (locale.contains("zh_TW") || locale.contains("zh_HK"))
++ defaultHan = QFont::Han_TraditionalChinese;
++ else if (locale.contains("zh"))
++ defaultHan = QFont::Han_SimplifiedChinese;
++ else if (locale.contains("ja"))
++ defaultHan = QFont::Han_Japanese;
++ else
++ defaultHan = QFont::Han; // don't change
++
++ script = defaultHan;
+ }
+ #endif
+
diff --git a/testing/qt3/gcc-4.6.patch b/testing/qt3/gcc-4.6.patch
new file mode 100644
index 000000000..bcbffcea6
--- /dev/null
+++ b/testing/qt3/gcc-4.6.patch
@@ -0,0 +1,33 @@
+diff -up qt-x11-free-3.3.8b/src/tools/qmap.h.cstddef qt-x11-free-3.3.8b/src/tools/qmap.h
+--- qt-x11-free-3.3.8b/src/tools/qmap.h.cstddef 2008-01-15 13:09:13.000000000 -0600
++++ qt-x11-free-3.3.8b/src/tools/qmap.h 2011-01-30 21:14:29.275088725 -0600
+@@ -49,6 +49,7 @@
+ #include "qvaluelist.h"
+ #endif // QT_H
+
++#include <cstddef>
+ #ifndef QT_NO_STL
+ #include <iterator>
+ #include <map>
+diff -up qt-x11-free-3.3.8b/src/tools/qvaluelist.h.cstddef qt-x11-free-3.3.8b/src/tools/qvaluelist.h
+--- qt-x11-free-3.3.8b/src/tools/qvaluelist.h.cstddef 2008-01-15 13:09:13.000000000 -0600
++++ qt-x11-free-3.3.8b/src/tools/qvaluelist.h 2011-01-30 21:14:01.765846592 -0600
+@@ -47,6 +47,7 @@
+ #include "qdatastream.h"
+ #endif // QT_H
+
++#include <cstddef>
+ #ifndef QT_NO_STL
+ #include <iterator>
+ #include <list>
+diff -up qt-x11-free-3.3.8b/src/tools/qvaluevector.h.cstddef qt-x11-free-3.3.8b/src/tools/qvaluevector.h
+--- qt-x11-free-3.3.8b/src/tools/qvaluevector.h.cstddef 2008-01-15 13:09:13.000000000 -0600
++++ qt-x11-free-3.3.8b/src/tools/qvaluevector.h 2011-01-30 21:14:01.765846592 -0600
+@@ -45,6 +45,7 @@
+ #include "qdatastream.h"
+ #endif // QT_H
+
++#include <cstddef>
+ #ifndef QT_NO_STL
+ #include <vector>
+ #endif
diff --git a/testing/qt3/qt-copy-kde-patches.tar.bz2 b/testing/qt3/qt-copy-kde-patches.tar.bz2
new file mode 100644
index 000000000..519f7173a
--- /dev/null
+++ b/testing/qt3/qt-copy-kde-patches.tar.bz2
Binary files differ
diff --git a/testing/qt3/qt-odbc.patch b/testing/qt3/qt-odbc.patch
new file mode 100644
index 000000000..6f21e3cf1
--- /dev/null
+++ b/testing/qt3/qt-odbc.patch
@@ -0,0 +1,19 @@
+diff -up qt-x11-free-3.3.8/src/sql/drivers/odbc/qsql_odbc.cpp.orig qt-x11-free-3.3.8/src/sql/drivers/odbc/qsql_odbc.cpp
+--- qt-x11-free-3.3.8/src/sql/drivers/odbc/qsql_odbc.cpp.orig 2009-02-24 11:32:27.000000000 +0100
++++ qt-x11-free-3.3.8/src/sql/drivers/odbc/qsql_odbc.cpp 2009-02-24 11:33:43.000000000 +0100
+@@ -57,13 +57,13 @@
+ #endif
+
+ // newer platform SDKs use SQLLEN instead of SQLINTEGER
+-#ifdef SQLLEN
++#if defined(SQLLEN) || defined(Q_OS_WIN64) || defined(Q_OS_UNIX)
+ # define QSQLLEN SQLLEN
+ #else
+ # define QSQLLEN SQLINTEGER
+ #endif
+
+-#ifdef SQLULEN
++#if defined(SQLULEN) || defined(Q_OS_WIN64) || defined(Q_OS_UNIX)
+ # define QSQLULEN SQLULEN
+ #else
+ # define QSQLULEN SQLUINTEGER
diff --git a/testing/qt3/qt-patches.tar.bz2 b/testing/qt3/qt-patches.tar.bz2
new file mode 100644
index 000000000..3f4aee171
--- /dev/null
+++ b/testing/qt3/qt-patches.tar.bz2
Binary files differ
diff --git a/testing/qt3/qt.install b/testing/qt3/qt.install
new file mode 100644
index 000000000..6d042daae
--- /dev/null
+++ b/testing/qt3/qt.install
@@ -0,0 +1,12 @@
+post_install() {
+ post_remove
+}
+
+post_upgrade() {
+ post_remove
+}
+
+post_remove() {
+ # this can be removed in future versions
+ sed -e '/\/opt\/qt\/lib/d' -i etc/ld.so.conf
+}
diff --git a/testing/qt3/qt.profile b/testing/qt3/qt.profile
new file mode 100644
index 000000000..ed4d232ae
--- /dev/null
+++ b/testing/qt3/qt.profile
@@ -0,0 +1,4 @@
+export QTDIR=/opt/qt
+export QT_XFT=true
+export PATH=$PATH:$QTDIR/bin
+export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/opt/qt/lib/pkgconfig
diff --git a/testing/qt3/qt3-png15.patch b/testing/qt3/qt3-png15.patch
new file mode 100644
index 000000000..e64fea36a
--- /dev/null
+++ b/testing/qt3/qt3-png15.patch
@@ -0,0 +1,212 @@
+$NetBSD: patch-as,v 1.5 2011/03/25 15:28:26 wiz Exp $
+
+--- src/kernel/qpngio.cpp.orig 2007-02-02 10:01:15.000000000 -0400
++++ src/kernel/qpngio.cpp
+@@ -43,6 +43,7 @@
+ #include "qiodevice.h"
+
+ #include <png.h>
++#include <zlib.h>
+
+
+ #ifdef Q_OS_TEMP
+@@ -123,9 +124,24 @@ void setup_qt( QImage& image, png_struct
+ png_get_IHDR(png_ptr, info_ptr, &width, &height, &bit_depth, &color_type,
+ 0, 0, 0);
+
++ png_colorp info_ptr_palette = NULL;
++ int info_ptr_num_palette = 0;
++ if (png_get_valid(png_ptr, info_ptr, PNG_INFO_PLTE)) {
++ png_get_PLTE(png_ptr, info_ptr, &info_ptr_palette, &info_ptr_num_palette);
++ }
++
++ png_bytep info_ptr_trans_alpha = NULL;
++ int info_ptr_num_trans = 0;
++ png_color_16p info_ptr_trans_color = NULL;
++
++ if (png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS)) {
++ png_get_tRNS(png_ptr, info_ptr, &info_ptr_trans_alpha, &info_ptr_num_trans, &info_ptr_trans_color);
++ }
++
++
+ if ( color_type == PNG_COLOR_TYPE_GRAY ) {
+ // Black & White or 8-bit grayscale
+- if ( bit_depth == 1 && info_ptr->channels == 1 ) {
++ if ( bit_depth == 1 && png_get_channels(png_ptr, info_ptr) == 1 ) {
+ png_set_invert_mono( png_ptr );
+ png_read_update_info( png_ptr, info_ptr );
+ if (!image.create( width, height, 1, 2, QImage::BigEndian ))
+@@ -159,7 +175,7 @@ void setup_qt( QImage& image, png_struct
+ image.setColor( i, qRgba(c,c,c,0xff) );
+ }
+ if ( png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS) ) {
+- const int g = info_ptr->trans_values.gray;
++ const int g = info_ptr_trans_color->gray;
+ if (g < ncols) {
+ image.setAlphaBuffer(TRUE);
+ image.setColor(g, image.color(g) & RGB_MASK);
+@@ -168,7 +184,7 @@ void setup_qt( QImage& image, png_struct
+ }
+ } else if ( color_type == PNG_COLOR_TYPE_PALETTE
+ && png_get_valid(png_ptr, info_ptr, PNG_INFO_PLTE)
+- && info_ptr->num_palette <= 256 )
++ && info_ptr_num_palette <= 256 )
+ {
+ // 1-bit and 8-bit color
+ if ( bit_depth != 1 )
+@@ -176,28 +192,28 @@ void setup_qt( QImage& image, png_struct
+ png_read_update_info( png_ptr, info_ptr );
+ png_get_IHDR(png_ptr, info_ptr,
+ &width, &height, &bit_depth, &color_type, 0, 0, 0);
+- if (!image.create(width, height, bit_depth, info_ptr->num_palette,
++ if (!image.create(width, height, bit_depth, info_ptr_num_palette,
+ QImage::BigEndian))
+ return;
+ int i = 0;
+ if ( png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS) ) {
+ image.setAlphaBuffer( TRUE );
+- while ( i < info_ptr->num_trans ) {
++ while ( i < info_ptr_num_trans ) {
+ image.setColor(i, qRgba(
+- info_ptr->palette[i].red,
+- info_ptr->palette[i].green,
+- info_ptr->palette[i].blue,
+- info_ptr->trans[i]
++ info_ptr_palette[i].red,
++ info_ptr_palette[i].green,
++ info_ptr_palette[i].blue,
++ info_ptr_trans_alpha[i]
+ )
+ );
+ i++;
+ }
+ }
+- while ( i < info_ptr->num_palette ) {
++ while ( i < info_ptr_num_palette ) {
+ image.setColor(i, qRgba(
+- info_ptr->palette[i].red,
+- info_ptr->palette[i].green,
+- info_ptr->palette[i].blue,
++ info_ptr_palette[i].red,
++ info_ptr_palette[i].green,
++ info_ptr_palette[i].blue,
+ 0xff
+ )
+ );
+@@ -284,7 +300,7 @@ void read_png_image(QImageIO* iio)
+ return;
+ }
+
+- if (setjmp(png_ptr->jmpbuf)) {
++ if (setjmp(png_jmpbuf(png_ptr))) {
+ png_destroy_read_struct(&png_ptr, &info_ptr, &end_info);
+ iio->setStatus(-4);
+ return;
+@@ -469,7 +485,7 @@ bool QPNGImageWriter::writeImage(const Q
+ return FALSE;
+ }
+
+- if (setjmp(png_ptr->jmpbuf)) {
++ if (setjmp(png_jmpbuf(png_ptr))) {
+ png_destroy_write_struct(&png_ptr, &info_ptr);
+ return FALSE;
+ }
+@@ -491,10 +507,16 @@ bool QPNGImageWriter::writeImage(const Q
+
+ png_set_write_fn(png_ptr, (void*)this, qpiw_write_fn, qpiw_flush_fn);
+
++#warning XXXtnn not too sure about this
++/*
++according to png.h, channels is only used on read, not writes, so we
++should be able to comment this out.
++
+ info_ptr->channels =
+ (image.depth() == 32)
+ ? (image.hasAlphaBuffer() ? 4 : 3)
+ : 1;
++*/
+
+ png_set_IHDR(png_ptr, info_ptr, image.width(), image.height(),
+ image.depth() == 1 ? 1 : 8 /* per channel */,
+@@ -504,11 +526,12 @@ bool QPNGImageWriter::writeImage(const Q
+ : PNG_COLOR_TYPE_RGB
+ : PNG_COLOR_TYPE_PALETTE, 0, 0, 0);
+
++ png_color_8 sig_bit;
++ sig_bit.red = 8;
++ sig_bit.green = 8;
++ sig_bit.blue = 8;
++ png_set_sBIT(png_ptr, info_ptr, &sig_bit);
+
+- //png_set_sBIT(png_ptr, info_ptr, 8);
+- info_ptr->sig_bit.red = 8;
+- info_ptr->sig_bit.green = 8;
+- info_ptr->sig_bit.blue = 8;
+
+ if (image.depth() == 1 && image.bitOrder() == QImage::LittleEndian)
+ png_set_packswap(png_ptr);
+@@ -522,11 +545,14 @@ bool QPNGImageWriter::writeImage(const Q
+ png_set_PLTE(png_ptr, info_ptr, palette, num_palette);
+ int* trans = new int[num_palette];
+ int num_trans = 0;
++ png_colorp info_ptr_palette = NULL;
++ int tmp;
++ png_get_PLTE(png_ptr, info_ptr, &info_ptr_palette, &tmp);
+ for (int i=0; i<num_palette; i++) {
+ QRgb rgb=image.color(i);
+- info_ptr->palette[i].red = qRed(rgb);
+- info_ptr->palette[i].green = qGreen(rgb);
+- info_ptr->palette[i].blue = qBlue(rgb);
++ info_ptr_palette[i].red = qRed(rgb);
++ info_ptr_palette[i].green = qGreen(rgb);
++ info_ptr_palette[i].blue = qBlue(rgb);
+ if (image.hasAlphaBuffer()) {
+ trans[i] = rgb >> 24;
+ if (trans[i] < 255) {
+@@ -534,6 +560,7 @@ bool QPNGImageWriter::writeImage(const Q
+ }
+ }
+ }
++ png_set_PLTE(png_ptr, info_ptr, info_ptr_palette, num_palette);
+ if (num_trans) {
+ copy_trans = new png_byte[num_trans];
+ for (int i=0; i<num_trans; i++)
+@@ -544,7 +571,10 @@ bool QPNGImageWriter::writeImage(const Q
+ }
+
+ if ( image.hasAlphaBuffer() ) {
+- info_ptr->sig_bit.alpha = 8;
++ png_color_8p sig_bit;
++ png_get_sBIT(png_ptr, info_ptr, &sig_bit);
++ sig_bit->alpha = 8;
++ png_set_sBIT(png_ptr, info_ptr, sig_bit);
+ }
+
+ // Swap ARGB to RGBA (normal PNG format) before saving on
+@@ -1030,7 +1060,7 @@ int QPNGFormat::decode(QImage& img, QIma
+ return -1;
+ }
+
+- if (setjmp((png_ptr)->jmpbuf)) {
++ if (setjmp(png_jmpbuf(png_ptr))) {
+ png_destroy_read_struct(&png_ptr, &info_ptr, 0);
+ image = 0;
+ return -1;
+@@ -1057,7 +1087,7 @@ int QPNGFormat::decode(QImage& img, QIma
+
+ if ( !png_ptr ) return 0;
+
+- if (setjmp(png_ptr->jmpbuf)) {
++ if (setjmp(png_jmpbuf(png_ptr))) {
+ png_destroy_read_struct(&png_ptr, &info_ptr, 0);
+ image = 0;
+ state = MovieStart;
+@@ -1117,7 +1147,7 @@ void QPNGFormat::end(png_structp png, pn
+ consumer->frameDone(QPoint(offx,offy),r);
+ consumer->end();
+ state = FrameStart;
+- unused_data = (int)png->buffer_size; // Since libpng doesn't tell us
++ unused_data = png_process_data_pause(png, 0);
+ }
+
+ #ifdef PNG_USER_CHUNKS_SUPPORTED
diff --git a/testing/smpeg/PKGBUILD b/testing/smpeg/PKGBUILD
new file mode 100644
index 000000000..96b7420ee
--- /dev/null
+++ b/testing/smpeg/PKGBUILD
@@ -0,0 +1,36 @@
+# $Id: PKGBUILD 168278 2012-10-07 17:15:25Z heftig $
+# Maintainer: Eric Belanger <eric@archlinux.org>
+# Contributor: Jan de Groot <jgc@archlinux.org>
+
+pkgname=smpeg
+pkgver=0.4.4
+pkgrel=7
+pkgdesc="SDL MPEG Player Library"
+arch=('i686' 'x86_64')
+url="http://icculus.org/smpeg/"
+license=('LGPL')
+depends=('sdl')
+makedepends=('gtk' 'mesa' 'glu')
+optdepends=('gtk: to use gtv ' 'glu: to use glmovie')
+options=('!libtool' '!makeflags')
+source=(http://mirrors.dotsrc.org/lokigames/open-source/smpeg/${pkgname}-${pkgver}.tar.gz
+ smpeg-0.4.4-gcc41.patch)
+md5sums=('59c76ac704088ef5539210190c4e1fe3'
+ '8b979a58307d7196655758bd3d2466c4')
+sha1sums=('6d7f4449472e6270ab435b2224f3fad951c35259'
+ '7d9a2ad7f6b702dfe3adcb87601d9b55022bbd1e')
+
+build() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+ patch -p1 -i $srcdir/smpeg-0.4.4-gcc41.patch
+ ./configure --prefix=/usr --mandir=/usr/share/man --disable-static
+ make LDFLAGS+=-lstdc++
+}
+
+package() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+ make DESTDIR=${pkgdir} install
+
+ # fix aclocal warnings
+ sed -i "s#(AM_PATH_SMPEG#([AM_PATH_SMPEG]#" ${pkgdir}/usr/share/aclocal/smpeg.m4
+}
diff --git a/testing/smpeg/smpeg-0.4.4-gcc41.patch b/testing/smpeg/smpeg-0.4.4-gcc41.patch
new file mode 100644
index 000000000..4a0eeb453
--- /dev/null
+++ b/testing/smpeg/smpeg-0.4.4-gcc41.patch
@@ -0,0 +1,41 @@
+Index: MPEGaudio.h
+===================================================================
+RCS file: /cvs/cvsroot/smpeg/MPEGaudio.h,v
+retrieving revision 1.23
+diff -u -p -r1.23 MPEGaudio.h
+--- smpeg/MPEGaudio.h 17 Jul 2001 19:52:24 -0000 1.23
++++ smpeg/MPEGaudio.h 6 Dec 2005 06:10:43 -0000
+@@ -151,12 +151,6 @@ private:
+ /* The actual MPEG audio class */
+ class MPEGaudio : public MPEGerror, public MPEGaudioaction {
+
+- friend void Play_MPEGaudioSDL(void *udata, Uint8 *stream, int len);
+- friend int Play_MPEGaudio(MPEGaudio *audio, Uint8 *stream, int len);
+-#ifdef THREADED_AUDIO
+- friend int Decode_MPEGaudio(void *udata);
+-#endif
+-
+ public:
+ MPEGaudio(MPEGstream *stream, bool initSDL = true);
+ virtual ~MPEGaudio();
+@@ -367,6 +361,20 @@ public:
+ #define N_TIMESTAMPS 5
+
+ double timestamp[N_TIMESTAMPS];
++
++ /* Functions which access MPEGaudio internals */
++ friend void Play_MPEGaudioSDL(void *udata, Uint8 *stream, int len);
++ friend int Play_MPEGaudio(MPEGaudio *audio, Uint8 *stream, int len);
++#ifdef THREADED_AUDIO
++ friend int Decode_MPEGaudio(void *udata);
++#endif
+ };
+
++/* Need to duplicate the prototypes, this is not a typo :) */
++void Play_MPEGaudioSDL(void *udata, Uint8 *stream, int len);
++int Play_MPEGaudio(MPEGaudio *audio, Uint8 *stream, int len);
++#ifdef THREADED_AUDIO
++int Decode_MPEGaudio(void *udata);
++#endif
++
+ #endif /* _MPEGAUDIO_H_ */
diff --git a/testing/swt/PKGBUILD b/testing/swt/PKGBUILD
new file mode 100644
index 000000000..f6db69266
--- /dev/null
+++ b/testing/swt/PKGBUILD
@@ -0,0 +1,56 @@
+# $Id: PKGBUILD 168272 2012-10-07 11:37:04Z guillaume $
+# Maintainer: Guillaume ALAUX <guillaume@archlinux.org>
+pkgname=swt
+pkgver=4.2
+pkgrel=2
+_date=201206081400
+pkgdesc="An open source widget toolkit for Java"
+arch=('i686' 'x86_64')
+url="http://www.eclipse.org/swt/"
+license=('EPL')
+depends=('java-runtime>=6' 'gtk2>=2.20.1' 'libxtst')
+optdepends=('libgnomeui' 'mesa' 'glu' 'libwebkit')
+makedepends=('java-environment' 'libxtst' 'mesa' 'glu' 'libgnomeui' 'unzip' 'pkgconfig' 'libwebkit' 'apache-ant')
+if [ "${CARCH}" = "i686" ]; then
+ _carch=x86
+ md5sums=('3efe0404f6129183abae46f7620fe14f'
+ '2f556ab534fc2488c6e8c0ee6c02825c')
+fi
+if [ "${CARCH}" = "x86_64" ]; then
+ _carch=x86_64
+ md5sums=('9e06b576116ff409f395571603582827'
+ '2f556ab534fc2488c6e8c0ee6c02825c')
+fi
+source=(http://download.eclipse.org/eclipse/downloads/drops4/R-${pkgver}-${_date}/swt-${pkgver}-gtk-linux-${_carch}.zip
+ build-swt.xml)
+# To test this pkg:
+# http://www.eclipse.org/swt/examples.php#standaloneOutsideEclipse
+
+build() {
+ cd ${srcdir}
+ unzip -oq src.zip -d src
+
+ . /etc/profile.d/jdk.sh
+ . /etc/profile.d/apache-ant.sh
+
+ # Shared objects
+ cd src
+ ./build.sh
+
+ # SWT jar
+ ant -f ../build-swt.xml compile
+}
+
+package() {
+ cd ${srcdir}/src
+
+ # Shared objects
+ export OUTPUT_DIR=${pkgdir}/usr/lib
+ install -dm755 ${OUTPUT_DIR}
+ make -f make_linux.mak install
+
+ # SWT jar
+ ant -f ../build-swt.xml jar
+ install -Dm755 ../swt.jar ${pkgdir}/usr/share/java/swt-${pkgver}.jar
+ ln -s swt-${pkgver}.jar ${pkgdir}/usr/share/java/swt.jar
+}
diff --git a/testing/swt/build-swt.xml b/testing/swt/build-swt.xml
new file mode 100644
index 000000000..a161204f8
--- /dev/null
+++ b/testing/swt/build-swt.xml
@@ -0,0 +1,17 @@
+<project name="SWT" default="jar" basedir=".">
+ <property name="src" location="."/>
+ <property name="build" location="build"/>
+
+ <target name="init">
+ <tstamp/>
+ <mkdir dir="${build}"/>
+ </target>
+
+ <target name="compile" depends="init" description="Compile the SWT toolset">
+ <javac srcdir="${src}" destdir="${build}" target="1.6" />
+ </target>
+
+ <target name="jar">
+ <jar destfile="swt.jar" basedir="${build}"/>
+ </target>
+</project>
diff --git a/testing/xine-lib/PKGBUILD b/testing/xine-lib/PKGBUILD
index 98355362b..5112660a3 100644
--- a/testing/xine-lib/PKGBUILD
+++ b/testing/xine-lib/PKGBUILD
@@ -1,9 +1,9 @@
-# $Id: PKGBUILD 163069 2012-07-06 15:22:28Z ibiru $
+# $Id: PKGBUILD 168288 2012-10-07 22:15:57Z eric $
# Maintainer: Eric Bélanger <eric@archlinux.org>
pkgname=xine-lib
pkgver=1.2.2
-pkgrel=1
+pkgrel=2
pkgdesc="A multimedia playback engine"
arch=('i686' 'x86_64')
url="http://www.xine-project.org"
@@ -11,11 +11,11 @@ license=('LGPL' 'GPL')
depends=('libxvmc' 'ffmpeg' 'libxinerama')
makedepends=('wavpack' 'faad2' 'libmng' 'imagemagick' 'mesa' 'libmodplug'
'vcdimager' 'jack' 'aalib' 'libdca' 'a52dec' 'libmad'
- 'libmpcdec' 'libcaca' 'libbluray' 'gnome-vfs' 'libvdpau')
+ 'libmpcdec' 'libcaca' 'libbluray' 'gnome-vfs' 'libvdpau' 'glu')
optdepends=('imagemagick: for using the imagemagick plugin' \
'jack: for using the jack plugin' \
'vcdimager: for using the vcd plugin' \
- 'mesa: for using the opengl plugin' \
+ 'glu: for using the opengl plugin' \
'wavpack: for using the wavpack plugin' \
'faad2: for using the faad plugin' \
'libmng: for using the mng plugin' \