source: scripts/patches/libpng-1.2.8-link_to_proper_libs-1.patch@ 9686a0d

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since 9686a0d was 7f65c0e, checked in by Jim Gifford <clfs@…>, 19 years ago

r625@server (orig r623): jim | 2005-10-31 12:43:24 -0800
Final Move

  • Property mode set to 100644
File size: 2.1 KB
RevLine 
[617118d]1Submitted By: Bruce Dubbs <bdubbs@linuxfromscratch.org>
2Date: 2004-08-05
3Updated By: Ryan Oliver <ryan.oliver@pha.com.au>
4Date: 2005-03-28
5Initial Package Version: 1.2.8
6Origin: http://blfs-bugs.linuxfromscratch.org/show_bug.cgi?id=644
7Description: libpng is not linked against libz and libm. This causes problems
8for packages that try to link against libpng without including "-lz -lm" in
9the linker flags.
10
11diff -uNr libpng-1.2.8-orig/scripts/libpng.pc.in libpng-1.2.8/scripts/libpng.pc.in
12--- libpng-1.2.8-orig/scripts/libpng.pc.in 2004-12-03 11:14:31.000000000 +1100
13+++ libpng-1.2.8/scripts/libpng.pc.in 2005-03-28 21:29:02.000000000 +1000
14@@ -7,5 +7,5 @@
15 Name: libpng12
16 Description: Loads and saves PNG files
17 Version: 1.2.8
18-Libs: -L${libdir} -lpng12 -lz -lm
19+Libs: -L${libdir} -lpng12
20 Cflags: -I${includedir}/libpng12
21diff -uNr libpng-1.2.8-orig/scripts/makefile.linux libpng-1.2.8/scripts/makefile.linux
22--- libpng-1.2.8-orig/scripts/makefile.linux 2004-12-03 11:14:31.000000000 +1100
23+++ libpng-1.2.8/scripts/makefile.linux 2005-03-28 21:27:56.000000000 +1000
24@@ -34,8 +34,9 @@
25 CFLAGS=-I$(ZLIBINC) -Wall -O3 -funroll-loops \
26 $(ALIGN) # $(WARNMORE) -g -DPNG_DEBUG=5
27
28-LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng12 -lz -lm
29-LDFLAGS_A=-L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) libpng.a -lz -lm
30+LIBS=-lz -lm
31+LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng12
32+LDFLAGS_A=-L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) libpng.a $(LIBS)
33
34 RANLIB=ranlib
35 #RANLIB=echo
36@@ -86,7 +87,7 @@
37 echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
38 echo L_opts=\"-L$(LIBPATH)\"; \
39 echo R_opts=\"-Wl,-rpath,$(LIBPATH)\"; \
40- echo libs=\"-lpng12 -lz -lm\"; \
41+ echo libs=\"-lpng12\"; \
42 cat scripts/libpng-config-body.in ) > libpng-config
43 chmod +x libpng-config
44
45@@ -99,12 +100,12 @@
46 $(LIBNAME).so.$(PNGVER): $(OBJSDLL)
47 $(CC) -shared -Wl,-soname,$(LIBNAME).so.$(PNGMAJ) \
48 -o $(LIBNAME).so.$(PNGVER) \
49- $(OBJSDLL)
50+ $(OBJSDLL) $(LIBS)
51
52 libpng.so.3.$(PNGMIN): $(OBJSDLL)
53 $(CC) -shared -Wl,-soname,libpng.so.3 \
54 -o libpng.so.3.$(PNGMIN) \
55- $(OBJSDLL)
56+ $(OBJSDLL) $(LIBS)
57
58 pngtest: pngtest.o $(LIBNAME).so
59 $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
Note: See TracBrowser for help on using the repository browser.