source:
patches/zlib-1.2.3-DESTDIR-1.patch@
8319028
Last change on this file since 8319028 was 3d9cea9, checked in by , 18 years ago | |
---|---|
|
|
File size: 6.5 KB |
-
Makefile.in
Submitted By: Jim Gifford <jim@linuxfromscratch.org> Date: 2006-11-15 Initial Package Version: 1.2.3 Origin: OpenWRT and Jim Gifford Upstream Status: Not submitted Description: Adds DESTDIR Support diff -Naur zlib-1.2.3.orig/Makefile.in zlib-1.2.3/Makefile.in
old new 25 25 # -Wstrict-prototypes -Wmissing-prototypes 26 26 27 27 LDFLAGS=libz.a 28 LDSHARED=$(CC) 28 LDSHARED=$(CC) -shared -Wl,-soname,$(SHAREDLIBM) 29 29 CPP=$(CC) -E 30 30 31 LIBS=libz.a 31 LIBS= 32 STATICLIB=libz.a 32 33 SHAREDLIB=libz.so 33 34 SHAREDLIBV=libz.so.1.2.3 34 35 SHAREDLIBM=libz.so.1 35 36 36 AR=ar rc37 AR=ar 37 38 RANLIB=ranlib 38 39 TAR=tar 39 40 SHELL=/bin/sh 40 41 EXE= 41 42 43 DESTDIR = 44 42 45 prefix = /usr/local 43 46 exec_prefix = ${prefix} 44 47 libdir = ${exec_prefix}/lib … … 67 70 echo ' *** zlib test FAILED ***'; \ 68 71 fi 69 72 70 libz.a: $(OBJS) $(OBJA)71 $(AR) $@ $(OBJS) $(OBJA)73 $(STATICLIB): $(OBJS) $(OBJA) 74 $(AR) rc $@ $(OBJS) $(OBJA) 72 75 -@ ($(RANLIB) $@ || true) >/dev/null 2>&1 73 76 74 77 match.o: match.S … … 77 80 mv _match.o match.o 78 81 rm -f _match.s 79 82 83 $(SHAREDLIB): $(SHAREDLIBV) 84 80 85 $(SHAREDLIBV): $(OBJS) 81 $(LDSHARED) - o $@ $(OBJS)86 $(LDSHARED) -lc -o $@ $(OBJS) 82 87 rm -f $(SHAREDLIB) $(SHAREDLIBM) 83 88 ln -s $@ $(SHAREDLIB) 84 89 ln -s $@ $(SHAREDLIBM) … … 90 95 $(CC) $(CFLAGS) -o $@ minigzip.o $(LDFLAGS) 91 96 92 97 install: $(LIBS) 93 -@if [ ! -d $( exec_prefix) ]; then mkdir -p$(exec_prefix); fi94 -@if [ ! -d $( includedir) ]; then mkdir -p$(includedir); fi95 -@if [ ! -d $( libdir) ]; then mkdir -p$(libdir); fi96 -@if [ ! -d $( man3dir) ]; then mkdir -p$(man3dir); fi97 cp zlib.h zconf.h $( includedir)98 chmod 644 $( includedir)/zlib.h$(includedir)/zconf.h99 cp $(LIBS) $(libdir)100 cd $(libdir); chmod 755 $(LIBS)101 -@(cd $( libdir); $(RANLIB) libz.a || true) >/dev/null 2>&1102 cd $( libdir); if test -f $(SHAREDLIBV); then \98 -@if [ ! -d $(DESTDIR)$(exec_prefix) ]; then mkdir -p $(DESTDIR)$(exec_prefix); fi 99 -@if [ ! -d $(DESTDIR)$(includedir) ]; then mkdir -p $(DESTDIR)$(includedir); fi 100 -@if [ ! -d $(DESTDIR)$(libdir) ]; then mkdir -p $(DESTDIR)$(libdir); fi 101 -@if [ ! -d $(DESTDIR)$(man3dir) ]; then mkdir -p $(DESTDIR)$(man3dir); fi 102 cp zlib.h zconf.h $(DESTDIR)$(includedir) 103 chmod 644 $(DESTDIR)$(includedir)/zlib.h $(DESTDIR)$(includedir)/zconf.h 104 if [ -e $(STATICLIB) ]; then install -m755 $(STATICLIB) $(DESTDIR)$(libdir); fi 105 if [ -e $(SHAREDLIBV) ]; then install -m755 $(SHAREDLIBV) $(DESTDIR)$(libdir); fi 106 -@(cd $(DESTDIR)$(libdir); $(RANLIB) libz.a || true) >/dev/null 2>&1 107 cd $(DESTDIR)$(libdir); if test -f $(SHAREDLIBV); then \ 103 108 rm -f $(SHAREDLIB) $(SHAREDLIBM); \ 104 109 ln -s $(SHAREDLIBV) $(SHAREDLIB); \ 105 110 ln -s $(SHAREDLIBV) $(SHAREDLIBM); \ 106 111 (ldconfig || true) >/dev/null 2>&1; \ 107 112 fi 108 cp zlib.3 $( man3dir)109 chmod 644 $( man3dir)/zlib.3113 cp zlib.3 $(DESTDIR)$(man3dir) 114 chmod 644 $(DESTDIR)$(man3dir)/zlib.3 110 115 # The ranlib in install is needed on NeXTSTEP which checks file times 111 116 # ldconfig is for Linux 112 117 -
configure
diff -Naur zlib-1.2.3.orig/configure zlib-1.2.3/configure
old new 23 23 VER=`sed -n -e '/VERSION "/s/.*"\(.*\)".*/\1/p' < zlib.h` 24 24 VER2=`sed -n -e '/VERSION "/s/.*"\([0-9]*\\.[0-9]*\)\\..*/\1/p' < zlib.h` 25 25 VER1=`sed -n -e '/VERSION "/s/.*"\([0-9]*\)\\..*/\1/p' < zlib.h` 26 AR=${AR-"ar rc"}26 AR=${AR-"ar"} 27 27 RANLIB=${RANLIB-"ranlib"} 28 28 prefix=${prefix-/usr/local} 29 29 exec_prefix=${exec_prefix-'${prefix}'} … … 73 73 74 74 if test "$gcc" -eq 1 && ($cc -c $cflags $test.c) 2>/dev/null; then 75 75 CC="$cc" 76 SFLAGS=${CFLAGS-"- fPIC -O3"}76 SFLAGS=${CFLAGS-"-D_REENTRANT -fPIC -O3"} 77 77 CFLAGS="$cflags" 78 78 case `(uname -s || echo unknown) 2>/dev/null` in 79 79 Linux | linux | GNU | GNU/*) LDSHARED=${LDSHARED-"$cc -shared -Wl,-soname,libz.so.1"};; … … 424 424 echo Checking for mmap support... No. 425 425 fi 426 426 427 cat > $test.c <<EOF 428 #include <stdio.h> 429 int main() { char buf[10]; snprintf(buf, sizeof(buf), "%s", "F"); return 0; } 430 EOF 431 if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then 432 echo "Checking for snprintf... Yes." 433 CFLAGS="$CFLAGS -DHAS_snprintf" 434 else 435 echo "Checking for snprintf.. No." 436 fi 437 438 cat > $test.c <<EOF 439 #include <stdio.h> 440 #include <stdarg.h> 441 int main(void) { va_list a; vsnprintf(0, 0, "", a); return 0; } 442 EOF 443 if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then 444 echo "Checking for vsnprintf... Yes." 445 CFLAGS="$CFLAGS -DHAS_vsnprintf" 446 else 447 echo "Checking for vsnprintf.. No." 448 fi 449 427 450 CPP=${CPP-"$CC -E"} 428 451 case $CFLAGS in 429 452 *ASMV*) … … 440 463 # udpate Makefile 441 464 sed < Makefile.in " 442 465 /^CC *=/s#=.*#=$CC# 443 /^CFLAGS *=/s#=.*#=$CFLAGS# 444 /^CPP *=/s#=.*#=$CPP# 445 /^LDSHARED *=/s#=.*#=$LDSHARED# 446 /^LIBS *=/s#=.*#=$LIBS# 447 /^SHAREDLIB *=/s#=.*#=$SHAREDLIB# 448 /^SHAREDLIBV *=/s#=.*#=$SHAREDLIBV# 449 /^SHAREDLIBM *=/s#=.*#=$SHAREDLIBM# 450 /^AR *=/s#=.*#=$AR# 451 /^RANLIB *=/s#=.*#=$RANLIB# 452 /^EXE *=/s#=.*#=$EXE# 453 /^prefix *=/s#=.*#=$prefix# 454 /^exec_prefix *=/s#=.*#=$exec_prefix# 455 /^libdir *=/s#=.*#=$libdir# 456 /^includedir *=/s#=.*#=$includedir# 457 /^mandir *=/s#=.*#=$mandir# 458 /^LDFLAGS *=/s#=.*#=$LDFLAGS# 466 /^CC *=/s%=.*%= $CC% 467 /^CFLAGS *=/s%=.*%= $CFLAGS% 468 /^CPP *=/s%=.*%= $CPP% 469 /^LDSHARED *=/s%=.*%= $LDSHARED% 470 /^LIBS *=/s%=.*%= $LIBS% 471 /^SHAREDLIB *=/s%=.*%= $SHAREDLIB% 472 /^SHAREDLIBV *=/s%=.*%= $SHAREDLIBV% 473 /^SHAREDLIBM *=/s%=.*%= $SHAREDLIBM% 474 /^AR *=/s%=.*%= $AR% 475 /^RANLIB *=/s%=.*%= $RANLIB% 476 /^EXE *=/s%=.*%= $EXE% 477 /^prefix *=/s%=.*%= $prefix% 478 /^exec_prefix *=/s%=.*%= $exec_prefix% 479 /^libdir *=/s%=.*%= $libdir% 480 /^includedir *=/s%=.*%= $includedir% 481 /^mandir *=/s%=.*%= $mandir% 482 /^LDFLAGS *=/s%=.*%= $LDFLAGS% 459 483 " > Makefile -
contrib/minizip/Makefile
diff -Naur zlib-1.2.3.orig/contrib/minizip/Makefile zlib-1.2.3/contrib/minizip/Makefile
old new 1 1 CC=cc 2 CFLAGS=-O -I../..2 CFLAGS=-O2 -g -I../.. -Dunix 3 3 4 UNZ_OBJS = miniunz.o unzip.o ioapi.o ../../libz.a5 ZIP_OBJS = minizip.o zip.o ioapi.o ../../libz.a4 UNZ_OBJS = miniunz.o unzip.o ioapi.o 5 ZIP_OBJS = minizip.o zip.o ioapi.o 6 6 7 7 .c.o: 8 8 $(CC) -c $(CFLAGS) $*.c … … 10 10 all: miniunz minizip 11 11 12 12 miniunz: $(UNZ_OBJS) 13 $(CC) $(CFLAGS) -o $@ $(UNZ_OBJS) 13 $(CC) $(CFLAGS) -o $@ $(UNZ_OBJS) -L ../.. -lz 14 14 15 15 minizip: $(ZIP_OBJS) 16 $(CC) $(CFLAGS) -o $@ $(ZIP_OBJS) 16 $(CC) $(CFLAGS) -o $@ $(ZIP_OBJS) -L ../.. -lz 17 17 18 18 test: miniunz minizip 19 19 ./minizip test readme.txt
Note:
See TracBrowser
for help on using the repository browser.