aboutsummaryrefslogtreecommitdiffstats
path: root/graphics/openjpeg
diff options
context:
space:
mode:
authorSunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org>2015-09-24 04:18:05 +0800
committerSunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org>2015-09-24 04:18:05 +0800
commit79eb067db030b30cc014cce52675aebf7770cd7b (patch)
treefeca9f23f9030fa65ecc98109f2e56749aaa998b /graphics/openjpeg
parent0826dbc4171b271a92209ef3eb14dc0f1f5f05fa (diff)
downloadfreebsd-ports-gnome-79eb067db030b30cc014cce52675aebf7770cd7b.tar.gz
freebsd-ports-gnome-79eb067db030b30cc014cce52675aebf7770cd7b.tar.zst
freebsd-ports-gnome-79eb067db030b30cc014cce52675aebf7770cd7b.zip
- Update to 2.1.1
- Add LICENSE_FILE - Add upstream patches [1] Obtained from: https://github.com/uclouvain/openjpeg/commit/a4e93c3b0af1c42770206b5d25014a05a60ec8f5 [1] https://github.com/uclouvain/openjpeg/commit/c16c91797f4b15eb55d56f85fd497d588331e71f [1] https://github.com/uclouvain/openjpeg/commit/55dbf8acff9afab1591b6a094b744d8426a32dd4 [1] Security: a233d51f-5d4c-11e5-9ad8-14dae9d210b8 MFH: 2015Q3
Diffstat (limited to 'graphics/openjpeg')
-rw-r--r--graphics/openjpeg/Makefile7
-rw-r--r--graphics/openjpeg/distinfo4
-rw-r--r--graphics/openjpeg/files/patch-src-lib-openjp2-j2k.c59
3 files changed, 65 insertions, 5 deletions
diff --git a/graphics/openjpeg/Makefile b/graphics/openjpeg/Makefile
index 7b39a7071bcc..7b36c81ee288 100644
--- a/graphics/openjpeg/Makefile
+++ b/graphics/openjpeg/Makefile
@@ -2,14 +2,14 @@
# $FreeBSD$
PORTNAME= openjpeg
-PORTVERSION= 2.1.0
-PORTREVISION= 1
+PORTVERSION= 2.1.1
CATEGORIES= graphics
MAINTAINER= sunpoet@FreeBSD.org
COMMENT= Open-source JPEG 2000 codec
LICENSE= BSD2CLAUSE
+LICENSE_FILE= ${WRKSRC}/LICENSE
LIB_DEPENDS= liblcms2.so:${PORTSDIR}/graphics/lcms2 \
libpng.so:${PORTSDIR}/graphics/png \
@@ -21,7 +21,8 @@ USES= cmake cpe pkgconfig
PLIST_SUB= VER=${PORTVERSION:R}
GH_ACCOUNT= uclouvain
-GH_TAGNAME= version.${PORTVERSION:R}
+#GH_TAGNAME= version.${PORTVERSION:R}
+GH_TAGNAME= 9c911c0
USE_GITHUB= yes
post-patch:
diff --git a/graphics/openjpeg/distinfo b/graphics/openjpeg/distinfo
index 2793cad6966d..661f4d97be68 100644
--- a/graphics/openjpeg/distinfo
+++ b/graphics/openjpeg/distinfo
@@ -1,2 +1,2 @@
-SHA256 (uclouvain-openjpeg-2.1.0-version.2.1_GH0.tar.gz) = 4afc996cd5e0d16360d71c58216950bcb4ce29a3272360eb29cadb1c8bce4efc
-SIZE (uclouvain-openjpeg-2.1.0-version.2.1_GH0.tar.gz) = 1775088
+SHA256 (uclouvain-openjpeg-2.1.1-9c911c0_GH0.tar.gz) = cb0f08de689cfc70604876aaa68c11546db508d0d711e48d946bd2b0a154f50d
+SIZE (uclouvain-openjpeg-2.1.1-9c911c0_GH0.tar.gz) = 1942736
diff --git a/graphics/openjpeg/files/patch-src-lib-openjp2-j2k.c b/graphics/openjpeg/files/patch-src-lib-openjp2-j2k.c
new file mode 100644
index 000000000000..2ecbe59c0a8d
--- /dev/null
+++ b/graphics/openjpeg/files/patch-src-lib-openjp2-j2k.c
@@ -0,0 +1,59 @@
+Obtained from: https://github.com/uclouvain/openjpeg/commit/a4e93c3b0af1c42770206b5d25014a05a60ec8f5
+ https://github.com/uclouvain/openjpeg/commit/c16c91797f4b15eb55d56f85fd497d588331e71f
+ https://github.com/uclouvain/openjpeg/commit/55dbf8acff9afab1591b6a094b744d8426a32dd4
+
+--- src/lib/openjp2/j2k.c.orig 2015-09-16 18:49:45 UTC
++++ src/lib/openjp2/j2k.c
+@@ -8603,8 +8603,10 @@ static opj_codestream_index_t* opj_j2k_c
+ cstr_index->marknum = 0;
+ cstr_index->marker = (opj_marker_info_t*)
+ opj_calloc(cstr_index->maxmarknum, sizeof(opj_marker_info_t));
+- if (!cstr_index-> marker)
++ if (!cstr_index-> marker) {
++ opj_free(cstr_index);
+ return NULL;
++ }
+
+ cstr_index->tile_index = NULL;
+
+@@ -9668,14 +9670,14 @@ static OPJ_BOOL opj_j2k_decode_one_tile
+ * so move to the last SOT read */
+ if ( !(opj_stream_read_seek(p_stream, p_j2k->m_specific_param.m_decoder.m_last_sot_read_pos+2, p_manager)) ){
+ opj_event_msg(p_manager, EVT_ERROR, "Problem with seek function\n");
+- opj_free(l_current_data);
++ opj_free(l_current_data);
+ return OPJ_FALSE;
+ }
+ }
+ else{
+ if ( !(opj_stream_read_seek(p_stream, p_j2k->cstr_index->tile_index[l_tile_no_to_dec].tp_index[0].start_pos+2, p_manager)) ) {
+ opj_event_msg(p_manager, EVT_ERROR, "Problem with seek function\n");
+- opj_free(l_current_data);
++ opj_free(l_current_data);
+ return OPJ_FALSE;
+ }
+ }
+@@ -9733,6 +9735,7 @@ static OPJ_BOOL opj_j2k_decode_one_tile
+ /* move into the codestream to the the first SOT (FIXME or not move?)*/
+ if (!(opj_stream_read_seek(p_stream, p_j2k->cstr_index->main_head_end + 2, p_manager) ) ) {
+ opj_event_msg(p_manager, EVT_ERROR, "Problem with seek function\n");
++ opj_free(l_current_data);
+ return OPJ_FALSE;
+ }
+ break;
+@@ -9998,11 +10001,15 @@ OPJ_BOOL opj_j2k_encode(opj_j2k_t * p_j2
+ /* now copy this data into the tile component */
+ if (! opj_tcd_copy_tile_data(p_j2k->m_tcd,l_current_data,l_current_tile_size)) {
+ opj_event_msg(p_manager, EVT_ERROR, "Size mismatch between tile data and sent data." );
++ opj_free(l_current_data);
+ return OPJ_FALSE;
+ }
+ }
+
+ if (! opj_j2k_post_write_tile (p_j2k,p_stream,p_manager)) {
++ if (l_current_data) {
++ opj_free(l_current_data);
++ }
+ return OPJ_FALSE;
+ }
+ }