libpng14/libpng-1.2.8-link_to_proper_libs.patch

50 lines
1.7 KiB
Diff
Raw Normal View History

diff -ur libpng-1.2.8/scripts/libpng.pc.in libpng-1.2.8-fix/scripts/libpng.pc.in
--- libpng-1.2.8/scripts/libpng.pc.in 2004-12-03 00:14:31.000000000 +0000
+++ libpng-1.2.8-fix/scripts/libpng.pc.in 2005-02-16 07:57:32.000000000 +0000
@@ -7,5 +7,5 @@
Name: libpng12
Description: Loads and saves PNG files
Version: 1.2.8
-Libs: -L${libdir} -lpng12 -lz -lm
+Libs: -L${libdir} -lpng12
Cflags: -I${includedir}/libpng12
diff -ur libpng-1.2.8/scripts/makefile.linux libpng-1.2.8-fix/scripts/makefile.linux
--- libpng-1.2.8/scripts/makefile.linux 2005-02-16 07:56:58.000000000 +0000
+++ libpng-1.2.8-fix/scripts/makefile.linux 2005-02-16 08:00:21.000000000 +0000
@@ -32,8 +32,9 @@
CFLAGS=-I$(ZLIBINC) -Wall -O3 -funroll-loops \
$(ALIGN) # $(WARNMORE) -g -DPNG_DEBUG=5
-LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng12 -lz -lm
-LDFLAGS_A=-L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) libpng.a -lz -lm
+LIBS=-lz -lm
+LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng12
+LDFLAGS_A=-L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) libpng.a $(LIBS)
RANLIB=ranlib
#RANLIB=echo
@@ -81,7 +82,7 @@
echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
echo L_opts=\"-L$(LIBPATH)\"; \
echo R_opts=\"-Wl,-rpath,$(LIBPATH)\"; \
- echo libs=\"-lpng12 -lz -lm\"; \
+ echo libs=\"-lpng12\"; \
cat scripts/libpng-config-body.in ) > libpng-config
chmod +x libpng-config
@@ -94,12 +95,12 @@
$(LIBNAME).so.$(PNGVER): $(OBJSDLL)
$(CC) -shared -Wl,-soname,$(LIBNAME).so.$(PNGMAJ) \
-o $(LIBNAME).so.$(PNGVER) \
- $(OBJSDLL)
+ $(OBJSDLL) $(LIBS)
libpng.so.3.$(PNGMIN): $(OBJSDLL)
$(CC) -shared -Wl,-soname,libpng.so.3 \
-o libpng.so.3.$(PNGMIN) \
- $(OBJSDLL)
+ $(OBJSDLL) $(LIBS)
pngtest: pngtest.o $(LIBNAME).so
$(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)