diff --git a/multimedia/graphics/jasper/actions.py b/multimedia/graphics/jasper/actions.py index 0c7ef3af9e..8e7c3bb93c 100644 --- a/multimedia/graphics/jasper/actions.py +++ b/multimedia/graphics/jasper/actions.py @@ -5,25 +5,22 @@ # See the file http://www.gnu.org/licenses/gpl.txt from pisi.actionsapi import shelltools -from pisi.actionsapi import autotools +from pisi.actionsapi import cmaketools from pisi.actionsapi import pisitools from pisi.actionsapi import libtools from pisi.actionsapi import get def setup(): - #autotools.autoreconf("-fi") - - #libtools.libtoolize("--force --install") - - autotools.configure("--enable-libjpeg \ - --enable-opengl \ - --enable-shared \ - --disable-static") + cmaketools.configure("-DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DALLOW_IN_SOURCE_BUILD=ON \ + -DCMAKE_SKIP_INSTALL_RPATH=YES") def build(): - autotools.make() + cmaketools.make() def install(): - autotools.rawInstall("DESTDIR=%s" % get.installDIR()) + cmaketools.rawInstall("DESTDIR=%s" % get.installDIR()) - pisitools.dodoc("NEWS", "README", "doc/*") + pisitools.dodoc("LICENSE", "README") diff --git a/multimedia/graphics/jasper/files/jasper-1.900.1-fix-filename-buffer-overflow.patch b/multimedia/graphics/jasper/files/jasper-1.900.1-fix-filename-buffer-overflow.patch new file mode 100644 index 0000000000..e95ed9cf23 --- /dev/null +++ b/multimedia/graphics/jasper/files/jasper-1.900.1-fix-filename-buffer-overflow.patch @@ -0,0 +1,37 @@ +Description: Filename buffer overflow fix + This patch fixes a security hole by a bad buffer size handling. +Author: Roland Stigge +Bug-Debian: http://bugs.debian.org/645118 + +--- a/src/libjasper/include/jasper/jas_stream.h ++++ b/src/libjasper/include/jasper/jas_stream.h +@@ -77,6 +77,7 @@ + #include + + #include ++#include + #if defined(JAS_HAVE_FCNTL_H) + #include + #endif +@@ -99,6 +100,12 @@ extern "C" { + #define O_BINARY 0 + #endif + ++#ifdef PATH_MAX ++#define JAS_PATH_MAX PATH_MAX ++#else ++#define JAS_PATH_MAX 4096 ++#endif ++ + /* + * Stream open flags. + */ +@@ -251,7 +258,7 @@ typedef struct { + typedef struct { + int fd; + int flags; +- char pathname[L_tmpnam + 1]; ++ char pathname[JAS_PATH_MAX + 1]; + } jas_stream_fileobj_t; + + #define JAS_STREAM_FILEOBJ_DELONCLOSE 0x01 diff --git a/multimedia/graphics/jasper/pspec.xml b/multimedia/graphics/jasper/pspec.xml index fe80e7e731..80ba2cf3a5 100644 --- a/multimedia/graphics/jasper/pspec.xml +++ b/multimedia/graphics/jasper/pspec.xml @@ -15,12 +15,13 @@ JasPer is a software-based implementation of the codec specified in the JPEG-2000 Part-1 standard (ISO/IEC 15444-1:2000). http://www.ece.uvic.ca/~frodo/jasper/software/jasper-2.0.10.tar.gz + cmake libjpeg-turbo-devel - + jasper-1.900.1-fix-filename-buffer-overflow.patch