Update pngquant to 2.9.1

Update Makefile to better handle build the shared libraries
epel9
Sérgio M. Basto 8 years ago
parent b51118e636
commit 01af2ede99

@ -0,0 +1,60 @@
--- ./Makefile.orig 2017-04-16 04:03:50.371539956 +0100
+++ ./Makefile 2017-04-16 04:57:42.147558976 +0100
@@ -24,38 +24,35 @@ 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
+$(SHAREDLIB): config.mk $(LIBDISTFILES)
$(MAKE) -C lib shared
-$(SHAREDLIB): config.mk sharedlib
-
$(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 +91,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:

@ -4,8 +4,8 @@
%global libname libimagequant
Name: pngquant
Version: 2.8.1
Release: 2%{?dist}
Version: 2.9.1
Release: 1%{?dist}
Summary: PNG quantization tool for reducing image file size
License: GPLv3+
@ -13,6 +13,7 @@ License: GPLv3+
URL: http://%{name}.org
Source0: https://github.com/pornel/%{name}/archive/%{version}/%{name}-%{version}.tar.gz
Source1: https://github.com/ImageOptim/libimagequant/archive/%{version}/%{libname}-%{version}.tar.gz
Patch1: pngquant-2.9.2-Makefile.patch
BuildRequires: libpng-devel >= 1.2.46-1
BuildRequires: zlib-devel >= 1.2.3-1
@ -56,16 +57,17 @@ There is also some brief API-documentation.
%setup -q -a1
rmdir lib/
mv %{libname}-%{version} lib
rm lib/configure
#rm lib/configure
%patch1 -p1
%build
%configure --with-openmp
%make_build bin.shared
%make_build SHARED=1
%install
%make_install
%make_install SHARED=1
mkdir -p %{buildroot}%{_includedir}/imagequant \
%{buildroot}%{_libdir}
@ -79,9 +81,7 @@ install -pm 0644 lib/*.h \
%{buildroot}%{_includedir}/imagequant
%check
# needed by ld / testsuite to find libimagequant
export LD_LIBRARY_PATH="$(pwd)/lib:$LD_LIBRARY_PATH"
make test.shared
make test SHARED=1
%post -n %{libname} -p /sbin/ldconfig
@ -105,6 +105,10 @@ make test.shared
%changelog
* Sun Apr 16 2017 Sérgio Basto <sergio@serjux.com> - 2.9.1-1
- Update pngquant to 2.9.1
- Update Makefile to better handle build the shared libraries
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.8.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

@ -1,2 +1,2 @@
1845f2ccc011f5455361eb8f4dbd449e pngquant-2.8.1.tar.gz
47095a6d6bbe5dd63e555f07183bd561 libimagequant-2.8.1.tar.gz
SHA512 (pngquant-2.9.1.tar.gz) = 1708b627892f37e99ecc46bc9a43b0ef58ab7f5074dda68ed5f37c0ebb515270903ddac2ea1f6e67aa15adb14382c9c4c74ffd9d579648bef90f40d8bdbaabe2
SHA512 (libimagequant-2.9.1.tar.gz) = d852a992062204f1f365804c6908a107c78c20eca5a28ca9b6074b7f49d166cce0112017059e529c3730def04e9e2707272b542b98fc2d96dd985d76bc2f7d34

Loading…
Cancel
Save