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