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