From dcd8a2582032b1de7974465bde5936f764680805 Mon Sep 17 00:00:00 2001 From: Jerome Duval Date: Tue, 26 Aug 2014 18:45:18 +0000 Subject: [PATCH] jasper: patch to fix 4 components image support --- media-libs/jasper/jasper-1.900.1.recipe | 4 ++- .../jasper/patches/jasper-1.900.1.patchset | 28 +++++++++++++++++++ 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 media-libs/jasper/patches/jasper-1.900.1.patchset diff --git a/media-libs/jasper/jasper-1.900.1.recipe b/media-libs/jasper/jasper-1.900.1.recipe index f8f5c0f09..c1233dd90 100644 --- a/media-libs/jasper/jasper-1.900.1.recipe +++ b/media-libs/jasper/jasper-1.900.1.recipe @@ -8,7 +8,7 @@ the JasPer Software Reference Manual. HOMEPAGE="http://www.ece.uvic.ca/~mdadams/jasper/" SRC_URI="http://www.ece.uvic.ca/~mdadams/jasper/software/jasper-1.900.1.zip" CHECKSUM_SHA256="6b905a9c2aca2e275544212666eefc4eb44d95d0a57e4305457b407fe63f9494" -REVISION="3" +REVISION="4" LICENSE="JasPer v2" COPYRIGHT="1999-2007 Michael D. Adams" @@ -16,6 +16,8 @@ COPYRIGHT="1999-2007 Michael D. Adams" ARCHITECTURES="x86_gcc2 x86 x86_64" SECONDARY_ARCHITECTURES="x86_gcc2 x86" +PATCHES="jasper-$portVersion.patchset" + PROVIDES=" jasper$secondaryArchSuffix = $portVersion compat >= 1.0.0 lib:libjasper$secondaryArchSuffix = 1.0.0 compat >= 1 diff --git a/media-libs/jasper/patches/jasper-1.900.1.patchset b/media-libs/jasper/patches/jasper-1.900.1.patchset new file mode 100644 index 000000000..aa6b70cda --- /dev/null +++ b/media-libs/jasper/patches/jasper-1.900.1.patchset @@ -0,0 +1,28 @@ +From d32f3e5cd8fa04052169c031ed12a64f22084c81 Mon Sep 17 00:00:00 2001 +From: Jerome Duval +Date: Tue, 26 Aug 2014 17:28:54 +0000 +Subject: Fix for 4 components images + + +diff --git a/src/libjasper/jpc/jpc_dec.c b/src/libjasper/jpc/jpc_dec.c +index fa72a0e..455fd64 100644 +--- a/src/libjasper/jpc/jpc_dec.c ++++ b/src/libjasper/jpc/jpc_dec.c +@@ -1069,12 +1069,12 @@ static int jpc_dec_tiledecode(jpc_dec_t *dec, jpc_dec_tile_t *tile) + /* Apply an inverse intercomponent transform if necessary. */ + switch (tile->cp->mctid) { + case JPC_MCT_RCT: +- assert(dec->numcomps == 3); ++ assert(dec->numcomps >= 3); + jpc_irct(tile->tcomps[0].data, tile->tcomps[1].data, + tile->tcomps[2].data); + break; + case JPC_MCT_ICT: +- assert(dec->numcomps == 3); ++ assert(dec->numcomps >= 3); + jpc_iict(tile->tcomps[0].data, tile->tcomps[1].data, + tile->tcomps[2].data); + break; +-- +1.8.3.4 +