Hello community,

here is the log from the commit of package libdevil for openSUSE:Factory 
checked in at 2018-04-19 15:27:18
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libdevil (Old)
 and      /work/SRC/openSUSE:Factory/.libdevil.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libdevil"

Thu Apr 19 15:27:18 2018 rev:6 rq:594546 version:1.7.8

Changes:
--------
--- /work/SRC/openSUSE:Factory/libdevil/libdevil.changes        2017-05-31 
12:20:19.575453447 +0200
+++ /work/SRC/openSUSE:Factory/.libdevil.new/libdevil.changes   2018-04-19 
15:27:21.012297515 +0200
@@ -1,0 +2,6 @@
+Sat Apr  7 18:39:11 UTC 2018 - wba...@tmo.at
+
+- Add jp2-remove-use-of-uchar-define.patch to fix build with newer
+  jasPer
+
+-------------------------------------------------------------------

New:
----
  jp2-remove-use-of-uchar-define.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ libdevil.spec ++++++
--- /var/tmp/diff_new_pack.AVzDof/_old  2018-04-19 15:27:21.644271750 +0200
+++ /var/tmp/diff_new_pack.AVzDof/_new  2018-04-19 15:27:21.648271587 +0200
@@ -35,6 +35,8 @@
 Patch2:         DevIL-%{version}-libpng14.patch
 # From Fedora
 Patch3:         DevIL-%{version}-gcc5.patch
+# PATCH-FIX-UPSTREAM
+Patch4:         jp2-remove-use-of-uchar-define.patch
 BuildRequires:  Mesa-devel
 BuildRequires:  OpenEXR-devel
 BuildRequires:  SDL-devel
@@ -146,6 +148,7 @@
 %patch1
 %patch2 -p1
 %patch3 -p1
+%patch4 -p2
 # FIXME: src-IL/src/il_wdp.c unclear license: https://jxrlib.codeplex.com can 
stand as replacement
 # make sure we don't compile this accidentally
 > src-IL/src/il_wdp.c

++++++ jp2-remove-use-of-uchar-define.patch ++++++
>From 8b5e3cb38f46afd063a5258af0da1eb6a942dec5 Mon Sep 17 00:00:00 2001
From: Ben Campbell <b...@scumways.com>
Date: Wed, 16 Nov 2016 14:41:05 +1300
Subject: [PATCH] jp2: remove use of uchar define from older jasPer

fixes #41
jasPer now defines jas_uchar instead of uchar, but it's a moot
point since the offending code in DevIL was never executed and could
be removed.
---
 DevIL/src-IL/src/il_jp2.c | 42 ++++++++++++++----------------------------
 1 file changed, 14 insertions(+), 28 deletions(-)

diff --git a/DevIL/src-IL/src/il_jp2.c b/DevIL/src-IL/src/il_jp2.c
index acc5787c..3fd397ba 100644
--- a/DevIL/src-IL/src/il_jp2.c
+++ b/DevIL/src-IL/src/il_jp2.c
@@ -358,7 +358,7 @@ static jas_stream_ops_t jas_stream_devilops = {
 
 static jas_stream_t *jas_stream_create(void);
 static void jas_stream_destroy(jas_stream_t *stream);
-static void jas_stream_initbuf(jas_stream_t *stream, int bufmode, char *buf, 
int bufsize);
+static void jas_stream_initbuf(jas_stream_t *stream, int bufmode );
 
 
 // Modified version of jas_stream_fopen and jas_stream_memopen from 
jas_stream.c of JasPer
@@ -377,7 +377,7 @@ jas_stream_t *iJp2ReadStream()
        stream->openmode_ = JAS_STREAM_READ | JAS_STREAM_BINARY;
 
        /* We use buffering whether it is from memory or a file. */
-       jas_stream_initbuf(stream, JAS_STREAM_FULLBUF, 0, 0);
+       jas_stream_initbuf(stream, JAS_STREAM_FULLBUF);
 
        /* Select the operations for a memory stream. */
        stream->ops_ = &jas_stream_devilops;
@@ -432,8 +432,7 @@ jas_stream_t *iJp2ReadStream()
 // The following functions are taken directly from jas_stream.c of JasPer,
 //  since they are designed to be used within JasPer only.
 
-static void jas_stream_initbuf(jas_stream_t *stream, int bufmode, char *buf,
-  int bufsize)
+static void jas_stream_initbuf(jas_stream_t *stream, int bufmode )
 {
        /* If this function is being called, the buffer should not have been
          initialized yet. */
@@ -441,31 +440,18 @@ static void jas_stream_initbuf(jas_stream_t *stream, int 
bufmode, char *buf,
 
        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_ = 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;
-                       }
-               } 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;
-               }
+        if ((stream->bufbase_ = 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;
+        }
        } 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;
@@ -527,7 +513,7 @@ jas_stream_t *iJp2WriteStream()
        stream->openmode_ = JAS_STREAM_WRITE | JAS_STREAM_BINARY;
 
        /* We use buffering whether it is from memory or a file. */
-       jas_stream_initbuf(stream, JAS_STREAM_FULLBUF, 0, 0);
+       jas_stream_initbuf(stream, JAS_STREAM_FULLBUF);
 
        /* Select the operations for a memory stream. */
        stream->ops_ = &jas_stream_devilops;

Reply via email to