]> git.pld-linux.org Git - packages/crossmingw32-gcc.git/blob - crossmingw32-gcc.spec
cdaf8fa582d1d6a694294a5d4a4122a437398a82
[packages/crossmingw32-gcc.git] / crossmingw32-gcc.spec
1 %define         DASHED_SNAP     %{nil}
2 %define         SNAP            %(echo %{DASHED_SNAP} | sed -e "s#-##g")
3 %define         GCC_VERSION     3.2.1
4 %define         STDC_VERSION    4.0.0
5 %define         OBJC_VERSION    1.0.0
6 %define         GCJ_VERSION     3.2
7 Summary:        Mingw32 Binary Utility Development Utilities - gcc
8 Summary(pl):    Zestaw narzêdzi mingw32 - gcc
9 Name:           crossmingw32-gcc
10 Version:        %{GCC_VERSION}
11 Release:        1
12 Epoch:          1
13 License:        GPL
14 Group:          Development/Languages
15 ExclusiveArch:  %{ix86}
16 Source0:        ftp://gcc.gnu.org/pub/gcc/releases/gcc-%{GCC_VERSION}/gcc-%{GCC_VERSION}.tar.bz2
17 Patch0:         gcc-slibdir.patch
18 BuildRequires:  crossmingw32-platform
19 BuildRequires:  crossmingw32-binutils
20 BuildRequires:  flex
21 BuildRequires:  bison
22 BuildRequires:  autoconf
23 Requires:       crossmingw32-binutils
24 Requires:       crossmingw32-platform
25 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
26
27 %define         no_install_post_strip   1
28 %define         target          i386-mingw32
29 %define         target_platform i386-pc-mingw32
30 %define         _prefix         /usr
31 %define         arch            %{_prefix}/%{target}
32 %define         gccarch         %{_prefix}/lib/gcc-lib/%{target}
33 %define         gcclib          %{_prefix}/lib/gcc-lib/%{target}/%{version}
34
35 %description
36 crossmingw32 is a complete cross-compiling development system for
37 building stand-alone Microsoft Windows applications under Linux using
38 the Mingw32 build libraries. This includes a binutils, gcc with g++
39 and objc, and libstdc++, all cross targeted to i386-mingw32, along
40 with supporting Win32 libraries in 'coff' format from free sources.
41
42 This package contains cross targeted gcc.
43
44 %description -l pl
45 crossmingw32 jest kompletnym systemem do kroskompilacji, pozwalaj±cym
46 budowaæ aplikacje MS Windows pod Linuksem u¿ywaj±c bibliotek mingw32.
47 System sk³ada siê z binutils, gcc z g++ i objc, libstdc++ - wszystkie
48 generuj±ce kod dla platformy i386-mingw32, oraz z bibliotek w formacie
49 COFF.
50
51 Ten pakiet zawiera gcc generuj±ce kod dla Win32.
52
53 %package c++
54 Summary:        Mingw32 Binary Utility Development Utilities - g++
55 Summary(pl):    Zestaw narzêdzi mingw32 - g++
56 Group:          Development/Languages
57 Requires:       %{name} = %{version}
58
59 %description c++
60 crossmingw32 is a complete cross-compiling development system for
61 building stand-alone Microsoft Windows applications under Linux using
62 the Mingw32 build libraries. This includes a binutils, gcc with g++
63 and objc, and libstdc++, all cross targeted to i386-mingw32, along
64 with supporting Win32 libraries in 'coff' format from free sources.
65
66 This package contains cross targeted g++ and (static) libstdc++.
67
68 %description c++ -l pl
69 crossmingw32 jest kompletnym systemem do kroskompilacji, pozwalaj±cym
70 budowaæ aplikacje MS Windows pod Linuksem u¿ywaj±c bibliotek mingw32.
71 System sk³ada siê z binutils, gcc z g++ i objc, libstdc++ - wszystkie
72 generuj±ce kod dla platformy i386-mingw32, oraz z bibliotek w formacie
73 COFF.
74
75 Ten pakiet zawiera g++ generuj±ce kod pod Win32 oraz bibliotekê
76 libstdc++.
77
78 # does this even work?
79 %package objc
80 Summary:        Mingw32 Binary Utility Development Utilities - objc
81 Summary(pl):    Zestaw narzêdzi mingw32 - objc
82 Group:          Development/Languages
83 Requires:       %{name} = %{version}
84
85 %description objc
86 crossmingw32 is a complete cross-compiling development system for
87 building stand-alone Microsoft Windows applications under Linux using
88 the Mingw32 build libraries. This includes a binutils, gcc with g++
89 and objc, and libstdc++, all cross targeted to i386-mingw32, along
90 with supporting Win32 libraries in 'coff' format from free sources.
91
92 This package contains cross targeted objc.
93
94 %description objc -l pl
95 crossmingw32 jest kompletnym systemem do kroskompilacji, pozwalaj±cym
96 budowaæ aplikacje MS Windows pod Linuksem u¿ywaj±c bibliotek mingw32.
97 System sk³ada siê z binutils, gcc z g++ i objc, libstdc++ - wszystkie
98 generuj±ce kod dla platformy i386-mingw32, oraz z bibliotek w formacie
99 COFF.
100
101 Ten pakiet zawiera kompilator objc generuj±cy kod pod Win32.
102
103 # does this even work?
104 %package g77
105 Summary:        Mingw32 Binary Utility Development Utilities - g77
106 Summary(pl):    Zestaw narzêdzi mingw32 - g77
107 Group:          Development/Languages
108 Requires:       %{name} = %{version}
109
110 %description g77
111 crossmingw32 is a complete cross-compiling development system for
112 building stand-alone Microsoft Windows applications under Linux using
113 the Mingw32 build libraries. This includes a binutils, gcc with g++
114 and objc, and libstdc++, all cross targeted to i386-mingw32, along
115 with supporting Win32 libraries in 'coff' format from free sources.
116
117 This package contains cross targeted g77.
118
119 %description g77 -l pl
120 crossmingw32 jest kompletnym systemem do kroskompilacji, pozwalaj±cym
121 budowaæ aplikacje MS Windows pod Linuksem u¿ywaj±c bibliotek mingw32.
122 System sk³ada siê z binutils, gcc z g++ i objc, libstdc++ - wszystkie
123 generuj±ce kod dla platformy i386-mingw32, oraz z bibliotek w formacie
124 COFF.
125
126 Ten pakiet zawiera g77 generuj±cy kod pod Win32.
127
128 # does this even work?
129 %package java
130 Summary:        Mingw32 Binary Utility Development Utilities - java
131 Summary(pl):    Zestaw narzêdzi mingw32 - java
132 Group:          Development/Languages
133 Requires:       %{name} = %{version}
134
135 %description java
136 crossmingw32 is a complete cross-compiling development system for
137 building stand-alone Microsoft Windows applications under Linux using
138 the Mingw32 build libraries. This includes a binutils, gcc with g++
139 and objc, and libstdc++, all cross targeted to i386-mingw32, along
140 with supporting Win32 libraries in 'coff' format from free sources.
141
142 This package contains cross targeted java.
143
144 %description java -l pl
145 crossmingw32 jest kompletnym systemem do kroskompilacji, pozwalaj±cym
146 budowaæ aplikacje MS Windows pod Linuksem u¿ywaj±c bibliotek mingw32.
147 System sk³ada siê z binutils, gcc z g++ i objc, libstdc++ - wszystkie
148 generuj±ce kod dla platformy i386-mingw32, oraz z bibliotek w formacie
149 COFF.
150
151 Ten pakiet zawiera kompilator Javy generuj±cy kod pod Win32.
152
153 %prep
154 %setup -q -n gcc-%{version}
155 %patch0 -p1
156
157 %build
158 rm -rf obj-%{target_platform} && install -d obj-%{target_platform} && cd obj-%{target_platform}
159
160 CFLAGS="%{rpmcflags}" \
161 CXXFLAGS="%{rpmcflags}"  \
162 LDFLAGS="%{rpmldflags}" \
163 TEXCONFIG=false \
164 ../configure \
165         --prefix=%{_prefix} \
166         --infodir=%{_infodir} \
167         --mandir=%{_mandir} \
168         --bindir=%{arch}/bin \
169         --enable-languages="c,c++,f77,gcov,java,objc" \
170         --with-gnu-as \
171         --with-gnu-ld \
172         --with-gxx-include-dir=%{arch}/include/g++ \
173         --target=%{target}
174
175 # to nie dzia³a bo kto¶ ukrad³ gthr-win32.h i nie wiem co tam wpisaæ
176 #       --enable-threads \
177
178 #touch ../gcc/c-gperf.h
179
180 %{__make} \
181         LDFLAGS_FOR_TARGET="%{rpmldflags}" \
182         TARGET_LIBGCC2_CFLAGS="-UCROSS_COMPILE"
183
184 # build libobjc.dll for Objective C
185 # to trzeba wywo³ywaæ z katalogu obj-%{target_platform}/%{target}/libobjc
186 # ale trzeba podaæ jeszcze GCC_FOR_TARGET - a mi siê nie chce.
187 # BTW, ten dll jest do czego¶ potrzebny???
188 #
189 #make \
190 #       LDFLAGS="%{rpmldflags}" \
191 #       TARGET_LIBGCC2_CFLAGS="-UCROSS_COMPILE" \
192 #       DLLTOOL="%{target}-dlltool --as=%{target}-as" libobjc.dll
193
194 # spec files for msvcrt*.dll configurations
195 cd gcc
196 for n in msvcrt msvcrt20 msvcrt40; do
197         sed "s/crtdll/$n/g" <specs | sed "s/crt1/crt2/g" >specs.$n
198 done
199
200 %install
201 rm -rf $RPM_BUILD_ROOT
202
203 install -d $RPM_BUILD_ROOT%{_bindir}
204 install -d $RPM_BUILD_ROOT%{_datadir}
205 (cd obj-%{target_platform}
206
207 %{__make} install \
208         prefix=$RPM_BUILD_ROOT%{_prefix} \
209         bindir=$RPM_BUILD_ROOT%{arch}/bin \
210         mandir=$RPM_BUILD_ROOT%{_mandir} \
211         infodir=$RPM_BUILD_ROOT%{_infodir} \
212         gxx_include_dir=$RPM_BUILD_ROOT%{arch}/include/g++
213
214 cd gcc
215 install specs.msvcrt specs.msvcrt20 specs.msvcrt40 $RPM_BUILD_ROOT%{gcclib}
216 )
217
218 mv -f $RPM_BUILD_ROOT%{arch}/bin/%{target}-* $RPM_BUILD_ROOT%{_bindir}
219
220 # c++filt is provided by binutils
221 rm -f $RPM_BUILD_ROOT%{_bindir}/i386-mingw32-c++filt
222
223 # what is this there for???
224 rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
225
226 # the same... make hardlink
227 ln -f $RPM_BUILD_ROOT%{arch}/bin/gcc $RPM_BUILD_ROOT%{_bindir}/%{target}-gcc
228
229 %{target}-strip -g $RPM_BUILD_ROOT%{gcclib}/libgcc.a
230
231 %clean
232 rm -rf $RPM_BUILD_ROOT
233
234 %files
235 %defattr(644,root,root,755)
236 %attr(755,root,root) %{_bindir}/%{target}-gcc*
237 %attr(755,root,root) %{_bindir}/%{target}-cpp
238 %attr(755,root,root) %{_bindir}/%{target}-gcov
239
240 %dir %{arch}/bin
241 %attr(755,root,root) %{arch}/bin/gcc
242
243 %dir %{gccarch}
244 %dir %{gcclib}
245 %attr(755,root,root) %{gcclib}/cc1
246 %attr(755,root,root) %{gcclib}/cpp0
247 %attr(755,root,root) %{gcclib}/tradcpp0
248 %{gcclib}/libgcc.a
249 %{gcclib}/specs*
250 %{gcclib}/include
251
252 %{_mandir}/man1/%{target}-gcc.1*
253
254 %files c++
255 %defattr(644,root,root,755)
256 %attr(755,root,root) %{_bindir}/%{target}-[cg]++
257 %attr(755,root,root) %{arch}/bin/[cg]++
258 %attr(755,root,root) %{gcclib}/cc1plus
259 %{_mandir}/man1/%{target}-g++.1*
260
261 %files objc
262 %defattr(644,root,root,755)
263 %attr(755,root,root) %{gcclib}/cc1obj
264
265 %files g77
266 %defattr(644,root,root,755)
267 %attr(755,root,root) %{_bindir}/%{target}-g77
268 %attr(755,root,root) %{gcclib}/f771
269 %{_mandir}/man1/%{target}-g77.1*
270
271 %files java
272 %defattr(644,root,root,755)
273 %attr(755,root,root) %{_bindir}/%{target}-gcj
274 %attr(755,root,root) %{_bindir}/%{target}-gcjh
275 %attr(755,root,root) %{_bindir}/%{target}-jcf-dump
276 %attr(755,root,root) %{_bindir}/%{target}-jv-scan
277 %attr(755,root,root) %{arch}/bin/grepjar
278 %attr(755,root,root) %{arch}/bin/jar
279 %attr(755,root,root) %{gcclib}/jc1
280 %attr(755,root,root) %{gcclib}/jvgenmain
This page took 0.049759 seconds and 3 git commands to generate.