]> git.pld-linux.org Git - packages/pngcrush.git/commitdiff
- updated to 1.8.13 master auto/th/pngcrush-1.8.13-1
authorJakub Bogusz <qboosh@pld-linux.org>
Mon, 28 May 2018 17:36:02 +0000 (19:36 +0200)
committerJakub Bogusz <qboosh@pld-linux.org>
Mon, 28 May 2018 17:36:02 +0000 (19:36 +0200)
- added ptrdiff patch (fixes internal zlib build with Z_SOLO)

pngcrush-ptrdiff.patch [new file with mode: 0644]
pngcrush.spec

diff --git a/pngcrush-ptrdiff.patch b/pngcrush-ptrdiff.patch
new file mode 100644 (file)
index 0000000..b22c9b9
--- /dev/null
@@ -0,0 +1,13 @@
+--- pngcrush-1.8.13/zutil.h.orig       2018-05-28 19:28:29.732393494 +0200
++++ pngcrush-1.8.13/zutil.h    2018-05-28 19:30:17.195725592 +0200
+@@ -29,10 +29,6 @@
+ #  include <stdlib.h>
+ #endif
+-#ifdef Z_SOLO
+-   typedef long ptrdiff_t;  /* guess -- will be caught if guess is wrong */
+-#endif
+-
+ #ifndef local
+ #  define local static
+ #endif
index 0749e1fb16f2d82a14b84a0354b105c8a88376c7..ff71725e7bb7f6f4ab46459ff925154f88b01623 100644 (file)
@@ -27,17 +27,19 @@ Summary:    Optimizer for png files
 Summary(pl.UTF-8):     Optymalizator plików png
 Summary(pt_BR.UTF-8):  Utilitário para compressão de pngs
 Name:          pngcrush
-Version:       1.7.92
+Version:       1.8.13
 Release:       1
 License:       BSD-like (see LICENSE)
 Group:         Applications/Graphics
 Source0:       http://downloads.sourceforge.net/pmt/%{name}-%{version}.tar.xz
-# Source0-md5: 08a0b39e26962af7028dcb978d26a9ee
+# Source0-md5: 2eeb072fcb56dcc4f7ccc35bd4238bd3
+Patch0:                %{name}-ptrdiff.patch
 URL:           http://pmt.sourceforge.net/pngcrush/
 BuildRequires: tar >= 1:1.22
 BuildRequires: xz
 %if %{with systemlibs}
 BuildRequires: libpng-devel
+BuildRequires: pkgconfig
 BuildRequires: zlib-devel
 %endif
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -61,6 +63,7 @@ Graphics). Ele pode comprimir os arquivos em até 40%, sem perdas.
 
 %prep
 %setup -q
+%patch0 -p1
 
 # create some real documentation
 # NOTE: remember to check these on upgrade!
@@ -68,19 +71,18 @@ sed -ne '1,/*\//p' pngcrush.c | cut -b 4- > README
 sed -ne '/\/\* To do/,/*\/$/p;/PNG_INTERNAL/q' pngcrush.c | cut -b 4- > TODO
 sed -ne '/* COPYRIGHT/,/*\/$/p;' pngcrush.c | cut -b 4- > LICENSE
 
-%if %{with systemlibs}
-# workaround for Makefile and #include "png.h"
-echo '#include <png.h>' > png.h
-%endif
-
 %build
-%{__make} \
+%{__make} %{?with_systemlibs:-f Makefile-nolib} \
        CC="%{__cc}" \
-       CFLAGS="%{rpmcflags} -Wall -I. -DZ_SOLO" \
-       LD="%{__cc} %{rpmldflags}" \
+       CFLAGS="%{rpmcflags} -std=c90 -Wall" \
+       OPTIONS="%{rpmcppflags}" \
+       LD="%{__cc}" \
+       LDFLAGS="%{rpmldflags}" \
 %if %{with systemlibs}
-       OBJS="pngcrush.o" \
-       LDFLAGS="%{rpmldflags} -lpng -lz"
+       PNGINC=$(pkg-config --variable=includedir libpng) \
+       PNGLIB=%{_libdir} \
+       ZINC=%{_includedir} \
+       ZLIB=%{_libdir}
 %endif
 
 %install
This page took 0.109415 seconds and 4 git commands to generate.