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