2 %define DASHED_SNAP %{nil}
3 %define SNAP %(echo %{DASHED_SNAP} | sed -e "s#-##g")
4 %define GCC_VERSION 3.3.1
6 %define apisrc w32api-%{apiver}
8 %define runsrc mingw-runtime-%{runver}
9 Summary: Mingw32 Binary Utility Development Utilities - gcc
10 Summary(pl): Zestaw narzêdzi mingw32 - gcc
11 Name: crossmingw32-gcc
12 Version: %{GCC_VERSION}
16 Group: Development/Languages
17 Source0: ftp://gcc.gnu.org/pub/gcc/releases/gcc-%{GCC_VERSION}/gcc-%{GCC_VERSION}.tar.bz2
18 # Source0-md5: 1135a104e9fa36fdf7c663598fab5c40
19 Source1: http://dl.sourceforge.net/mingw/%{apisrc}.tar.gz
20 # Source1-md5: 31d5e495150e392ac0fe6b51011d3fa2
21 Source2: http://dl.sourceforge.net/mingw/%{runsrc}.tar.gz
22 # Source2-md5: 50f4158d5354633926e63fe95591694a
23 Patch0: %{name}-noioctl.patch
24 BuildRequires: autoconf
26 BuildRequires: crossmingw32-binutils >= 2.14.90.0.4.1-2
28 %if %{without bootstrap}
29 BuildRequires: crossmingw32-runtime >= 3.0
30 BuildRequires: crossmingw32-w32api >= 2.3
32 Requires: crossmingw32-binutils >= 2.14.90.0.4.1-2
33 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35 %define no_install_post_strip 1
37 %define target i386-mingw32
38 %define target_platform i386-pc-mingw32
39 %define arch %{_prefix}/%{target}
40 %define gccarch %{_prefix}/lib/gcc-lib/%{target}
41 %define gcclib %{_prefix}/lib/gcc-lib/%{target}/%{version}
44 crossmingw32 is a complete cross-compiling development system for
45 building stand-alone Microsoft Windows applications under Linux using
46 the Mingw32 build libraries. This includes a binutils, gcc with g++
47 and objc, and libstdc++, all cross targeted to i386-mingw32, along
48 with supporting Win32 libraries in 'coff' format from free sources.
50 This package contains cross targeted gcc.
53 crossmingw32 jest kompletnym systemem do kroskompilacji, pozwalaj±cym
54 budowaæ aplikacje MS Windows pod Linuksem u¿ywaj±c bibliotek mingw32.
55 System sk³ada siê z binutils, gcc z g++ i objc, libstdc++ - wszystkie
56 generuj±ce kod dla platformy i386-mingw32, oraz z bibliotek w formacie
59 Ten pakiet zawiera gcc generuj±ce kod dla Win32.
62 Summary: Mingw32 Binary Utility Development Utilities - g++
63 Summary(pl): Zestaw narzêdzi mingw32 - g++
64 Group: Development/Languages
65 Requires: %{name} = %{epoch}:%{version}
68 crossmingw32 is a complete cross-compiling development system for
69 building stand-alone Microsoft Windows applications under Linux using
70 the Mingw32 build libraries. This includes a binutils, gcc with g++
71 and objc, and libstdc++, all cross targeted to i386-mingw32, along
72 with supporting Win32 libraries in 'coff' format from free sources.
74 This package contains cross targeted g++ and (static) libstdc++.
76 %description c++ -l pl
77 crossmingw32 jest kompletnym systemem do kroskompilacji, pozwalaj±cym
78 budowaæ aplikacje MS Windows pod Linuksem u¿ywaj±c bibliotek mingw32.
79 System sk³ada siê z binutils, gcc z g++ i objc, libstdc++ - wszystkie
80 generuj±ce kod dla platformy i386-mingw32, oraz z bibliotek w formacie
83 Ten pakiet zawiera g++ generuj±ce kod pod Win32 oraz bibliotekê
86 # does this even work?
88 Summary: Mingw32 Binary Utility Development Utilities - objc
89 Summary(pl): Zestaw narzêdzi mingw32 - objc
90 Group: Development/Languages
91 Requires: %{name} = %{epoch}:%{version}
94 crossmingw32 is a complete cross-compiling development system for
95 building stand-alone Microsoft Windows applications under Linux using
96 the Mingw32 build libraries. This includes a binutils, gcc with g++
97 and objc, and libstdc++, all cross targeted to i386-mingw32, along
98 with supporting Win32 libraries in 'coff' format from free sources.
100 This package contains cross targeted objc.
102 %description objc -l pl
103 crossmingw32 jest kompletnym systemem do kroskompilacji, pozwalaj±cym
104 budowaæ aplikacje MS Windows pod Linuksem u¿ywaj±c bibliotek mingw32.
105 System sk³ada siê z binutils, gcc z g++ i objc, libstdc++ - wszystkie
106 generuj±ce kod dla platformy i386-mingw32, oraz z bibliotek w formacie
109 Ten pakiet zawiera kompilator objc generuj±cy kod pod Win32.
111 # does this even work?
113 Summary: Mingw32 Binary Utility Development Utilities - g77
114 Summary(pl): Zestaw narzêdzi mingw32 - g77
115 Group: Development/Languages
116 Requires: %{name} = %{epoch}:%{version}
119 crossmingw32 is a complete cross-compiling development system for
120 building stand-alone Microsoft Windows applications under Linux using
121 the Mingw32 build libraries. This includes a binutils, gcc with g++
122 and objc, and libstdc++, all cross targeted to i386-mingw32, along
123 with supporting Win32 libraries in 'coff' format from free sources.
125 This package contains cross targeted g77.
127 %description g77 -l pl
128 crossmingw32 jest kompletnym systemem do kroskompilacji, pozwalaj±cym
129 budowaæ aplikacje MS Windows pod Linuksem u¿ywaj±c bibliotek mingw32.
130 System sk³ada siê z binutils, gcc z g++ i objc, libstdc++ - wszystkie
131 generuj±ce kod dla platformy i386-mingw32, oraz z bibliotek w formacie
134 Ten pakiet zawiera g77 generuj±cy kod pod Win32.
136 # does this even work?
138 Summary: Mingw32 Binary Utility Development Utilities - java
139 Summary(pl): Zestaw narzêdzi mingw32 - java
140 Group: Development/Languages
141 Requires: %{name} = %{epoch}:%{version}
144 crossmingw32 is a complete cross-compiling development system for
145 building stand-alone Microsoft Windows applications under Linux using
146 the Mingw32 build libraries. This includes a binutils, gcc with g++
147 and objc, and libstdc++, all cross targeted to i386-mingw32, along
148 with supporting Win32 libraries in 'coff' format from free sources.
150 This package contains cross targeted java.
152 %description java -l pl
153 crossmingw32 jest kompletnym systemem do kroskompilacji, pozwalaj±cym
154 budowaæ aplikacje MS Windows pod Linuksem u¿ywaj±c bibliotek mingw32.
155 System sk³ada siê z binutils, gcc z g++ i objc, libstdc++ - wszystkie
156 generuj±ce kod dla platformy i386-mingw32, oraz z bibliotek w formacie
159 Ten pakiet zawiera kompilator Javy generuj±cy kod pod Win32.
164 %if %{with bootstrap}
166 tar xzf %{SOURCE1} -C winsup
167 tar xzf %{SOURCE2} -C winsup
173 %if %{with bootstrap}
174 for tool in as ar dlltool ld nm ranlib strip ; do
175 ln -sf %{arch}/bin/$tool winsup/bin/$tool
177 build_tooldir=`pwd`/winsup
179 build_tooldir=%{arch}
182 rm -rf obj-%{target_platform} && install -d obj-%{target_platform} && cd obj-%{target_platform}
184 CFLAGS="%{rpmcflags}" \
185 CXXFLAGS="%{rpmcflags}" \
186 LDFLAGS="%{rpmldflags}" \
189 --prefix=%{_prefix} \
190 --infodir=%{_infodir} \
191 --mandir=%{_mandir} \
192 --bindir=%{arch}/bin \
193 --includedir=%{arch}/include \
194 --enable-languages="c,c++,f77,java,objc" \
197 --with-gxx-include-dir=%{arch}/include/g++ \
199 --build=%{_target_platform} \
200 --host=%{_target_platform} \
203 #touch ../gcc/c-gperf.h
206 LDFLAGS_FOR_TARGET="%{rpmldflags}" \
207 TARGET_LIBGCC2_CFLAGS="-UCROSS_COMPILE" \
208 build_tooldir="$build_tooldir" \
209 FLAGS_FOR_TARGET="-B${build_tooldir}/bin -B${build_tooldir}/lib -isystem ${build_tooldir}/include -nostdinc" \
210 CFLAGS_FOR_TARGET="-nostdinc" \
211 NM_FOR_TARGET="%{target}-nm"
213 # build libobjc.dll for Objective C
214 # to trzeba wywo³ywaæ z katalogu obj-%{target_platform}/%{target}/libobjc
215 # ale trzeba podaæ jeszcze GCC_FOR_TARGET - a mi siê nie chce.
216 # BTW, ten dll jest do czego¶ potrzebny???
218 #make -C %{target}/libobjc \
219 # LDFLAGS="%{rpmldflags}" \
220 # TARGET_LIBGCC2_CFLAGS="-UCROSS_COMPILE" \
221 # DLLTOOL="%{target}-dlltool --as=%{target}-as" libobjc.dll
223 # spec files for msvcrt*.dll configurations
225 for n in msvcrt msvcrt20 msvcrt40; do
226 sed "s/crtdll/$n/g" <specs | sed "s/crt1/crt2/g" >specs.$n
230 rm -rf $RPM_BUILD_ROOT
233 install -d $RPM_BUILD_ROOT%{_bindir}
234 install -d $RPM_BUILD_ROOT%{_datadir}
235 cd obj-%{target_platform}
238 DESTDIR=$RPM_BUILD_ROOT
241 install specs.msvcrt specs.msvcrt20 specs.msvcrt40 $RPM_BUILD_ROOT%{gcclib}
244 mv -f $RPM_BUILD_ROOT%{arch}/bin/%{target}-* $RPM_BUILD_ROOT%{_bindir}
246 # already in arch/lib, shouldn't be here
247 rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
250 # strip linux binaries
251 strip -R .comment -R .note \
252 `echo $RPM_BUILD_ROOT{%{_bindir}/*,%{arch}/bin/*} | grep -v gccbug` \
253 $RPM_BUILD_ROOT%{gcclib}/{cc1*,f771,jc1,jvgenmain}
255 # strip mingw32 libraries
257 $RPM_BUILD_ROOT%{gcclib}/libgcc.a \
258 $RPM_BUILD_ROOT%{arch}/lib/lib*.a
262 ln -f $RPM_BUILD_ROOT%{_bindir}/%{target}-{g++,c++}
263 ln -f $RPM_BUILD_ROOT%{arch}/bin/{g++,c++}
265 # the same... make hardlink
266 ln -f $RPM_BUILD_ROOT%{arch}/bin/gcc $RPM_BUILD_ROOT%{_bindir}/%{target}-gcc
269 rm -rf $RPM_BUILD_ROOT
272 %defattr(644,root,root,755)
273 %attr(755,root,root) %{_bindir}/%{target}-gcc*
274 %attr(755,root,root) %{_bindir}/%{target}-cpp
275 %attr(755,root,root) %{_bindir}/%{target}-gcov
276 %attr(755,root,root) %{arch}/bin/gcc
277 %{arch}/lib/libiberty.a
281 %attr(755,root,root) %{gcclib}/cc1
286 %{_mandir}/man1/%{target}-gcc.1*
289 %defattr(644,root,root,755)
290 %attr(755,root,root) %{_bindir}/%{target}-[cg]++
291 %attr(755,root,root) %{arch}/bin/[cg]++
292 %attr(755,root,root) %{gcclib}/cc1plus
293 %{arch}/lib/libstdc++.a
294 %{arch}/lib/libstdc++.la
295 %{arch}/lib/libsupc++.a
296 %{arch}/lib/libsupc++.la
298 %{_mandir}/man1/%{target}-g++.1*
301 %defattr(644,root,root,755)
302 %attr(755,root,root) %{gcclib}/cc1obj
303 %{arch}/lib/libobjc.a
304 %{arch}/lib/libobjc.la
307 %defattr(644,root,root,755)
308 %attr(755,root,root) %{_bindir}/%{target}-g77
309 %attr(755,root,root) %{gcclib}/f771
310 %{arch}/lib/libfrtbegin.a
312 %{arch}/lib/libg2c.la
313 %{_mandir}/man1/%{target}-g77.1*
316 %defattr(644,root,root,755)
317 %attr(755,root,root) %{_bindir}/%{target}-gcj
318 %attr(755,root,root) %{_bindir}/%{target}-gcjh
319 %attr(755,root,root) %{_bindir}/%{target}-jcf-dump
320 %attr(755,root,root) %{_bindir}/%{target}-jv-scan
321 %attr(755,root,root) %{arch}/bin/grepjar
322 %attr(755,root,root) %{arch}/bin/jar
323 %attr(755,root,root) %{gcclib}/jc1
324 %attr(755,root,root) %{gcclib}/jvgenmain
325 %{_mandir}/man1/%{target}-gcj.1*