cvs commit: patches/libpng libpng-1.2.5-link-to-proper-libs.patch

tushar at linuxfromscratch.org tushar at linuxfromscratch.org
Sun Mar 14 08:37:29 PST 2004


tushar      04/03/14 09:37:29

  Added:       libpng   libpng-1.2.5-link-to-proper-libs.patch
  Log:
  Added: libpng-1.2.5-link-to-proper-libs.patch
  
  Revision  Changes    Path
  1.1                  patches/libpng/libpng-1.2.5-link-to-proper-libs.patch
  
  Index: libpng-1.2.5-link-to-proper-libs.patch
  ===================================================================
  Submitted By: Tushar Teredesai <tushar at linuxfromscratch.org>
  Date: 2004-03-14
  Initial Package Version: 1.2.5
  Origin: http://blfs-bugs.linuxfromscratch.org/show_bug.cgi?id=644
  Description: libpng is not linked against libz and libm. This causes problems
  for packages that try to link against libpng without including "-lz -lm" in
  the linker flags.
  
  diff -ur libpng-1.2.5.orig/scripts/libpng.pc.in libpng-1.2.5/scripts/libpng.pc.in
  --- libpng-1.2.5.orig/scripts/libpng.pc.in	2002-10-03 06:32:33.000000000 -0500
  +++ libpng-1.2.5/scripts/libpng.pc.in	2004-03-14 10:29:13.000000000 -0600
  @@ -7,5 +7,5 @@
   Name: libpng12
   Description: Loads and saves PNG files
   Version: 1.2.5
  -Libs: -L${libdir} -lpng12 -lz -lm
  +Libs: -L${libdir} -lpng12
   Cflags: -I${includedir}/libpng12
  diff -ur libpng-1.2.5.orig/scripts/makefile.linux libpng-1.2.5/scripts/makefile.linux
  --- libpng-1.2.5.orig/scripts/makefile.linux	2002-10-03 06:32:34.000000000 -0500
  +++ libpng-1.2.5/scripts/makefile.linux	2004-03-14 10:31:21.000000000 -0600
  @@ -34,8 +34,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
  @@ -86,7 +87,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
   
  @@ -99,12 +100,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)
  
  
  



More information about the patches mailing list