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