diff options
author | sunpoet <sunpoet@FreeBSD.org> | 2016-11-02 01:52:00 +0800 |
---|---|---|
committer | sunpoet <sunpoet@FreeBSD.org> | 2016-11-02 01:52:00 +0800 |
commit | 87906712fa615d12fda828b3a764bc5b54e12f44 (patch) | |
tree | 56b2d22bd73cdd3c952044cc6d3a038d6b4deb8a /graphics | |
parent | 0380d0663ee46cd8b35612b01d46183c91774e97 (diff) | |
download | freebsd-ports-gnome-87906712fa615d12fda828b3a764bc5b54e12f44.tar.gz freebsd-ports-gnome-87906712fa615d12fda828b3a764bc5b54e12f44.tar.zst freebsd-ports-gnome-87906712fa615d12fda828b3a764bc5b54e12f44.zip |
- Update to 2.1.2
Changes: https://github.com/uclouvain/openjpeg/blob/master/CHANGELOG.md
Diffstat (limited to 'graphics')
-rw-r--r-- | graphics/openjpeg/Makefile | 5 | ||||
-rw-r--r-- | graphics/openjpeg/distinfo | 5 | ||||
-rw-r--r-- | graphics/openjpeg/files/patch-src-lib-openjp2-j2k.c | 59 | ||||
-rw-r--r-- | graphics/openjpeg/files/patch-src_lib_openjp2_pi.c | 17 | ||||
-rw-r--r-- | graphics/openjpeg/files/patch-src_lib_openjp2_tcd.c | 23 | ||||
-rw-r--r-- | graphics/openjpeg/files/patch-tests_compare__dump__files.c | 30 | ||||
-rw-r--r-- | graphics/openjpeg/files/patch-tests_nonregression_test__suite.ctest.in | 9 | ||||
-rw-r--r-- | graphics/openjpeg/pkg-plist | 2 |
8 files changed, 6 insertions, 144 deletions
diff --git a/graphics/openjpeg/Makefile b/graphics/openjpeg/Makefile index 488a714b9399..fce36d5499a3 100644 --- a/graphics/openjpeg/Makefile +++ b/graphics/openjpeg/Makefile @@ -2,7 +2,8 @@ # $FreeBSD$ PORTNAME= openjpeg -PORTVERSION= 2.1.1 +PORTVERSION= 2.1.2 +DISTVERSIONPREFIX= v PORTREVISION= 1 CATEGORIES= graphics @@ -23,8 +24,6 @@ USES= cmake cpe pkgconfig PLIST_SUB= VER=${PORTVERSION:R} GH_ACCOUNT= uclouvain -#GH_TAGNAME= version.${PORTVERSION:R} -GH_TAGNAME= 9c911c0 USE_GITHUB= yes post-patch: diff --git a/graphics/openjpeg/distinfo b/graphics/openjpeg/distinfo index 661f4d97be68..e99d5d0a0208 100644 --- a/graphics/openjpeg/distinfo +++ b/graphics/openjpeg/distinfo @@ -1,2 +1,3 @@ -SHA256 (uclouvain-openjpeg-2.1.1-9c911c0_GH0.tar.gz) = cb0f08de689cfc70604876aaa68c11546db508d0d711e48d946bd2b0a154f50d -SIZE (uclouvain-openjpeg-2.1.1-9c911c0_GH0.tar.gz) = 1942736 +TIMESTAMP = 1475154150 +SHA256 (uclouvain-openjpeg-v2.1.2_GH0.tar.gz) = 4ce77b6ef538ef090d9bde1d5eeff8b3069ab56c4906f083475517c2c023dfa7 +SIZE (uclouvain-openjpeg-v2.1.2_GH0.tar.gz) = 1987071 diff --git a/graphics/openjpeg/files/patch-src-lib-openjp2-j2k.c b/graphics/openjpeg/files/patch-src-lib-openjp2-j2k.c deleted file mode 100644 index 2ecbe59c0a8d..000000000000 --- a/graphics/openjpeg/files/patch-src-lib-openjp2-j2k.c +++ /dev/null @@ -1,59 +0,0 @@ -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; - } - } diff --git a/graphics/openjpeg/files/patch-src_lib_openjp2_pi.c b/graphics/openjpeg/files/patch-src_lib_openjp2_pi.c deleted file mode 100644 index 5ee8d6fea3af..000000000000 --- a/graphics/openjpeg/files/patch-src_lib_openjp2_pi.c +++ /dev/null @@ -1,17 +0,0 @@ ---- src/lib/openjp2/pi.c.orig 2016-09-14 00:01:22 UTC -+++ src/lib/openjp2/pi.c -@@ -1236,7 +1236,13 @@ opj_pi_iterator_t *opj_pi_create_decode( - l_current_pi = l_pi; - - /* memory allocation for include */ -- l_current_pi->include = (OPJ_INT16*) opj_calloc((l_tcp->numlayers +1) * l_step_l, sizeof(OPJ_INT16)); -+ /* prevent an integer overflow issue */ -+ l_current_pi->include = 00; -+ if (l_step_l <= (SIZE_MAX / (l_tcp->numlayers + 1U))) -+ { -+ l_current_pi->include = (OPJ_INT16*) opj_calloc((l_tcp->numlayers +1) * l_step_l, sizeof(OPJ_INT16)); -+ } -+ - if - (!l_current_pi->include) - { diff --git a/graphics/openjpeg/files/patch-src_lib_openjp2_tcd.c b/graphics/openjpeg/files/patch-src_lib_openjp2_tcd.c deleted file mode 100644 index a42e69fbcd47..000000000000 --- a/graphics/openjpeg/files/patch-src_lib_openjp2_tcd.c +++ /dev/null @@ -1,23 +0,0 @@ ---- src/lib/openjp2/tcd.c.orig 2016-09-14 00:02:27 UTC -+++ src/lib/openjp2/tcd.c -@@ -706,9 +706,20 @@ static INLINE OPJ_BOOL opj_tcd_init_tile - l_tx0 = l_cp->tx0 + p * l_cp->tdx; /* can't be greater than l_image->x1 so won't overflow */ - l_tile->x0 = (OPJ_INT32)opj_uint_max(l_tx0, l_image->x0); - l_tile->x1 = (OPJ_INT32)opj_uint_min(opj_uint_adds(l_tx0, l_cp->tdx), l_image->x1); -+ /* all those OPJ_UINT32 are casted to OPJ_INT32, let's do some sanity check */ -+ if ((l_tile->x0 < 0) || (l_tile->x1 <= l_tile->x0)) { -+ opj_event_msg(manager, EVT_ERROR, "Tile X coordinates are not supported\n"); -+ return OPJ_FALSE; -+ } - l_ty0 = l_cp->ty0 + q * l_cp->tdy; /* can't be greater than l_image->y1 so won't overflow */ - l_tile->y0 = (OPJ_INT32)opj_uint_max(l_ty0, l_image->y0); - l_tile->y1 = (OPJ_INT32)opj_uint_min(opj_uint_adds(l_ty0, l_cp->tdy), l_image->y1); -+ /* all those OPJ_UINT32 are casted to OPJ_INT32, let's do some sanity check */ -+ if ((l_tile->y0 < 0) || (l_tile->y1 <= l_tile->y0)) { -+ opj_event_msg(manager, EVT_ERROR, "Tile Y coordinates are not supported\n"); -+ return OPJ_FALSE; -+ } -+ - - /* testcase 1888.pdf.asan.35.988 */ - if (l_tccp->numresolutions == 0) { diff --git a/graphics/openjpeg/files/patch-tests_compare__dump__files.c b/graphics/openjpeg/files/patch-tests_compare__dump__files.c deleted file mode 100644 index a79b4ff39a95..000000000000 --- a/graphics/openjpeg/files/patch-tests_compare__dump__files.c +++ /dev/null @@ -1,30 +0,0 @@ ---- tests/compare_dump_files.c.orig 2016-09-14 00:05:13 UTC -+++ tests/compare_dump_files.c -@@ -118,10 +118,10 @@ int main(int argc, char **argv) - test_cmp_parameters inParam; - FILE *fbase=NULL, *ftest=NULL; - int same = 0; -- char lbase[256]; -- char strbase[256]; -- char ltest[256]; -- char strtest[256]; -+ char lbase[512]; -+ char strbase[512]; -+ char ltest[512]; -+ char strtest[512]; - - if( parse_cmdline_cmp(argc, argv, &inParam) == 1 ) - { -@@ -154,9 +154,9 @@ int main(int argc, char **argv) - - while (fgets(lbase, sizeof(lbase), fbase) && fgets(ltest,sizeof(ltest),ftest)) - { -- int nbase = sscanf(lbase, "%255[^\r\n]", strbase); -- int ntest = sscanf(ltest, "%255[^\r\n]", strtest); -- assert( nbase != 255 && ntest != 255 ); -+ int nbase = sscanf(lbase, "%511[^\r\n]", strbase); -+ int ntest = sscanf(ltest, "%511[^\r\n]", strtest); -+ assert( nbase != 511 && ntest != 511 ); - if( nbase != 1 || ntest != 1 ) - { - fprintf(stderr, "could not parse line from files\n" ); diff --git a/graphics/openjpeg/files/patch-tests_nonregression_test__suite.ctest.in b/graphics/openjpeg/files/patch-tests_nonregression_test__suite.ctest.in deleted file mode 100644 index ee04be1a3234..000000000000 --- a/graphics/openjpeg/files/patch-tests_nonregression_test__suite.ctest.in +++ /dev/null @@ -1,9 +0,0 @@ ---- tests/nonregression/test_suite.ctest.in.orig 2016-09-14 00:06:50 UTC -+++ tests/nonregression/test_suite.ctest.in -@@ -505,3 +505,6 @@ opj_decompress -i @INPUT_NR_PATH@/issue2 - # issue 326 + PR 559: CIELab colorspace - opj_decompress -i @INPUT_NR_PATH@/issue559-eci-090-CIELab.jp2 -o @TEMP_PATH@/issue559-eci-090-CIELab.jp2.pgx - opj_decompress -i @INPUT_NR_PATH@/issue559-eci-091-CIELab.jp2 -o @TEMP_PATH@/issue559-eci-091-CIELab.jp2.pgx -+# issue 823 (yes, not a typo, test image is issue822) -+!opj_decompress -i @INPUT_NR_PATH@/issue822.jp2 -o @TEMP_PATH@/issue822.png -+ diff --git a/graphics/openjpeg/pkg-plist b/graphics/openjpeg/pkg-plist index 3f0f29b19fd3..c18fede3dbaa 100644 --- a/graphics/openjpeg/pkg-plist +++ b/graphics/openjpeg/pkg-plist @@ -5,7 +5,7 @@ include/openjpeg-%%VER%%/openjpeg.h include/openjpeg-%%VER%%/opj_config.h include/openjpeg-%%VER%%/opj_stdint.h lib/libopenjp2.so -lib/libopenjp2.so.%%VER%%.0 +lib/libopenjp2.so.%%VER%%.2 lib/libopenjp2.so.7 lib/openjpeg-%%VER%%/OpenJPEGConfig.cmake lib/openjpeg-%%VER%%/OpenJPEGTargets-%%CMAKE_BUILD_TYPE%%.cmake |