]> git.pld-linux.org Git - packages/crossmingw32-gcc.git/blob - crossmingw32-gcc.spec
- restored fortran
[packages/crossmingw32-gcc.git] / crossmingw32-gcc.spec
1 #
2 # TODO:
3 # - openmp
4 #
5 # Conditional build:
6 %bcond_with     bootstrap       # bootstrap build (using binary w32api/mingwrt)
7 #
8 Summary:        Cross MinGW32 GNU binary utility development utilities - gcc
9 Summary(es.UTF-8):      Utilitarios para desarrollo de binarios de la GNU - MinGW32 gcc
10 Summary(fr.UTF-8):      Utilitaires de développement binaire de GNU - MinGW32 gcc
11 Summary(pl.UTF-8):      Skrośne narzędzia programistyczne GNU dla MinGW32 - gcc
12 Summary(pt_BR.UTF-8):   Utilitários para desenvolvimento de binários da GNU - MinGW32 gcc
13 Summary(tr.UTF-8):      GNU geliştirme araçları - MinGW32 gcc
14 Name:           crossmingw32-gcc
15 Version:        4.5.1
16 Release:        1
17 Epoch:          1
18 License:        GPL v3+
19 Group:          Development/Languages
20 Source0:        ftp://gcc.gnu.org/pub/gcc/releases/gcc-%{version}/gcc-%{version}.tar.bz2
21 # Source0-md5:  48231a8e33ed6e058a341c53b819de1a
22 %define         apiver  3.15
23 Source1:        http://downloads.sourceforge.net/mingw/w32api-%{apiver}-1-mingw32-dev.tar.lzma
24 # Source1-md5:  efcbcadd0299a6413d95b9ce919ede9f
25 %define         runver  3.18
26 Source2:        http://downloads.sourceforge.net/mingw/mingwrt-%{runver}-mingw32-dev.tar.gz
27 # Source2-md5:  e49803d8c14b1ffa6e24e5b5fee31a3d
28 # svn diff -x --ignore-eol-style svn://gcc.gnu.org/svn/gcc/tags/gcc_4_5_1_release svn://gcc.gnu.org/svn/gcc/branches/gcc-4_5-branch > gcc-branch.diff
29 Patch100:       gcc-branch.diff
30 Patch0:         %{name}-buildsystem1.patch
31 Patch1:         %{name}-buildsystem2.patch
32 Patch2:         %{name}-lfs.patch
33 BuildRequires:  autoconf
34 BuildRequires:  automake
35 BuildRequires:  bison
36 BuildRequires:  crossmingw32-binutils >= 2.15.91.0.2-2
37 BuildRequires:  flex
38 BuildRequires:  libmpc-devel
39 %if %{without bootstrap}
40 BuildRequires:  crossmingw32-runtime >= 3.5
41 BuildRequires:  crossmingw32-w32api >= 3.1
42 %endif
43 BuildRequires:  mpfr-devel
44 BuildRequires:  texinfo >= 4.2
45 %if %{with booststrap}
46 BuildRequires:  tar >= 1:1.22
47 BuildRequires:  xz
48 %endif
49 Requires:       crossmingw32-binutils >= 2.15.91.0.2-2
50 Requires:       gcc-dirs
51 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
52
53 %define         target          i386-mingw32
54 %define         sysprefix       /usr
55 %define         arch            %{sysprefix}/%{target}
56 %define         gccarchdir      %{_libdir}/gcc/%{target}
57 %define         gcclibdir       %{gccarchdir}/%{version}
58 %define         _dlldir         /usr/share/wine/windows/system
59
60 %define         _noautostrip    .*/lib.*\\.a
61
62 %define         _enable_debug_packages 0
63
64 %description
65 crossmingw32 is a complete cross-compiling development system for
66 building stand-alone Microsoft Windows applications under Linux using
67 the MinGW32 build libraries. This includes a binutils, gcc with g++
68 and objc, and libstdc++, all cross targeted to i386-mingw32, along
69 with supporting Win32 libraries in 'coff' format from free sources.
70
71 This package contains cross targeted gcc.
72
73 %description -l de.UTF-8
74 Dieses Paket enthält einen Cross-gcc, der es erlaubt, auf einem
75 anderem Rechner Code für Win32 zu generieren.
76
77 %description -l pl.UTF-8
78 crossmingw32 jest kompletnym systemem do kompilacji skrośnej,
79 pozwalającym budować aplikacje MS Windows pod Linuksem używając
80 bibliotek MinGW32. System składa się z binutils, gcc z g++ i objc,
81 libstdc++ - wszystkie generujące kod dla platformy i386-mingw32, oraz
82 z bibliotek w formacie COFF.
83
84 Ten pakiet zawiera gcc generujące skrośnie kod dla Win32.
85
86 %package -n crossmingw32-libgcc-dll
87 Summary:        libgcc DLL library for Windows
88 Summary(pl.UTF-8):      Biblioteka DLL libgcc dla Windows
89 Group:          Applications/Emulators
90 Requires:       wine
91
92 %description -n crossmingw32-libgcc-dll
93 libgcc DLL library for Windows.
94
95 %description -n crossmingw32-libgcc-dll -l pl.UTF-8
96 Biblioteka DLL libgcc dla Windows.
97
98 %package c++
99 Summary:        MinGW32 binary utility development utilities - g++
100 Summary(pl.UTF-8):      Zestaw narzędzi MinGW32 - g++
101 Group:          Development/Languages
102 Requires:       %{name} = %{epoch}:%{version}-%{release}
103
104 %description c++
105 crossmingw32 is a complete cross-compiling development system for
106 building stand-alone Microsoft Windows applications under Linux using
107 the MinGW32 build libraries. This includes a binutils, gcc with g++
108 and objc, and libstdc++, all cross targeted to i386-mingw32, along
109 with supporting Win32 libraries in 'coff' format from free sources.
110
111 This package contains cross targeted g++ and (static) libstdc++.
112
113 %description c++ -l pl.UTF-8
114 crossmingw32 jest kompletnym systemem do kompilacji skrośnej,
115 pozwalającym budować aplikacje MS Windows pod Linuksem używając
116 bibliotek MinGW32. System składa się z binutils, gcc z g++ i objc,
117 libstdc++ - wszystkie generujące kod dla platformy i386-mingw32, oraz
118 z bibliotek w formacie COFF.
119
120 Ten pakiet zawiera g++ generujące kod pod Win32 oraz bibliotekę
121 libstdc++.
122
123 %package -n crossmingw32-libstdc++-static
124 Summary:        Static standard C++ library - cross MinGW32 version
125 Summary(pl.UTF-8):      Statyczna biblioteka standardowa C++ - wersja skrośna MinGW32
126 Group:          Development/Libraries
127 Requires:       %{name}-c++ = %{epoch}:%{version}-%{release}
128
129 %description -n crossmingw32-libstdc++-static
130 Static standard C++ library - cross MinGW32 version.
131
132 %description -n crossmingw32-libstdc++-static -l pl.UTF-8
133 Statyczna biblioteka standardowa C++ - wersja skrośna MinGW32.
134
135 %package -n crossmingw32-libstdc++-dll
136 Summary:        libstdc++ DLL library for Windows
137 Summary(pl.UTF-8):      Biblioteka DLL libstdc++ dla Windows
138 Group:          Applications/Emulators
139 Requires:       crossmingw32-libgcc-dll = %{epoch}:%{version}-%{release}
140 Requires:       wine
141
142 %description -n crossmingw32-libstdc++-dll
143 libstdc++ DLL library for Windows.
144
145 %description -n crossmingw32-libstdc++-dll -l pl.UTF-8
146 Biblioteka DLL libstdc++ dla Windows.
147
148 %package objc
149 Summary:        MinGW32 binary utility development utilities - objc
150 Summary(pl.UTF-8):      Zestaw narzędzi MinGW32 - objc
151 Group:          Development/Languages
152 Requires:       %{name} = %{epoch}:%{version}-%{release}
153
154 %description objc
155 crossmingw32 is a complete cross-compiling development system for
156 building stand-alone Microsoft Windows applications under Linux using
157 the MinGW32 build libraries. This includes a binutils, gcc with g++
158 and objc, and libstdc++, all cross targeted to i386-mingw32, along
159 with supporting Win32 libraries in 'coff' format from free sources.
160
161 This package contains cross targeted objc compiler.
162
163 %description objc -l pl.UTF-8
164 crossmingw32 jest kompletnym systemem do kompilacji skrośnej,
165 pozwalającym budować aplikacje MS Windows pod Linuksem używając
166 bibliotek MinGW32. System składa się z binutils, gcc z g++ i objc,
167 libstdc++ - wszystkie generujące kod dla platformy i386-mingw32, oraz
168 z bibliotek w formacie COFF.
169
170 Ten pakiet zawiera kompilator objc generujący kod pod Win32.
171
172 %package -n crossmingw32-libobjc-static
173 Summary:        Static Objective C library - cross MinGW32 version
174 Summary(pl.UTF-8):      Statyczna biblioteka Objective C - wersja skrośna MinGW32
175 Group:          Development/Libraries
176 Requires:       %{name}-objc = %{epoch}:%{version}-%{release}
177
178 %description -n crossmingw32-libobjc-static
179 Static Objective C library - cross MinGW32 version.
180
181 %description -n crossmingw32-libobjc-static -l pl.UTF-8
182 Statyczna biblioteka Objective C - wersja skrośna MinGW32.
183
184 %package -n crossmingw32-libobjc-dll
185 Summary:        libobjc DLL library for Windows
186 Summary(pl.UTF-8):      Biblioteka DLL libobjc dla Windows
187 Group:          Applications/Emulators
188 Requires:       crossmingw32-libgcc-dll = %{epoch}:%{version}-%{release}
189 Requires:       wine
190
191 %description -n crossmingw32-libobjc-dll
192 libobjc DLL library for Windows.
193
194 %description -n crossmingw32-libobjc-dll -l pl.UTF-8
195 Biblioteka DLL libobjc dla Windows.
196
197 %package fortran
198 Summary:        MinGW32 binary utility development utilities - Fortran
199 Summary(pl.UTF-8):      Zestaw narzędzi MinGW32 - Fortran
200 Group:          Development/Languages
201 Requires:       %{name} = %{epoch}:%{version}-%{release}
202 Obsoletes:      crossmingw32-gcc-g77
203
204 %description fortran
205 crossmingw32 is a complete cross-compiling development system for
206 building stand-alone Microsoft Windows applications under Linux using
207 the MinGW32 build libraries. This includes a binutils, gcc with g++
208 and objc, and libstdc++, all cross targeted to i386-mingw32, along
209 with supporting Win32 libraries in 'coff' format from free sources.
210
211 This package contains cross targeted Fortran compiler.
212
213 %description fortran -l pl.UTF-8
214 crossmingw32 jest kompletnym systemem do kompilacji skrośnej,
215 pozwalającym budować aplikacje MS Windows pod Linuksem używając
216 bibliotek MinGW32. System składa się z binutils, gcc z g++ i objc,
217 libstdc++ - wszystkie generujące kod dla platformy i386-mingw32, oraz
218 z bibliotek w formacie COFF.
219
220 Ten pakiet zawiera kompilator Fortranu generujący kod pod Win32.
221
222 %package -n crossmingw32-libgfortran-static
223 Summary:        Static Fortran library - cross MinGW32 version
224 Summary(pl.UTF-8):      Statyczna biblioteka Fortrana - wersja skrośna MinGW32
225 Group:          Development/Libraries
226 Requires:       %{name}-fortran = %{epoch}:%{version}-%{release}
227
228 %description -n crossmingw32-libgfortran-static
229 Static Fortran library - cross MinGW32 version.
230
231 %description -n crossmingw32-libgfortran-static -l pl.UTF-8
232 Statyczna biblioteka Fortrana - wersja skrośna MinGW32.
233
234 %package -n crossmingw32-libgfortran-dll
235 Summary:        libgfortran DLL library for Windows
236 Summary(pl.UTF-8):      Biblioteka DLL libgfortran dla Windows
237 Group:          Applications/Emulators
238 Requires:       wine
239
240 %description -n crossmingw32-libgfortran-dll
241 libgfortran DLL library for Windows.
242
243 %description -n crossmingw32-libgfortran-dll -l pl.UTF-8
244 Biblioteka DLL libgfortran dla Windows.
245
246 %package java
247 Summary:        MinGW32 binary utility development utilities - Java
248 Summary(pl.UTF-8):      Zestaw narzędzi MinGW32 - Java
249 Group:          Development/Languages
250 Requires:       %{name} = %{epoch}:%{version}-%{release}
251
252 %description java
253 crossmingw32 is a complete cross-compiling development system for
254 building stand-alone Microsoft Windows applications under Linux using
255 the MinGW32 build libraries. This includes a binutils, gcc with g++
256 and objc, and libstdc++, all cross targeted to i386-mingw32, along
257 with supporting Win32 libraries in 'coff' format from free sources.
258
259 This package contains cross targeted Java compiler.
260
261 %description java -l pl.UTF-8
262 crossmingw32 jest kompletnym systemem do kompilacji skrośnej,
263 pozwalającym budować aplikacje MS Windows pod Linuksem używając
264 bibliotek MinGW32. System składa się z binutils, gcc z g++ i objc,
265 libstdc++ - wszystkie generujące kod dla platformy i386-mingw32, oraz
266 z bibliotek w formacie COFF.
267
268 Ten pakiet zawiera kompilator Javy generujący kod pod Win32.
269
270 %prep
271 %setup -q -n gcc-%{version}
272 %patch100 -p0
273 %patch0 -p1
274 %patch2 -p1
275
276 %if %{with bootstrap}
277 # note: "winsup" dirs below are special, handled by gcc's configure
278 install -d winsup/{mingw,w32api}
279 tar xf %{SOURCE1} -C winsup/w32api
280 tar xf %{SOURCE2} -C winsup/mingw
281 %endif
282
283 # override snapshot version.
284 echo %{version} > gcc/BASE-VER
285 echo "release" > gcc/DEV-PHASE
286
287 %build
288 rm -rf builddir && install -d builddir && cd builddir
289 %if %{with bootstrap}
290 install -d %{target}/winsup
291 ln -sf ../../../winsup/mingw/lib %{target}/winsup/mingw
292 ln -sf ../../../winsup/w32api %{target}/winsup/w32api
293 WINSUPDIR=$(cd ..; pwd)/winsup
294 %endif
295
296 CC="%{__cc}" \
297 CFLAGS="%{rpmcflags}" \
298 CXXFLAGS="%{rpmcxxflags}" \
299 TEXCONFIG=false \
300 ../configure \
301         --prefix=%{sysprefix} \
302         --bindir=%{arch}/bin \
303         --libdir=%{_libdir} \
304         --includedir=%{arch}/include \
305         --libexecdir=%{_libdir} \
306         --infodir=%{_infodir} \
307         --mandir=%{_mandir} \
308         %{!?with_bootstrap:--with-headers=%{arch}/include} \
309         --with-libs=%{!?with_bootstrap:%{arch}/lib}%{?with_bootstrap:${WINSUPDIR}/mingw/lib} \
310         --with-build-time-tools=%{arch}/bin \
311         --with-dwarf2 \
312         --with-gnu-as \
313         --with-gnu-ld \
314         --with-mangler-in-ld \
315         --with-long-double-128 \
316         --enable-threads \
317         --enable-languages="c,c++,fortran,java,objc" \
318         --enable-c99 \
319         --enable-long-long \
320         --enable-fully-dynamic-string \
321         --enable-libstdcxx-allocator=new \
322         --enable-version-specific-runtime-libs \
323         --enable-shared \
324         --disable-nls \
325         --disable-symvers \
326         --disable-sjlj-exceptions \
327         --disable-win32-registry \
328         --disable-multilib \
329         --disable-libssp \
330         --target=%{target}
331
332 cd ..
333 %{__make} -C builddir all-host
334 patch -p1 <%{PATCH1}
335 %{__make} -C builddir
336
337 %install
338 rm -rf $RPM_BUILD_ROOT
339 install -d $RPM_BUILD_ROOT%{_bindir}
340
341 %{__make} -C builddir install \
342         DESTDIR=$RPM_BUILD_ROOT
343
344 # host (ELF) library
345 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libiberty.a
346
347 mv $RPM_BUILD_ROOT%{gcclibdir}/include-fixed/{limits,syslimits}.h $RPM_BUILD_ROOT%{gcclibdir}/include
348 %{__rm} -r $RPM_BUILD_ROOT%{gcclibdir}/include-fixed
349 %{__rm} -r $RPM_BUILD_ROOT%{gcclibdir}/install-tools
350
351 # make links in host bindir
352 ln -f $RPM_BUILD_ROOT%{arch}/bin/%{target}-gcc $RPM_BUILD_ROOT%{_bindir}/%{target}-gcc
353 ln -f $RPM_BUILD_ROOT%{arch}/bin/%{target}-g++ $RPM_BUILD_ROOT%{_bindir}/%{target}-g++
354 ln -f $RPM_BUILD_ROOT%{arch}/bin/%{target}-cpp $RPM_BUILD_ROOT%{_bindir}/%{target}-cpp
355 ln -f $RPM_BUILD_ROOT%{arch}/bin/%{target}-gcov $RPM_BUILD_ROOT%{_bindir}/%{target}-gcov
356 ln -f $RPM_BUILD_ROOT%{arch}/bin/%{target}-gcj $RPM_BUILD_ROOT%{_bindir}/%{target}-gcj
357 ln -f $RPM_BUILD_ROOT%{arch}/bin/%{target}-jcf-dump $RPM_BUILD_ROOT%{_bindir}/%{target}-jcf-dump
358 ln -f $RPM_BUILD_ROOT%{arch}/bin/%{target}-gfortran $RPM_BUILD_ROOT%{_bindir}/%{target}-gfortran
359
360 # DLLs
361 install -d $RPM_BUILD_ROOT%{_dlldir}
362 mv -f $RPM_BUILD_ROOT%{arch}/bin/*.dll $RPM_BUILD_ROOT%{_dlldir}
363 if [ ! -f $RPM_BUILD_ROOT%{_dlldir}/libgcc_s_dw2-1.dll ]; then
364         echo "libgcc DLL not installed?"
365         install builddir/i386-mingw32/libgcc/shlib/libgcc_s_dw2-1.dll $RPM_BUILD_ROOT%{_dlldir}
366 fi
367
368 %if 0%{!?debug:1}
369 %{target}-strip --strip-unneeded -R.comment -R.note $RPM_BUILD_ROOT%{_dlldir}/*.dll
370 %{target}-strip -g -R.comment -R.note $RPM_BUILD_ROOT%{gcclibdir}/lib*.a \
371         $RPM_BUILD_ROOT%{arch}/lib/lib*.a
372 %endif
373
374 # already in native gcc
375 %{__rm} -r $RPM_BUILD_ROOT%{_infodir}
376 # common FSF man pages
377 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man7/{fsf-funding,gfdl,gpl}.7
378 # programs not packaged
379 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/%{target}-{aot-compile,gc-analyze,gcj-dbtool,gij,grmic,jv-convert,rebuild-gcj-db}.1
380
381 %clean
382 rm -rf $RPM_BUILD_ROOT
383
384 %files
385 %defattr(644,root,root,755)
386 %attr(755,root,root) %{_bindir}/%{target}-gcc
387 %attr(755,root,root) %{_bindir}/%{target}-cpp
388 %attr(755,root,root) %{_bindir}/%{target}-gcov
389 %attr(755,root,root) %{arch}/bin/%{target}-gcc
390 %attr(755,root,root) %{arch}/bin/%{target}-gcc-%{version}
391 %attr(755,root,root) %{arch}/bin/%{target}-gccbug
392 %attr(755,root,root) %{arch}/bin/%{target}-cpp
393 %attr(755,root,root) %{arch}/bin/%{target}-gcov
394 %attr(755,root,root) %{arch}/bin/gcc
395 %{arch}/lib/libiberty.a
396 %dir %{gccarchdir}
397 %dir %{gcclibdir}
398 %attr(755,root,root) %{gcclibdir}/cc1
399 %attr(755,root,root) %{gcclibdir}/collect2
400 %attr(755,root,root) %{gcclibdir}/lto-wrapper
401 %{gcclibdir}/libgcc.a
402 %{gcclibdir}/libgcc_eh.a
403 %{gcclibdir}/libgcc_s.a
404 %{gcclibdir}/libgcov.a
405 %dir %{gcclibdir}/include
406 %{gcclibdir}/include/*.h
407 %{_mandir}/man1/%{target}-cpp.1*
408 %{_mandir}/man1/%{target}-gcc.1*
409 %{_mandir}/man1/%{target}-gcov.1*
410
411 %files -n crossmingw32-libgcc-dll
412 %defattr(644,root,root,755)
413 %{_dlldir}/libgcc_s_dw2-1.dll
414
415 %files c++
416 %defattr(644,root,root,755)
417 %attr(755,root,root) %{_bindir}/%{target}-g++
418 %attr(755,root,root) %{arch}/bin/%{target}-c++
419 %attr(755,root,root) %{arch}/bin/%{target}-g++
420 %attr(755,root,root) %{arch}/bin/c++
421 %attr(755,root,root) %{arch}/bin/g++
422 %attr(755,root,root) %{gcclibdir}/cc1plus
423 %{gcclibdir}/libstdc++.dll.a
424 %{gcclibdir}/libstdc++.la
425 %{gcclibdir}/libsupc++.la
426 %{gcclibdir}/libsupc++.a
427 %{gcclibdir}/crtbegin.o
428 %{gcclibdir}/crtend.o
429 %{gcclibdir}/crtfastmath.o
430 %{gcclibdir}/include/c++
431 %{_mandir}/man1/%{target}-g++.1*
432
433 %files -n crossmingw32-libstdc++-static
434 %defattr(644,root,root,755)
435 %{gcclibdir}/libstdc++.a
436
437 %files -n crossmingw32-libstdc++-dll
438 %defattr(644,root,root,755)
439 %{_dlldir}/libstdc++-6.dll
440
441 %files objc
442 %defattr(644,root,root,755)
443 %attr(755,root,root) %{gcclibdir}/cc1obj
444 %{gcclibdir}/libobjc.dll.a
445 %{gcclibdir}/libobjc.la
446 %{gcclibdir}/include/objc
447
448 %files -n crossmingw32-libobjc-static
449 %defattr(644,root,root,755)
450 %{gcclibdir}/libobjc.a
451
452 %files -n crossmingw32-libobjc-dll
453 %defattr(644,root,root,755)
454 %{_dlldir}/libobjc-2.dll
455
456 %files fortran
457 %defattr(644,root,root,755)
458 %attr(755,root,root) %{_bindir}/%{target}-gfortran
459 %attr(755,root,root) %{arch}/bin/%{target}-gfortran
460 %attr(755,root,root) %{arch}/bin/gfortran
461 %attr(755,root,root) %{gcclibdir}/f951
462 %{gcclibdir}/finclude
463 %{gcclibdir}/libgfortran.dll.a
464 %{gcclibdir}/libgfortran.la
465 %{gcclibdir}/libgfortranbegin.a
466 %{gcclibdir}/libgfortranbegin.la
467 %{_mandir}/man1/%{target}-gfortran.1*
468
469 %files -n crossmingw32-libgfortran-static
470 %defattr(644,root,root,755)
471 %{gcclibdir}/libgfortran.a
472
473 %files -n crossmingw32-libgfortran-dll
474 %defattr(644,root,root,755)
475 %{_dlldir}/libgfortran-3.dll
476
477 %files java
478 %defattr(644,root,root,755)
479 %attr(755,root,root) %{_bindir}/%{target}-gcj
480 %attr(755,root,root) %{_bindir}/%{target}-jcf-dump
481 %attr(755,root,root) %{arch}/bin/%{target}-gcj
482 %attr(755,root,root) %{arch}/bin/%{target}-jcf-dump
483 %attr(755,root,root) %{gcclibdir}/jc1
484 %attr(755,root,root) %{gcclibdir}/jvgenmain
485 %{_mandir}/man1/%{target}-gcj.1*
486 %{_mandir}/man1/%{target}-jcf-dump.1*
This page took 0.126174 seconds and 3 git commands to generate.