]> git.pld-linux.org Git - packages/crossmingw32-gcc.git/blob - crossmingw32-gcc.spec
28cc7c12882acda35a94f0b514323895ccce89b5
[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.2
5 %define apiver  2.5
6 %define apisrc  w32api-%{apiver}
7 %define runver  3.3
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:  2fada3a3effd2fd791df09df1f1534b3
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:  49c4a72951cb34c86b7583970dc058e9
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.3
36 BuildRequires:  crossmingw32-w32api >= 2.5
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/%{target}
47 %define         gcclib          %{_libdir}/gcc/%{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 anderem 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}-%{release}
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}-%{release}
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}-%{release}
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}-%{release}
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 and sparc's -mtune=* are not valid for target's g++
200 CFLAGS="%{rpmcflags}" \
201 %ifarch alpha
202 CXXFLAGS="`echo '%{rpmcflags}' | sed -e 's/ \?-mieee\>//'`"  \
203 %else
204 %ifarch sparc sparc64 sparcv9
205 CXXFLAGS="`echo '%{rpmcflags}' | sed -e 's/ \?-mtune[=0-9a-z]*//'`" \
206 %else
207 CXXFLAGS="%{rpmcflags}"  \
208 %endif
209 %endif
210 LDFLAGS="%{rpmldflags}" \
211 TEXCONFIG=false \
212 ../configure \
213         --prefix=%{_prefix} \
214         --infodir=%{_infodir} \
215         --mandir=%{_mandir} \
216         --bindir=%{arch}/bin \
217         --libdir=%{_libdir} \
218         --libexecdir=%{_libexecdir} \
219         --includedir=%{arch}/include \
220         --enable-languages="c,c++,f77,java,objc" \
221         --with-gnu-as \
222         --with-gnu-ld \
223         --with-gxx-include-dir=%{arch}/include/g++ \
224         --enable-threads \
225         --build=%{_target_platform} \
226         --host=%{_target_platform} \
227         --target=%{target}
228
229 #touch ../gcc/c-gperf.h
230
231 %{__make} \
232         LDFLAGS_FOR_TARGET="%{rpmldflags}" \
233         TARGET_LIBGCC2_CFLAGS="-UCROSS_COMPILE" \
234         build_tooldir="$build_tooldir" \
235         FLAGS_FOR_TARGET="-B${build_tooldir}/bin -B${build_tooldir}/lib -isystem ${build_tooldir}/include -nostdinc" \
236         CFLAGS_FOR_TARGET="-nostdinc" \
237         NM_FOR_TARGET="%{target}-nm"
238
239 # build libobjc.dll for Objective C
240 # it must be called from obj-%{target_platform}/%{target}/libobjc, but
241 # GCC_FOR_TARGET must be passed
242 #
243 #make -C %{target}/libobjc \
244 #       LDFLAGS="%{rpmldflags}" \
245 #       TARGET_LIBGCC2_CFLAGS="-UCROSS_COMPILE" \
246 #       DLLTOOL="%{target}-dlltool --as=%{target}-as" libobjc.dll
247
248 # spec files for msvcrt*.dll configurations
249 cd gcc
250 for n in msvcrt msvcrt20 msvcrt40; do
251         sed "s/crtdll/$n/g" <specs | sed "s/crt1/crt2/g" >specs.$n
252 done
253
254 %install
255 rm -rf $RPM_BUILD_ROOT
256 cd gcc-%{version}
257
258 install -d $RPM_BUILD_ROOT%{_bindir}
259 install -d $RPM_BUILD_ROOT%{_datadir}
260 cd obj-%{target_platform}
261
262 %{__make} install \
263         DESTDIR=$RPM_BUILD_ROOT
264
265 cd gcc
266 install specs.msvcrt specs.msvcrt20 specs.msvcrt40 $RPM_BUILD_ROOT%{gcclib}
267 cd ../..
268
269 mv -f $RPM_BUILD_ROOT%{arch}/bin/%{target}-* $RPM_BUILD_ROOT%{_bindir}
270
271 # already in arch/lib, shouldn't be here
272 rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
273
274 %if 0%{!?debug:1}
275 # strip linux binaries
276 strip -R .comment -R .note \
277         `echo $RPM_BUILD_ROOT{%{_bindir}/*,%{arch}/bin/*} | grep -v gccbug` \
278         $RPM_BUILD_ROOT%{gcclib}/{cc1*,f771,jc1,jvgenmain}
279
280 # strip mingw32 libraries
281 %{target}-strip -g \
282         $RPM_BUILD_ROOT%{gcclib}/libgcc.a \
283         $RPM_BUILD_ROOT%{arch}/lib/lib*.a
284 %endif
285
286 # restore hardlinks
287 ln -f $RPM_BUILD_ROOT%{_bindir}/%{target}-{g++,c++}
288 ln -f $RPM_BUILD_ROOT%{arch}/bin/{g++,c++}
289
290 # the same... make hardlink
291 ln -f $RPM_BUILD_ROOT%{arch}/bin/gcc $RPM_BUILD_ROOT%{_bindir}/%{target}-gcc
292
293 %clean
294 rm -rf $RPM_BUILD_ROOT
295
296 %files
297 %defattr(644,root,root,755)
298 %attr(755,root,root) %{_bindir}/%{target}-gcc*
299 %attr(755,root,root) %{_bindir}/%{target}-cpp
300 %attr(755,root,root) %{_bindir}/%{target}-gcov
301 %attr(755,root,root) %{arch}/bin/gcc
302 %{arch}/lib/libiberty.a
303
304 %dir %{gccarch}
305 %dir %{gcclib}
306 %attr(755,root,root) %{gcclib}/cc1
307 %{gcclib}/libgcc.a
308 %{gcclib}/libgcov.a
309 %{gcclib}/specs*
310 %{gcclib}/include
311
312 %{_mandir}/man1/%{target}-cpp.1*
313 %{_mandir}/man1/%{target}-gcc.1*
314 %{_mandir}/man1/%{target}-gcov.1*
315
316 %files c++
317 %defattr(644,root,root,755)
318 %attr(755,root,root) %{_bindir}/%{target}-[cg]++
319 %attr(755,root,root) %{arch}/bin/[cg]++
320 %attr(755,root,root) %{gcclib}/cc1plus
321 %{arch}/lib/libstdc++.a
322 %{arch}/lib/libstdc++.la
323 %{arch}/lib/libsupc++.a
324 %{arch}/lib/libsupc++.la
325 %{arch}/include/g++
326 %{_mandir}/man1/%{target}-g++.1*
327
328 %files objc
329 %defattr(644,root,root,755)
330 %attr(755,root,root) %{gcclib}/cc1obj
331 %{arch}/lib/libobjc.a
332 %{arch}/lib/libobjc.la
333
334 %files g77
335 %defattr(644,root,root,755)
336 %attr(755,root,root) %{_bindir}/%{target}-g77
337 %attr(755,root,root) %{gcclib}/f771
338 %{arch}/lib/libfrtbegin.a
339 %{arch}/lib/libg2c.a
340 %{arch}/lib/libg2c.la
341 %{_mandir}/man1/%{target}-g77.1*
342
343 %files java
344 %defattr(644,root,root,755)
345 %attr(755,root,root) %{_bindir}/%{target}-gcj
346 %attr(755,root,root) %{_bindir}/%{target}-gcjh
347 %attr(755,root,root) %{_bindir}/%{target}-grepjar
348 %attr(755,root,root) %{_bindir}/%{target}-jar
349 %attr(755,root,root) %{_bindir}/%{target}-jcf-dump
350 %attr(755,root,root) %{_bindir}/%{target}-jv-scan
351 #%attr(755,root,root) %{arch}/bin/grepjar
352 #%attr(755,root,root) %{arch}/bin/jar
353 %attr(755,root,root) %{gcclib}/jc1
354 %attr(755,root,root) %{gcclib}/jvgenmain
355 %{_mandir}/man1/%{target}-gcj.1*
356 %{_mandir}/man1/%{target}-gcjh.1*
357 %{_mandir}/man1/%{target}-grepjar.1*
358 %{_mandir}/man1/%{target}-jar.1*
359 %{_mandir}/man1/%{target}-jcf-dump.1*
360 %{_mandir}/man1/%{target}-jv-scan.1*
This page took 0.108544 seconds and 3 git commands to generate.