]> git.pld-linux.org Git - packages/crossmingw32ce-gcc.git/blob - crossmingw32ce-gcc.spec
- drop obsolete files
[packages/crossmingw32ce-gcc.git] / crossmingw32ce-gcc.spec
1 #
2 # Conditional build:
3 %bcond_with     bootstrap       # bootstrap build (using binary w32api/mingw)
4 #
5 Summary:        Cross Mingw32CE GNU binary utility development utilities - gcc
6 Summary(es.UTF-8):      Utilitarios para desarrollo de binarios de la GNU - Mingw32CE gcc
7 Summary(fr.UTF-8):      Utilitaires de développement binaire de GNU - Mingw32CE gcc
8 Summary(pl.UTF-8):      Skrośne narzędzia programistyczne GNU dla Mingw32CE - gcc
9 Summary(pt_BR.UTF-8):   Utilitários para desenvolvimento de binários da GNU - Mingw32CE gcc
10 Summary(tr.UTF-8):      GNU geliştirme araçları - Mingw32CE gcc
11 Name:           crossmingw32ce-gcc
12 Version:        4.1.0
13 Release:        0.1
14 License:        GPL
15 Group:          Development/Languages
16 #Source0:       ftp://gcc.gnu.org/pub/gcc/releases/gcc-%{version}/gcc-%{version}.tar.bz2
17 # https://cegcc.svn.sourceforge.net/svnroot/cegcc/trunk/cegcc/src/gcc
18 Source0:        gcc-20070227.909.tar.bz2
19 # Source0-md5:  ece53d2ea4d055f48d4f819922332d21
20 Patch0:         gcc-nodebug.patch
21 Patch1:         %{name}-bug25672.patch
22 BuildRequires:  autoconf
23 BuildRequires:  automake
24 BuildRequires:  bison
25 BuildRequires:  crossmingw32ce-binutils >= 2.15.91.0.2-2
26 BuildRequires:  flex
27 BuildRequires:  rpmbuild(macros) >= 1.315
28 %if %{with bootstrap}
29 # download rpm from http://cegcc.sourceforge.net/
30 BuildRequires:  cegcc
31 %else
32 BuildRequires:  crossmingw32ce-runtime >= 3.5
33 BuildRequires:  crossmingw32ce-w32api >= 3.1
34 %endif
35 Requires:       crossmingw32ce-binutils >= 2.15.91.0.2-2
36 Requires:       gcc-dirs
37 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38
39 %define         target          arm-wince-mingw32ce
40 %define         target_platform arm-wince-mingw32ce
41 %define         arch            %{_prefix}/%{target}
42 %define         gccarch         %{_libdir}/gcc/%{target}
43 %define         gcclib          %{gccarch}/%{version}
44
45 %define         _noautostrip    .*/lib.*\\.a
46
47 # -march=i686 is invalid
48 # so as i can't decide whether to use -march=armv4 or -march=armv5, i'll just strip
49 %define         filterout_c             -march=.*
50 %define         filterout_cxx   -march=.*
51
52 %description
53 crossmingw32ce is a complete cross-compiling development system for
54 building stand-alone Microsoft Windows applications under Linux using
55 the Mingw32CE build libraries. This includes a binutils, gcc with g++
56 and objc, and libstdc++, all cross targeted to i386-mingw32ce, along
57 with supporting Win32 libraries in 'coff' format from free sources.
58
59 This package contains cross targeted gcc.
60
61 %description -l de.UTF-8
62 Dieses Paket enthält einen Cross-gcc, der es erlaubt, auf einem
63 anderem Rechner Code für Win32 zu generieren.
64
65 %description -l pl.UTF-8
66 crossmingw32ce jest kompletnym systemem do kompilacji skrośnej,
67 pozwalającym budować aplikacje MS Windows pod Linuksem używając
68 bibliotek Mingw32CE. System składa się z binutils, gcc z g++ i objc,
69 libstdc++ - wszystkie generujące kod dla platformy i386-mingw32ce,
70 oraz z bibliotek w formacie COFF.
71
72 Ten pakiet zawiera gcc generujące skrośnie kod dla Win32.
73
74 %package c++
75 Summary:        Mingw32CE binary utility development utilities - g++
76 Summary(pl.UTF-8):      Zestaw narzędzi mingw32ce - g++
77 Group:          Development/Languages
78 Requires:       %{name} = %{version}-%{release}
79
80 %description c++
81 crossmingw32ce is a complete cross-compiling development system for
82 building stand-alone Microsoft Windows applications under Linux using
83 the Mingw32CE build libraries. This includes a binutils, gcc with g++
84 and objc, and libstdc++, all cross targeted to i386-mingw32ce, along
85 with supporting Win32 libraries in 'coff' format from free sources.
86
87 This package contains cross targeted g++ and (static) libstdc++.
88
89 %description c++ -l pl.UTF-8
90 crossmingw32ce jest kompletnym systemem do kompilacji skrośnej,
91 pozwalającym budować aplikacje MS Windows pod Linuksem używając
92 bibliotek mingw32ce. System składa się z binutils, gcc z g++ i objc,
93 libstdc++ - wszystkie generujące kod dla platformy i386-mingw32ce,
94 oraz z bibliotek w formacie COFF.
95
96 Ten pakiet zawiera g++ generujące kod pod Win32 oraz bibliotekę
97 libstdc++.
98
99 %prep
100 %setup -q -n gcc
101 %if %{with bootstrap}
102 install -d winsup/w32api
103 ln -s /usr/ppc/%{target}/include/w32api winsup/w32api/include
104 %endif
105 #{!?debug:%patch0 -p1}
106 %patch1 -p0
107
108 %build
109 %if %{with bootstrap}
110 #for tool in as ar dlltool ld nm ranlib strip; do
111 #       ln -sf %{arch}/bin/$tool winsup/bin/$tool
112 #done
113 build_tooldir=`pwd`/winsup
114 includedir=/usr/ppc/%{target}/include
115 %else
116 build_tooldir=%{arch}
117 includedir=/usr/%{target}/include
118 %endif
119
120 cp /usr/share/automake/config.sub .
121 cp /usr/share/automake/config.sub boehm-gc
122
123 rm -rf obj-%{target_platform}
124 install -d obj-%{target_platform}
125 cd obj-%{target_platform}
126
127 # note: alpha's -mieee and sparc's -mtune=* are not valid for target's g++
128 CFLAGS="%{rpmcflags}" \
129 %ifarch alpha
130 CXXFLAGS="`echo '%{rpmcflags}' | sed -e 's/ \?-mieee\>//'`" \
131 %else
132 %ifarch sparc sparc64 sparcv9
133 CXXFLAGS="`echo '%{rpmcflags}' | sed -e 's/ \?-mtune[=0-9a-z]*//'`" \
134 %else
135 CXXFLAGS="%{rpmcflags}" \
136 %endif
137 %endif
138 LDFLAGS="%{rpmldflags}" \
139 TEXCONFIG=false \
140 ../configure \
141         --prefix=%{_prefix} \
142         --infodir=%{_infodir} \
143         --mandir=%{_mandir} \
144         --bindir=%{arch}/bin \
145         --libdir=%{_libdir} \
146         --libexecdir=%{_libexecdir} \
147         --includedir=$includedir \
148         --disable-shared \
149         --enable-threads \
150         --enable-languages="c,c++" \
151         --enable-c99 \
152         --enable-long-long \
153         --disable-nls \
154         --with-gnu-as \
155         --with-gnu-ld \
156         --with-mangler-in-ld \
157         --with-gxx-include-dir=%{arch}/include/g++ \
158         --build=%{_target_platform} \
159         --host=%{_target_platform} \
160         --target=%{target}
161
162 %{__make} all
163
164 # spec files for msvcrt*.dll configurations
165 cd gcc
166 for n in msvcrt msvcrt20 msvcrt40; do
167         sed "s/crtdll/$n/g" <specs | sed "s/crt1/crt2/g" >specs.$n
168 done
169
170 %install
171 rm -rf $RPM_BUILD_ROOT
172 install -d $RPM_BUILD_ROOT{%{_bindir},%{_datadir}}
173
174 cd obj-%{target_platform}
175
176 %{__make} install \
177         DESTDIR=$RPM_BUILD_ROOT
178
179 cd gcc
180 install specs.msvcrt specs.msvcrt20 specs.msvcrt40 $RPM_BUILD_ROOT%{gcclib}
181 cd ../..
182
183 mv -f $RPM_BUILD_ROOT%{arch}/bin/%{target}-* $RPM_BUILD_ROOT%{_bindir}
184
185 # already in arch/lib, shouldn't be here
186 rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
187
188 # include/ contains install-tools/include/* and headers that were fixed up
189 # by fixincludes, we don't want former
190 gccdir=$RPM_BUILD_ROOT%{gcclib}
191 mkdir   $gccdir/tmp
192 # we have to save these however
193 mv -f   $gccdir/include/syslimits.h $gccdir/tmp
194 rm -rf  $gccdir/include
195 mv -f   $gccdir/tmp $gccdir/include
196 cp -f   $gccdir/install-tools/include/*.h $gccdir/include
197 # but we don't want anything more from install-tools
198 rm -rf  $gccdir/install-tools
199
200 %if 0%{!?debug:1}
201 %{target}-strip -g -R.note -R.comment $RPM_BUILD_ROOT%{gcclib}/libgcc.a
202 %{target}-strip -g -R.note -R.comment $RPM_BUILD_ROOT%{gcclib}/libgcov.a
203 %{target}-strip -g -R.note -R.comment $RPM_BUILD_ROOT%{arch}/lib/lib*.a
204 %endif
205
206 # restore hardlinks
207 ln -f $RPM_BUILD_ROOT%{_bindir}/%{target}-{g++,c++}
208 ln -f $RPM_BUILD_ROOT%{arch}/bin/{g++,c++}
209
210 # the same... make hardlink
211 ln -f $RPM_BUILD_ROOT%{arch}/bin/gcc $RPM_BUILD_ROOT%{_bindir}/%{target}-gcc
212
213 %clean
214 rm -rf $RPM_BUILD_ROOT
215
216 %files
217 %defattr(644,root,root,755)
218 %attr(755,root,root) %{_bindir}/%{target}-gcc*
219 %attr(755,root,root) %{_bindir}/%{target}-cpp
220 %attr(755,root,root) %{_bindir}/%{target}-gcov
221 %attr(755,root,root) %{arch}/bin/gcc
222 %{arch}/lib/libiberty.a
223
224 %dir %{gccarch}
225 %dir %{gcclib}
226 %attr(755,root,root) %{gcclib}/cc1
227 %attr(755,root,root) %{gcclib}/collect2
228 %{gcclib}/libgcc.a
229 %{gcclib}/libgcov.a
230 %{gcclib}/specs*
231 %{gcclib}/include
232
233 %{_mandir}/man1/%{target}-cpp.1*
234 %{_mandir}/man1/%{target}-gcc.1*
235 %{_mandir}/man1/%{target}-gcov.1*
236
237 %{arch}/lib/libssp.a
238 %{arch}/lib/libssp.la
239 %{arch}/lib/libssp_nonshared.a
240 %{arch}/lib/libssp_nonshared.la
241
242 %files c++
243 %defattr(644,root,root,755)
244 %attr(755,root,root) %{_bindir}/%{target}-[cg]++
245 %attr(755,root,root) %{arch}/bin/[cg]++
246 %attr(755,root,root) %{gcclib}/cc1plus
247 %{arch}/lib/libstdc++.a
248 %{arch}/lib/libstdc++.la
249 %{arch}/lib/libsupc++.a
250 %{arch}/lib/libsupc++.la
251 %{arch}/include/g++
252 %{_mandir}/man1/%{target}-g++.1*
This page took 0.060552 seconds and 3 git commands to generate.