]> git.pld-linux.org Git - packages/crossmingw32-gcc.git/blob - crossmingw32-gcc.spec
- up to 4.5.1 (with branch diff like in regular gcc.spec)
[packages/crossmingw32-gcc.git] / crossmingw32-gcc.spec
1 #
2 # TODO:
3 # - restore languages other than c, c++
4 # - openmp
5 #
6 # Conditional build:
7 %bcond_with     bootstrap       # bootstrap build (using binary w32api/mingw)
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 v2+
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.10
24 Source1:        http://dl.sourceforge.net/mingw/w32api-%{apiver}.tar.gz
25 # Source1-md5:  7067a6b3ac9d94bb753f9f6f37e2033c
26 %define         runver  3.13
27 Source2:        http://dl.sourceforge.net/mingw/mingw-runtime-%{runver}.tar.gz
28 # Source2-md5:  22179021f41d5eee76447b78fb94a3fb
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 Requires:       crossmingw32-binutils >= 2.15.91.0.2-2
47 Requires:       gcc-dirs
48 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
49
50 %define         target          i386-mingw32
51 %define         arch            %{_prefix}/%{target}
52 %define         gccarch         %{_libdir}/gcc/%{target}
53 %define         gcclib          %{gccarch}/%{version}
54
55 %define         _noautostrip    .*/lib.*\\.a
56
57 %define         _enable_debug_packages 0
58
59 %description
60 crossmingw32 is a complete cross-compiling development system for
61 building stand-alone Microsoft Windows applications under Linux using
62 the Mingw32 build libraries. This includes a binutils, gcc with g++
63 and objc, and libstdc++, all cross targeted to i386-mingw32, along
64 with supporting Win32 libraries in 'coff' format from free sources.
65
66 This package contains cross targeted gcc.
67
68 %description -l de.UTF-8
69 Dieses Paket enthält einen Cross-gcc, der es erlaubt, auf einem
70 anderem Rechner Code für Win32 zu generieren.
71
72 %description -l pl.UTF-8
73 crossmingw32 jest kompletnym systemem do kompilacji skrośnej,
74 pozwalającym budować aplikacje MS Windows pod Linuksem używając
75 bibliotek Mingw32. System składa się z binutils, gcc z g++ i objc,
76 libstdc++ - wszystkie generujące kod dla platformy i386-mingw32, oraz
77 z bibliotek w formacie COFF.
78
79 Ten pakiet zawiera gcc generujące skrośnie kod dla Win32.
80
81 %package c++
82 Summary:        Mingw32 binary utility development utilities - g++
83 Summary(pl.UTF-8):      Zestaw narzędzi mingw32 - g++
84 Group:          Development/Languages
85 Requires:       %{name} = %{epoch}:%{version}-%{release}
86
87 %description c++
88 crossmingw32 is a complete cross-compiling development system for
89 building stand-alone Microsoft Windows applications under Linux using
90 the Mingw32 build libraries. This includes a binutils, gcc with g++
91 and objc, and libstdc++, all cross targeted to i386-mingw32, along
92 with supporting Win32 libraries in 'coff' format from free sources.
93
94 This package contains cross targeted g++ and (static) libstdc++.
95
96 %description c++ -l pl.UTF-8
97 crossmingw32 jest kompletnym systemem do kompilacji skrośnej,
98 pozwalającym budować aplikacje MS Windows pod Linuksem używając
99 bibliotek mingw32. System składa się z binutils, gcc z g++ i objc,
100 libstdc++ - wszystkie generujące kod dla platformy i386-mingw32, oraz
101 z bibliotek w formacie COFF.
102
103 Ten pakiet zawiera g++ generujące kod pod Win32 oraz bibliotekę
104 libstdc++.
105
106 # no obj-c, fortran, java for the moment
107 %if 0
108 # does this even work?
109 %package objc
110 Summary:        Mingw32 binary utility development utilities - objc
111 Summary(pl.UTF-8):      Zestaw narzędzi mingw32 - objc
112 Group:          Development/Languages
113 Requires:       %{name} = %{epoch}:%{version}-%{release}
114
115 %description objc
116 crossmingw32 is a complete cross-compiling development system for
117 building stand-alone Microsoft Windows applications under Linux using
118 the Mingw32 build libraries. This includes a binutils, gcc with g++
119 and objc, and libstdc++, all cross targeted to i386-mingw32, along
120 with supporting Win32 libraries in 'coff' format from free sources.
121
122 This package contains cross targeted objc compiler.
123
124 %description objc -l pl.UTF-8
125 crossmingw32 jest kompletnym systemem do kompilacji skrośnej,
126 pozwalającym budować aplikacje MS Windows pod Linuksem używając
127 bibliotek mingw32. System składa się z binutils, gcc z g++ i objc,
128 libstdc++ - wszystkie generujące kod dla platformy i386-mingw32, oraz
129 z bibliotek w formacie COFF.
130
131 Ten pakiet zawiera kompilator objc generujący kod pod Win32.
132
133 # does this even work?
134 %package fortran
135 Summary:        Mingw32 binary utility development utilities - Fortran
136 Summary(pl.UTF-8):      Zestaw narzędzi mingw32 - Fortran
137 Group:          Development/Languages
138 Requires:       %{name} = %{epoch}:%{version}-%{release}
139 Obsoletes:      crossmingw32-gcc-g77
140
141 %description fortran
142 crossmingw32 is a complete cross-compiling development system for
143 building stand-alone Microsoft Windows applications under Linux using
144 the Mingw32 build libraries. This includes a binutils, gcc with g++
145 and objc, and libstdc++, all cross targeted to i386-mingw32, along
146 with supporting Win32 libraries in 'coff' format from free sources.
147
148 This package contains cross targeted Fortran compiler.
149
150 %description fortran -l pl.UTF-8
151 crossmingw32 jest kompletnym systemem do kompilacji skrośnej,
152 pozwalającym budować aplikacje MS Windows pod Linuksem używając
153 bibliotek mingw32. System składa się z binutils, gcc z g++ i objc,
154 libstdc++ - wszystkie generujące kod dla platformy i386-mingw32, oraz
155 z bibliotek w formacie COFF.
156
157 Ten pakiet zawiera kompilator Fortranu generujący kod pod Win32.
158
159 # does this even work?
160 %package java
161 Summary:        Mingw32 binary utility development utilities - Java
162 Summary(pl.UTF-8):      Zestaw narzędzi mingw32 - Java
163 Group:          Development/Languages
164 Requires:       %{name} = %{epoch}:%{version}-%{release}
165
166 %description java
167 crossmingw32 is a complete cross-compiling development system for
168 building stand-alone Microsoft Windows applications under Linux using
169 the Mingw32 build libraries. This includes a binutils, gcc with g++
170 and objc, and libstdc++, all cross targeted to i386-mingw32, along
171 with supporting Win32 libraries in 'coff' format from free sources.
172
173 This package contains cross targeted Java compiler.
174
175 %description java -l pl.UTF-8
176
177 crossmingw32 jest kompletnym systemem do kompilacji skrośnej,
178 pozwalającym budować aplikacje MS Windows pod Linuksem używając
179 bibliotek mingw32. System składa się z binutils, gcc z g++ i objc,
180 libstdc++ - wszystkie generujące kod dla platformy i386-mingw32, oraz
181 z bibliotek w formacie COFF.
182
183 Ten pakiet zawiera kompilator Javy generujący kod pod Win32.
184 %endif
185
186 %prep
187 %setup -q -n gcc-%{version}
188 %patch100 -p0
189 %patch0 -p1
190 %patch2 -p1
191
192 %if %{with bootstrap}
193 mkdir winsup
194 tar xzf %{SOURCE1} -C winsup
195 tar xzf %{SOURCE2} -C winsup
196 %endif
197
198 # override snapshot version.
199 echo %{version} > gcc/BASE-VER
200 echo "release" > gcc/DEV-PHASE
201
202 %build
203 %if %{with bootstrap}
204 for tool in as ar dlltool ld nm ranlib strip ; do
205         ln -sf %{arch}/bin/$tool winsup/bin/$tool
206 done
207 %endif
208
209 rm -rf builddir && install -d builddir && cd builddir
210
211 CC="%{__cc}" \
212 CFLAGS="%{rpmcflags}" \
213 CXXFLAGS="%{rpmcxxflags}" \
214 TEXCONFIG=false \
215 ../configure \
216         --prefix=%{arch} \
217         --infodir=%{_infodir} \
218         --mandir=%{_mandir} \
219         --with-headers=%{arch}/include \
220         --with-libs=%{arch}/lib \
221         --with-build-time-tools=%{arch}/bin \
222         --with-dwarf2 \
223         --with-gnu-as \
224         --with-gnu-ld \
225         --with-mangler-in-ld \
226         --with-long-double-128 \
227         --enable-threads \
228         --enable-languages="c,c++" \
229         --enable-c99 \
230         --enable-long-long \
231         --enable-fully-dynamic-string \
232         --enable-libstdcxx-allocator=new \
233         --enable-version-specific-runtime-libs \
234         --enable-shared \
235         --disable-nls \
236         --disable-symvers \
237         --disable-sjlj-exceptions \
238         --disable-win32-registry \
239         --disable-multilib \
240         --disable-libssp \
241         --target=%{target}
242
243 cd ..
244 %{__make} -C builddir all-host
245 patch -p1 <%{PATCH1}
246 %{__make} -C builddir
247
248 %install
249 rm -rf $RPM_BUILD_ROOT
250 install -d $RPM_BUILD_ROOT{%{_bindir},%{_datadir}}
251
252 %{__make} -C builddir install \
253         DESTDIR=$RPM_BUILD_ROOT
254
255 %if 0%{!?debug:1}
256 %{target}-strip -g -R.note -R.comment $RPM_BUILD_ROOT%{arch}/lib/lib*.a
257 %endif
258
259 # restore hardlinks
260 ln -f $RPM_BUILD_ROOT%{arch}/bin/%{target}-gcc $RPM_BUILD_ROOT%{_bindir}/%{target}-gcc
261 ln -f $RPM_BUILD_ROOT%{arch}/bin/%{target}-g++ $RPM_BUILD_ROOT%{_bindir}/%{target}-g++
262 ln -f $RPM_BUILD_ROOT%{arch}/bin/%{target}-cpp $RPM_BUILD_ROOT%{_bindir}/%{target}-cpp
263 ln -f $RPM_BUILD_ROOT%{arch}/bin/%{target}-gcov $RPM_BUILD_ROOT%{_bindir}/%{target}-gcov
264
265 install -d $RPM_BUILD_ROOT%{_libdir}
266 install -d $RPM_BUILD_ROOT%{_libdir}/gcc
267
268 cp -r $RPM_BUILD_ROOT%{arch}/libexec/gcc/%{target} $RPM_BUILD_ROOT%{_libdir}/gcc
269 cp -r $RPM_BUILD_ROOT%{arch}/lib/gcc/%{target} $RPM_BUILD_ROOT%{_libdir}/gcc
270 rm -rf $RPM_BUILD_ROOT%{_libdir}/gcc/%{target}/%{version}/install-tools
271 rm -rf $RPM_BUILD_ROOT%{arch}/libexec
272 rm -rf $RPM_BUILD_ROOT%{arch}/lib/gcc
273
274 mv -f $RPM_BUILD_ROOT%{_libdir}/gcc/%{target}/%{version}/cc1 $RPM_BUILD_ROOT%{arch}/bin/cc1
275 mv -f $RPM_BUILD_ROOT%{_libdir}/gcc/%{target}/%{version}/cc1plus $RPM_BUILD_ROOT%{arch}/bin/cc1plus
276 mv -f $RPM_BUILD_ROOT%{_libdir}/gcc/%{target}/%{version}/collect2 $RPM_BUILD_ROOT%{arch}/bin/collect2
277
278 install builddir/i386-mingw32/libgcc/shlib/libgcc_s_dw2-1.dll $RPM_BUILD_ROOT%{arch}/bin
279 %clean
280 rm -rf $RPM_BUILD_ROOT
281
282 %files
283 %defattr(644,root,root,755)
284 %attr(755,root,root) %{_bindir}/%{target}-gcc
285 %attr(755,root,root) %{_bindir}/%{target}-cpp
286 %attr(755,root,root) %{_bindir}/%{target}-gcov
287 %attr(755,root,root) %{arch}/bin/%{target}-gcc*
288 %attr(755,root,root) %{arch}/bin/%{target}-cpp
289 %attr(755,root,root) %{arch}/bin/%{target}-gcov
290 %attr(755,root,root) %{arch}/bin/cc1
291 %attr(755,root,root) %{arch}/bin/collect2
292 %{arch}/bin/*.dll
293
294 %{_libdir}/gcc/%{target}
295 %{arch}/%{_lib}/libiberty.a
296
297 %{_mandir}/man1/%{target}-cpp.1*
298 %{_mandir}/man1/%{target}-gcc.1*
299 %{_mandir}/man1/%{target}-gcov.1*
300
301 %files c++
302 %defattr(644,root,root,755)
303 %attr(755,root,root) %{_bindir}/%{target}-g++
304 %attr(755,root,root) %{arch}/bin/%{target}-c++
305 %attr(755,root,root) %{arch}/bin/%{target}-g++
306 %attr(755,root,root) %{arch}/bin/cc1plus
307
308 %{_mandir}/man1/%{target}-g++.1*
309
310 # no obj-c, fortran, java for the moment
311 %if 0
312 %files objc
313 %defattr(644,root,root,755)
314 %attr(755,root,root) %{gcclib}/cc1obj
315 %{arch}/lib/libobjc.a
316 %{arch}/lib/libobjc.la
317
318 %files fortran
319 %defattr(644,root,root,755)
320 %attr(755,root,root) %{_bindir}/%{target}-gfortran
321 %attr(755,root,root) %{arch}/bin/gfortran
322 %attr(755,root,root) %{gcclib}/f951
323 %{arch}/lib/libgfortran.a
324 %{arch}/lib/libgfortran.la
325 %{arch}/lib/libgfortranbegin.a
326 %{arch}/lib/libgfortranbegin.la
327 %{_mandir}/man1/%{target}-gfortran.1*
328
329 %files java
330 %defattr(644,root,root,755)
331 %attr(755,root,root) %{_bindir}/%{target}-gcj
332 %attr(755,root,root) %{_bindir}/%{target}-gcjh
333 %attr(755,root,root) %{_bindir}/%{target}-gjnih
334 %attr(755,root,root) %{_bindir}/%{target}-grepjar
335 %attr(755,root,root) %{_bindir}/%{target}-fastjar
336 %attr(755,root,root) %{_bindir}/%{target}-jcf-dump
337 %attr(755,root,root) %{_bindir}/%{target}-jv-scan
338 #%attr(755,root,root) %{arch}/bin/grepjar
339 #%attr(755,root,root) %{arch}/bin/jar
340 %attr(755,root,root) %{gcclib}/jc1
341 %attr(755,root,root) %{gcclib}/jvgenmain
342 %{_mandir}/man1/%{target}-gcj.1*
343 %{_mandir}/man1/%{target}-gcjh.1*
344 %{_mandir}/man1/%{target}-gjnih.1*
345 %{_mandir}/man1/%{target}-grepjar.1*
346 %{_mandir}/man1/%{target}-fastjar.1*
347 %{_mandir}/man1/%{target}-jcf-dump.1*
348 %{_mandir}/man1/%{target}-jv-scan.1*
349 %endif
This page took 0.050286 seconds and 3 git commands to generate.