Date: Sat, 12 Sep 2020 14:58:35 +0000 (UTC) From: Sunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r548375 - in head/graphics: gdal/files opencv/files qt5-imageformats/files xv/files Message-ID: <202009121458.08CEwZII011991@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: sunpoet Date: Sat Sep 12 14:58:35 2020 New Revision: 548375 URL: https://svnweb.freebsd.org/changeset/ports/548375 Log: Fix build with jasper 2.0.20 Added: head/graphics/gdal/files/patch-frmts-jpeg2000-jpeg2000_vsil_io.cpp (contents, props changed) head/graphics/gdal/files/patch-frmts-jpeg2000-jpeg2000dataset.cpp (contents, props changed) head/graphics/opencv/files/patch-modules_imgcodecs_src_grfmt__jpeg2000.cpp (contents, props changed) head/graphics/qt5-imageformats/files/ head/graphics/qt5-imageformats/files/patch-src_plugins_imageformats_jp2_qjp2handler.cpp (contents, props changed) head/graphics/xv/files/patch-xvjp2k.c (contents, props changed) Added: head/graphics/gdal/files/patch-frmts-jpeg2000-jpeg2000_vsil_io.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/graphics/gdal/files/patch-frmts-jpeg2000-jpeg2000_vsil_io.cpp Sat Sep 12 14:58:35 2020 (r548375) @@ -0,0 +1,28 @@ +Obtained from: https://github.com/OSGeo/gdal/commit/e236eeaed1be45a4af457565085e3db1f2fc489f + +--- frmts/jpeg2000/jpeg2000_vsil_io.cpp.orig 2020-05-04 09:21:31 UTC ++++ frmts/jpeg2000/jpeg2000_vsil_io.cpp +@@ -94,13 +94,23 @@ typedef struct { + * File stream object. + \******************************************************************************/ + ++// PRIjas_seqent macro is defined since Jasper 2.0.17 ++ ++#ifndef PRIjas_seqent + static int JPEG2000_VSIL_read(jas_stream_obj_t *obj, char *buf, int cnt) ++#else ++static int JPEG2000_VSIL_read(jas_stream_obj_t *obj, char *buf, unsigned cnt) ++#endif + { + jas_stream_VSIFL_t *fileobj = JAS_CAST(jas_stream_VSIFL_t *, obj); + return static_cast<int>(VSIFReadL(buf, 1, cnt, fileobj->fp)); + } + ++#ifndef PRIjas_seqent + static int JPEG2000_VSIL_write(jas_stream_obj_t *obj, char *buf, int cnt) ++#else ++static int JPEG2000_VSIL_write(jas_stream_obj_t *obj, const char *buf, unsigned int cnt) ++#endif + { + jas_stream_VSIFL_t *fileobj = JAS_CAST(jas_stream_VSIFL_t *, obj); + return static_cast<int>(VSIFWriteL(buf, 1, cnt, fileobj->fp)); Added: head/graphics/gdal/files/patch-frmts-jpeg2000-jpeg2000dataset.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/graphics/gdal/files/patch-frmts-jpeg2000-jpeg2000dataset.cpp Sat Sep 12 14:58:35 2020 (r548375) @@ -0,0 +1,22 @@ +Obtained from: https://github.com/OSGeo/gdal/commit/ab72c4893e6d14d488dfed25745d79f11bee45b9 + +--- frmts/jpeg2000/jpeg2000dataset.cpp.orig 2020-05-04 09:21:31 UTC ++++ frmts/jpeg2000/jpeg2000dataset.cpp +@@ -484,7 +484,7 @@ int JPEG2000Dataset::DecodeImage() + /* the JP2 boxes match the ones of the code stream */ + if (nBands != 0) + { +- if (nBands != jas_image_numcmpts( psImage )) ++ if (nBands != static_cast<int>(jas_image_numcmpts( psImage ))) + { + CPLError(CE_Failure, CPLE_AppDefined, + "The number of components indicated in the IHDR box (%d) mismatch " +@@ -595,7 +595,7 @@ GDALDataset *JPEG2000Dataset::Open( GDALOpenInfo * poO + + { + int iFormat; +- char *pszFormatName = nullptr; ++ const char *pszFormatName = nullptr; + + if (!Identify(poOpenInfo)) + return nullptr; Added: head/graphics/opencv/files/patch-modules_imgcodecs_src_grfmt__jpeg2000.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/graphics/opencv/files/patch-modules_imgcodecs_src_grfmt__jpeg2000.cpp Sat Sep 12 14:58:35 2020 (r548375) @@ -0,0 +1,20 @@ +--- modules/imgcodecs/src/grfmt_jpeg2000.cpp.orig 2018-02-23 08:38:33 UTC ++++ modules/imgcodecs/src/grfmt_jpeg2000.cpp +@@ -337,7 +337,7 @@ bool Jpeg2KDecoder::readComponent8u( uchar *data, voi + + for( y = 0; y < yend - ystart; ) + { +- jas_seqent_t* pix_row = &jas_matrix_get( buffer, y / ystep, 0 ); ++ jas_seqent_t* pix_row = jas_matrix_getref( buffer, y / ystep, 0 ); + uchar* dst = data + (y - yoffset) * step - xoffset; + + if( xstep == 1 ) +@@ -401,7 +401,7 @@ bool Jpeg2KDecoder::readComponent16u( unsigned short + + for( y = 0; y < yend - ystart; ) + { +- jas_seqent_t* pix_row = &jas_matrix_get( buffer, y / ystep, 0 ); ++ jas_seqent_t* pix_row = jas_matrix_getref( buffer, y / ystep, 0 ); + ushort* dst = data + (y - yoffset) * step - xoffset; + + if( xstep == 1 ) Added: head/graphics/qt5-imageformats/files/patch-src_plugins_imageformats_jp2_qjp2handler.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/graphics/qt5-imageformats/files/patch-src_plugins_imageformats_jp2_qjp2handler.cpp Sat Sep 12 14:58:35 2020 (r548375) @@ -0,0 +1,10 @@ +--- src/plugins/imageformats/jp2/qjp2handler.cpp.orig 2020-04-27 07:24:21 UTC ++++ src/plugins/imageformats/jp2/qjp2handler.cpp +@@ -44,6 +44,7 @@ + #include "qvariant.h" + #include "qcolor.h" + ++#include <math.h> + #include <jasper/jasper.h> + + QT_BEGIN_NAMESPACE Added: head/graphics/xv/files/patch-xvjp2k.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/graphics/xv/files/patch-xvjp2k.c Sat Sep 12 14:58:35 2020 (r548375) @@ -0,0 +1,11 @@ +--- xvjp2k.c.orig 2007-05-14 01:04:37 UTC ++++ xvjp2k.c +@@ -76,7 +76,7 @@ static const char *fbasename, /* File's base name, fo + */ + int jas_getdbglevel(void) {return 0;} + int jas_setdbglevel(int n) {return 0;} +-int jas_memdump(FILE *fp,void *data,size_t len) {return 0;} ++int jas_memdump(FILE *fp,const void *data,size_t len) {return 0;} + + int jas_eprintf(const char *fmt,...) /* Handle JasPer Library message */ + {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202009121458.08CEwZII011991>