2 %define DASHED_SNAP %{nil}
3 %define SNAP %(echo %{DASHED_SNAP} | sed -e "s#-##g")
4 %define GCC_VERSION 3.3
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 ExclusiveArch: %{ix86}
18 Source0: ftp://gcc.gnu.org/pub/gcc/releases/gcc-%{GCC_VERSION}/gcc-%{GCC_VERSION}.tar.bz2
19 # Source0-md5: 39147717455d8dba4d43d1b058ea46e2
20 Source1: http://dl.sourceforge.net/mingw/%{apisrc}.tar.gz
21 # Source1-md5: 31d5e495150e392ac0fe6b51011d3fa2
22 Source2: http://dl.sourceforge.net/mingw/%{runsrc}.tar.gz
23 # Source2-md5: 50f4158d5354633926e63fe95591694a
24 Patch0: %{name}-noioctl.patch
25 BuildRequires: autoconf
27 BuildRequires: crossmingw32-binutils >= 2.14.90.0.4.1-2
29 %if %{without bootstrap}
30 BuildRequires: crossmingw32-runtime >= 3.0
31 BuildRequires: crossmingw32-w32api >= 2.3
33 Requires: crossmingw32-binutils >= 2.14.90.0.4.1-2
34 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36 %define no_install_post_strip 1
38 %define target i386-mingw32
39 %define target_platform i386-pc-mingw32
40 %define arch %{_prefix}/%{target}
41 %define gccarch %{_prefix}/lib/gcc-lib/%{target}
42 %define gcclib %{_prefix}/lib/gcc-lib/%{target}/%{version}
45 crossmingw32 is a complete cross-compiling development system for
46 building stand-alone Microsoft Windows applications under Linux using
47 the Mingw32 build libraries. This includes a binutils, gcc with g++
48 and objc, and libstdc++, all cross targeted to i386-mingw32, along
49 with supporting Win32 libraries in 'coff' format from free sources.
51 This package contains cross targeted gcc.
54 crossmingw32 jest kompletnym systemem do kroskompilacji, pozwalaj±cym
55 budowaæ aplikacje MS Windows pod Linuksem u¿ywaj±c bibliotek mingw32.
56 System sk³ada siê z binutils, gcc z g++ i objc, libstdc++ - wszystkie
57 generuj±ce kod dla platformy i386-mingw32, oraz z bibliotek w formacie
60 Ten pakiet zawiera gcc generuj±ce kod dla Win32.
63 Summary: Mingw32 Binary Utility Development Utilities - g++
64 Summary(pl): Zestaw narzêdzi mingw32 - g++
65 Group: Development/Languages
66 Requires: %{name} = %{epoch}:%{version}
69 crossmingw32 is a complete cross-compiling development system for
70 building stand-alone Microsoft Windows applications under Linux using
71 the Mingw32 build libraries. This includes a binutils, gcc with g++
72 and objc, and libstdc++, all cross targeted to i386-mingw32, along
73 with supporting Win32 libraries in 'coff' format from free sources.
75 This package contains cross targeted g++ and (static) libstdc++.
77 %description c++ -l pl
78 crossmingw32 jest kompletnym systemem do kroskompilacji, pozwalaj±cym
79 budowaæ aplikacje MS Windows pod Linuksem u¿ywaj±c bibliotek mingw32.
80 System sk³ada siê z binutils, gcc z g++ i objc, libstdc++ - wszystkie
81 generuj±ce kod dla platformy i386-mingw32, oraz z bibliotek w formacie
84 Ten pakiet zawiera g++ generuj±ce kod pod Win32 oraz bibliotekê
87 # does this even work?
89 Summary: Mingw32 Binary Utility Development Utilities - objc
90 Summary(pl): Zestaw narzêdzi mingw32 - objc
91 Group: Development/Languages
92 Requires: %{name} = %{epoch}:%{version}
95 crossmingw32 is a complete cross-compiling development system for
96 building stand-alone Microsoft Windows applications under Linux using
97 the Mingw32 build libraries. This includes a binutils, gcc with g++
98 and objc, and libstdc++, all cross targeted to i386-mingw32, along
99 with supporting Win32 libraries in 'coff' format from free sources.
101 This package contains cross targeted objc.
103 %description objc -l pl
104 crossmingw32 jest kompletnym systemem do kroskompilacji, pozwalaj±cym
105 budowaæ aplikacje MS Windows pod Linuksem u¿ywaj±c bibliotek mingw32.
106 System sk³ada siê z binutils, gcc z g++ i objc, libstdc++ - wszystkie
107 generuj±ce kod dla platformy i386-mingw32, oraz z bibliotek w formacie
110 Ten pakiet zawiera kompilator objc generuj±cy kod pod Win32.
112 # does this even work?
114 Summary: Mingw32 Binary Utility Development Utilities - g77
115 Summary(pl): Zestaw narzêdzi mingw32 - g77
116 Group: Development/Languages
117 Requires: %{name} = %{epoch}:%{version}
120 crossmingw32 is a complete cross-compiling development system for
121 building stand-alone Microsoft Windows applications under Linux using
122 the Mingw32 build libraries. This includes a binutils, gcc with g++
123 and objc, and libstdc++, all cross targeted to i386-mingw32, along
124 with supporting Win32 libraries in 'coff' format from free sources.
126 This package contains cross targeted g77.
128 %description g77 -l pl
129 crossmingw32 jest kompletnym systemem do kroskompilacji, pozwalaj±cym
130 budowaæ aplikacje MS Windows pod Linuksem u¿ywaj±c bibliotek mingw32.
131 System sk³ada siê z binutils, gcc z g++ i objc, libstdc++ - wszystkie
132 generuj±ce kod dla platformy i386-mingw32, oraz z bibliotek w formacie
135 Ten pakiet zawiera g77 generuj±cy kod pod Win32.
137 # does this even work?
139 Summary: Mingw32 Binary Utility Development Utilities - java
140 Summary(pl): Zestaw narzêdzi mingw32 - java
141 Group: Development/Languages
142 Requires: %{name} = %{epoch}:%{version}
145 crossmingw32 is a complete cross-compiling development system for
146 building stand-alone Microsoft Windows applications under Linux using
147 the Mingw32 build libraries. This includes a binutils, gcc with g++
148 and objc, and libstdc++, all cross targeted to i386-mingw32, along
149 with supporting Win32 libraries in 'coff' format from free sources.
151 This package contains cross targeted java.
153 %description java -l pl
154 crossmingw32 jest kompletnym systemem do kroskompilacji, pozwalaj±cym
155 budowaæ aplikacje MS Windows pod Linuksem u¿ywaj±c bibliotek mingw32.
156 System sk³ada siê z binutils, gcc z g++ i objc, libstdc++ - wszystkie
157 generuj±ce kod dla platformy i386-mingw32, oraz z bibliotek w formacie
160 Ten pakiet zawiera kompilator Javy generuj±cy kod pod Win32.
165 %if %{with bootstrap}
167 tar xzf %{SOURCE1} -C winsup
168 tar xzf %{SOURCE2} -C winsup
174 %if %{with bootstrap}
175 for tool in as ar dlltool ld nm ranlib strip ; do
176 ln -sf %{arch}/bin/$tool winsup/bin/$tool
178 build_tooldir=`pwd`/winsup
180 build_tooldir=%{arch}
183 rm -rf obj-%{target_platform} && install -d obj-%{target_platform} && cd obj-%{target_platform}
185 CFLAGS="%{rpmcflags}" \
186 CXXFLAGS="%{rpmcflags}" \
187 LDFLAGS="%{rpmldflags}" \
190 --prefix=%{_prefix} \
191 --infodir=%{_infodir} \
192 --mandir=%{_mandir} \
193 --bindir=%{arch}/bin \
194 --includedir=%{arch}/include \
195 --enable-languages="c,c++,f77,java,objc" \
198 --with-gxx-include-dir=%{arch}/include/g++ \
200 --build=%{_target_platform} \
201 --host=%{_target_platform} \
204 #touch ../gcc/c-gperf.h
207 LDFLAGS_FOR_TARGET="%{rpmldflags}" \
208 TARGET_LIBGCC2_CFLAGS="-UCROSS_COMPILE" \
209 build_tooldir="$build_tooldir" \
210 FLAGS_FOR_TARGET="-B${build_tooldir}/bin -B${build_tooldir}/lib -isystem ${build_tooldir}/include -nostdinc" \
211 CFLAGS_FOR_TARGET="-nostdinc" \
212 NM_FOR_TARGET="%{target}-nm"
214 # build libobjc.dll for Objective C
215 # to trzeba wywo³ywaæ z katalogu obj-%{target_platform}/%{target}/libobjc
216 # ale trzeba podaæ jeszcze GCC_FOR_TARGET - a mi siê nie chce.
217 # BTW, ten dll jest do czego¶ potrzebny???
219 #make -C %{target}/libobjc \
220 # LDFLAGS="%{rpmldflags}" \
221 # TARGET_LIBGCC2_CFLAGS="-UCROSS_COMPILE" \
222 # DLLTOOL="%{target}-dlltool --as=%{target}-as" libobjc.dll
224 # spec files for msvcrt*.dll configurations
226 for n in msvcrt msvcrt20 msvcrt40; do
227 sed "s/crtdll/$n/g" <specs | sed "s/crt1/crt2/g" >specs.$n
231 rm -rf $RPM_BUILD_ROOT
234 install -d $RPM_BUILD_ROOT%{_bindir}
235 install -d $RPM_BUILD_ROOT%{_datadir}
236 cd obj-%{target_platform}
239 DESTDIR=$RPM_BUILD_ROOT
242 install specs.msvcrt specs.msvcrt20 specs.msvcrt40 $RPM_BUILD_ROOT%{gcclib}
245 mv -f $RPM_BUILD_ROOT%{arch}/bin/%{target}-* $RPM_BUILD_ROOT%{_bindir}
247 # already in arch/lib, shouldn't be here
248 rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
251 # strip linux binaries
252 strip -R .comment -R .note \
253 `echo $RPM_BUILD_ROOT{%{_bindir}/*,%{arch}/bin/*} | grep -v gccbug` \
254 $RPM_BUILD_ROOT%{gcclib}/{cc1*,f771,jc1,jvgenmain}
256 # strip mingw32 libraries
258 $RPM_BUILD_ROOT%{gcclib}/libgcc.a \
259 $RPM_BUILD_ROOT%{arch}/lib/lib*.a
263 ln -f $RPM_BUILD_ROOT%{_bindir}/%{target}-{g++,c++}
264 ln -f $RPM_BUILD_ROOT%{arch}/bin/{g++,c++}
266 # the same... make hardlink
267 ln -f $RPM_BUILD_ROOT%{arch}/bin/gcc $RPM_BUILD_ROOT%{_bindir}/%{target}-gcc
270 rm -rf $RPM_BUILD_ROOT
273 %defattr(644,root,root,755)
274 %attr(755,root,root) %{_bindir}/%{target}-gcc*
275 %attr(755,root,root) %{_bindir}/%{target}-cpp
276 %attr(755,root,root) %{_bindir}/%{target}-gcov
277 %attr(755,root,root) %{arch}/bin/gcc
278 %{arch}/lib/libiberty.a
282 %attr(755,root,root) %{gcclib}/cc1
287 %{_mandir}/man1/%{target}-gcc.1*
290 %defattr(644,root,root,755)
291 %attr(755,root,root) %{_bindir}/%{target}-[cg]++
292 %attr(755,root,root) %{arch}/bin/[cg]++
293 %attr(755,root,root) %{gcclib}/cc1plus
294 %{arch}/lib/libstdc++.a
295 %{arch}/lib/libstdc++.la
296 %{arch}/lib/libsupc++.a
297 %{arch}/lib/libsupc++.la
299 %{_mandir}/man1/%{target}-g++.1*
302 %defattr(644,root,root,755)
303 %attr(755,root,root) %{gcclib}/cc1obj
304 %{arch}/lib/libobjc.a
305 %{arch}/lib/libobjc.la
308 %defattr(644,root,root,755)
309 %attr(755,root,root) %{_bindir}/%{target}-g77
310 %attr(755,root,root) %{gcclib}/f771
311 %{arch}/lib/libfrtbegin.a
313 %{arch}/lib/libg2c.la
314 %{_mandir}/man1/%{target}-g77.1*
317 %defattr(644,root,root,755)
318 %attr(755,root,root) %{_bindir}/%{target}-gcj
319 %attr(755,root,root) %{_bindir}/%{target}-gcjh
320 %attr(755,root,root) %{_bindir}/%{target}-jcf-dump
321 %attr(755,root,root) %{_bindir}/%{target}-jv-scan
322 %attr(755,root,root) %{arch}/bin/grepjar
323 %attr(755,root,root) %{arch}/bin/jar
324 %attr(755,root,root) %{gcclib}/jc1
325 %attr(755,root,root) %{gcclib}/jvgenmain
326 %{_mandir}/man1/%{target}-gcj.1*