[617118d] | 1 | Submitted By: Bruce Dubbs <bdubbs@linuxfromscratch.org>
|
---|
| 2 | Date: 2004-08-05
|
---|
| 3 | Updated By: Ryan Oliver <ryan.oliver@pha.com.au>
|
---|
| 4 | Date: 2005-03-28
|
---|
| 5 | Initial Package Version: 1.2.8
|
---|
| 6 | Origin: http://blfs-bugs.linuxfromscratch.org/show_bug.cgi?id=644
|
---|
| 7 | Description: libpng is not linked against libz and libm. This causes problems
|
---|
| 8 | for packages that try to link against libpng without including "-lz -lm" in
|
---|
| 9 | the linker flags.
|
---|
| 10 |
|
---|
| 11 | diff -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
|
---|
| 21 | diff -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)
|
---|