]> git.pld-linux.org Git - packages/crossmingw32-gcc.git/blob - crossmingw32-gcc.spec
- another try at amd64
[packages/crossmingw32-gcc.git] / crossmingw32-gcc.spec
1 %bcond_with     bootstrap
2 %define         DASHED_SNAP     %{nil}
3 %define         SNAP            %(echo %{DASHED_SNAP} | sed -e "s#-##g")
4 %define         GCC_VERSION     3.3.2
5 %define apiver  2.4
6 %define apisrc  w32api-%{apiver}
7 %define runver  3.2
8 %define runsrc  mingw-runtime-%{runver}
9 Summary:        Cross Mingw32 GNU binary utility development utilities - gcc
10 Summary(es):    Utilitarios para desarrollo de binarios de la GNU - Mingw32 gcc
11 Summary(fr):    Utilitaires de développement binaire de GNU - Mingw32 gcc
12 Summary(pl):    Skro¶ne narzêdzia programistyczne GNU dla Mingw32 - gcc
13 Summary(pt_BR): Utilitários para desenvolvimento de binários da GNU - Mingw32 gcc
14 Summary(tr):    GNU geliþtirme araçlarý - Mingw32 gcc
15 Name:           crossmingw32-gcc
16 Version:        %{GCC_VERSION}
17 Release:        1
18 Epoch:          1
19 License:        GPL
20 Group:          Development/Languages
21 Source0:        ftp://gcc.gnu.org/pub/gcc/releases/gcc-%{GCC_VERSION}/gcc-%{GCC_VERSION}.tar.bz2
22 # Source0-md5:  65999f654102f5438ac8562d13a6eced
23 Source1:        http://dl.sourceforge.net/mingw/%{apisrc}.tar.gz
24 # Source1-md5:  9f9b9a7a7ef14e112924fea46b3360ce
25 Source2:        http://dl.sourceforge.net/mingw/%{runsrc}.tar.gz
26 # Source2-md5:  ecfd49e08f20a88b7ba11a755f2b53c2
27 Patch0:         %{name}-noioctl.patch
28 BuildRequires:  autoconf
29 BuildRequires:  automake
30 BuildRequires:  bison
31 BuildRequires:  crossmingw32-binutils >= 2.14.90.0.4.1-2
32 BuildRequires:  flex
33 %if %{without bootstrap}
34 BuildRequires:  crossmingw32-runtime >= 3.0
35 BuildRequires:  crossmingw32-w32api >= 2.3
36 %endif
37 Requires:       crossmingw32-binutils >= 2.14.90.0.4.1-2
38 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39
40 %define         no_install_post_strip   1
41
42 %define         target          i386-mingw32
43 %define         target_platform i386-pc-mingw32
44 %define         arch            %{_prefix}/%{target}
45 %define         gccarch         %{_libdir}/gcc-lib/%{target}
46 %define         gcclib          %{_libdir}/gcc-lib/%{target}/%{version}
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 i386-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} = %{epoch}:%{version}
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} = %{epoch}:%{version}
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.
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 g77
122 Summary:        Mingw32 binary utility development utilities - g77
123 Summary(pl):    Zestaw narzêdzi mingw32 - g77
124 Group:          Development/Languages
125 Requires:       %{name} = %{epoch}:%{version}
126
127 %description g77
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 g77.
135
136 %description g77 -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 g77 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} = %{epoch}:%{version}
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.
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 -c
173 cd gcc-%{version}
174 %if %{with bootstrap}
175 mkdir winsup
176 tar xzf %{SOURCE1} -C winsup
177 tar xzf %{SOURCE2} -C winsup
178 %endif
179 %patch -p1
180
181 %build
182 cd gcc-%{version}
183 %if %{with bootstrap}
184 for tool in as ar dlltool ld nm ranlib strip ; do
185         ln -sf %{arch}/bin/$tool winsup/bin/$tool
186 done
187 build_tooldir=`pwd`/winsup
188 %else
189 build_tooldir=%{arch}
190 %endif
191
192 cp /usr/share/automake/config.sub .
193 cp /usr/share/automake/config.sub boehm-gc
194
195 rm -rf obj-%{target_platform} && install -d obj-%{target_platform} && cd obj-%{target_platform}
196
197 # note: alpha's -mieee is not valid for target's g++
198 CFLAGS="%{rpmcflags}" \
199 %ifarch alpha
200 CXXFLAGS="`echo '%{rpmcflags}' | sed -e 's/ \?-mieee\>//'`"  \
201 %else
202 CXXFLAGS="%{rpmcflags}"  \
203 %endif
204 LDFLAGS="%{rpmldflags}" \
205 TEXCONFIG=false \
206 ../configure \
207         --prefix=%{_prefix} \
208         --infodir=%{_infodir} \
209         --mandir=%{_mandir} \
210         --bindir=%{arch}/bin \
211         --libdir=%{_libdir} \
212         --includedir=%{arch}/include \
213         --enable-languages="c,c++,f77,java,objc" \
214         --with-gnu-as \
215         --with-gnu-ld \
216         --with-gxx-include-dir=%{arch}/include/g++ \
217         --enable-threads \
218         --build=%{_target_platform} \
219         --host=%{_target_platform} \
220         --target=%{target}
221
222 #touch ../gcc/c-gperf.h
223
224 %{__make} \
225         LDFLAGS_FOR_TARGET="%{rpmldflags}" \
226         TARGET_LIBGCC2_CFLAGS="-UCROSS_COMPILE" \
227         build_tooldir="$build_tooldir" \
228         FLAGS_FOR_TARGET="-B${build_tooldir}/bin -B${build_tooldir}/lib -isystem ${build_tooldir}/include -nostdinc" \
229         CFLAGS_FOR_TARGET="-nostdinc" \
230         NM_FOR_TARGET="%{target}-nm"
231
232 # build libobjc.dll for Objective C
233 # to trzeba wywo³ywaæ z katalogu obj-%{target_platform}/%{target}/libobjc
234 # ale trzeba podaæ jeszcze GCC_FOR_TARGET - a mi siê nie chce.
235 # BTW, ten dll jest do czego¶ potrzebny???
236 #
237 #make -C %{target}/libobjc \
238 #       LDFLAGS="%{rpmldflags}" \
239 #       TARGET_LIBGCC2_CFLAGS="-UCROSS_COMPILE" \
240 #       DLLTOOL="%{target}-dlltool --as=%{target}-as" libobjc.dll
241
242 # spec files for msvcrt*.dll configurations
243 cd gcc
244 for n in msvcrt msvcrt20 msvcrt40; do
245         sed "s/crtdll/$n/g" <specs | sed "s/crt1/crt2/g" >specs.$n
246 done
247
248 %install
249 rm -rf $RPM_BUILD_ROOT
250 cd gcc-%{version}
251
252 install -d $RPM_BUILD_ROOT%{_bindir}
253 install -d $RPM_BUILD_ROOT%{_datadir}
254 cd obj-%{target_platform}
255
256 %{__make} install \
257         DESTDIR=$RPM_BUILD_ROOT
258
259 cd gcc
260 install specs.msvcrt specs.msvcrt20 specs.msvcrt40 $RPM_BUILD_ROOT%{gcclib}
261 cd ../..
262
263 mv -f $RPM_BUILD_ROOT%{arch}/bin/%{target}-* $RPM_BUILD_ROOT%{_bindir}
264
265 # already in arch/lib, shouldn't be here
266 rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
267
268 %if 0%{!?debug:1}
269 # strip linux binaries
270 strip -R .comment -R .note \
271         `echo $RPM_BUILD_ROOT{%{_bindir}/*,%{arch}/bin/*} | grep -v gccbug` \
272         $RPM_BUILD_ROOT%{gcclib}/{cc1*,f771,jc1,jvgenmain}
273
274 # strip mingw32 libraries
275 %{target}-strip -g \
276         $RPM_BUILD_ROOT%{gcclib}/libgcc.a \
277         $RPM_BUILD_ROOT%{arch}/%{_lib}/lib*.a
278 %endif
279
280 # restore hardlinks
281 ln -f $RPM_BUILD_ROOT%{_bindir}/%{target}-{g++,c++}
282 ln -f $RPM_BUILD_ROOT%{arch}/bin/{g++,c++}
283
284 # the same... make hardlink
285 ln -f $RPM_BUILD_ROOT%{arch}/bin/gcc $RPM_BUILD_ROOT%{_bindir}/%{target}-gcc
286
287 %clean
288 rm -rf $RPM_BUILD_ROOT
289
290 %files
291 %defattr(644,root,root,755)
292 %attr(755,root,root) %{_bindir}/%{target}-gcc*
293 %attr(755,root,root) %{_bindir}/%{target}-cpp
294 %attr(755,root,root) %{_bindir}/%{target}-gcov
295 %attr(755,root,root) %{arch}/bin/gcc
296 %{arch}/%{_lib}/libiberty.a
297
298 %dir %{gccarch}
299 %dir %{gcclib}
300 %attr(755,root,root) %{gcclib}/cc1
301 %{gcclib}/libgcc.a
302 %{gcclib}/specs*
303 %{gcclib}/include
304
305 %{_mandir}/man1/%{target}-gcc.1*
306
307 %files c++
308 %defattr(644,root,root,755)
309 %attr(755,root,root) %{_bindir}/%{target}-[cg]++
310 %attr(755,root,root) %{arch}/bin/[cg]++
311 %attr(755,root,root) %{gcclib}/cc1plus
312 %{arch}/%{_lib}/libstdc++.a
313 %{arch}/%{_lib}/libstdc++.la
314 %{arch}/%{_lib}/libsupc++.a
315 %{arch}/%{_lib}/libsupc++.la
316 %{arch}/include/g++
317 %{_mandir}/man1/%{target}-g++.1*
318
319 %files objc
320 %defattr(644,root,root,755)
321 %attr(755,root,root) %{gcclib}/cc1obj
322 %{arch}/%{_lib}/libobjc.a
323 %{arch}/%{_lib}/libobjc.la
324
325 %files g77
326 %defattr(644,root,root,755)
327 %attr(755,root,root) %{_bindir}/%{target}-g77
328 %attr(755,root,root) %{gcclib}/f771
329 %{arch}/%{_lib}/libfrtbegin.a
330 %{arch}/%{_lib}/libg2c.a
331 %{arch}/%{_lib}/libg2c.la
332 %{_mandir}/man1/%{target}-g77.1*
333
334 %files java
335 %defattr(644,root,root,755)
336 %attr(755,root,root) %{_bindir}/%{target}-gcj
337 %attr(755,root,root) %{_bindir}/%{target}-gcjh
338 %attr(755,root,root) %{_bindir}/%{target}-jcf-dump
339 %attr(755,root,root) %{_bindir}/%{target}-jv-scan
340 %attr(755,root,root) %{arch}/bin/grepjar
341 %attr(755,root,root) %{arch}/bin/jar
342 %attr(755,root,root) %{gcclib}/jc1
343 %attr(755,root,root) %{gcclib}/jvgenmain
344 %{_mandir}/man1/%{target}-gcj.1*
This page took 0.087592 seconds and 4 git commands to generate.