/[gentoo-x86]/app-arch/zip/files/zip-2.32-build.patch
Gentoo

Contents of /app-arch/zip/files/zip-2.32-build.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download) (as text)
Sun Dec 2 19:52:06 2007 UTC (12 years, 8 months ago) by vapier
Branch: MAIN
CVS Tags: HEAD
File MIME type: text/x-diff
Cleanup the build system yet again #200995.
(Portage version: 2.1.4_rc4)

1 respect build environment settings
2
3 --- zip/unix/Makefile
4 +++ zip/unix/Makefile
5 @@ -12,15 +12,15 @@
6
7 list: all
8
9 -MAKE = make -f unix/Makefile
10 +MAKE := $(MAKE) -f unix/Makefile
11 SHELL = /bin/sh
12 LN = ln -s
13
14 # (to use the Gnu compiler, change cc to gcc in CC)
15 -CC = cc
16 +CC ?= gcc
17 BIND = $(CC)
18 AS = $(CC) -c
19 -CPP = /lib/cpp
20 +CPP ?= $(CC)
21 EXE =
22
23 # probably can change this to 'install' if you have it
24 @@ -47,7 +47,7 @@
25 # LFLAGS1 flags after output file spec, before obj file list
26 # LFLAGS2 flags after obj file list (libraries, etc)
27 CFLAGS_NOOPT = -I. -DUNIX $(LOCAL_ZIP)
28 -CFLAGS = -O2 $(CFLAGS_NOOPT)
29 +CFLAGS ?= -O2 $(CFLAGS_NOOPT)
30 LFLAGS1 =
31 LFLAGS2 = -s
32
33 --- zip/unix/configure
34 +++ zip/unix/configure
35 @@ -13,52 +13,13 @@
36
37 CC=${1-cc}
38 -CFLAGS=${2-"-I. -DUNIX"}
39 -LFLAGS1=""
40 +CFLAGS="${2--I. -DUNIX} ${CFLAGS} ${CPPFLAGS}"
41 +LFLAGS1="${LDFLAGS}"
42 LN="ln -s"
43 -echo "Check C compiler type (optimization option)"
44 -cat > conftest.c << _EOF_
45 -int main()
46 -{
47 -#ifndef __SUNPRO_C
48 - bad code
49 -#endif
50 - return 0;
51 -}
52 -_EOF_
53 -$CC $CFLAGS -c conftest.c > /dev/null 2>/dev/null
54 -if test $? -eq 0; then
55 - echo ' Sun C (-xO3)'
56 - CFLAGS="${CFLAGS} -xO3"
57 -else
58 - cat > conftest.c << _EOF_
59 -int main()
60 -{
61 -#ifndef __DECC
62 - bad code
63 -#endif
64 - return 0;
65 -}
66 -_EOF_
67 - $CC $CFLAGS -c conftest.c > /dev/null 2>/dev/null
68 - if test $? -eq 0; then
69 - echo ' DEC C (-O3)'
70 - CFLAGS="${CFLAGS} -O3"
71 - else
72 - echo ' Other (gcc?) (-O2)'
73 - CFLAGS="${CFLAGS} -O2"
74 - fi
75 -fi
76
77 echo Check for the C preprocessor
78 # on SVR4, cc -E does not produce correct assembler files. Need /lib/cpp.
79 CPP="${CC} -E"
80 # solaris as(1) needs -P, maybe others as well ?
81 -[ -f /usr/ccs/lib/cpp ] && CPP="/usr/ccs/lib/cpp -P"
82 -[ -f /usr/lib/cpp ] && CPP=/usr/lib/cpp
83 -[ -f /lib/cpp ] && CPP=/lib/cpp
84 -[ -f /usr/bin/cpp ] && CPP=/usr/bin/cpp
85 -[ -f /xenix ] && CPP="${CC} -E"
86 -[ -f /lynx.os ] && CPP="${CC} -E"
87
88 echo "#include <stdio.h>" > conftest.c
89 $CPP conftest.c >/dev/null 2>/dev/null || CPP="${CC} -E"

  ViewVC Help
Powered by ViewVC 1.1.20