diff options
author | Slávek Banko <[email protected]> | 2022-05-22 19:10:54 +0200 |
---|---|---|
committer | Slávek Banko <[email protected]> | 2022-05-22 19:15:54 +0200 |
commit | 23d9297f26a87b4f678f444a5b93f6082755f528 (patch) | |
tree | 7359bd48f9bb5dc6557de4c38d1c46fb565edba8 | |
parent | 76b329890650f4eb4ef0f06572d21965f99cc2e0 (diff) | |
download | tde-packaging-23d9297f26a87b4f678f444a5b93f6082755f528.tar.gz tde-packaging-23d9297f26a87b4f678f444a5b93f6082755f528.zip |
FreeBSD tdelibs: Add patch for support for Jasper 3.x.
Signed-off-by: Slávek Banko <[email protected]>
-rw-r--r-- | freebsd/core/tdelibs/Makefile | 2 | ||||
-rw-r--r-- | freebsd/core/tdelibs/files/patch-bp000-jasper-3.diff | 29 |
2 files changed, 30 insertions, 1 deletions
diff --git a/freebsd/core/tdelibs/Makefile b/freebsd/core/tdelibs/Makefile index 57487d776..8078d9085 100644 --- a/freebsd/core/tdelibs/Makefile +++ b/freebsd/core/tdelibs/Makefile @@ -9,7 +9,7 @@ PORTNAME= tdelibs-trinity COMMENT= Core libraries and binaries for all TDE applications TDE_PREVERSION= MASTER_SITE_SUBDIR= t/${PORTNAME} -PORTREVISION= 0 +PORTREVISION= 1 CATEGORIES= x11 DIST_SUBDIR= TDE/core diff --git a/freebsd/core/tdelibs/files/patch-bp000-jasper-3.diff b/freebsd/core/tdelibs/files/patch-bp000-jasper-3.diff new file mode 100644 index 000000000..97fc19a9b --- /dev/null +++ b/freebsd/core/tdelibs/files/patch-bp000-jasper-3.diff @@ -0,0 +1,29 @@ +commit 813d99d1241d251e78fce97c28d2533dbee8dae3 +Author: Slávek Banko <[email protected]> +Date: Wed Apr 27 20:07:36 2022 +0200 + + Add support for Jasper 3.x. + + Signed-off-by: Slávek Banko <[email protected]> + +diff --git a/kimgio/jp2.cpp b/kimgio/jp2.cpp +index 1f3f09c0..68075cf9 100644 +--- a/kimgio/jp2.cpp ++++ b/kimgio/jp2.cpp +@@ -279,7 +279,16 @@ kimgio_jp2_write( TQImageIO* io ) + TQTextStream ts( &rate, IO_WriteOnly ); + ts << "rate=" + << ( (io->quality() < 0) ? DEFAULT_RATE : io->quality() / 100.0F ); ++# if defined(JAS_VERSION_MAJOR) && (JAS_VERSION_MAJOR >= 3) ++ const jas_image_fmtinfo_t *jp2_fmtinfo = jas_image_lookupfmtbyname("jp2"); ++ int i = -1; ++ if (jp2_fmtinfo) ++ { ++ i = jas_image_encode(ji, stream, jp2_fmtinfo->id, rate.utf8().data()); ++ } ++# else + int i = jp2_encode( ji, stream, rate.utf8().data() ); ++# endif + + jas_image_destroy( ji ); + jas_stream_close( stream ); |