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