Fixed dependency of libimagequant.so.0

- Minor fix on ln to %{libname}.so
epel9
Sérgio Basto 10 years ago
parent 956f7e5a1f
commit 239d15b39e

@ -1,11 +1,44 @@
diff -urp pngquant-2.4.0.1.orig/Makefile pngquant-2.4.0.1/Makefile --- pngquant-2.4.0.1.orig/lib/Makefile 2015-04-11 23:24:38.000000000 +0100
+++ pngquant-2.4.0.1/lib/Makefile 2015-04-19 02:24:14.987943234 +0100
@@ -1,14 +1,14 @@
-include config.mk
STATICLIB=libimagequant.a
-SHAREDLIB=libimagequant.so.0
+SHAREDLIB=libimagequant.so
+SOVER=0
DLL=libimagequant.dll
DLLIMP=libimagequant_dll.a
DLLDEF=libimagequant_dll.def
OBJS = pam.o mediancut.o blur.o mempool.o viter.o nearest.o libimagequant.o
-SHAREDOBJS = $(subst .o,.lo,$(OBJS))
BUILD_CONFIGURATION="$(CC) $(CFLAGS) $(LDFLAGS)"
@@ -32,11 +32,9 @@ $(DLL) $(DLLIMP): $(OBJS)
$(STATICLIB): $(OBJS)
$(AR) $(ARFLAGS) $@ $^
-$(SHAREDOBJS):
- $(CC) -fPIC $(CFLAGS) -c $(@:.lo=.c) -o $@
-
-$(SHAREDLIB): $(SHAREDOBJS)
- $(CC) -shared -o $@ $^ $(LDFLAGS)
+$(SHAREDLIB): $(OBJS)
+ $(CC) -shared -Wl,-soname,$(SHAREDLIB).$(SOVER) $(CFLAGS) $(OBJS) -o $(SHAREDLIB).$(SOVER)
+ ln -fs $(SHAREDLIB).$(SOVER) $(SHAREDLIB)
$(OBJS): $(wildcard *.h) config.mk
--- pngquant-2.4.0.1.orig/Makefile 2015-04-11 23:24:38.000000000 +0100 --- pngquant-2.4.0.1.orig/Makefile 2015-04-11 23:24:38.000000000 +0100
+++ pngquant-2.4.0.1/Makefile 2015-04-18 23:53:29.737846589 +0100 +++ pngquant-2.4.0.1/Makefile 2015-04-19 02:19:40.340909213 +0100
@@ -11,6 +11,7 @@ OBJS += $(COCOA_OBJS) @@ -11,6 +11,7 @@ OBJS += $(COCOA_OBJS)
endif endif
STATICLIB = lib/libimagequant.a STATICLIB = lib/libimagequant.a
+SHAREDLIB = lib/libimagequant.so.0 +SHAREDLIB = lib/libimagequant.so
DISTFILES = *.[chm] pngquant.1 Makefile configure README.md INSTALL CHANGELOG COPYRIGHT DISTFILES = *.[chm] pngquant.1 Makefile configure README.md INSTALL CHANGELOG COPYRIGHT
TARNAME = pngquant-$(VERSION) TARNAME = pngquant-$(VERSION)
@ -33,7 +66,7 @@ diff -urp pngquant-2.4.0.1.orig/Makefile pngquant-2.4.0.1/Makefile
clean: clean:
$(MAKE) -C lib clean $(MAKE) -C lib clean
- rm -f '$(BIN)' $(OBJS) $(COCOA_OBJS) $(STATICLIB) $(TARFILE) - rm -f '$(BIN)' $(OBJS) $(COCOA_OBJS) $(STATICLIB) $(TARFILE)
+ rm -f '$(BIN)' $(OBJS) $(COCOA_OBJS) $(SHAREDLIB) $(TARFILE) + rm -f '$(BIN)' $(OBJS) $(COCOA_OBJS) $(TARFILE)
distclean: clean distclean: clean
$(MAKE) -C lib distclean $(MAKE) -C lib distclean

@ -2,7 +2,7 @@
Name: pngquant Name: pngquant
Version: 2.4.0.1 Version: 2.4.0.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
%{?el5:Group: Applications/Multimedia} %{?el5:Group: Applications/Multimedia}
@ -87,8 +87,7 @@ make install DESTDIR=%{buildroot} PREFIX=%{_prefix}
# install libimagequant # install libimagequant
install -pm 0755 lib/%{libname}.so.0 \ install -pm 0755 lib/%{libname}.so.0 \
%{buildroot}%{_libdir} %{buildroot}%{_libdir}
ln -fs %{_libdir}/%{libname}.so.0 \ ln -fs %{libname}.so.0 %{buildroot}%{_libdir}/%{libname}.so
%{buildroot}%{_libdir}/%{libname}.so
install -pm 0644 lib/*.h \ install -pm 0644 lib/*.h \
%{buildroot}%{_includedir}/imagequant %{buildroot}%{_includedir}/imagequant
@ -126,6 +125,13 @@ install -Dpm0644 pngquant.1 %{buildroot}/%{_mandir}/man1/pngquant.1
%changelog %changelog
* Sun Apr 19 2015 Sérgio Basto <sergio@serjux.com> - 2.4.0.1-2
- Fixed dependency of libimagequant.so.0
- Minor fix on ln to %{libname}.so
* Sun Apr 19 2015 Sérgio Basto <sergio@serjux.com> - 2.4.0.1-1
- Update to 2.4.0
* Mon Feb 09 2015 Sérgio Basto <sergio@serjux.com> - 2.3.4-1 * Mon Feb 09 2015 Sérgio Basto <sergio@serjux.com> - 2.3.4-1
- Update to 2.3.4 - Update to 2.3.4

Loading…
Cancel
Save