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