]> git.pld-linux.org Git - packages/crossmingw64-gcc.git/blob - crossmingw64-gcc.spec
- initial spec dropin, install/files nfy. i'll commit all my scriptology soon...
[packages/crossmingw64-gcc.git] / crossmingw64-gcc.spec
1 #
2 # Conditional build:
3 %bcond_with     bootstrap       # bootstrap build (only pure C compiler w/o startfiles)
4 #
5 Summary:        Cross Mingw64 GNU binary utility development utilities - gcc
6 Summary(es.UTF-8):      Utilitarios para desarrollo de binarios de la GNU - Mingw64 gcc
7 Summary(fr.UTF-8):      Utilitaires de développement binaire de GNU - Mingw64 gcc
8 Summary(pl.UTF-8):      Skrośne narzędzia programistyczne GNU dla Mingw64 - gcc
9 Summary(pt_BR.UTF-8):   Utilitários para desenvolvimento de binários da GNU - Mingw64 gcc
10 Summary(tr.UTF-8):      GNU geliştirme araçları - Mingw64 gcc
11 Name:           crossmingw64-gcc
12 Version:        4.3.1
13 Release:        0.1
14 Epoch:          1
15 License:        GPL v3+
16 Group:          Development/Languages
17 Source0:        ftp://gcc.gnu.org/pub/gcc/releases/gcc-%{version}/gcc-%{version}.tar.bz2
18 # Source0-md5:  4afa0290cc3a41ac8822666f1110de98
19 Source1:        http://dl.sourceforge.net/mingw-w64/mingw-w64-snapshot-20080424.tar.bz2
20 # Source1-md5:  e2eea49233efd0be3a40fc774abeb1a2
21 Patch0:         %{name}-no_include64.patch
22 BuildRequires:  autoconf
23 BuildRequires:  automake
24 BuildRequires:  bison
25 BuildRequires:  crossmingw64-binutils
26 BuildRequires:  flex
27 BuildRequires:  mpfr-devel
28 BuildRequires:  texinfo >= 4.2
29 Requires:       crossmingw64-binutils
30 Requires:       gcc-dirs
31 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32
33 %define         target          x86_64-mingw32
34 %define         arch            %{_prefix}/%{target}
35 %define         gccarch         %{_libdir}/gcc/%{target}
36 %define         gcclib          %{gccarch}/%{version}
37
38 %define         _noautostrip    .*/lib.*\\.a
39
40 %description
41 crossmingw64 is a complete cross-compiling development system for
42 building stand-alone Microsoft Windows applications under Linux using
43 the Mingw64 build libraries. This includes a binutils, gcc with g++
44 and libstdc++, all cross targeted to x86_64-mingw32.
45
46 This package contains cross targeted gcc.
47
48 %package c++
49 Summary:        Mingw64 binary utility development utilities - g++
50 Summary(pl.UTF-8):      Zestaw narzędzi mingw64 - g++
51 Group:          Development/Languages
52 Requires:       %{name} = %{epoch}:%{version}-%{release}
53
54 %description c++
55 crossmingw64 is a complete cross-compiling development system for
56 building stand-alone Microsoft Windows applications under Linux using
57 the Mingw64 build libraries. This includes a binutils, gcc with g++
58 and libstdc++, all cross targeted to x86_64-mingw32.
59
60 This package contains cross targeted g++ and (static) libstdc++.
61
62 %prep
63 %setup -q -n gcc-%{version}
64 %patch0 -p1
65 mkdir winsup
66 tar -xjf %{SOURCE1} -C winsup
67 ln -s mingw-w64-headers winsup/trunk/mingw
68
69 %build
70 build_sysroot=`pwd`/winsup/trunk
71
72 rm -rf BUILDDIR && install -d BUILDDIR && cd BUILDDIR
73
74 CFLAGS="%{rpmcflags}" \
75 CXXFLAGS="%{rpmcflags}" \
76 LDFLAGS="%{rpmldflags}" \
77 TEXCONFIG=false \
78 ../configure \
79         --prefix=%{_prefix} \
80         --infodir=%{_infodir} \
81         --mandir=%{_mandir} \
82         --bindir=%{arch}/bin \
83         --libdir=%{_libdir} \
84         --libexecdir=%{_libexecdir} \
85         --includedir=%{arch}/include \
86         --with-sysroot=%{arch} \
87         --with-build-sysroot=$build_sysroot \
88         --disable-shared \
89         --enable-threads=win32 \
90         --enable-languages="c%{!?with_bootstrap:,c++}" \
91         --enable-c99 \
92         --enable-long-long \
93         --enable-cmath \
94         --disable-nls \
95         --with-gnu-as \
96         --with-gnu-ld \
97         --with-mangler-in-ld \
98         --with-gxx-include-dir=%{arch}/include/c++/%{version} \
99         --disable-libstdcxx-pch \
100         --enable-__cxa_atexit \
101         --disable-libmudflap \
102         --disable-libssp \
103         --target=%{target}
104
105 %{__make} all
106
107 %install
108 rm -rf $RPM_BUILD_ROOT
109 install -d $RPM_BUILD_ROOT{%{_bindir},%{_datadir}}
110
111 cd BUILDDIR
112
113 %{__make} install \
114         DESTDIR=$RPM_BUILD_ROOT
115
116 install gcc/specs $RPM_BUILD_ROOT%{gcclib}
117
118 cd ..
119
120 mv -f $RPM_BUILD_ROOT%{arch}/bin/%{target}-* $RPM_BUILD_ROOT%{_bindir}
121
122 # already in arch/lib, shouldn't be here
123 rm $RPM_BUILD_ROOT%{_libdir}/libiberty.a
124
125 gccdir=$RPM_BUILD_ROOT%{gcclib}
126 mv $gccdir/include-fixed/{limits,syslimits}.h $gccdir/include
127 rm -r $gccdir/include-fixed
128 rm -r $gccdir/install-tools
129
130 %if 0%{!?debug:1}
131 %{target}-strip -g -R.note -R.comment $RPM_BUILD_ROOT%{gcclib}/libgcc.a
132 %{target}-strip -g -R.note -R.comment $RPM_BUILD_ROOT%{gcclib}/libgcov.a
133 %endif
134
135 #if %{without bootstrap}
136 # restore hardlinks
137 #ln -f $RPM_BUILD_ROOT%{_bindir}/%{target}-{g++,c++}
138 #ln -f $RPM_BUILD_ROOT%{arch}/bin/{g++,c++}
139 #endif
140
141 # the same... make hardlink
142 ln -f $RPM_BUILD_ROOT%{arch}/bin/gcc $RPM_BUILD_ROOT%{_bindir}/%{target}-gcc
143
144 %clean
145 rm -rf $RPM_BUILD_ROOT
146
147 %files
148 %defattr(644,root,root,755)
149 %attr(755,root,root) %{_bindir}/%{target}-gcc*
150 %attr(755,root,root) %{_bindir}/%{target}-cpp
151 %attr(755,root,root) %{_bindir}/%{target}-gcov
152 %attr(755,root,root) %{arch}/bin/gcc
153 #{arch}/lib/libiberty.a
154 %dir %{gccarch}
155 %dir %{gcclib}
156 %attr(755,root,root) %{gcclib}/cc1
157 %attr(755,root,root) %{gcclib}/collect2
158 %{gcclib}/libgcc.a
159 %{gcclib}/libgcov.a
160 %{gcclib}/specs*
161 %dir %{gcclib}/include
162
163 %{_mandir}/man1/%{target}-cpp.1*
164 %{_mandir}/man1/%{target}-gcc.1*
165 %{_mandir}/man1/%{target}-gcov.1*
166
167 %if 0
168 %files c++
169 %defattr(644,root,root,755)
170 %attr(755,root,root) %{_bindir}/%{target}-[cg]++
171 %attr(755,root,root) %{arch}/bin/[cg]++
172 %attr(755,root,root) %{gcclib}/cc1plus
173 %{arch}/lib/libstdc++.a
174 %{arch}/lib/libstdc++.la
175 %{arch}/lib/libsupc++.a
176 %{arch}/lib/libsupc++.la
177 %{arch}/include/g++
178 %{_mandir}/man1/%{target}-g++.1*
179 %endif
This page took 0.144471 seconds and 4 git commands to generate.