[packages/jbig2dec] - new URLs, updated to 0.12 - updated shared patch - added png patch (fixes build with current libpn

qboosh qboosh at pld-linux.org
Tue Jan 5 17:06:30 CET 2016


commit 092985cdf2dded37af8116c8fa654f4d717af430
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Tue Jan 5 17:08:25 2016 +0100

    - new URLs, updated to 0.12
    - updated shared patch
    - added png patch (fixes build with current libpng)

 jbig2dec-png.patch    | 30 ++++++++++++++++++++++++++++++
 jbig2dec-shared.patch | 11 +++++------
 jbig2dec.spec         | 16 ++++++++--------
 3 files changed, 43 insertions(+), 14 deletions(-)
---
diff --git a/jbig2dec.spec b/jbig2dec.spec
index 86ecda6..580bbb0 100644
--- a/jbig2dec.spec
+++ b/jbig2dec.spec
@@ -1,20 +1,19 @@
 Summary:	Decoder implementation of the JBIG2 image compression format
 Summary(pl.UTF-8):	Implementacja dekodera formatu kompresji obrazu JBIG2
 Name:		jbig2dec
-Version:	0.11
-Release:	2
+Version:	0.12
+Release:	1
 License:	GPL v2+ with AFPL Ghostscript exception
-Group:		Applications
-Source0:	http://downloads.sourceforge.net/jbig2dec/%{name}-%{version}.tar.xz
-# Source0-md5:	4cc8ab6fb7ebe6f24460ec5ce30d84d9
+Group:		Applications/Graphics
+Source0:	http://downloads.ghostscript.com/public/jbig2dec/%{name}-%{version}.tar.gz
+# Source0-md5:	b73cfb55c61c6978e6539b889bdc2633
 Patch0:		%{name}-shared.patch
-URL:		http://jbig2dec.sourceforge.net/
+Patch1:		%{name}-png.patch
+URL:		http://www.ghostscript.com/jbig2dec.html
 BuildRequires:	autoconf >= 2.53
 BuildRequires:	automake >= 1:1.7
 BuildRequires:	libpng-devel
 BuildRequires:	libtool
-BuildRequires:	tar >= 1:1.22
-BuildRequires:	xz
 BuildRequires:	zlib-devel
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -91,6 +90,7 @@ Statyczna wersja biblioteki jbig2dec.
 %prep
 %setup -q
 %patch0 -p1
+%patch1 -p1
 
 %build
 %{__libtoolize}
diff --git a/jbig2dec-png.patch b/jbig2dec-png.patch
new file mode 100644
index 0000000..acadf24
--- /dev/null
+++ b/jbig2dec-png.patch
@@ -0,0 +1,30 @@
+--- jbig2dec-0.12/jbig2_image_png.c.orig	2014-10-31 14:30:04.000000000 +0100
++++ jbig2dec-0.12/jbig2_image_png.c	2016-01-05 17:02:22.500568493 +0100
+@@ -26,8 +26,6 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <png.h>
+-#include <pngstruct.h>
+-#define CVT_PTR(ptr) (ptr)
+ 
+ #include "jbig2.h"
+ #include "jbig2_priv.h"
+@@ -40,7 +38,7 @@
+ {
+     png_size_t check;
+ 
+-    check = fwrite(data, 1, length, (png_FILE_p)png_ptr->io_ptr);
++    check = fwrite(data, 1, length, png_get_io_ptr(png_ptr));
+     if (check != length) {
+       png_error(png_ptr, "Write Error");
+     }
+@@ -49,8 +47,7 @@
+ static void
+ jbig2_png_flush(png_structp png_ptr)
+ {
+-    png_FILE_p io_ptr;
+-    io_ptr = (png_FILE_p)CVT_PTR((png_ptr->io_ptr));
++    png_FILE_p io_ptr = png_get_io_ptr(png_ptr);
+     if (io_ptr != NULL)
+         fflush(io_ptr);
+ }
diff --git a/jbig2dec-shared.patch b/jbig2dec-shared.patch
index eea460c..826b3a6 100644
--- a/jbig2dec-shared.patch
+++ b/jbig2dec-shared.patch
@@ -1,17 +1,16 @@
---- jbig2dec-0.9/configure.ac.orig	2006-07-27 01:57:39.000000000 +0200
-+++ jbig2dec-0.9/configure.ac	2006-08-27 00:28:46.842054000 +0200
-@@ -34,11 +34,12 @@
+--- jbig2dec-0.12/configure.ac.orig	2016-01-05 16:06:21.787376199 +0100
++++ jbig2dec-0.12/configure.ac	2016-01-05 16:55:48.807251688 +0100
+@@ -45,11 +45,11 @@
      LDFLAGS="$LDFLAGS -L$ac_cv_want_libpng/lib"
    fi
    dnl libpng requires pow() which may be in libm
 -  AC_SEARCH_LIBS([pow], [m])
 +  AC_CHECK_FUNC([pow], [M_LIB=], [AC_CHECK_LIB([m], [pow], [M_LIB="-lm"])])
-   AC_CHECK_LIB([png], [png_check_sig], [
+   AC_CHECK_LIB([png], [png_create_write_struct], [
      AC_CHECK_LIB([z], [deflate], [
        AC_DEFINE(HAVE_LIBPNG, 1, [Define if libpng is available (-lpng)])
--      LIBS="-lpng -lz $LIBS"
+-      PNG_LIBS="-lpng -lz"
 +      PNG_LIBS="-lpng -lz $M_LIB"
-+      AC_SUBST([PNG_LIBS])
        AC_LIBOBJ([jbig2_image_png])
        have_libpng="yes"
      ])
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/jbig2dec.git/commitdiff/092985cdf2dded37af8116c8fa654f4d717af430



More information about the pld-cvs-commit mailing list