diff options
author | Danny Rawlins <contact@romster.me> | 2021-05-08 15:06:03 +1000 |
---|---|---|
committer | Danny Rawlins <contact@romster.me> | 2021-05-08 15:06:03 +1000 |
commit | e512d6c44057cc4fa5baba5027dd127d9b330f9a (patch) | |
tree | 2c7f8e9e5b2a50c084c7b2b42ce1f65c81c980ae /jasper | |
parent | 799fc5bbd90b48dd201d307d68674e566a0969aa (diff) | |
download | opt-e512d6c44057cc4fa5baba5027dd127d9b330f9a.tar.gz opt-e512d6c44057cc4fa5baba5027dd127d9b330f9a.tar.xz |
jasper: contrib -> opt
Diffstat (limited to 'jasper')
-rw-r--r-- | jasper/.footprint | 42 | ||||
-rw-r--r-- | jasper/.signature | 6 | ||||
-rw-r--r-- | jasper/Pkgfile | 46 | ||||
-rw-r--r-- | jasper/jasper-1.900.1-fix-filename-buffer-overflow.patch | 37 |
4 files changed, 131 insertions, 0 deletions
diff --git a/jasper/.footprint b/jasper/.footprint new file mode 100644 index 000000000..db66a9332 --- /dev/null +++ b/jasper/.footprint @@ -0,0 +1,42 @@ +drwxr-xr-x root/root usr/ +drwxr-xr-x root/root usr/bin/ +-rwxr-xr-x root/root usr/bin/imgcmp +-rwxr-xr-x root/root usr/bin/imginfo +-rwxr-xr-x root/root usr/bin/jasper +-rwxr-xr-x root/root usr/bin/jiv +drwxr-xr-x root/root usr/include/ +drwxr-xr-x root/root usr/include/jasper/ +-rw-r--r-- root/root usr/include/jasper/jas_cm.h +-rw-r--r-- root/root usr/include/jasper/jas_compiler.h +-rw-r--r-- root/root usr/include/jasper/jas_config.h +-rw-r--r-- root/root usr/include/jasper/jas_debug.h +-rw-r--r-- root/root usr/include/jasper/jas_dll.h +-rw-r--r-- root/root usr/include/jasper/jas_fix.h +-rw-r--r-- root/root usr/include/jasper/jas_getopt.h +-rw-r--r-- root/root usr/include/jasper/jas_icc.h +-rw-r--r-- root/root usr/include/jasper/jas_image.h +-rw-r--r-- root/root usr/include/jasper/jas_init.h +-rw-r--r-- root/root usr/include/jasper/jas_malloc.h +-rw-r--r-- root/root usr/include/jasper/jas_math.h +-rw-r--r-- root/root usr/include/jasper/jas_seq.h +-rw-r--r-- root/root usr/include/jasper/jas_stream.h +-rw-r--r-- root/root usr/include/jasper/jas_string.h +-rw-r--r-- root/root usr/include/jasper/jas_tmr.h +-rw-r--r-- root/root usr/include/jasper/jas_tvp.h +-rw-r--r-- root/root usr/include/jasper/jas_types.h +-rw-r--r-- root/root usr/include/jasper/jas_version.h +-rw-r--r-- root/root usr/include/jasper/jasper.h +drwxr-xr-x root/root usr/lib/ +-rw-r--r-- root/root usr/lib/libjasper.a +lrwxrwxrwx root/root usr/lib/libjasper.so -> libjasper.so.4 +lrwxrwxrwx root/root usr/lib/libjasper.so.4 -> libjasper.so.4.0.0 +-rwxr-xr-x root/root usr/lib/libjasper.so.4.0.0 +drwxr-xr-x root/root usr/lib/pkgconfig/ +-rw-r--r-- root/root usr/lib/pkgconfig/jasper.pc +drwxr-xr-x root/root usr/share/ +drwxr-xr-x root/root usr/share/man/ +drwxr-xr-x root/root usr/share/man/man1/ +-rw-r--r-- root/root usr/share/man/man1/imgcmp.1.gz +-rw-r--r-- root/root usr/share/man/man1/imginfo.1.gz +-rw-r--r-- root/root usr/share/man/man1/jasper.1.gz +-rw-r--r-- root/root usr/share/man/man1/jiv.1.gz diff --git a/jasper/.signature b/jasper/.signature new file mode 100644 index 000000000..53a6c4d74 --- /dev/null +++ b/jasper/.signature @@ -0,0 +1,6 @@ +untrusted comment: verify with /etc/ports/opt.pub +RWSE3ohX2g5d/feh1aDfc58XpUz6DiE5tynH1lBEqkc9ShAP839PwSvRV1ckHDQKiBOUsXaU+olbkneQVAwb2JtO5NgOspaVsQ8= +SHA256 (Pkgfile) = 46c3cae4f80b1e6630411ecacc99955c16b9a96c0911b1f2fe242b247d92f5ec +SHA256 (.footprint) = 2663af88aeb3fd06c40efc05558af405f50dbda6d410a36f3b02f005e0f0abf0 +SHA256 (jasper-2.0.28.tar.gz) = 6b4e5f682be0ab1a5acb0eeb6bf41d6ce17a658bb8e2dbda95de40100939cc88 +SHA256 (jasper-1.900.1-fix-filename-buffer-overflow.patch) = f51377e9b3e4faaa6b17b2d5fcf6f6d94fe2916a65dc9c78b5a99b891f5726dc diff --git a/jasper/Pkgfile b/jasper/Pkgfile new file mode 100644 index 000000000..105039fec --- /dev/null +++ b/jasper/Pkgfile @@ -0,0 +1,46 @@ +# Description: Codec JPEG-2000 Part-1 standard. +# URL: https://www.ece.uvic.ca/~frodo/jasper/ +# Maintainer: Danny Rawlins, crux at romster dot me +# Depends on: freeglut libjpeg-turbo xorg-libxmu + +name=jasper +version=2.0.28 +release=1 +source=(https://github.com/jasper-software/jasper/archive/version-$version/$name-$version.tar.gz + jasper-1.900.1-fix-filename-buffer-overflow.patch) + +build() { + cd $name-version-$version + + patch -p1 -i $SRC/jasper-1.900.1-fix-filename-buffer-overflow.patch + sed -r 's|(CMAKE_SKIP_BUILD_RPATH) FALSE|\1 TRUE|g' -i CMakeLists.txt + + mkdir -p build-{shared,static} + + local config=" +-D CMAKE_INSTALL_PREFIX=/usr +-D CMAKE_INSTALL_LIBDIR=lib +-D CMAKE_BUILD_TYPE=Release +-D JAS_ENABLE_OPENGL=ON +-D JAS_ENABLE_LIBJPEG=ON +-D JAS_ENABLE_AUTOMATIC_DEPENDENCIES=OFF +-D CMAKE_SKIP_RPATH=ON +-D OpenGL_GL_PREFERENCE=GLVND" + + #build static lib + ( cd build-static + cmake .. $config -D JAS_ENABLE_SHARED=OFF + make + ) + + #build shared lib + ( cd build-shared + cmake .. $config -D JAS_ENABLE_SHARED=ON + make + ) + + make -C build-static DESTDIR=$PKG install + make -C build-shared DESTDIR=$PKG install + + rm -r $PKG/usr/share/doc +} diff --git a/jasper/jasper-1.900.1-fix-filename-buffer-overflow.patch b/jasper/jasper-1.900.1-fix-filename-buffer-overflow.patch new file mode 100644 index 000000000..e95ed9cf2 --- /dev/null +++ b/jasper/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 <stigge@antcom.de> +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 <jasper/jas_config.h> + + #include <stdio.h> ++#include <limits.h> + #if defined(JAS_HAVE_FCNTL_H) + #include <fcntl.h> + #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 |