source: scripts/patches/libpng-1.2.8-link_to_proper_libs-1.patch@ 8fdfc096

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since 8fdfc096 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
  • scripts/libpng.pc.in

    Submitted By: Bruce Dubbs <bdubbs@linuxfromscratch.org>
    Date: 2004-08-05
    Updated By: Ryan Oliver <ryan.oliver@pha.com.au>
    Date: 2005-03-28
    Initial Package Version: 1.2.8
    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 -uNr libpng-1.2.8-orig/scripts/libpng.pc.in libpng-1.2.8/scripts/libpng.pc.in
    old new  
    77Name: libpng12
    88Description: Loads and saves PNG files
    99Version: 1.2.8
    10 Libs: -L${libdir} -lpng12 -lz -lm
     10Libs: -L${libdir} -lpng12
    1111Cflags: -I${includedir}/libpng12
  • scripts/makefile.linux

    diff -uNr libpng-1.2.8-orig/scripts/makefile.linux libpng-1.2.8/scripts/makefile.linux
    old new  
    3434CFLAGS=-I$(ZLIBINC) -Wall -O3 -funroll-loops \
    3535        $(ALIGN) # $(WARNMORE) -g -DPNG_DEBUG=5
    3636
    37 LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng12 -lz -lm
    38 LDFLAGS_A=-L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) libpng.a -lz -lm
     37LIBS=-lz -lm
     38LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng12
     39LDFLAGS_A=-L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) libpng.a $(LIBS)
    3940
    4041RANLIB=ranlib
    4142#RANLIB=echo
     
    8687        echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
    8788        echo L_opts=\"-L$(LIBPATH)\"; \
    8889        echo R_opts=\"-Wl,-rpath,$(LIBPATH)\"; \
    89         echo libs=\"-lpng12 -lz -lm\"; \
     90        echo libs=\"-lpng12\"; \
    9091        cat scripts/libpng-config-body.in ) > libpng-config
    9192        chmod +x libpng-config
    9293
     
    99100$(LIBNAME).so.$(PNGVER): $(OBJSDLL)
    100101        $(CC) -shared -Wl,-soname,$(LIBNAME).so.$(PNGMAJ) \
    101102        -o $(LIBNAME).so.$(PNGVER) \
    102         $(OBJSDLL)
     103        $(OBJSDLL) $(LIBS)
    103104
    104105libpng.so.3.$(PNGMIN): $(OBJSDLL)
    105106        $(CC) -shared -Wl,-soname,libpng.so.3 \
    106107        -o libpng.so.3.$(PNGMIN) \
    107         $(OBJSDLL)
     108        $(OBJSDLL) $(LIBS)
    108109
    109110pngtest: pngtest.o $(LIBNAME).so
    110111        $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
Note: See TracBrowser for help on using the repository browser.