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