CRUX-ARM : Home

Home :: Documentation :: Download :: Development :: Community :: Ports :: Packages :: Bugs :: Links :: About :: Donors
procps: updated to 3.3.3 and aligned with upstream. Cleaned cross patches.
[crossrootfs.git] / bzip2 / bzip2.patch
CommitLineData
9a719059
VM
1diff -aur bzip2-1.0.6.orig/Makefile bzip2-1.0.6/Makefile
2--- bzip2-1.0.6.orig/Makefile 2008-02-14 13:39:18.000000000 +0100
3+++ bzip2-1.0.6/Makefile 2009-06-14 13:49:03.889599030 +0200
4@@ -21,7 +21,7 @@
6dca1d21
JB
5 LDFLAGS=
6
7 BIGFILES=-D_FILE_OFFSET_BITS=64
8-CFLAGS=-Wall -Winline -O2 -g $(BIGFILES)
9a719059 9+CFLAGS+=-fpic -Wall -Winline $(BIGFILES)
6dca1d21
JB
10
11 # Where you want it installed when you do 'make install'
12 PREFIX=/usr/local
9a719059 13@@ -70,43 +70,36 @@
6dca1d21
JB
14 @cat words3
15
16 install: bzip2 bzip2recover
17- if ( test ! -d $(PREFIX)/bin ) ; then mkdir -p $(PREFIX)/bin ; fi
18- if ( test ! -d $(PREFIX)/lib ) ; then mkdir -p $(PREFIX)/lib ; fi
19- if ( test ! -d $(PREFIX)/man ) ; then mkdir -p $(PREFIX)/man ; fi
20- if ( test ! -d $(PREFIX)/man/man1 ) ; then mkdir -p $(PREFIX)/man/man1 ; fi
21- if ( test ! -d $(PREFIX)/include ) ; then mkdir -p $(PREFIX)/include ; fi
22- cp -f bzip2 $(PREFIX)/bin/bzip2
23- cp -f bzip2 $(PREFIX)/bin/bunzip2
24- cp -f bzip2 $(PREFIX)/bin/bzcat
25- cp -f bzip2recover $(PREFIX)/bin/bzip2recover
26- chmod a+x $(PREFIX)/bin/bzip2
27- chmod a+x $(PREFIX)/bin/bunzip2
28- chmod a+x $(PREFIX)/bin/bzcat
29- chmod a+x $(PREFIX)/bin/bzip2recover
30- cp -f bzip2.1 $(PREFIX)/man/man1
31- chmod a+r $(PREFIX)/man/man1/bzip2.1
32- cp -f bzlib.h $(PREFIX)/include
33- chmod a+r $(PREFIX)/include/bzlib.h
34- cp -f libbz2.a $(PREFIX)/lib
35- chmod a+r $(PREFIX)/lib/libbz2.a
36- cp -f bzgrep $(PREFIX)/bin/bzgrep
37- ln -s -f $(PREFIX)/bin/bzgrep $(PREFIX)/bin/bzegrep
38- ln -s -f $(PREFIX)/bin/bzgrep $(PREFIX)/bin/bzfgrep
39- chmod a+x $(PREFIX)/bin/bzgrep
40- cp -f bzmore $(PREFIX)/bin/bzmore
41- ln -s -f $(PREFIX)/bin/bzmore $(PREFIX)/bin/bzless
42- chmod a+x $(PREFIX)/bin/bzmore
43- cp -f bzdiff $(PREFIX)/bin/bzdiff
44- ln -s -f $(PREFIX)/bin/bzdiff $(PREFIX)/bin/bzcmp
45- chmod a+x $(PREFIX)/bin/bzdiff
46- cp -f bzgrep.1 bzmore.1 bzdiff.1 $(PREFIX)/man/man1
47- chmod a+r $(PREFIX)/man/man1/bzgrep.1
48- chmod a+r $(PREFIX)/man/man1/bzmore.1
49- chmod a+r $(PREFIX)/man/man1/bzdiff.1
50- echo ".so man1/bzgrep.1" > $(PREFIX)/man/man1/bzegrep.1
51- echo ".so man1/bzgrep.1" > $(PREFIX)/man/man1/bzfgrep.1
52- echo ".so man1/bzmore.1" > $(PREFIX)/man/man1/bzless.1
53- echo ".so man1/bzdiff.1" > $(PREFIX)/man/man1/bzcmp.1
54+ install -d $(PREFIX)/bin \
55+ $(PREFIX)/lib \
56+ $(PREFIX)/man/man1 \
57+ $(PREFIX)/include
58+ install -m 755 bzip2 \
59+ bzip2recover \
60+ bzgrep \
61+ bzmore \
62+ bzdiff \
63+ $(PREFIX)/bin
64+ install -m 644 bzlib.h $(PREFIX)/include
65+ install -m 644 libbz2.a $(PREFIX)/lib
66+ ln -sf bzip2 $(PREFIX)/bin/bunzip2
67+ ln -sf bzip2 $(PREFIX)/bin/bzcat
68+ ln -sf bzgrep $(PREFIX)/bin/bzegrep
69+ ln -sf bzgrep $(PREFIX)/bin/bzfgrep
70+ ln -sf bzmore $(PREFIX)/bin/bzless
71+ ln -sf bzdiff $(PREFIX)/bin/bzcmp
72+ install -m 644 bzip2.1 \
73+ bzgrep.1 \
74+ bzmore.1 \
75+ bzdiff.1 \
76+ $(PREFIX)/man/man1
77+ ln -sf bzgrep.1 $(PREFIX)/man/man1/bzegrep.1
78+ ln -sf bzgrep.1 $(PREFIX)/man/man1/bzfgrep.1
79+ ln -sf bzmore.1 $(PREFIX)/man/man1/bzless.1
80+ ln -sf bzdiff.1 $(PREFIX)/man/man1/bzcmp.1
81+ ln -sf bzip2.1 $(PREFIX)/man/man1/bunzip2.1
82+ ln -sf bzip2.1 $(PREFIX)/man/man1/bzcat.1
83+ ln -sf bzip2.1 $(PREFIX)/man/man1/bzip2recover.1
84
85 clean:
86 rm -f *.o libbz2.a bzip2 bzip2recover \
9a719059
VM
87diff -aur bzip2-1.0.6.orig/Makefile-libbz2_so bzip2-1.0.6/Makefile-libbz2_so
88--- bzip2-1.0.6.orig/Makefile-libbz2_so 2007-12-09 14:00:50.000000000 +0100
89+++ bzip2-1.0.6/Makefile-libbz2_so 2009-06-14 13:48:27.519580669 +0200
6dca1d21
JB
90@@ -24,7 +24,7 @@
91 SHELL=/bin/sh
92 CC=gcc
93 BIGFILES=-D_FILE_OFFSET_BITS=64
94-CFLAGS=-fpic -fPIC -Wall -Winline -O2 -g $(BIGFILES)
9a719059 95+CFLAGS+=-fpic -Wall -Winline $(BIGFILES)
6dca1d21
JB
96
97 OBJS= blocksort.o \
98 huffman.o \
9a719059 99@@ -37,11 +37,15 @@
6dca1d21 100 all: $(OBJS)
9a719059
VM
101 $(CC) -shared -Wl,-soname -Wl,libbz2.so.1.0 -o libbz2.so.1.0.6 $(OBJS)
102 $(CC) $(CFLAGS) -o bzip2-shared bzip2.c libbz2.so.1.0.6
6dca1d21 103- rm -f libbz2.so.1.0
9a719059 104- ln -s libbz2.so.1.0.6 libbz2.so.1.0
6dca1d21
JB
105+
106+install:
107+ install -d $(PREFIX)/lib
9a719059
VM
108+ install -m 755 libbz2.so.1.0.6 $(PREFIX)/lib
109+ ln -sf libbz2.so.1.0.6 $(PREFIX)/lib/libbz2.so.1.0
6dca1d21
JB
110+ ln -sf libbz2.so.1.0 $(PREFIX)/lib/libbz2.so
111
112 clean:
9a719059
VM
113- rm -f $(OBJS) bzip2.o libbz2.so.1.0.6 libbz2.so.1.0 bzip2-shared
114+ rm -f $(OBJS) bzip2.o libbz2.so.1.0.6 bzip2-shared
6dca1d21
JB
115
116 blocksort.o: blocksort.c
117 $(CC) $(CFLAGS) -c blocksort.c
9a719059
VM
118diff -aur bzip2-1.0.6.orig/bzlib_private.h bzip2-1.0.6/bzlib_private.h
119--- bzip2-1.0.6.orig/bzlib_private.h 2007-12-09 15:00:46.000000000 +0100
120+++ bzip2-1.0.6/bzlib_private.h 2009-06-14 13:53:28.200579230 +0200
121@@ -128,7 +128,7 @@
122
123 /*-- Stuff for randomising repetitive blocks. --*/
124
125-extern Int32 BZ2_rNums[512];
126+extern const Int32 BZ2_rNums[512];
127
128 #define BZ_RAND_DECLS \
129 Int32 rNToGo; \
130@@ -152,7 +152,7 @@
131
132 /*-- Stuff for doing CRCs. --*/
133
134-extern UInt32 BZ2_crc32Table[256];
135+extern const UInt32 BZ2_crc32Table[256];
136
137 #define BZ_INITIALISE_CRC(crcVar) \
138 { \
139diff -aur bzip2-1.0.6.orig/crctable.c bzip2-1.0.6/crctable.c
140--- bzip2-1.0.6.orig/crctable.c 2007-12-09 13:29:49.000000000 +0100
141+++ bzip2-1.0.6/crctable.c 2009-06-14 13:52:33.248830630 +0200
142@@ -28,7 +28,7 @@
143 comp.compression FAQ.
144 --*/
145
146-UInt32 BZ2_crc32Table[256] = {
147+const UInt32 BZ2_crc32Table[256] = {
148
149 /*-- Ugly, innit? --*/
150
151diff -aur bzip2-1.0.6.orig/randtable.c bzip2-1.0.6/randtable.c
152--- bzip2-1.0.6.orig/randtable.c 2007-12-09 13:32:55.000000000 +0100
153+++ bzip2-1.0.6/randtable.c 2009-06-14 13:53:38.063580427 +0200
154@@ -23,7 +23,7 @@
155
156
157 /*---------------------------------------------*/
158-Int32 BZ2_rNums[512] = {
159+const Int32 BZ2_rNums[512] = {
160 619, 720, 127, 481, 931, 816, 813, 233, 566, 247,
161 985, 724, 205, 454, 863, 491, 741, 242, 949, 214,
162 733, 859, 335, 708, 621, 574, 73, 654, 730, 472,