]> git.pld-linux.org Git - packages/crossmingw32-gcc.git/blob - crossmingw32-gcc.spec
- adapterized and made spec %%debug ready or added using %%rpm*flags macros
[packages/crossmingw32-gcc.git] / crossmingw32-gcc.spec
1 Summary:        Mingw32 GNU Binary Utility Development Utilities - gcc
2 Name:           crossmingw32-gcc
3 Version:        2.95.3
4 Release:        6
5 Epoch:          1
6 License:        GPL
7 Group:          Development/Languages
8 Group(de):      Entwicklung/Sprachen
9 Group(pl):      Programowanie/Jêzyki
10 ExclusiveArch:  %{ix86}
11 Source0:        ftp://ftp.gnu.org/pub/gnu/gcc-%{version}.tar.gz
12 Patch0:         gcc-info.patch
13 Patch1:         gcc-pld-linux.patch
14 Patch2:         gcc-libstdc++.patch
15 Patch3:         gcc-bootstrap.patch
16 Patch4:         gcc-cpp-macro-doc.patch
17 Patch5:         gcc-default-arch.patch
18 Patch6:         gcc-libstdc++-out-of-mem.patch
19 Patch7:         gcc-libstdc++-wstring.patch
20 Patch8:         gcc-libstdc++-bastring.patch
21 Patch9:         gcc-manpage.patch
22 Patch10:        gcc-cpp-dos-newlines.patch
23 Patch11:        gcc-gpc.patch
24 Patch12:        gcc-m68k-pic.patch
25 Patch13:        gcc-sparc32-rfi.patch
26 Patch14:        gcc-builtin-apply.patch
27 Patch15:        gcc-ppc-ice.patch
28 Patch16:        gcc-ppc-descriptions.patch
29 Patch17:        gcc-alpha-complex-float.patch
30 Patch18:        gcc-gcj-vs-iconv.patch
31 Patch19:        gcc-libobjc.patch
32 Patch20:        gcc-pointer-arith.patch
33 Patch21:        gcc-crtendS.patch
34 Patch22:        %{name}-libio.patch
35 Patch23:        %{name}-includes.patch
36 Patch24:        %{name}-libiberty.patch
37 BuildRequires:  crossmingw32-platform
38 BuildRequires:  crossmingw32-binutils
39 BuildRequires:  flex
40 BuildRequires:  bison
41 BuildRequires:  autoconf
42 Requires:       crossmingw32-binutils
43 Requires:       crossmingw32-platform
44 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
45
46 %define         target          i386-mingw32
47 %define         target_platform i386-pc-mingw32
48 %define         _prefix         /usr
49 %define         arch            %{_prefix}/%{target}
50 %define         gccarch         %{_prefix}/lib/gcc-lib/%{target}
51 %define         gcclib          %{_prefix}/lib/gcc-lib/%{target}/%{version}
52
53 %description
54 crossmingw32 is a complete cross-compiling development system for
55 building stand-alone Microsoft Windows applications under Linux using
56 the Mingw32 build libraries. This includes a binutils, gcc with g++
57 and objc, and libstdc++, all cross targeted to i386-mingw32, along
58 with supporting Win32 libraries in 'coff' format from free sources.
59
60 This package contains cross targeted gcc.
61
62 %package c++
63 Summary:        Mingw32 GNU Binary Utility Development Utilities - g++
64 Group:          Development/Languages
65 Group(de):      Entwicklung/Sprachen
66 Group(pl):      Programowanie/Jêzyki
67 Requires:       %{name} = %{version}
68
69 %description c++
70 crossmingw32 is a complete cross-compiling development system for
71 building stand-alone Microsoft Windows applications under Linux using
72 the Mingw32 build libraries. This includes a binutils, gcc with g++
73 and objc, and libstdc++, all cross targeted to i386-mingw32, along
74 with supporting Win32 libraries in 'coff' format from free sources.
75
76 This package contains cross targeted g++ and (static) libstdc++.
77
78 # does this even work?
79 %package objc
80 Summary:        Mingw32 GNU Binary Utility Development Utilities - objc
81 Group:          Development/Languages
82 Group(de):      Entwicklung/Sprachen
83 Group(pl):      Programowanie/Jêzyki
84 Requires:       %{name} = %{version}
85
86 %description objc
87 crossmingw32 is a complete cross-compiling development system for
88 building stand-alone Microsoft Windows applications under Linux using
89 the Mingw32 build libraries. This includes a binutils, gcc with g++
90 and objc, and libstdc++, all cross targeted to i386-mingw32, along
91 with supporting Win32 libraries in 'coff' format from free sources.
92
93 This package contains cross targeted objc.
94
95 # does this even work?
96 %package g77
97 Summary:        Mingw32 GNU Binary Utility Development Utilities - g77
98 Group:          Development/Languages
99 Group(de):      Entwicklung/Sprachen
100 Group(pl):      Programowanie/Jêzyki
101 Requires:       %{name} = %{version}
102
103 %description g77
104 crossmingw32 is a complete cross-compiling development system for
105 building stand-alone Microsoft Windows applications under Linux using
106 the Mingw32 build libraries. This includes a binutils, gcc with g++
107 and objc, and libstdc++, all cross targeted to i386-mingw32, along
108 with supporting Win32 libraries in 'coff' format from free sources.
109
110 This package contains cross targeted g77.
111
112 # does this even work?
113 %package chill
114 Summary:        Mingw32 GNU Binary Utility Development Utilities - chill
115 Group:          Development/Languages
116 Group(de):      Entwicklung/Sprachen
117 Group(pl):      Programowanie/Jêzyki
118 Requires:       %{name} = %{version}
119
120 %description chill
121 crossmingw32 is a complete cross-compiling development system for
122 building stand-alone Microsoft Windows applications under Linux using
123 the Mingw32 build libraries. This includes a binutils, gcc with g++
124 and objc, and libstdc++, all cross targeted to i386-mingw32, along
125 with supporting Win32 libraries in 'coff' format from free sources.
126
127 This package contains cross targeted chill.
128
129 # does this even work?
130 %package java
131 Summary:        Mingw32 GNU Binary Utility Development Utilities - java
132 Group:          Development/Languages
133 Group(de):      Entwicklung/Sprachen
134 Group(pl):      Programowanie/Jêzyki
135 Requires:       %{name} = %{version}
136
137 %description java
138 crossmingw32 is a complete cross-compiling development system for
139 building stand-alone Microsoft Windows applications under Linux using
140 the Mingw32 build libraries. This includes a binutils, gcc with g++
141 and objc, and libstdc++, all cross targeted to i386-mingw32, along
142 with supporting Win32 libraries in 'coff' format from free sources.
143
144 This package contains cross targeted java.
145
146 %prep
147 %setup -q -n gcc-%{version}
148 %patch0 -p1
149 %patch1 -p1
150 %patch2 -p1
151 %patch3 -p1
152 %patch4 -p0
153 %patch5 -p0
154 %patch6 -p0
155 %patch7 -p0
156 %patch8 -p0
157 %patch9 -p0
158 %patch10 -p0
159 %patch11 -p1
160 %ifarch m68k
161 %patch12 -p0
162 %endif
163 %ifarch sparc sparc32
164 %patch13 -p0
165 %patch14 -p0
166 %endif
167 %ifarch ppc
168 %patch15 -p0
169 %patch16 -p0
170 %endif
171 %ifarch alpha
172 %patch17 -p1
173 %endif
174 %patch18 -p0
175 %patch19 -p0
176 %patch20 -p0
177 %patch21 -p1
178
179 %patch22 -p1
180 %patch23 -p1
181 %patch24 -p1
182
183 %build
184 (cd libiberty ; autoconf)
185 (cd gcc
186 autoconf
187 cd ..
188 rm -rf obj-%{target_platform}
189 install -d obj-%{target_platform}
190 cd obj-%{target_platform}
191
192 CFLAGS="%{rpmcflags}" CXXFLAGS="%{rpmcflags}" LDFLAGS="%{rpmldflags}" \
193 ../configure \
194         --prefix=%{_prefix} \
195         --infodir=%{_infodir} \
196         --mandir=%{_mandir} \
197         --bindir=%{arch}/bin \
198         --with-gnu-as \
199         --with-gnu-ld \
200         --with-gxx-include-dir=%{arch}/include/g++ \
201         --target=%{target}
202
203 # to nie dzia³a bo kto¶ ukrad³ gthr-win32.h i nie wiem co tam wpisaæ
204 #       --enable-threads \
205
206 touch ../gcc/c-gperf.h
207
208 %{__make} \
209         LDFLAGS_FOR_TARGET="%{rpmldflags}" \
210         TARGET_LIBGCC2_CFLAGS="-UCROSS_COMPILE"
211
212 # build libobjc.dll for Objective C
213 # to trzeba wywo³ywaæ z katalogu obj-%{target_platform}/%{target}/libobjc
214 # ale trzeba podaæ jeszcze GCC_FOR_TARGET - a mi siê nie chce.
215 # BTW, ten dll jest do czego¶ potrzebny???
216 #
217 #make \
218 #       LDFLAGS="%{rpmldflags}" \
219 #       TARGET_LIBGCC2_CFLAGS="-UCROSS_COMPILE" \
220 #       DLLTOOL="%{target}-dlltool --as=%{target}-as" libobjc.dll
221
222 # spec files for msvcrt*.dll configurations
223 cd gcc
224 for n in msvcrt msvcrt20 msvcrt40; do
225         sed "s/crtdll/$n/g" <specs | sed "s/crt1/crt2/g" >specs.$n
226 done
227 )
228
229 %install
230 rm -rf $RPM_BUILD_ROOT
231
232 install -d $RPM_BUILD_ROOT%{_bindir}
233 install -d $RPM_BUILD_ROOT%{_datadir}
234 (cd obj-%{target_platform}
235
236 %{__make} install \
237         prefix=$RPM_BUILD_ROOT%{_prefix} \
238         bindir=$RPM_BUILD_ROOT%{arch}/bin \
239         mandir=$RPM_BUILD_ROOT%{_mandir} \
240         infodir=$RPM_BUILD_ROOT%{_infodir} \
241         gxx_include_dir=$RPM_BUILD_ROOT%{arch}/include/g++
242
243 cd gcc
244 install specs.msvcrt specs.msvcrt20 specs.msvcrt40 $RPM_BUILD_ROOT%{gcclib}
245 )
246
247 mv -f $RPM_BUILD_ROOT%{arch}/bin/%{target}-* $RPM_BUILD_ROOT%{_bindir}
248
249 # c++filt is provided by binutils
250 rm -f $RPM_BUILD_ROOT%{_bindir}/i386-mingw32-c++filt
251
252 # what is this there for???
253 rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
254
255 # the same... make hardlink
256 ln -f $RPM_BUILD_ROOT%{arch}/bin/gcc $RPM_BUILD_ROOT%{_bindir}/%{target}-gcc
257
258 %clean
259 rm -rf $RPM_BUILD_ROOT
260
261 %files
262 %defattr(644,root,root,755)
263 %attr(755,root,root) %{_bindir}/%{target}-gcc
264 %attr(755,root,root) %{_bindir}/%{target}-*protoize
265 %dir %{arch}/bin
266 %attr(755,root,root) %{arch}/bin/cpp
267 %attr(755,root,root) %{arch}/bin/gcc
268 %attr(755,root,root) %{arch}/bin/gcov
269 %{arch}/include/_G_config.h
270 %{arch}/lib/libiberty.a
271 %dir %{gccarch}
272 %dir %{gcclib}
273 %attr(755,root,root) %{gcclib}/cc1
274 %attr(755,root,root) %{gcclib}/cpp0
275 %{gcclib}/SYSCALLS.c.X
276 %{gcclib}/libgcc.a
277 %{gcclib}/specs*
278 %dir %{gcclib}/include
279 %{gcclib}/include/float.h
280 %{gcclib}/include/iso646.h
281 %{gcclib}/include/limits.h
282 %{gcclib}/include/proto.h
283 %{gcclib}/include/stdarg.h
284 %{gcclib}/include/stdbool.h
285 %{gcclib}/include/stddef.h
286 %{gcclib}/include/syslimits.h
287 %{gcclib}/include/varargs.h
288 %{gcclib}/include/va-*.h
289 %{_mandir}/man1/%{target}-gcc.1*
290
291 %files c++
292 %defattr(644,root,root,755)
293 %attr(755,root,root) %{_bindir}/%{target}-[cg]++
294 %{arch}/include/g++
295 %{arch}/lib/libstdc++.a
296 %attr(755,root,root) %{gcclib}/cc1plus
297 %{gcclib}/libstdc++*
298 %{gcclib}/include/new.h
299 %{gcclib}/include/exception
300 %{gcclib}/include/new
301 %{gcclib}/include/typeinfo
302 %{_mandir}/man1/%{target}-g++.1*
303
304 %files objc
305 %defattr(644,root,root,755)
306 %attr(755,root,root) %{gcclib}/cc1obj
307 %{gcclib}/libobjc.a
308 %{gcclib}/include/objc
309
310 %files g77
311 %defattr(644,root,root,755)
312 %attr(755,root,root) %{_bindir}/%{target}-g77
313 %attr(755,root,root) %{gcclib}/f771
314 %{_mandir}/man1/%{target}-g77.1*
315
316 %files chill
317 %defattr(644,root,root,755)
318 %attr(755,root,root) %{_bindir}/%{target}-chill
319 %attr(755,root,root) %{gcclib}/cc1chill
320 %{gcclib}/chillrt0.o
321 %{gcclib}/libchill.a
322
323 %files java
324 %defattr(644,root,root,755)
325 %attr(755,root,root) %{_bindir}/%{target}-gcj
326 %attr(755,root,root) %{arch}/bin/gcjh
327 %attr(755,root,root) %{arch}/bin/jcf-dump
328 %attr(755,root,root) %{arch}/bin/jv-scan
329 %attr(755,root,root) %{gcclib}/jc1
330 %attr(755,root,root) %{gcclib}/jvgenmain
This page took 0.121772 seconds and 4 git commands to generate.