]> git.pld-linux.org Git - packages/gcc2.git/blob - gcc2.spec
- invoke fix-info-dir via /sbin/postshell where possible to avoid extra /bin/sh dep
[packages/gcc2.git] / gcc2.spec
1 %define         rname           gcc
2 %define         rver            2.95.3
3 %define         snap            20010823
4 %define         STDC_VERSION    2.10.0
5 %define         STDC_RELEASE    5
6 Summary:        GNU Compiler Collection
7 Summary(pl.UTF-8):      Kolekcja kompilatorów GNU
8 Name:           %{rname}2
9 Version:        2.95.4
10 Release:        0.%{snap}.6
11 License:        GPL
12 Group:          Development/Languages
13 Source0:        ftp://gcc.gnu.org/pub/gcc/releases/gcc-%{rver}/%{rname}-%{rver}.tar.bz2
14 # Source0-md5:  87ee083a830683e2aaa57463940a0c3c
15 Patch0:         %{name}-info.patch
16 Patch1:         %{name}-pld-linux.patch
17 Patch2:         %{name}-libstdc++.patch
18 Patch3:         %{name}-bootstrap.patch
19 Patch4:         %{name}-cpp-macro-doc.patch
20 Patch5:         %{name}-default-arch.patch
21 Patch6:         %{name}-libstdc++-out-of-mem.patch
22 Patch7:         %{name}-libstdc++-wstring.patch
23 Patch8:         %{name}-libstdc++-bastring.patch
24 Patch9:         %{name}-manpage.patch
25 Patch10:        %{name}-cpp-dos-newlines.patch
26 Patch11:        %{name}-gpc.patch
27 Patch12:        %{name}-m68k-pic.patch
28 Patch13:        %{name}-sparc32-rfi.patch
29 Patch14:        %{name}-builtin-apply.patch
30 Patch15:        %{name}-ppc-ice.patch
31 Patch16:        %{name}-ppc-descriptions.patch
32 Patch17:        %{name}-alpha-complex-float.patch
33 Patch18:        %{name}-gcj-vs-iconv.patch
34 Patch19:        %{name}-libobjc.patch
35 #Patch20:       %{name}-pointer-arith.patch
36 Patch21:        %{name}-suffix.patch
37 Patch22:        %{name}-athlon-option.patch
38 Patch50:        gcc-%{rver}-%{snap}.patch.bz2
39 BuildRequires:  autoconf
40 BuildRequires:  automake
41 BuildRequires:  bison
42 BuildRequires:  texinfo
43 Requires:       binutils
44 Requires:       cpp2 = %{version}
45 %ifarch alpha
46 Conflicts:      glibc-devel < 2.2.5
47 %endif
48 URL:            http://gcc.gnu.org/
49 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
50
51 %description
52 A compiler aimed at integrating all the optimizations and features
53 necessary for a high-performance and stable development environment.
54
55 %description -l pl.UTF-8
56 Kompilator, posiadający duże możliwości optymalizacyjne niezbędne do
57 wyprodukowania szybkiego i stabilnego kodu wynikowego.
58
59 %package c++
60 Summary:        C++ support for gcc
61 Summary(fr.UTF-8):      Support C++ pour le compilateur gcc
62 Summary(pl.UTF-8):      Wspomaganie C++ dla kompilatora gcc
63 Summary(tr.UTF-8):      gcc için C++ desteği
64 Group:          Development/Languages
65 Requires:       %{name} = %{version}-%{release}
66 Obsoletes:      egcc-c++
67 Obsoletes:      egcs-c++
68
69 %description c++
70 This package adds C++ support to the GNU C compiler. It includes
71 support for most of the current C++ specification, including templates
72 and exception handling. It does not include a standard C++ library,
73 which is available separately.
74
75 %description c++ -l de.UTF-8
76 Dieses Paket enthält die C++-Unterstützung für den GNU-C-Compiler. Es
77 unterstützt die aktuelle C++-Spezifikation, inkl. Templates und
78 Ausnahmeverarbeitung. Eine C++-Standard-Library ist nicht enthalten -
79 sie ist getrennt erhältlich.
80
81 %description c++ -l fr.UTF-8
82 Ce package ajoute un support C++ au compilateur c GNU. Il comprend un
83 support pour la plupart des spécifications actuelles de C++, dont les
84 modéles et la gestion des exceptions. Il ne comprend pas une
85 bibliothéque C++ standard, qui est disponible séparément.
86
87 %description c++ -l pl.UTF-8
88 Programy z tego pakietu zapewniają wsparcie dla C++ do gcc. Posiada
89 wspomaganie dla dużej ilości obecnych specyfikacji C++, nie posiada
90 natomiast standardowych bibliotek C++, które są w oddzielnym pakiecie.
91
92 %description c++ -l tr.UTF-8
93 Bu paket, GNU C derleyicisine C++ desteği ekler. 'Template'ler ve
94 aykırı durum işleme gibi çoğu güncel C++ tanımlarına uyar. Standart
95 C++ kitaplığı bu pakette yer almaz.
96
97 %package objc
98 Summary:        Objective C support for gcc
99 Summary(de.UTF-8):      Objektive C-Unterstützung für gcc
100 Summary(fr.UTF-8):      Gestion d'Objective C pour gcc
101 Summary(pl.UTF-8):      Wspomaganie obiektowego C dla kompilatora gcc
102 Summary(tr.UTF-8):      gcc için Objective C desteği
103 Group:          Development/Languages
104 Requires:       %{name} = %{version}-%{release}
105 Obsoletes:      egcc-objc
106 Obsoletes:      egcs-objc
107
108 %description objc
109 This package adds Objective C support to the GNU C compiler. Objective
110 C is a object oriented derivative of the C language, mainly used on
111 systems running NeXTSTEP. This package does not include the standard
112 objective C object library.
113
114 %description objc -l de.UTF-8
115 Dieses Paket ergänzt den GNU-C-Compiler durch Objective-C-Support.
116 Objective C ist ein objektorientiertes Derivat von C, das zur
117 Hauptsache auf Systemen mit NeXTSTEP zum Einsatz kommt. Die
118 Standard-Objective-C-Objekt-Library ist nicht Teil des Pakets.
119
120 %description objc -l fr.UTF-8
121 Ce package ajoute un support Objective C au compilateur C GNU.
122 L'Objective C est un langage orienté objetdérivé du langage C,
123 principalement utilisé sur les systèmes NeXTSTEP. Ce package n'inclue
124 pas la bibliothéque Objective C standard.
125
126 %description objc -l pl.UTF-8
127 Ten pakiet jest wsparciem obiektowego C dla kompilatora gcc. W
128 pakiecie nie ma jeszcze bibliotek C-obj.
129
130 %description objc -l tr.UTF-8
131 Bu paket, GNU C derleyicisine Objective C desteği ekler. Objective C,
132 C dilinin nesne yönelik bir türevidir ve NeXTSTEP altında çalışan
133 sistemlerde yaygın olarak kullanılır. Standart Objective C nesne
134 kitaplığı bu pakette yer almaz.
135
136 %package g77
137 Summary:        Fortran 77 support for gcc
138 Summary(pl.UTF-8):      Wspomaganie Fortran 77 dla gcc
139 Group:          Development/Languages
140 Obsoletes:      egcs-g77
141
142 %description g77
143 This apckage adds support for compiling Fortran 77 programs with the
144 GNU compiler.
145
146 %description g77 -l pl.UTF-8
147 Ten pakiet jest wsparciem Fortran 77 dla kompilatora gcc. Jest
148 potrzebny do kompilowania programów pisanych w języku Fortran 77.
149
150 %package chill
151 Summary:        CHILL support for gcc
152 Summary(pl.UTF-8):      Wspomoganie CHILL dla gcc
153 Group:          Development/Languages
154 Requires:       %{name} = %{version}-%{release}
155
156 %description chill
157 This package adds support for compiling CHILL programs with the GNU
158 compiler.
159
160 Chill is the "CCITT High-Level Language", where CCITT is the old name
161 for what is now ITU, the International Telecommunications Union. It is
162 is language in the Modula2 family, and targets many of the same
163 applications as Ada (especially large embedded systems). Chill was
164 never used much in the United States, but is still being used in
165 Europe, Brazil, Korea, and other places.
166
167 %description chill -l pl.UTF-8
168 Ten pakiet dodaje do gcc możliwość kompilowania programów w języku
169 CHILL.
170
171 %package -n libstdc++2
172 Summary:        GNU c++ library
173 Summary(pl.UTF-8):      Biblioteki GNU C++
174 Version:        %{STDC_VERSION}
175 Release:        %{STDC_RELEASE}
176 Group:          Libraries
177 Obsoletes:      libg++
178
179 %description -n libstdc++2
180 This is the GNU implementation of the standard C++ libraries, along
181 with additional GNU tools. This package includes the shared libraries
182 necessary to run C++ applications.
183
184 %description -n libstdc++2 -l de.UTF-8
185 Dies ist die GNU-Implementierung der Standard-C++-Libraries mit
186 weiteren GNU-Tools. Dieses Paket enthält die zum Ausführen von
187 C++-Anwendungen erforderlichen gemeinsam genutzten Libraries.
188
189 %description -n libstdc++2 -l fr.UTF-8
190 Ceci est l'implémentation GNU des librairies C++ standard, ainsi que
191 des outils GNU supplémentaires. Ce package comprend les librairies
192 partagées nécessaires à l'exécution d'application C++.
193
194 %description -n libstdc++2 -l pl.UTF-8
195 Pakiet ten zawiera biblioteki będące implementacją standardowych
196 bibliotek C++. Znajdują się w nim biblioteki dynamiczne niezbędne do
197 uruchomienia aplikacji napisanych w C++.
198
199 %description -n libstdc++2 -l tr.UTF-8
200 Bu paket, standart C++ kitaplıklarının GNU gerçeklemesidir ve C++
201 uygulamalarının koşturulması için gerekli kitaplıkları içerir.
202
203 %package -n libstdc++2-devel
204 Summary:        Header files and libraries for C++ development
205 Summary(de.UTF-8):      Header-Dateien und Libraries zur Entwicklung mit C++
206 Summary(fr.UTF-8):      Fichiers d'en-tête et biblitothèques pour développer en C++
207 Summary(pl.UTF-8):      Pliki nagłówkowe do programowania z użyciem bibliotek C++
208 Summary(tr.UTF-8):      C++ ile program geliştirmek için gerekli dosyalar
209 Version:        %{STDC_VERSION}
210 Release:        %{STDC_RELEASE}
211 Group:          Development/Libraries
212 Requires:       %{name}-c++
213 Requires:       libstdc++2 = %{STDC_VERSION}
214 Obsoletes:      libg++-devel
215
216 %description -n libstdc++2-devel
217 This is the GNU implementation of the standard C++ libraries. This
218 package includes the header files and libraries needed for C++
219 development.
220
221 %description -n libstdc++2-devel -l pl.UTF-8
222 Pakiet ten zawiera biblioteki będące implementacją standardowych
223 bibliotek C++. Znajdują się w nim pliki nagłówkowe wykorzystywane przy
224 programowaniu w języku C++.
225
226 %package -n libstdc++2-static
227 Summary:        Static c++ standard library
228 Summary(pl.UTF-8):      Biblioteka statyczna c++
229 Version:        %{STDC_VERSION}
230 Release:        %{STDC_RELEASE}
231 Group:          Development/Libraries
232 Requires:       libstdc++2-devel = %{STDC_VERSION}
233
234 %description -n libstdc++2-static
235 Static c++ standard library.
236
237 %description -n libstdc++2-static -l pl.UTF-8
238 Biblioteka statyczna C++.
239
240 %package -n cpp2
241 Summary:        The C Pre Processor
242 Summary(pl.UTF-8):      Preprocesor C
243 Group:          Development/Languages
244 Obsoletes:      egcs-cpp
245
246 %description -n cpp2
247 The C preprocessor is a "macro processor" that is used automatically
248 by the C compiler to transform your program before actual compilation.
249 It is called a macro processor because it allows you to define
250 "macros", which are brief abbreviations for longer constructs.
251
252 The C preprocessor provides four separate facilities that you can use
253 as you see fit:
254
255 - Inclusion of header files. These are files of declarations that can
256   be substituted into your program.
257 - Macro expansion. You can define "macros", which are abbreviations
258   for arbitrary fragments of C code, and then the C preprocessor will
259   replace the macros with their definitions throughout the program.
260 - Conditional compilation. Using special preprocessing directives, you
261   can include or exclude parts of the program according to various
262   conditions.
263 - Line control. If you use a program to combine or rearrange source
264   files into an intermediate file which is then compiled, you can use
265   line control to inform the compiler of where each source line
266   originally came from.
267
268 %description -n cpp2 -l pl.UTF-8
269 Preprocesor C jest "makro procesorem" który jest automatycznie używany
270 przez kompilator C do obróbki kompilowanego programu przed właściwą
271 kompilacją. Jest on nazywany makroprocesorem, ponieważ umożliwia
272 definiowanie i rozwijanie makr umożliwiających skracanie długich
273 konstrukcji w języku C.
274
275 Preprocesor C umożliwia wykonywanie czterech różnych typów operacji:
276
277 - Dołączanie plików (np. nagłówkowych). Wstawia pliki w miejscu
278   deklaracji polecenia dołączenia innego pliku.
279 - Rozwijanie makr. Można definiować "makra" nadając im identyfikatory,
280   których późniejsze użycie powoduje podczas rozwijania podmienienie
281   identyfikatora deklarowaną wcześniej wartością.
282 - Kompilacja warunkowa. W zależności od obecności symboli i dyrektyw w
283   środowisku preprocesora są włączane warunkowo, bądź nie, pewne
284   fragmenty obrabianego strumienia tekstów.
285 - Kontrola linii źródła. Niezależnie od tego jakim przeobrażeniom
286   podlega wynikowy strumień danych w wyniku rozwijania makr i dołączania
287   są zapamiętywane informacje o tym, której linii pliku źródłowego
288   odpowiada fragment pliku wynikowego.
289
290 %prep
291 %setup -q -n %{rname}-%{rver}
292 %patch50 -p1
293 %patch0 -p1
294 %patch1 -p1
295 %patch2 -p1
296 %patch3 -p1
297 %patch4 -p0
298 %patch5 -p0
299 %patch6 -p0
300 %patch7 -p0
301 %patch8 -p0
302 %patch9 -p0
303 %patch10 -p0
304 %patch11 -p1
305 %ifarch m68k
306 %patch12 -p0
307 %endif
308 %ifarch sparc sparc32
309 %patch13 -p0
310 %patch14 -p0
311 %endif
312 %ifarch ppc
313 %patch15 -p0
314 %patch16 -p0
315 %endif
316 %ifarch alpha
317 %patch17 -p1
318 %endif
319 %patch18 -p0
320 %patch19 -p0
321 #%patch20 -p0
322 %patch21 -p1
323 %patch22 -p1
324
325 %build
326 rm -rf gcc/java
327 cd gcc
328 %{__autoconf}
329 cp -f /usr/share/automake/config.* .
330 cd ..
331 cp -f /usr/share/automake/config.* .
332 rm -rf obj-%{_target_platform}
333 install -d obj-%{_target_platform} && cd obj-%{_target_platform}
334
335 CC="%{__cc}"; export CC
336 CFLAGS="%{rpmcflags}" \
337 CXXFLAGS="%{rpmcflags}" \
338 TEXCONFIG=false ../configure \
339         --host=%{_target_platform} \
340         --build=%{_target_platform} \
341         --prefix=%{_prefix} \
342         --infodir=%{_infodir} \
343         --enable-shared \
344 %ifnarch sparc sparc64
345         --enable-threads=posix \
346         --enable-haifa \
347 %endif
348         --with-gnu-as \
349         --with-gnu-ld \
350         --with-gxx-include-dir="\$\{prefix\}/include/g++" \
351         --disable-nls \
352         --program-suffix="2"
353
354 PATH=$PATH:/sbin:%{_sbindir}
355 touch  ../gcc/c-gperf.h
356
357 cd ..
358 %{__make} -C obj-%{_target_platform} bootstrap \
359         LDFLAGS_FOR_TARGET="%{rpmldflags}" \
360         mandir=%{_mandir} \
361         infodir=%{_infodir}
362
363 %install
364 rm -rf $RPM_BUILD_ROOT
365 install -d $RPM_BUILD_ROOT{/lib,%{_datadir}}
366
367 cd obj-%{_target_platform}
368 PATH=$PATH:/sbin:%{_sbindir}
369
370 %{__make} install \
371         prefix=$RPM_BUILD_ROOT%{_prefix} \
372         mandir=$RPM_BUILD_ROOT%{_mandir} \
373         infodir=$RPM_BUILD_ROOT%{_infodir}
374
375 %{__make} install \
376         prefix=$RPM_BUILD_ROOT%{_prefix} \
377         mandir=$RPM_BUILD_ROOT%{_mandir} \
378         infodir=$RPM_BUILD_ROOT%{_infodir} -C texinfo
379
380 ln -sf gcc2 $RPM_BUILD_ROOT%{_bindir}/cc2
381
382 ln -sf g772 $RPM_BUILD_ROOT%{_bindir}/f772
383
384 mv $RPM_BUILD_ROOT%{_libdir}/libstdc++.a \
385         $RPM_BUILD_ROOT%{_libdir}/gcc-lib/%{_target_cpu}*/*/
386
387 ln -sf %{_bindir}/cpp2 $RPM_BUILD_ROOT/lib/cpp2
388
389 cd $RPM_BUILD_ROOT%{_bindir}
390 mv chill chill2
391 mv %{_target_platform}-gcc %{_target_platform}-gcc2
392
393 %clean
394 rm -rf $RPM_BUILD_ROOT
395
396 %post   -p      /sbin/postshell
397 -/usr/sbin/fix-info-dir -c %{_infodir}
398
399 %postun -p      /sbin/postshell
400 -/usr/sbin/fix-info-dir -c %{_infodir}
401
402 %post g77       -p      /sbin/postshell
403 -/usr/sbin/fix-info-dir -c %{_infodir}
404
405 %postun g77     -p      /sbin/postshell
406 -/usr/sbin/fix-info-dir -c %{_infodir}
407
408 %post chill     -p      /sbin/postshell
409 -/usr/sbin/fix-info-dir -c %{_infodir}
410
411 %postun chill   -p      /sbin/postshell
412 -/usr/sbin/fix-info-dir -c %{_infodir}
413
414 %post -n cpp2   -p      /sbin/postshell
415 -/usr/sbin/fix-info-dir -c %{_infodir}
416
417 %postun -n cpp2 -p      /sbin/postshell
418 -/usr/sbin/fix-info-dir -c %{_infodir}
419
420 %post   -p /sbin/ldconfig -n libstdc++2
421 %postun -p /sbin/ldconfig -n libstdc++2
422
423 %files
424 %defattr(644,root,root,755)
425 %doc READ* ChangeLog
426
427 %dir %{_libdir}/gcc-lib
428 %dir %{_libdir}/gcc-lib/%{_target_cpu}*
429 %dir %{_libdir}/gcc-lib/%{_target_cpu}*/*
430 %dir %{_libdir}/gcc-lib/%{_target_cpu}*/*/include
431
432 %attr(755,root,root) %{_bindir}/%{_target_cpu}*-gcc2
433 %attr(755,root,root) %{_bindir}/gcc2
434 %attr(755,root,root) %{_bindir}/gcov2
435 %attr(755,root,root) %{_bindir}/protoize2
436 %attr(755,root,root) %{_bindir}/unprotoize2
437 %attr(755,root,root) %{_bindir}/cc2
438
439 %{_libdir}/gcc-lib/%{_target_cpu}*/*/SYSCALLS.c.X
440 %attr(755,root,root) %{_libdir}/gcc-lib/%{_target_cpu}*/*/cc1
441 %{_libdir}/gcc-lib/%{_target_cpu}*/*/libgcc.a
442 %{_libdir}/gcc-lib/%{_target_cpu}*/*/lib*.map
443 %{_libdir}/gcc-lib/%{_target_cpu}*/*/specs
444
445 %attr(755,root,root) %{_libdir}/gcc-lib/%{_target_cpu}*/*/crt*.o
446 %attr(755,root,root) %{_libdir}/gcc-lib/%{_target_cpu}*/*/collect2
447
448 %{_libdir}/gcc-lib/%{_target_cpu}*/*/include/float.h
449 %{_libdir}/gcc-lib/%{_target_cpu}*/*/include/iso646.h
450 %{_libdir}/gcc-lib/%{_target_cpu}*/*/include/limits.h
451 %{_libdir}/gcc-lib/%{_target_cpu}*/*/include/proto.h
452 %{_libdir}/gcc-lib/%{_target_cpu}*/*/include/stdarg.h
453 %{_libdir}/gcc-lib/%{_target_cpu}*/*/include/stdbool.h
454 %{_libdir}/gcc-lib/%{_target_cpu}*/*/include/stddef.h
455 %{_libdir}/gcc-lib/%{_target_cpu}*/*/include/syslimits.h
456 %{_libdir}/gcc-lib/%{_target_cpu}*/*/include/va-*.h
457 %{_libdir}/gcc-lib/%{_target_cpu}*/*/include/varargs.h
458
459 %files c++
460 %defattr(644,root,root,755)
461
462 %attr(755,root,root) %{_bindir}/g++2
463 %attr(755,root,root) %{_bindir}/c++2
464 %attr(755,root,root) %{_bindir}/c++filt2
465 %attr(755,root,root) %{_libdir}/gcc-lib/%{_target_cpu}*/*/cc1plus
466
467 %{_libdir}/gcc-lib/%{_target_cpu}*/*/include/exception
468 %{_libdir}/gcc-lib/%{_target_cpu}*/*/include/new
469 %{_libdir}/gcc-lib/%{_target_cpu}*/*/include/typeinfo
470 %{_libdir}/gcc-lib/%{_target_cpu}*/*/include/new.h
471
472 %files objc
473 %defattr(644,root,root,755)
474
475 %attr(755,root,root) %{_libdir}/gcc-lib/%{_target_cpu}*/*/cc1obj
476
477 %{_libdir}/gcc-lib/%{_target_cpu}*/*/libobjc.a
478 %{_libdir}/gcc-lib/%{_target_cpu}*/*/include/objc
479
480 %files g77
481 %defattr(644,root,root,755)
482
483 %attr(755,root,root) %{_bindir}/g772
484 %attr(755,root,root) %{_bindir}/f772
485
486 %attr(755,root,root) %{_libdir}/gcc-lib/%{_target_cpu}*/*/f771
487 %{_libdir}/gcc-lib/%{_target_cpu}*/*/libg2c.a
488
489 %{_libdir}/gcc-lib/%{_target_cpu}*/*/include/g2c.h
490
491 %files chill
492 %defattr(644,root,root,755)
493 %doc gcc/ch/chill.brochure
494
495 %attr(755,root,root) %{_bindir}/chill2
496
497 %{_infodir}/chill*
498
499 %attr(755,root,root) %{_libdir}/gcc-lib/%{_target_cpu}*/*/cc1chill
500 %attr(755,root,root) %{_libdir}/gcc-lib/%{_target_cpu}*/*/chill*.o
501 %{_libdir}/gcc-lib/%{_target_cpu}*/*/libchill.a
502
503 %files -n libstdc++2
504 %defattr(644,root,root,755)
505 %attr(755,root,root) %{_libdir}/libstdc++.so.*.*.*
506
507 %files -n libstdc++2-devel
508 %defattr(644,root,root,755)
509 %{_includedir}/g++
510 %attr(755,root,root) %{_libdir}/gcc-lib/%{_target_cpu}*/*/libstdc++.so
511
512 %files -n libstdc++2-static
513 %defattr(644,root,root,755)
514 %{_libdir}/gcc-lib/%{_target_cpu}*/*/libstdc++.a
515
516 %files -n cpp2
517 %defattr(644,root,root,755)
518 %attr(755,root,root) /lib/cpp2
519 %attr(755,root,root) %{_bindir}/cpp2
520 %attr(755,root,root) %{_libdir}/gcc-lib/%{_target_cpu}*/*/cpp0
This page took 0.0742 seconds and 3 git commands to generate.