]> git.pld-linux.org Git - packages/crossmingw32-gcc.git/blob - crossmingw32-gcc.spec
- updated mingw: w32api 3.10, runtime 3.13
[packages/crossmingw32-gcc.git] / crossmingw32-gcc.spec
1 #
2 # Conditional build:
3 %bcond_with     bootstrap       # bootstrap build (using binary w32api/mingw)
4 #
5 Summary:        Cross Mingw32 GNU binary utility development utilities - gcc
6 Summary(es.UTF-8):      Utilitarios para desarrollo de binarios de la GNU - Mingw32 gcc
7 Summary(fr.UTF-8):      Utilitaires de développement binaire de GNU - Mingw32 gcc
8 Summary(pl.UTF-8):      Skrośne narzędzia programistyczne GNU dla Mingw32 - gcc
9 Summary(pt_BR.UTF-8):   Utilitários para desenvolvimento de binários da GNU - Mingw32 gcc
10 Summary(tr.UTF-8):      GNU geliştirme araçları - Mingw32 gcc
11 Name:           crossmingw32-gcc
12 Version:        4.1.2
13 Release:        2
14 Epoch:          1
15 License:        GPL v2+
16 Group:          Development/Languages
17 Source0:        ftp://gcc.gnu.org/pub/gcc/releases/gcc-%{version}/gcc-%{version}.tar.bz2
18 # Source0-md5:  a4a3eb15c96030906d8494959eeda23c
19 %define         apiver  3.10
20 Source1:        http://dl.sourceforge.net/mingw/w32api-%{apiver}.tar.gz
21 # Source1-md5:  7067a6b3ac9d94bb753f9f6f37e2033c
22 %define         runver  3.13
23 Source2:        http://dl.sourceforge.net/mingw/mingw-runtime-%{runver}.tar.gz
24 # Source2-md5:  22179021f41d5eee76447b78fb94a3fb
25 Patch0:         gcc-4.1-nodebug.patch
26 Patch1:         %{name}-noioctl.patch
27 Patch2:         gcc-4.1-texinfo.patch
28 Patch3:         gcc-4.1-pr29826.patch
29 BuildRequires:  autoconf
30 BuildRequires:  automake
31 BuildRequires:  bison
32 BuildRequires:  crossmingw32-binutils >= 2.15.91.0.2-2
33 BuildRequires:  flex
34 %if %{without bootstrap}
35 BuildRequires:  crossmingw32-runtime >= 3.5
36 BuildRequires:  crossmingw32-w32api >= 3.1
37 %endif
38 BuildRequires:  mpfr-devel
39 BuildRequires:  texinfo >= 4.2
40 Requires:       crossmingw32-binutils >= 2.15.91.0.2-2
41 Requires:       gcc-dirs
42 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
43
44 %define         target          i386-mingw32
45 %define         target_platform i386-pc-mingw32
46 %define         arch            %{_prefix}/%{target}
47 %define         gccarch         %{_libdir}/gcc/%{target}
48 %define         gcclib          %{gccarch}/%{version}
49
50 %define         _noautostrip    .*/lib.*\\.a
51
52 %description
53 crossmingw32 is a complete cross-compiling development system for
54 building stand-alone Microsoft Windows applications under Linux using
55 the Mingw32 build libraries. This includes a binutils, gcc with g++
56 and objc, and libstdc++, all cross targeted to i386-mingw32, along
57 with supporting Win32 libraries in 'coff' format from free sources.
58
59 This package contains cross targeted gcc.
60
61 %description -l de.UTF-8
62 Dieses Paket enthält einen Cross-gcc, der es erlaubt, auf einem
63 anderem Rechner Code für Win32 zu generieren.
64
65 %description -l pl.UTF-8
66 crossmingw32 jest kompletnym systemem do kompilacji skrośnej,
67 pozwalającym budować aplikacje MS Windows pod Linuksem używając
68 bibliotek Mingw32. System składa się z binutils, gcc z g++ i objc,
69 libstdc++ - wszystkie generujące kod dla platformy i386-mingw32, oraz
70 z bibliotek w formacie COFF.
71
72 Ten pakiet zawiera gcc generujące skrośnie kod dla Win32.
73
74 %package c++
75 Summary:        Mingw32 binary utility development utilities - g++
76 Summary(pl.UTF-8):      Zestaw narzędzi mingw32 - g++
77 Group:          Development/Languages
78 Requires:       %{name} = %{epoch}:%{version}-%{release}
79
80 %description c++
81 crossmingw32 is a complete cross-compiling development system for
82 building stand-alone Microsoft Windows applications under Linux using
83 the Mingw32 build libraries. This includes a binutils, gcc with g++
84 and objc, and libstdc++, all cross targeted to i386-mingw32, along
85 with supporting Win32 libraries in 'coff' format from free sources.
86
87 This package contains cross targeted g++ and (static) libstdc++.
88
89 %description c++ -l pl.UTF-8
90 crossmingw32 jest kompletnym systemem do kompilacji skrośnej,
91 pozwalającym budować aplikacje MS Windows pod Linuksem używając
92 bibliotek mingw32. System składa się z binutils, gcc z g++ i objc,
93 libstdc++ - wszystkie generujące kod dla platformy i386-mingw32, oraz
94 z bibliotek w formacie COFF.
95
96 Ten pakiet zawiera g++ generujące kod pod Win32 oraz bibliotekę
97 libstdc++.
98
99 # does this even work?
100 %package objc
101 Summary:        Mingw32 binary utility development utilities - objc
102 Summary(pl.UTF-8):      Zestaw narzędzi mingw32 - objc
103 Group:          Development/Languages
104 Requires:       %{name} = %{epoch}:%{version}-%{release}
105
106 %description objc
107 crossmingw32 is a complete cross-compiling development system for
108 building stand-alone Microsoft Windows applications under Linux using
109 the Mingw32 build libraries. This includes a binutils, gcc with g++
110 and objc, and libstdc++, all cross targeted to i386-mingw32, along
111 with supporting Win32 libraries in 'coff' format from free sources.
112
113 This package contains cross targeted objc compiler.
114
115 %description objc -l pl.UTF-8
116 crossmingw32 jest kompletnym systemem do kompilacji skrośnej,
117 pozwalającym budować aplikacje MS Windows pod Linuksem używając
118 bibliotek mingw32. System składa się z binutils, gcc z g++ i objc,
119 libstdc++ - wszystkie generujące kod dla platformy i386-mingw32, oraz
120 z bibliotek w formacie COFF.
121
122 Ten pakiet zawiera kompilator objc generujący kod pod Win32.
123
124 # does this even work?
125 %package fortran
126 Summary:        Mingw32 binary utility development utilities - Fortran
127 Summary(pl.UTF-8):      Zestaw narzędzi mingw32 - Fortran
128 Group:          Development/Languages
129 Requires:       %{name} = %{epoch}:%{version}-%{release}
130 Obsoletes:      crossmingw32-gcc-g77
131
132 %description fortran
133 crossmingw32 is a complete cross-compiling development system for
134 building stand-alone Microsoft Windows applications under Linux using
135 the Mingw32 build libraries. This includes a binutils, gcc with g++
136 and objc, and libstdc++, all cross targeted to i386-mingw32, along
137 with supporting Win32 libraries in 'coff' format from free sources.
138
139 This package contains cross targeted Fortran compiler.
140
141 %description fortran -l pl.UTF-8
142 crossmingw32 jest kompletnym systemem do kompilacji skrośnej,
143 pozwalającym budować aplikacje MS Windows pod Linuksem używając
144 bibliotek mingw32. System składa się z binutils, gcc z g++ i objc,
145 libstdc++ - wszystkie generujące kod dla platformy i386-mingw32, oraz
146 z bibliotek w formacie COFF.
147
148 Ten pakiet zawiera kompilator Fortranu generujący kod pod Win32.
149
150 # does this even work?
151 %package java
152 Summary:        Mingw32 binary utility development utilities - Java
153 Summary(pl.UTF-8):      Zestaw narzędzi mingw32 - Java
154 Group:          Development/Languages
155 Requires:       %{name} = %{epoch}:%{version}-%{release}
156
157 %description java
158 crossmingw32 is a complete cross-compiling development system for
159 building stand-alone Microsoft Windows applications under Linux using
160 the Mingw32 build libraries. This includes a binutils, gcc with g++
161 and objc, and libstdc++, all cross targeted to i386-mingw32, along
162 with supporting Win32 libraries in 'coff' format from free sources.
163
164 This package contains cross targeted Java compiler.
165
166 %description java -l pl.UTF-8
167
168 crossmingw32 jest kompletnym systemem do kompilacji skrośnej,
169 pozwalającym budować aplikacje MS Windows pod Linuksem używając
170 bibliotek mingw32. System składa się z binutils, gcc z g++ i objc,
171 libstdc++ - wszystkie generujące kod dla platformy i386-mingw32, oraz
172 z bibliotek w formacie COFF.
173
174 Ten pakiet zawiera kompilator Javy generujący kod pod Win32.
175
176 %prep
177 %setup -q -n gcc-%{version}
178 %if %{with bootstrap}
179 mkdir winsup
180 tar xzf %{SOURCE1} -C winsup
181 tar xzf %{SOURCE2} -C winsup
182 %endif
183 %{!?debug:%patch0 -p1}
184 %patch1 -p1
185 %patch2 -p1
186 cd gcc
187 %patch3 -p0
188
189 %build
190 %if %{with bootstrap}
191 for tool in as ar dlltool ld nm ranlib strip ; do
192         ln -sf %{arch}/bin/$tool winsup/bin/$tool
193 done
194 build_tooldir=`pwd`/winsup
195 %else
196 build_tooldir=%{arch}
197 %endif
198
199 cp /usr/share/automake/config.sub .
200 cp /usr/share/automake/config.sub boehm-gc
201 # avoid autoconf call, breaks build
202
203 rm -rf obj-%{target_platform}
204 install -d obj-%{target_platform}
205 cd obj-%{target_platform}
206
207 # note: alpha's -mieee and sparc's -mtune=* are not valid for target's g++
208 CFLAGS="%{rpmcflags}" \
209 %ifarch alpha
210 CXXFLAGS="`echo '%{rpmcflags}' | sed -e 's/ \?-mieee\>//'`" \
211 %else
212 %ifarch sparc sparc64 sparcv9
213 CXXFLAGS="`echo '%{rpmcflags}' | sed -e 's/ \?-mtune[=0-9a-z]*//'`" \
214 %else
215 CXXFLAGS="%{rpmcflags}" \
216 %endif
217 %endif
218 LDFLAGS="%{rpmldflags}" \
219 TEXCONFIG=false \
220 ../configure \
221         --prefix=%{_prefix} \
222         --infodir=%{_infodir} \
223         --mandir=%{_mandir} \
224         --bindir=%{arch}/bin \
225         --libdir=%{_libdir} \
226         --libexecdir=%{_libexecdir} \
227         --includedir=%{arch}/include \
228         --disable-shared \
229         --enable-threads \
230         --enable-languages="c,c++,fortran,java,objc" \
231         --enable-c99 \
232         --enable-long-long \
233         --disable-nls \
234         --with-gnu-as \
235         --with-gnu-ld \
236         --with-mangler-in-ld \
237         --with-gxx-include-dir=%{arch}/include/g++ \
238         --build=%{_target_platform} \
239         --host=%{_target_platform} \
240         --target=%{target}
241
242 %{__make} all
243
244 # spec files for msvcrt*.dll configurations
245 cd gcc
246 for n in msvcrt msvcrt20 msvcrt40; do
247         sed "s/crtdll/$n/g" <specs | sed "s/crt1/crt2/g" >specs.$n
248 done
249
250 %install
251 rm -rf $RPM_BUILD_ROOT
252 install -d $RPM_BUILD_ROOT{%{_bindir},%{_datadir}}
253
254 cd obj-%{target_platform}
255
256 %{__make} install \
257         DESTDIR=$RPM_BUILD_ROOT
258
259 cd gcc
260 install specs.msvcrt specs.msvcrt20 specs.msvcrt40 $RPM_BUILD_ROOT%{gcclib}
261 cd ../..
262
263 mv -f $RPM_BUILD_ROOT%{arch}/bin/%{target}-* $RPM_BUILD_ROOT%{_bindir}
264
265 # already in arch/lib, shouldn't be here
266 rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
267
268 # include/ contains install-tools/include/* and headers that were fixed up
269 # by fixincludes, we don't want former
270 gccdir=$RPM_BUILD_ROOT%{gcclib}
271 mkdir   $gccdir/tmp
272 # we have to save these however
273 mv -f   $gccdir/include/syslimits.h $gccdir/tmp
274 rm -rf  $gccdir/include
275 mv -f   $gccdir/tmp $gccdir/include
276 cp -f   $gccdir/install-tools/include/*.h $gccdir/include
277 # but we don't want anything more from install-tools
278 rm -rf  $gccdir/install-tools
279
280 %if 0%{!?debug:1}
281 %{target}-strip -g -R.note -R.comment $RPM_BUILD_ROOT%{gcclib}/libgcc.a
282 %{target}-strip -g -R.note -R.comment $RPM_BUILD_ROOT%{gcclib}/libgcov.a
283 %{target}-strip -g -R.note -R.comment $RPM_BUILD_ROOT%{arch}/lib/lib*.a
284 %endif
285
286 # restore hardlinks
287 ln -f $RPM_BUILD_ROOT%{_bindir}/%{target}-{g++,c++}
288 ln -f $RPM_BUILD_ROOT%{arch}/bin/{g++,c++}
289
290 # the same... make hardlink
291 ln -f $RPM_BUILD_ROOT%{arch}/bin/gcc $RPM_BUILD_ROOT%{_bindir}/%{target}-gcc
292
293 %clean
294 rm -rf $RPM_BUILD_ROOT
295
296 %files
297 %defattr(644,root,root,755)
298 %attr(755,root,root) %{_bindir}/%{target}-gcc*
299 %attr(755,root,root) %{_bindir}/%{target}-cpp
300 %attr(755,root,root) %{_bindir}/%{target}-gcov
301 %attr(755,root,root) %{arch}/bin/gcc
302 %{arch}/lib/libiberty.a
303
304 %dir %{gccarch}
305 %dir %{gcclib}
306 %attr(755,root,root) %{gcclib}/cc1
307 %attr(755,root,root) %{gcclib}/collect2
308 %{gcclib}/libgcc.a
309 %{gcclib}/libgcov.a
310 %{gcclib}/specs*
311 %{gcclib}/include
312
313 %{_mandir}/man1/%{target}-cpp.1*
314 %{_mandir}/man1/%{target}-gcc.1*
315 %{_mandir}/man1/%{target}-gcov.1*
316
317 %{arch}/lib/libssp.a
318 %{arch}/lib/libssp.la
319 %{arch}/lib/libssp_nonshared.a
320 %{arch}/lib/libssp_nonshared.la
321
322 %files c++
323 %defattr(644,root,root,755)
324 %attr(755,root,root) %{_bindir}/%{target}-[cg]++
325 %attr(755,root,root) %{arch}/bin/[cg]++
326 %attr(755,root,root) %{gcclib}/cc1plus
327 %{arch}/lib/libstdc++.a
328 %{arch}/lib/libstdc++.la
329 %{arch}/lib/libsupc++.a
330 %{arch}/lib/libsupc++.la
331 %{arch}/include/g++
332 %{_mandir}/man1/%{target}-g++.1*
333
334 %files objc
335 %defattr(644,root,root,755)
336 %attr(755,root,root) %{gcclib}/cc1obj
337 %{arch}/lib/libobjc.a
338 %{arch}/lib/libobjc.la
339
340 %files fortran
341 %defattr(644,root,root,755)
342 %attr(755,root,root) %{_bindir}/%{target}-gfortran
343 %attr(755,root,root) %{arch}/bin/gfortran
344 %attr(755,root,root) %{gcclib}/f951
345 %{arch}/lib/libgfortran.a
346 %{arch}/lib/libgfortran.la
347 %{arch}/lib/libgfortranbegin.a
348 %{arch}/lib/libgfortranbegin.la
349 %{_mandir}/man1/%{target}-gfortran.1*
350
351 %files java
352 %defattr(644,root,root,755)
353 %attr(755,root,root) %{_bindir}/%{target}-gcj
354 %attr(755,root,root) %{_bindir}/%{target}-gcjh
355 %attr(755,root,root) %{_bindir}/%{target}-gjnih
356 %attr(755,root,root) %{_bindir}/%{target}-grepjar
357 %attr(755,root,root) %{_bindir}/%{target}-fastjar
358 %attr(755,root,root) %{_bindir}/%{target}-jcf-dump
359 %attr(755,root,root) %{_bindir}/%{target}-jv-scan
360 #%attr(755,root,root) %{arch}/bin/grepjar
361 #%attr(755,root,root) %{arch}/bin/jar
362 %attr(755,root,root) %{gcclib}/jc1
363 %attr(755,root,root) %{gcclib}/jvgenmain
364 %{_mandir}/man1/%{target}-gcj.1*
365 %{_mandir}/man1/%{target}-gcjh.1*
366 %{_mandir}/man1/%{target}-gjnih.1*
367 %{_mandir}/man1/%{target}-grepjar.1*
368 %{_mandir}/man1/%{target}-fastjar.1*
369 %{_mandir}/man1/%{target}-jcf-dump.1*
370 %{_mandir}/man1/%{target}-jv-scan.1*
This page took 0.058843 seconds and 4 git commands to generate.