public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Amy Winston" <amynka@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-libs/gdal/files/, sci-libs/gdal/
Date: Sat,  3 Dec 2016 10:35:58 +0000 (UTC)	[thread overview]
Message-ID: <1480760783.f6d0b15b0e40546b0cb66930e2cd8a95a4001d24.amynka@gentoo> (raw)

commit:     f6d0b15b0e40546b0cb66930e2cd8a95a4001d24
Author:     Amy Winston <amynka <AT> gentoo <DOT> org>
AuthorDate: Sat Dec  3 10:26:23 2016 +0000
Commit:     Amy Winston <amynka <AT> gentoo <DOT> org>
CommitDate: Sat Dec  3 10:26:23 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f6d0b15b

sci-libs/gdal: add jasper patch bug #599626

Package-Manager: portage-2.3.0

 sci-libs/gdal/files/gdal-2.0.2-jasper2.patch | 62 ++++++++++++++++++++++++++++
 sci-libs/gdal/gdal-2.0.2-r3.ebuild           |  1 +
 2 files changed, 63 insertions(+)

diff --git a/sci-libs/gdal/files/gdal-2.0.2-jasper2.patch b/sci-libs/gdal/files/gdal-2.0.2-jasper2.patch
new file mode 100644
index 00000000..a418e41
--- /dev/null
+++ b/sci-libs/gdal/files/gdal-2.0.2-jasper2.patch
@@ -0,0 +1,62 @@
+diff -urN orig/frmts/jpeg2000/jpeg2000_vsil_io.cpp dwok/frmts/jpeg2000/jpeg2000_vsil_io.cpp
+--- orig/frmts/jpeg2000/jpeg2000_vsil_io.cpp	2016-01-26 16:21:48.000000000 +0100
++++ dwok/frmts/jpeg2000/jpeg2000_vsil_io.cpp	2016-11-16 21:53:15.280302723 +0100
+@@ -179,40 +179,25 @@
+ * Buffer initialization code.
+ \******************************************************************************/
+ 
+-static void JPEG2000_VSIL_jas_stream_initbuf(jas_stream_t *stream, int bufmode, char *buf,
+-  int bufsize)
++static void JPEG2000_VSIL_jas_stream_initbuf(jas_stream_t *stream, int bufmode)
+ {
+ 	/* If this function is being called, the buffer should not have been
+ 	  initialized yet. */
+ 	assert(!stream->bufbase_);
+ 
+ 	if (bufmode != JAS_STREAM_UNBUF) {
+-		/* The full- or line-buffered mode is being employed. */
+-		if (!buf) {
+-			/* The caller has not specified a buffer to employ, so allocate
+-			  one. */
+-			if ((stream->bufbase_ = (unsigned char*)jas_malloc(JAS_STREAM_BUFSIZE +
+-			  JAS_STREAM_MAXPUTBACK))) {
+-				stream->bufmode_ |= JAS_STREAM_FREEBUF;
+-				stream->bufsize_ = JAS_STREAM_BUFSIZE;
+-			} else {
+-				/* The buffer allocation has failed.  Resort to unbuffered
+-				  operation. */
+-				stream->bufbase_ = stream->tinybuf_;
+-				stream->bufsize_ = 1;
+-			}
++		if ((stream->bufbase_ = (unsigned char*)jas_malloc(JAS_STREAM_BUFSIZE +
++		  JAS_STREAM_MAXPUTBACK))) {
++			stream->bufmode_ |= JAS_STREAM_FREEBUF;
++			stream->bufsize_ = JAS_STREAM_BUFSIZE;
+ 		} else {
+-			/* The caller has specified a buffer to employ. */
+-			/* The buffer must be large enough to accommodate maximum
+-			  putback. */
+-			assert(bufsize > JAS_STREAM_MAXPUTBACK);
+-			stream->bufbase_ = JAS_CAST(uchar *, buf);
+-			stream->bufsize_ = bufsize - JAS_STREAM_MAXPUTBACK;
++			/* The buffer allocation has failed.  Resort to unbuffered
++			  operation. */
++			stream->bufbase_ = stream->tinybuf_;
++			stream->bufsize_ = 1;
+ 		}
+ 	} else {
+ 		/* The unbuffered mode is being employed. */
+-		/* A buffer should not have been supplied by the caller. */
+-		assert(!buf);
+ 		/* Use a trivial one-character buffer. */
+ 		stream->bufbase_ = stream->tinybuf_;
+ 		stream->bufsize_ = 1;
+@@ -282,7 +267,7 @@
+ 	}
+ 
+ 	/* By default, use full buffering for this type of stream. */
+-	JPEG2000_VSIL_jas_stream_initbuf(stream, JAS_STREAM_FULLBUF, 0, 0);
++	JPEG2000_VSIL_jas_stream_initbuf(stream, JAS_STREAM_FULLBUF);
+ 
+ 	return stream;
+ }

diff --git a/sci-libs/gdal/gdal-2.0.2-r3.ebuild b/sci-libs/gdal/gdal-2.0.2-r3.ebuild
index 2dae2cd..f8a672c 100644
--- a/sci-libs/gdal/gdal-2.0.2-r3.ebuild
+++ b/sci-libs/gdal/gdal-2.0.2-r3.ebuild
@@ -87,6 +87,7 @@ src_prepare() {
 
 	if use jpeg2k; then
 		epatch "${FILESDIR}"/${P}-jasper.patch
+		epatch "${FILESDIR}"/${P}-jasper2.patch #bug 599626
 	fi
 
 	# -soname is only accepted by GNU ld/ELF


             reply	other threads:[~2016-12-03 10:36 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-03 10:35 Amy Winston [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-02-10 20:11 [gentoo-commits] repo/gentoo:master commit in: sci-libs/gdal/files/, sci-libs/gdal/ Andreas Sturmlechner
2025-02-09 15:12 Andreas Sturmlechner
2023-11-21 22:36 Andreas Sturmlechner
2022-10-09 18:29 Andreas Sturmlechner
2022-03-12 15:53 Andreas Sturmlechner
2022-01-10 23:19 Sam James
2021-10-02 12:58 Andreas Sturmlechner
2021-05-28  3:47 Sam James
2020-04-13  9:21 Andreas Sturmlechner
2019-12-25 20:46 Andreas Sturmlechner
2019-11-01 18:53 Andreas Sturmlechner
2019-07-15  5:36 Andreas Sturmlechner
2019-06-12 10:03 Andreas Sturmlechner
2019-05-19 20:55 Andreas Sturmlechner
2019-01-16 20:01 Andreas Sturmlechner
2018-01-16 20:25 Andreas Sturmlechner
2017-12-20 20:08 Andreas Sturmlechner
2017-12-20 18:23 Amy Liffey
2017-07-19 18:54 Andreas Sturmlechner
2016-11-07 13:56 Amy Winston
2016-07-18 20:41 Sven Wegener

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1480760783.f6d0b15b0e40546b0cb66930e2cd8a95a4001d24.amynka@gentoo \
    --to=amynka@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox