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