]> git.pld-linux.org Git - packages/crossmingw32-gcc.git/blob - crossmingw32-gcc.spec
- updated gcc to 3.3.3, w32api 2.5; added nodebug patch
[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.3
5 %define apiver  2.5
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:  3c6cfd9fcd180481063b4058cf6faff2
23 Source1:        http://dl.sourceforge.net/mingw/%{apisrc}.tar.gz
24 # Source1-md5:  be74d8925d1e273336ecb0d9225867f1
25 Source2:        http://dl.sourceforge.net/mingw/%{runsrc}.tar.gz
26 # Source2-md5:  ecfd49e08f20a88b7ba11a755f2b53c2
27 Patch0:         gcc-nodebug.patch
28 Patch1:         %{name}-noioctl.patch
29 BuildRequires:  autoconf
30 BuildRequires:  automake
31 BuildRequires:  bison
32 BuildRequires:  crossmingw32-binutils >= 2.14.90.0.4.1-2
33 BuildRequires:  flex
34 %if %{without bootstrap}
35 BuildRequires:  crossmingw32-runtime >= 3.0
36 BuildRequires:  crossmingw32-w32api >= 2.3
37 %endif
38 Requires:       crossmingw32-binutils >= 2.14.90.0.4.1-2
39 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
40
41 %define         no_install_post_strip   1
42
43 %define         target          i386-mingw32
44 %define         target_platform i386-pc-mingw32
45 %define         arch            %{_prefix}/%{target}
46 %define         gccarch         %{_libdir}/gcc-lib/%{target}
47 %define         gcclib          %{_libdir}/gcc-lib/%{target}/%{version}
48
49 %description
50 crossmingw32 is a complete cross-compiling development system for
51 building stand-alone Microsoft Windows applications under Linux using
52 the Mingw32 build libraries. This includes a binutils, gcc with g++
53 and objc, and libstdc++, all cross targeted to i386-mingw32, along
54 with supporting Win32 libraries in 'coff' format from free sources.
55
56 This package contains cross targeted gcc.
57
58 %description -l de
59 Dieses Paket enthält einen Cross-gcc, der es erlaubt, auf einem
60 i386-Rechner Code für Win32 zu generieren.
61
62 %description -l pl
63 crossmingw32 jest kompletnym systemem do kompilacji skro¶nej,
64 pozwalaj±cym budowaæ aplikacje MS Windows pod Linuksem u¿ywaj±c
65 bibliotek Mingw32. System sk³ada siê z binutils, gcc z g++ i objc,
66 libstdc++ - wszystkie generuj±ce kod dla platformy i386-mingw32, oraz
67 z bibliotek w formacie COFF.
68
69 Ten pakiet zawiera gcc generuj±ce skro¶nie kod dla Win32.
70
71 %package c++
72 Summary:        Mingw32 binary utility development utilities - g++
73 Summary(pl):    Zestaw narzêdzi mingw32 - g++
74 Group:          Development/Languages
75 Requires:       %{name} = %{epoch}:%{version}
76
77 %description c++
78 crossmingw32 is a complete cross-compiling development system for
79 building stand-alone Microsoft Windows applications under Linux using
80 the Mingw32 build libraries. This includes a binutils, gcc with g++
81 and objc, and libstdc++, all cross targeted to i386-mingw32, along
82 with supporting Win32 libraries in 'coff' format from free sources.
83
84 This package contains cross targeted g++ and (static) libstdc++.
85
86 %description c++ -l pl
87 crossmingw32 jest kompletnym systemem do kompilacji skro¶nej,
88 pozwalaj±cym budowaæ aplikacje MS Windows pod Linuksem u¿ywaj±c
89 bibliotek mingw32. System sk³ada siê z binutils, gcc z g++ i objc,
90 libstdc++ - wszystkie generuj±ce kod dla platformy i386-mingw32, oraz
91 z bibliotek w formacie COFF.
92
93 Ten pakiet zawiera g++ generuj±ce kod pod Win32 oraz bibliotekê
94 libstdc++.
95
96 # does this even work?
97 %package objc
98 Summary:        Mingw32 binary utility development utilities - objc
99 Summary(pl):    Zestaw narzêdzi mingw32 - objc
100 Group:          Development/Languages
101 Requires:       %{name} = %{epoch}:%{version}
102
103 %description objc
104 crossmingw32 is a complete cross-compiling development system for
105 building stand-alone Microsoft Windows applications under Linux using
106 the Mingw32 build libraries. This includes a binutils, gcc with g++
107 and objc, and libstdc++, all cross targeted to i386-mingw32, along
108 with supporting Win32 libraries in 'coff' format from free sources.
109
110 This package contains cross targeted objc.
111
112 %description objc -l pl
113 crossmingw32 jest kompletnym systemem do kompilacji skro¶nej,
114 pozwalaj±cym budowaæ aplikacje MS Windows pod Linuksem u¿ywaj±c
115 bibliotek mingw32. System sk³ada siê z binutils, gcc z g++ i objc,
116 libstdc++ - wszystkie generuj±ce kod dla platformy i386-mingw32, oraz
117 z bibliotek w formacie COFF.
118
119 Ten pakiet zawiera kompilator objc generuj±cy kod pod Win32.
120
121 # does this even work?
122 %package g77
123 Summary:        Mingw32 binary utility development utilities - g77
124 Summary(pl):    Zestaw narzêdzi mingw32 - g77
125 Group:          Development/Languages
126 Requires:       %{name} = %{epoch}:%{version}
127
128 %description g77
129 crossmingw32 is a complete cross-compiling development system for
130 building stand-alone Microsoft Windows applications under Linux using
131 the Mingw32 build libraries. This includes a binutils, gcc with g++
132 and objc, and libstdc++, all cross targeted to i386-mingw32, along
133 with supporting Win32 libraries in 'coff' format from free sources.
134
135 This package contains cross targeted g77.
136
137 %description g77 -l pl
138 crossmingw32 jest kompletnym systemem do kompilacji skro¶nej,
139 pozwalaj±cym budowaæ aplikacje MS Windows pod Linuksem u¿ywaj±c
140 bibliotek mingw32. System sk³ada siê z binutils, gcc z g++ i objc,
141 libstdc++ - wszystkie generuj±ce kod dla platformy i386-mingw32, oraz
142 z bibliotek w formacie COFF.
143
144 Ten pakiet zawiera g77 generuj±cy kod pod Win32.
145
146 # does this even work?
147 %package java
148 Summary:        Mingw32 binary utility development utilities - java
149 Summary(pl):    Zestaw narzêdzi mingw32 - java
150 Group:          Development/Languages
151 Requires:       %{name} = %{epoch}:%{version}
152
153 %description java
154 crossmingw32 is a complete cross-compiling development system for
155 building stand-alone Microsoft Windows applications under Linux using
156 the Mingw32 build libraries. This includes a binutils, gcc with g++
157 and objc, and libstdc++, all cross targeted to i386-mingw32, along
158 with supporting Win32 libraries in 'coff' format from free sources.
159
160 This package contains cross targeted java.
161
162 %description java -l pl
163
164 crossmingw32 jest kompletnym systemem do kompilacji skro¶nej,
165 pozwalaj±cym budowaæ aplikacje MS Windows pod Linuksem u¿ywaj±c
166 bibliotek mingw32. System sk³ada siê z binutils, gcc z g++ i objc,
167 libstdc++ - wszystkie generuj±ce kod dla platformy i386-mingw32, oraz
168 z bibliotek w formacie COFF.
169
170 Ten pakiet zawiera kompilator Javy generuj±cy kod pod Win32.
171
172 %prep
173 %setup -q -c
174 cd gcc-%{version}
175 %if %{with bootstrap}
176 mkdir winsup
177 tar xzf %{SOURCE1} -C winsup
178 tar xzf %{SOURCE2} -C winsup
179 %endif
180 %{!?debug:%patch0 -p1}
181 %patch1 -p1
182
183 %build
184 cd gcc-%{version}
185 %if %{with bootstrap}
186 for tool in as ar dlltool ld nm ranlib strip ; do
187         ln -sf %{arch}/bin/$tool winsup/bin/$tool
188 done
189 build_tooldir=`pwd`/winsup
190 %else
191 build_tooldir=%{arch}
192 %endif
193
194 cp /usr/share/automake/config.sub .
195 cp /usr/share/automake/config.sub boehm-gc
196
197 rm -rf obj-%{target_platform} && install -d obj-%{target_platform} && cd obj-%{target_platform}
198
199 # note: alpha's -mieee is not valid for target's g++
200 CFLAGS="%{rpmcflags}" \
201 %ifarch alpha
202 CXXFLAGS="`echo '%{rpmcflags}' | sed -e 's/ \?-mieee\>//'`"  \
203 %else
204 CXXFLAGS="%{rpmcflags}"  \
205 %endif
206 LDFLAGS="%{rpmldflags}" \
207 TEXCONFIG=false \
208 ../configure \
209         --prefix=%{_prefix} \
210         --infodir=%{_infodir} \
211         --mandir=%{_mandir} \
212         --bindir=%{arch}/bin \
213         --libdir=%{_libdir} \
214         --includedir=%{arch}/include \
215         --enable-languages="c,c++,f77,java,objc" \
216         --with-gnu-as \
217         --with-gnu-ld \
218         --with-gxx-include-dir=%{arch}/include/g++ \
219         --enable-threads \
220         --build=%{_target_platform} \
221         --host=%{_target_platform} \
222         --target=%{target}
223
224 #touch ../gcc/c-gperf.h
225
226 %{__make} \
227         LDFLAGS_FOR_TARGET="%{rpmldflags}" \
228         TARGET_LIBGCC2_CFLAGS="-UCROSS_COMPILE" \
229         build_tooldir="$build_tooldir" \
230         FLAGS_FOR_TARGET="-B${build_tooldir}/bin -B${build_tooldir}/lib -isystem ${build_tooldir}/include -nostdinc" \
231         CFLAGS_FOR_TARGET="-nostdinc" \
232         NM_FOR_TARGET="%{target}-nm"
233
234 # build libobjc.dll for Objective C
235 # to trzeba wywo³ywaæ z katalogu obj-%{target_platform}/%{target}/libobjc
236 # ale trzeba podaæ jeszcze GCC_FOR_TARGET - a mi siê nie chce.
237 # BTW, ten dll jest do czego¶ potrzebny???
238 #
239 #make -C %{target}/libobjc \
240 #       LDFLAGS="%{rpmldflags}" \
241 #       TARGET_LIBGCC2_CFLAGS="-UCROSS_COMPILE" \
242 #       DLLTOOL="%{target}-dlltool --as=%{target}-as" libobjc.dll
243
244 # spec files for msvcrt*.dll configurations
245 cd gcc
246 for n in msvcrt msvcrt20 msvcrt40; do
247         sed "s/crtdll/$n/g" <specs | sed "s/crt1/crt2/g" >specs.$n
248 done
249
250 %install
251 rm -rf $RPM_BUILD_ROOT
252 cd gcc-%{version}
253
254 install -d $RPM_BUILD_ROOT%{_bindir}
255 install -d $RPM_BUILD_ROOT%{_datadir}
256 cd obj-%{target_platform}
257
258 %{__make} install \
259         DESTDIR=$RPM_BUILD_ROOT
260
261 cd gcc
262 install specs.msvcrt specs.msvcrt20 specs.msvcrt40 $RPM_BUILD_ROOT%{gcclib}
263 cd ../..
264
265 mv -f $RPM_BUILD_ROOT%{arch}/bin/%{target}-* $RPM_BUILD_ROOT%{_bindir}
266
267 # already in arch/lib, shouldn't be here
268 rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
269
270 %if 0%{!?debug:1}
271 # strip linux binaries
272 strip -R .comment -R .note \
273         `echo $RPM_BUILD_ROOT{%{_bindir}/*,%{arch}/bin/*} | grep -v gccbug` \
274         $RPM_BUILD_ROOT%{gcclib}/{cc1*,f771,jc1,jvgenmain}
275
276 # strip mingw32 libraries
277 %{target}-strip -g \
278         $RPM_BUILD_ROOT%{gcclib}/libgcc.a \
279         $RPM_BUILD_ROOT%{arch}/lib/lib*.a
280 %endif
281
282 # restore hardlinks
283 ln -f $RPM_BUILD_ROOT%{_bindir}/%{target}-{g++,c++}
284 ln -f $RPM_BUILD_ROOT%{arch}/bin/{g++,c++}
285
286 # the same... make hardlink
287 ln -f $RPM_BUILD_ROOT%{arch}/bin/gcc $RPM_BUILD_ROOT%{_bindir}/%{target}-gcc
288
289 %clean
290 rm -rf $RPM_BUILD_ROOT
291
292 %files
293 %defattr(644,root,root,755)
294 %attr(755,root,root) %{_bindir}/%{target}-gcc*
295 %attr(755,root,root) %{_bindir}/%{target}-cpp
296 %attr(755,root,root) %{_bindir}/%{target}-gcov
297 %attr(755,root,root) %{arch}/bin/gcc
298 %{arch}/lib/libiberty.a
299
300 %dir %{gccarch}
301 %dir %{gcclib}
302 %attr(755,root,root) %{gcclib}/cc1
303 %{gcclib}/libgcc.a
304 %{gcclib}/specs*
305 %{gcclib}/include
306
307 %{_mandir}/man1/%{target}-gcc.1*
308
309 %files c++
310 %defattr(644,root,root,755)
311 %attr(755,root,root) %{_bindir}/%{target}-[cg]++
312 %attr(755,root,root) %{arch}/bin/[cg]++
313 %attr(755,root,root) %{gcclib}/cc1plus
314 %{arch}/lib/libstdc++.a
315 %{arch}/lib/libstdc++.la
316 %{arch}/lib/libsupc++.a
317 %{arch}/lib/libsupc++.la
318 %{arch}/include/g++
319 %{_mandir}/man1/%{target}-g++.1*
320
321 %files objc
322 %defattr(644,root,root,755)
323 %attr(755,root,root) %{gcclib}/cc1obj
324 %{arch}/lib/libobjc.a
325 %{arch}/lib/libobjc.la
326
327 %files g77
328 %defattr(644,root,root,755)
329 %attr(755,root,root) %{_bindir}/%{target}-g77
330 %attr(755,root,root) %{gcclib}/f771
331 %{arch}/lib/libfrtbegin.a
332 %{arch}/lib/libg2c.a
333 %{arch}/lib/libg2c.la
334 %{_mandir}/man1/%{target}-g77.1*
335
336 %files java
337 %defattr(644,root,root,755)
338 %attr(755,root,root) %{_bindir}/%{target}-gcj
339 %attr(755,root,root) %{_bindir}/%{target}-gcjh
340 %attr(755,root,root) %{_bindir}/%{target}-jcf-dump
341 %attr(755,root,root) %{_bindir}/%{target}-jv-scan
342 %attr(755,root,root) %{arch}/bin/grepjar
343 %attr(755,root,root) %{arch}/bin/jar
344 %attr(755,root,root) %{gcclib}/jc1
345 %attr(755,root,root) %{gcclib}/jvgenmain
346 %{_mandir}/man1/%{target}-gcj.1*
This page took 0.050734 seconds and 4 git commands to generate.