python-pathvalidate: bump version to 0.14.1
[buildroot-gz.git] / package / libgsm / 0001-misc.patch
blob735d74449eefe276262336b3e5d0c3403e6f27ca
1 Misc fixes from Archlinux
3 Patch from:
4 https://git.archlinux.org/svntogit/packages.git/plain/gsm/trunk/gsm.patch
6 Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
8 --- a/Makefile 2006-04-26 15:14:26.000000000 -0400
9 +++ b/Makefile 2010-06-19 16:53:25.000000000 -0400
10 @@ -44,7 +44,7 @@
11 # CCFLAGS = -c -O
13 CC = gcc -ansi -pedantic
14 -CCFLAGS = -c -O2 -DNeedFunctionPrototypes=1
15 +CCFLAGS = -c -O2 -fPIC -DNeedFunctionPrototypes=1
17 LD = $(CC)
19 @@ -96,11 +96,11 @@
20 # Other tools
22 SHELL = /bin/sh
23 -LN = ln
24 +LN = ln -s -f
25 BASENAME = basename
26 AR = ar
27 ARFLAGS = cr
28 -RMFLAGS =
29 +RMFLAGS = -f
30 FIND = find
31 COMPRESS = compress
32 COMPRESSFLAGS =
33 @@ -139,7 +139,7 @@
35 # Targets
37 -LIBGSM = $(LIB)/libgsm.a
38 +LIBGSMSO = $(LIB)/libgsm.so
40 TOAST = $(BIN)/toast
41 UNTOAST = $(BIN)/untoast
42 @@ -257,7 +257,7 @@
43 # Install targets
45 GSM_INSTALL_TARGETS = \
46 - $(GSM_INSTALL_LIB)/libgsm.a \
47 + $(GSM_INSTALL_LIB)/libgsm.so \
48 $(GSM_INSTALL_INC)/gsm.h \
49 $(GSM_INSTALL_MAN)/gsm.3 \
50 $(GSM_INSTALL_MAN)/gsm_explode.3 \
51 @@ -279,7 +279,7 @@
53 # Target rules
55 -all: $(LIBGSM) $(TOAST) $(TCAT) $(UNTOAST)
56 +all: $(LIBGSMSO) $(TOAST) $(TCAT) $(UNTOAST)
57 @-echo $(ROOT): Done.
59 tst: $(TST)/lin2cod $(TST)/cod2lin $(TOAST) $(TST)/test-result
60 @@ -299,24 +299,23 @@
62 # The basic API: libgsm
64 -$(LIBGSM): $(LIB) $(GSM_OBJECTS)
65 - -rm $(RMFLAGS) $(LIBGSM)
66 - $(AR) $(ARFLAGS) $(LIBGSM) $(GSM_OBJECTS)
67 - $(RANLIB) $(LIBGSM)
69 +$(LIBGSMSO): $(LIB) $(GSM_OBJECTS)
70 + $(LD) -shared -Wl,-soname,libgsm.so.1 -o $@.1.0.13 $(GSM_OBJECTS)
71 + $(LN) libgsm.so.1.0.13 $(LIBGSMSO).1
72 + $(LN) libgsm.so.1.0.13 $(LIBGSMSO)
74 # Toast, Untoast and Tcat -- the compress-like frontends to gsm.
76 -$(TOAST): $(BIN) $(TOAST_OBJECTS) $(LIBGSM)
77 - $(LD) $(LFLAGS) -o $(TOAST) $(TOAST_OBJECTS) $(LIBGSM) $(LDLIB)
78 +$(TOAST): $(BIN) $(TOAST_OBJECTS) $(LIBGSMSO)
79 + $(LD) $(LFLAGS) -o $(TOAST) $(TOAST_OBJECTS) $(LIBGSMSO) $(LDLIB)
81 $(UNTOAST): $(BIN) $(TOAST)
82 -rm $(RMFLAGS) $(UNTOAST)
83 - $(LN) $(TOAST) $(UNTOAST)
84 + $(LN) toast $(UNTOAST)
86 $(TCAT): $(BIN) $(TOAST)
87 -rm $(RMFLAGS) $(TCAT)
88 - $(LN) $(TOAST) $(TCAT)
89 + $(LN) toast $(TCAT)
92 # The local bin and lib directories
93 @@ -351,53 +350,54 @@
96 $(TOAST_INSTALL_BIN)/toast: $(TOAST)
97 - -rm $@
98 + -rm $(RMFLAGS) $@
99 cp $(TOAST) $@
100 chmod 755 $@
102 $(TOAST_INSTALL_BIN)/untoast: $(TOAST_INSTALL_BIN)/toast
103 - -rm $@
104 - ln $? $@
105 + -rm $(RMFLAGS) $@
106 + $(LN) toast $@
108 $(TOAST_INSTALL_BIN)/tcat: $(TOAST_INSTALL_BIN)/toast
109 - -rm $@
110 - ln $? $@
111 + -rm $(RMFLAGS) $@
112 + $(LN) toast $@
114 $(TOAST_INSTALL_MAN)/toast.1: $(MAN)/toast.1
115 - -rm $@
116 + -rm $(RMFLAGS) $@
117 cp $? $@
118 chmod 444 $@
120 $(GSM_INSTALL_MAN)/gsm.3: $(MAN)/gsm.3
121 - -rm $@
122 + -rm $(RMFLAGS) $@
123 cp $? $@
124 chmod 444 $@
126 $(GSM_INSTALL_MAN)/gsm_option.3: $(MAN)/gsm_option.3
127 - -rm $@
128 + -rm $(RMFLAGS) $@
129 cp $? $@
130 chmod 444 $@
132 $(GSM_INSTALL_MAN)/gsm_explode.3: $(MAN)/gsm_explode.3
133 - -rm $@
134 + -rm $(RMFLAGS) $@
135 cp $? $@
136 chmod 444 $@
138 $(GSM_INSTALL_MAN)/gsm_print.3: $(MAN)/gsm_print.3
139 - -rm $@
140 + -rm $(RMFLAGS) $@
141 cp $? $@
142 chmod 444 $@
144 $(GSM_INSTALL_INC)/gsm.h: $(INC)/gsm.h
145 - -rm $@
146 - cp $? $@
147 - chmod 444 $@
149 -$(GSM_INSTALL_LIB)/libgsm.a: $(LIBGSM)
150 - -rm $@
151 + -rm $(RMFLAGS) $@
152 cp $? $@
153 chmod 444 $@
155 +$(GSM_INSTALL_LIB)/libgsm.so: $(LIBGSMSO)
156 + -rm $(RMFLAGS) $@ $@.1 $@.1.0.13
157 + cp $?.1.0.13 $@.1.0.13
158 + chmod 755 $@.1.0.13
159 + $(LN) libgsm.so.1.0.13 $@
160 + $(LN) libgsm.so.1.0.13 $@.1
162 # Distribution
164 @@ -425,7 +425,7 @@
165 -print | xargs rm $(RMFLAGS)
167 clean: semi-clean
168 - -rm $(RMFLAGS) $(LIBGSM) $(ADDTST)/add \
169 + -rm $(RMFLAGS) $(LIBGSMSO)* $(ADDTST)/add \
170 $(TOAST) $(TCAT) $(UNTOAST) \
171 $(ROOT)/gsm-1.0.tar.Z
173 @@ -473,22 +473,22 @@
174 $(TST)/test-result: $(TST)/lin2cod $(TST)/cod2lin $(TOAST) $(TST)/run
175 ( cd $(TST); ./run )
177 -$(TST)/lin2txt: $(TST)/lin2txt.o $(LIBGSM)
178 +$(TST)/lin2txt: $(TST)/lin2txt.o $(LIBGSMSO)
179 $(LD) $(LFLAGS) -o $(TST)/lin2txt \
180 - $(TST)/lin2txt.o $(LIBGSM) $(LDLIB)
181 + $(TST)/lin2txt.o $(LIBGSMSO) $(LDLIB)
183 -$(TST)/lin2cod: $(TST)/lin2cod.o $(LIBGSM)
184 +$(TST)/lin2cod: $(TST)/lin2cod.o $(LIBGSMSO)
185 $(LD) $(LFLAGS) -o $(TST)/lin2cod \
186 - $(TST)/lin2cod.o $(LIBGSM) $(LDLIB)
187 + $(TST)/lin2cod.o $(LIBGSMSO) $(LDLIB)
189 -$(TST)/gsm2cod: $(TST)/gsm2cod.o $(LIBGSM)
190 +$(TST)/gsm2cod: $(TST)/gsm2cod.o $(LIBGSMSO)
191 $(LD) $(LFLAGS) -o $(TST)/gsm2cod \
192 - $(TST)/gsm2cod.o $(LIBGSM) $(LDLIB)
193 + $(TST)/gsm2cod.o $(LIBGSMSO) $(LDLIB)
195 -$(TST)/cod2txt: $(TST)/cod2txt.o $(LIBGSM)
196 +$(TST)/cod2txt: $(TST)/cod2txt.o $(LIBGSMSO)
197 $(LD) $(LFLAGS) -o $(TST)/cod2txt \
198 - $(TST)/cod2txt.o $(LIBGSM) $(LDLIB)
199 + $(TST)/cod2txt.o $(LIBGSMSO) $(LDLIB)
201 -$(TST)/cod2lin: $(TST)/cod2lin.o $(LIBGSM)
202 +$(TST)/cod2lin: $(TST)/cod2lin.o $(LIBGSMSO)
203 $(LD) $(LFLAGS) -o $(TST)/cod2lin \
204 - $(TST)/cod2lin.o $(LIBGSM) $(LDLIB)
205 + $(TST)/cod2lin.o $(LIBGSMSO) $(LDLIB)