/[packages]/cauldron/bzip2/current/SOURCES/bzip2-1.0.5-makefile.patch
ViewVC logotype

Contents of /cauldron/bzip2/current/SOURCES/bzip2-1.0.5-makefile.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 241 - (show annotations) (download)
Fri Jan 7 12:50:50 2011 UTC (13 years, 3 months ago) by pterjan
File size: 6726 byte(s)
imported package bzip2
1 diff -Naur bzip2-1.0.5/Makefile bzip2-1.0.5.tpg/Makefile
2 --- bzip2-1.0.5/Makefile 2008-02-14 12:39:18.000000000 +0000
3 +++ bzip2-1.0.5.tpg/Makefile 2009-01-10 19:45:10.000000000 +0000
4 @@ -12,45 +12,76 @@
5 # in the file LICENSE.
6 # ------------------------------------------------------------------
7
8 +include config.in
9 +
10 +# define libdir name
11 +lib ?= lib
12 +
13 +# define standard opt flags
14 +CFLAGS ?= -O2 -fomit-frame-pointer
15 +
16 SHELL=/bin/sh
17
18 # To assist in cross-compiling
19 CC=gcc
20 AR=ar
21 RANLIB=ranlib
22 -LDFLAGS=
23 +LDFLAGS+=
24
25 -BIGFILES=-D_FILE_OFFSET_BITS=64
26 -CFLAGS=-Wall -Winline -O2 -g $(BIGFILES)
27 +# Large file support
28 +CFLAGS += -D_FILE_OFFSET_BITS=64
29
30 -# Where you want it installed when you do 'make install'
31 -PREFIX=/usr/local
32 +# Warnings
33 +CFLAGS += -Wall -Winline
34
35 -
36 -OBJS= blocksort.o \
37 - huffman.o \
38 - crctable.o \
39 - randtable.o \
40 - compress.o \
41 - decompress.o \
42 - bzlib.o
43 -
44 -all: libbz2.a bzip2 bzip2recover test
45 -
46 -bzip2: libbz2.a bzip2.o
47 - $(CC) $(CFLAGS) $(LDFLAGS) -o bzip2 bzip2.o -L. -lbz2
48 -
49 -bzip2recover: bzip2recover.o
50 - $(CC) $(CFLAGS) $(LDFLAGS) -o bzip2recover bzip2recover.o
51 -
52 -libbz2.a: $(OBJS)
53 - rm -f libbz2.a
54 - $(AR) cq libbz2.a $(OBJS)
55 - @if ( test -f $(RANLIB) -o -f /usr/bin/ranlib -o \
56 - -f /bin/ranlib -o -f /usr/ccs/bin/ranlib ) ; then \
57 - echo $(RANLIB) libbz2.a ; \
58 - $(RANLIB) libbz2.a ; \
59 - fi
60 +OBJS= blocksort.lo \
61 + huffman.lo \
62 + crctable.lo \
63 + randtable.lo \
64 + compress.lo \
65 + decompress.lo \
66 + bzlib.lo
67 +
68 +LIB=libbz2.la
69 +
70 +prefix=/usr
71 +bindir=$(prefix)/bin
72 +libdir=$(prefix)/$(lib)
73 +mandir=$(prefix)/share/man
74 +includedir=$(prefix)/include
75 +DESTDIR=
76 +
77 +all: $(LIB) bzip2 bzip2recover test
78 +
79 +install: all test
80 + mkdir -p $(DESTDIR)$(bindir)
81 + libtool --mode=install install -s -m 0755 bzip2 $(DESTDIR)$(bindir)/
82 + libtool --mode=install install -s -m 0755 bzip2recover $(DESTDIR)$(bindir)/
83 + libtool --mode=install install -m 0755 bzdiff $(DESTDIR)$(bindir)/
84 + libtool --mode=install install -m 0755 bzmore $(DESTDIR)$(bindir)/
85 + ln -sf bzip2 $(DESTDIR)$(bindir)/bunzip2
86 + ln -sf bzip2 $(DESTDIR)$(bindir)/bzcat
87 + mkdir -p $(DESTDIR)$(mandir)/man1
88 + install -c -m 0644 bzip2.1 $(DESTDIR)$(mandir)/man1/
89 + install -c -m 0644 bzdiff.1 $(DESTDIR)$(mandir)/man1/
90 + install -c -m 0644 bzmore.1 $(DESTDIR)$(mandir)/man1/
91 + ln -sf bzip2.1 $(DESTDIR)$(mandir)/man1/bunzip2.1
92 + ln -sf bzip2.1 $(DESTDIR)$(mandir)/man1/bzcat.1
93 + ln -sf bzip2.1 $(DESTDIR)$(mandir)/man1/bzip2recover.1
94 + mkdir -p $(DESTDIR)$(libdir)
95 + libtool --mode=install install $(LIB) $(DESTDIR)$(libdir)
96 + mkdir -p $(DESTDIR)$(includedir)
97 + install -c -m 0644 bzlib.h $(DESTDIR)$(includedir)
98 +
99 +bzip2: bzip2.c $(LIB)
100 + libtool --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -o $@ bzip2.c $(LIB)
101 +
102 +bzip2recover: bzip2recover.c
103 + libtool --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -o $@ bzip2recover.c
104 +
105 +$(LIB): $(OBJS)
106 + libtool --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJS) -rpath $(libdir) \
107 + -version-info 1:0:0
108
109 check: test
110 test: bzip2
111 @@ -69,70 +100,18 @@
112 cmp sample3.tst sample3.ref
113 @cat words3
114
115 -install: bzip2 bzip2recover
116 - if ( test ! -d $(PREFIX)/bin ) ; then mkdir -p $(PREFIX)/bin ; fi
117 - if ( test ! -d $(PREFIX)/lib ) ; then mkdir -p $(PREFIX)/lib ; fi
118 - if ( test ! -d $(PREFIX)/man ) ; then mkdir -p $(PREFIX)/man ; fi
119 - if ( test ! -d $(PREFIX)/man/man1 ) ; then mkdir -p $(PREFIX)/man/man1 ; fi
120 - if ( test ! -d $(PREFIX)/include ) ; then mkdir -p $(PREFIX)/include ; fi
121 - cp -f bzip2 $(PREFIX)/bin/bzip2
122 - cp -f bzip2 $(PREFIX)/bin/bunzip2
123 - cp -f bzip2 $(PREFIX)/bin/bzcat
124 - cp -f bzip2recover $(PREFIX)/bin/bzip2recover
125 - chmod a+x $(PREFIX)/bin/bzip2
126 - chmod a+x $(PREFIX)/bin/bunzip2
127 - chmod a+x $(PREFIX)/bin/bzcat
128 - chmod a+x $(PREFIX)/bin/bzip2recover
129 - cp -f bzip2.1 $(PREFIX)/man/man1
130 - chmod a+r $(PREFIX)/man/man1/bzip2.1
131 - cp -f bzlib.h $(PREFIX)/include
132 - chmod a+r $(PREFIX)/include/bzlib.h
133 - cp -f libbz2.a $(PREFIX)/lib
134 - chmod a+r $(PREFIX)/lib/libbz2.a
135 - cp -f bzgrep $(PREFIX)/bin/bzgrep
136 - ln -s -f $(PREFIX)/bin/bzgrep $(PREFIX)/bin/bzegrep
137 - ln -s -f $(PREFIX)/bin/bzgrep $(PREFIX)/bin/bzfgrep
138 - chmod a+x $(PREFIX)/bin/bzgrep
139 - cp -f bzmore $(PREFIX)/bin/bzmore
140 - ln -s -f $(PREFIX)/bin/bzmore $(PREFIX)/bin/bzless
141 - chmod a+x $(PREFIX)/bin/bzmore
142 - cp -f bzdiff $(PREFIX)/bin/bzdiff
143 - ln -s -f $(PREFIX)/bin/bzdiff $(PREFIX)/bin/bzcmp
144 - chmod a+x $(PREFIX)/bin/bzdiff
145 - cp -f bzgrep.1 bzmore.1 bzdiff.1 $(PREFIX)/man/man1
146 - chmod a+r $(PREFIX)/man/man1/bzgrep.1
147 - chmod a+r $(PREFIX)/man/man1/bzmore.1
148 - chmod a+r $(PREFIX)/man/man1/bzdiff.1
149 - echo ".so man1/bzgrep.1" > $(PREFIX)/man/man1/bzegrep.1
150 - echo ".so man1/bzgrep.1" > $(PREFIX)/man/man1/bzfgrep.1
151 - echo ".so man1/bzmore.1" > $(PREFIX)/man/man1/bzless.1
152 - echo ".so man1/bzdiff.1" > $(PREFIX)/man/man1/bzcmp.1
153 -
154 clean:
155 - rm -f *.o libbz2.a bzip2 bzip2recover \
156 + rm -f *.o *.lo *.a $(LIB) bzip2 bzip2recover \
157 sample1.rb2 sample2.rb2 sample3.rb2 \
158 sample1.tst sample2.tst sample3.tst
159
160 -blocksort.o: blocksort.c
161 - @cat words0
162 - $(CC) $(CFLAGS) -c blocksort.c
163 -huffman.o: huffman.c
164 - $(CC) $(CFLAGS) -c huffman.c
165 -crctable.o: crctable.c
166 - $(CC) $(CFLAGS) -c crctable.c
167 -randtable.o: randtable.c
168 - $(CC) $(CFLAGS) -c randtable.c
169 -compress.o: compress.c
170 - $(CC) $(CFLAGS) -c compress.c
171 -decompress.o: decompress.c
172 - $(CC) $(CFLAGS) -c decompress.c
173 -bzlib.o: bzlib.c
174 - $(CC) $(CFLAGS) -c bzlib.c
175 -bzip2.o: bzip2.c
176 - $(CC) $(CFLAGS) -c bzip2.c
177 -bzip2recover.o: bzip2recover.c
178 - $(CC) $(CFLAGS) -c bzip2recover.c
179 +.SUFFIXES: .c .o .lo
180 +
181 +%.o: %.c bzlib.h bzlib_private.h
182 + $(CC) $(CFLAGS) -c $<
183
184 +%.lo: %.c bzlib.h bzlib_private.h
185 + libtool --mode=compile $(CC) $(CFLAGS) -c $<
186
187 distclean: clean
188 rm -f manual.ps manual.html manual.pdf
189 diff -Naur bzip2-1.0.5/Makefile-libbz2_so bzip2-1.0.5.tpg/Makefile-libbz2_so
190 --- bzip2-1.0.5/Makefile-libbz2_so 2007-12-09 13:00:50.000000000 +0000
191 +++ bzip2-1.0.5.tpg/Makefile-libbz2_so 2009-01-10 19:50:43.000000000 +0000
192 @@ -20,11 +20,13 @@
193 # in the file LICENSE.
194 # ------------------------------------------------------------------
195
196 +include config.in
197
198 SHELL=/bin/sh
199 CC=gcc
200 BIGFILES=-D_FILE_OFFSET_BITS=64
201 -CFLAGS=-fpic -fPIC -Wall -Winline -O2 -g $(BIGFILES)
202 +CFLAGS +=-fpic -fPIC -Wall -Winline -O2 -g $(BIGFILES)
203 +LDFLAGS +=
204
205 OBJS= blocksort.o \
206 huffman.o \
207 @@ -35,8 +37,8 @@
208 bzlib.o
209
210 all: $(OBJS)
211 - $(CC) -shared -Wl,-soname -Wl,libbz2.so.1.0 -o libbz2.so.1.0.4 $(OBJS)
212 - $(CC) $(CFLAGS) -o bzip2-shared bzip2.c libbz2.so.1.0.4
213 + $(CC) $(CFLAGS) -shared -Wl,-soname -Wl,libbz2.so.1.0 $(LDFLAGS) -o libbz2.so.1.0.4 $(OBJS)
214 + $(CC) $(CFLAGS) $(LDFLAGS) -o bzip2-shared bzip2.c libbz2.so.1.0.4
215 rm -f libbz2.so.1.0
216 ln -s libbz2.so.1.0.4 libbz2.so.1.0
217

  ViewVC Help
Powered by ViewVC 1.1.30