update to pre 2.9.2

epel9
Sérgio M. Basto 8 years ago
parent 38a09254c8
commit 8d2ddda1c3

File diff suppressed because it is too large Load Diff

@ -1,62 +0,0 @@
diff --git a/Makefile b/Makefile
index 50213fa..2874e80 100644
--- a/Makefile
+++ b/Makefile
@@ -24,38 +24,34 @@ TESTBIN = test/test
all: $(BIN)
+ifeq ($(SHARED),1)
+ LIB=$(SHAREDLIB)
+else
+ LIB=$(STATICLIB)
+endif
+
staticlib: $(STATICLIB)
+sharedlib: $(SHAREDLIB)
+
$(STATICLIB): config.mk $(LIBDISTFILES)
$(MAKE) -C lib static
-sharedlib: lib/libimagequant.h
- $(MAKE) -C lib shared
-
-$(SHAREDLIB): config.mk sharedlib
+$(SHAREDLIB): config.mk
$(OBJS): $(wildcard *.h) config.mk
rwpng_cocoa.o: rwpng_cocoa.m
$(CC) -Wno-enum-conversion -c $(CFLAGS) -o $@ $< &> /dev/null || clang -Wno-enum-conversion -c -O3 -o $@ $<
-$(BIN): $(OBJS) $(STATICLIB)
+$(BIN): $(OBJS) $(LIB)
$(CC) $^ $(CFLAGS) $(LDFLAGS) -o $@
-$(TESTBIN): test/test.o $(STATICLIB)
+$(TESTBIN): test/test.o $(LIB)
$(CC) $^ $(CFLAGS) $(LDFLAGS) -o $@
test: $(BIN) $(TESTBIN)
- ./test/test.sh ./test $(BIN) $(TESTBIN)
-
-bin.shared: $(OBJS) $(SHAREDLIB)
- $(CC) $^ $(CFLAGS) $(LDFLAGS) -o $(BIN)
-
-testbin.shared: test/test.o $(SHAREDLIB)
- $(CC) $^ $(CFLAGS) $(LDFLAGS) -o $(TESTBIN)
-
-test.shared: bin.shared testbin.shared
- ./test/test.sh ./test $(BIN) $(TESTBIN)
+ LD_LIBRARY_PATH="lib" ./test/test.sh ./test $(BIN) $(TESTBIN)
dist: $(TARFILE)
@@ -94,5 +90,5 @@ endif
lib/libimagequant.h:
git submodule init && git submodule update || true
-.PHONY: all clean dist distclean dll install uninstall test staticlib
+.PHONY: all clean dist distclean dll install uninstall test staticlib sharedlib
.DELETE_ON_ERROR:

@ -5,22 +5,23 @@
Name: pngquant Name: pngquant
Version: 2.9.1 Version: 2.9.1
Release: 1%{?dist} Release: 2%{?dist}
Summary: PNG quantization tool for reducing image file size Summary: PNG quantization tool for reducing image file size
License: GPLv3+ License: GPLv3+
URL: http://%{name}.org URL: http://%{name}.org
Source0: https://github.com/pornel/%{name}/archive/%{version}/%{name}-%{version}.tar.gz Source0: https://github.com/pornel/%{name}/archive/%{version}/%{name}-%{version}.tar.gz
Patch1: pngquant-2.9.2-Makefile.patch #near of https://github.com/pornel/pngquant/compare/2.9.1...master.diff
Patch0: 2.9.1...master.diff
BuildRequires: libpng-devel >= 1.2.46-1 BuildRequires: libpng-devel >= 1.2.46-1
BuildRequires: zlib-devel >= 1.2.3-1 BuildRequires: zlib-devel >= 1.2.3-1
BuildRequires: lcms2-devel BuildRequires: lcms2-devel
BuildRequires: %{libname}-devel >= %{version}-%{release} BuildRequires: %{libname}-devel >= %{version}
Requires: libpng%{?_isa} >= 1.2.46-1 Requires: libpng%{?_isa} >= 1.2.46-1
Requires: zlib%{?_isa} >= 1.2.3-1 Requires: zlib%{?_isa} >= 1.2.3-1
Requires: %{libname}%{?_isa} = %{version}-%{release} Requires: %{libname}%{?_isa} = %{version}
%description %description
@ -33,24 +34,20 @@ their 24/32-bit version. %{name} uses the median cut algorithm.
%prep %prep
%setup -q %setup -q
ln -s /usr/include/libimagequant.h lib/ %patch0 -p1
ln -s %{_libdir}/libimagequant.so lib
%patch1 -p1
%build %build
%configure --with-openmp %configure --with-openmp --with-libimagequant
%make_build SHARED=1 %make_build
%install %install
%make_install SHARED=1 %make_install
mkdir -p %{buildroot}%{_includedir}/imagequant \
%{buildroot}%{_libdir}
%check %check
make test SHARED=1 make test
%files %files
@ -61,7 +58,10 @@ make test SHARED=1
%changelog %changelog
* Wed Apr 19 2017 Sérgio Basto <sergio@serjux.com> - 2.9.1-2 * Sat Jul 01 2017 Sérgio Basto <sergio@serjux.com> - 2.9.1-2
- update to pre 2.9.2
* Wed Apr 19 2017 Sérgio Basto <sergio@serjux.com> - 2.9.1-1
- Update pngquant to 2.9.1 - Update pngquant to 2.9.1
- Update Makefile to better handle build the shared libraries - Update Makefile to better handle build the shared libraries
- Remove libimagequant sub-package and use the new libimagequant package. - Remove libimagequant sub-package and use the new libimagequant package.

@ -1,2 +1 @@
SHA512 (pngquant-2.9.1.tar.gz) = 1708b627892f37e99ecc46bc9a43b0ef58ab7f5074dda68ed5f37c0ebb515270903ddac2ea1f6e67aa15adb14382c9c4c74ffd9d579648bef90f40d8bdbaabe2 SHA512 (pngquant-2.9.1.tar.gz) = 1708b627892f37e99ecc46bc9a43b0ef58ab7f5074dda68ed5f37c0ebb515270903ddac2ea1f6e67aa15adb14382c9c4c74ffd9d579648bef90f40d8bdbaabe2
SHA512 (libimagequant-2.9.1.tar.gz) = d852a992062204f1f365804c6908a107c78c20eca5a28ca9b6074b7f49d166cce0112017059e529c3730def04e9e2707272b542b98fc2d96dd985d76bc2f7d34

Loading…
Cancel
Save