]> git.pld-linux.org Git - packages/compat-gcc-34.git/blob - compat-gcc-34.spec
- updated gettext BR
[packages/compat-gcc-34.git] / compat-gcc-34.spec
1 #
2 #               nothing to debug. 3_4-branch is closed.
3 %define         _enable_debug_packages  0
4 #
5 Summary:        GNU Compiler Collection: the C compiler and shared files
6 Summary(pl.UTF-8):      Kolekcja kompilatorów GNU: kompilator C i pliki współdzielone
7 Name:           compat-gcc-34
8 Version:        3.4.6
9 Release:        1
10 License:        GPL
11 Group:          Development/Languages
12 Source0:        ftp://gcc.gnu.org/pub/gcc/releases/gcc-%{version}/gcc-%{version}.tar.bz2
13 # Source0-md5:  4a21ac777d4b5617283ce488b808da7b
14 Patch0:         %{name}-info.patch
15 Patch1:         %{name}-nolocalefiles.patch
16 Patch2:         %{name}-nodebug.patch
17 Patch3:         %{name}-pr16276.patch
18 Patch4:         %{name}-cxxabi.patch
19 Patch5:         %{name}-pr-rh.patch
20 URL:            http://gcc.gnu.org/
21 BuildRequires:  autoconf
22 BuildRequires:  automake
23 BuildRequires:  binutils >= 2:2.15.91.0.2
24 BuildRequires:  bison
25 BuildRequires:  fileutils >= 4.0.41
26 BuildRequires:  flex
27 BuildRequires:  gettext-tools
28 BuildRequires:  glibc-devel >= 2.2.5-20
29 BuildRequires:  perl-devel
30 BuildRequires:  texinfo >= 4.1
31 BuildRequires:  zlib-devel
32 Requires:       binutils >= 2:2.15.91.0.2
33 Requires:       gcc-dirs >= 1.0-3
34 Provides:       cpp = %{epoch}:%{version}-%{release}
35 Obsoletes:      compat-gcc-34-libgcc
36 Conflicts:      glibc-devel < 2.2.5-20
37 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38
39 %ifarch sparc64
40 %define         rpmcflags       -O2 -mtune=ultrasparc
41 %endif
42
43 %description
44 A compiler aimed at integrating all the optimizations and features
45 necessary for a high-performance and stable development environment.
46
47 This package contains the C compiler and some files shared by various
48 parts of the GNU Compiler Collection. In order to use another GCC
49 compiler you will need to install the appropriate subpackage.
50
51 %description -l pl.UTF-8
52 Kompilator, posiadający duże możliwości optymalizacyjne niezbędne do
53 wyprodukowania szybkiego i stabilnego kodu wynikowego.
54
55 Ten pakiet zawiera kompilator C i pliki współdzielone przez różne
56 części kolekcji kompilatorów GNU (GCC). Żeby używać innego kompilatora
57 z GCC, trzeba zainstalować odpowiedni podpakiet.
58
59 %package c++
60 Summary:        C++ support for gcc
61 Summary(pl.UTF-8):      Obsługa C++ dla gcc
62 Group:          Development/Languages
63 Obsoletes:      compat-gcc-34-libstdc++
64 Obsoletes:      compat-gcc-34-libstdc++-devel
65 Obsoletes:      compat-gcc-34-libstdc++-static
66 Requires:       %{name} = %{epoch}:%{version}-%{release}
67
68 %description c++
69 This package adds C++ support to the GNU Compiler Collection. It
70 includes support for most of the current C++ specification, including
71 templates and exception handling.
72
73 %description c++ -l pl.UTF-8
74 Ten pakiet dodaje obsługę C++ do kompilatora gcc. Ma wsparcie dla
75 dużej ilości obecnych specyfikacji C++.
76
77 %prep
78 %setup -q -n gcc-%{version}
79 %patch0 -p1
80 %patch1 -p1
81 %patch2 -p1
82 %patch3 -p0
83 %patch4 -p0
84 %patch5 -p0
85
86 # because we distribute modified version of gcc...
87 perl -pi -e 's/(version.*)";/$1 (PLD Linux)";/' gcc/version.c
88 perl -pi -e 's@(bug_report_url.*<URL:).*";@$1http://bugs.pld-linux.org/>";@' gcc/version.c
89
90 mv ChangeLog ChangeLog.general
91
92 %build
93 # because pr16276 patch modifies configure.ac
94 cd gcc
95 %{__autoconf}
96 cd ..
97 cp -f /usr/share/automake/config.sub .
98
99 rm -rf obj-%{_target_platform} && install -d obj-%{_target_platform} && cd obj-%{_target_platform}
100
101 CC="%{__cc}" \
102 CFLAGS="%{rpmcflags}" \
103 CXXFLAGS="%{rpmcflags}" \
104 TEXCONFIG=false \
105 ../configure \
106         --prefix=%{_prefix} \
107         --libdir=%{_libdir} \
108         --libexecdir=%{_libdir} \
109         --infodir=%{_infodir} \
110         --mandir=%{_mandir} \
111         --program-suffix="-3.4" \
112         --enable-version-specific-runtime-libs \
113         --enable-shared \
114         --enable-threads=posix \
115         --enable-__cxa_atexit \
116         --enable-languages="c,c++" \
117         --enable-c99 \
118         --enable-long-long \
119         --disable-multilib \
120         --disable-libstdcxx-pch \
121         --enable-nls \
122         --with-gnu-as \
123         --with-gnu-ld \
124         --with-slibdir=/%{_lib} \
125         %{_target_platform}
126
127 PATH=$PATH:/sbin:%{_sbindir}
128
129 cd ..
130 %{__make} -C obj-%{_target_platform} \
131         BOOT_CFLAGS="%{rpmcflags}" \
132         LDFLAGS_FOR_TARGET="%{rpmldflags}" \
133         mandir=%{_mandir} \
134         infodir=%{_infodir}
135
136 %install
137 rm -rf $RPM_BUILD_ROOT
138 install -d $RPM_BUILD_ROOT{%{_aclocaldir},%{_datadir},%{_infodir}}
139
140 cd obj-%{_target_platform}
141 PATH=$PATH:/sbin:%{_sbindir}
142
143 %{__make} -j1 install \
144         mandir=%{_mandir} \
145         infodir=%{_infodir} \
146         DESTDIR=$RPM_BUILD_ROOT
147
148 %ifarch sparc64
149 ln -f $RPM_BUILD_ROOT%{_bindir}/sparc64-pld-linux-gcc \
150         $RPM_BUILD_ROOT%{_bindir}/sparc-pld-linux-gcc
151 %endif
152
153 ln -sf gcc-3.4 $RPM_BUILD_ROOT%{_bindir}/cc-3.4
154 echo ".so gcc-3.4.1" > $RPM_BUILD_ROOT%{_mandir}/man1/cc-3.4.1
155
156 cd ..
157
158 # include/ contains install-tools/include/* and headers that were fixed up
159 # by fixincludes, we don't want former
160 gccdir=$(echo $RPM_BUILD_ROOT%{_libdir}/gcc/*/*/)
161 mkdir $gccdir/tmp
162 # we have to save these however
163 mv $gccdir/include/syslimits.h $gccdir/tmp
164 mv $gccdir/include/c++ $gccdir/tmp
165 rm -r $gccdir/include
166 mv $gccdir/tmp $gccdir/include
167 cp $gccdir/install-tools/include/*.h $gccdir/include
168 # but we don't want anything more from install-tools
169 rm -r $gccdir/install-tools
170
171 %clean
172 rm -rf $RPM_BUILD_ROOT
173
174 %post
175 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
176
177 %postun
178 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
179
180 %files
181 %defattr(644,root,root,755)
182 %doc ChangeLog.general MAINTAINERS NEWS bugs.html faq.html
183 %doc gcc/{ChangeLog,ONEWS,README.Portability}
184 %dir %{_libdir}/gcc/*/*
185 %dir %{_libdir}/gcc/*/*/include
186 %attr(755,root,root) %{_bindir}/*-gcc*
187 %attr(755,root,root) %{_bindir}/gcc-*
188 %attr(755,root,root) %{_bindir}/gcov-*
189 %attr(755,root,root) %{_bindir}/cc-*
190 %attr(755,root,root) %{_bindir}/cpp-*
191 %{_mandir}/man1/cc-*.1*
192 %{_mandir}/man1/cpp-*.1*
193 %{_mandir}/man1/gcc-*.1*
194 %{_mandir}/man1/gcov-*.1*
195 %{_libdir}/gcc/*/*/libgcov.a
196 %{_libdir}/gcc/*/*/libgcc.a
197 %{_libdir}/gcc/*/*/libgcc_eh.a
198 %{_libdir}/gcc/*/*/specs
199 %{_libdir}/gcc/*/*/crt*.o
200 %attr(755,root,root) %{_libdir}/gcc/*/*/cc1
201 %attr(755,root,root) %{_libdir}/gcc/*/*/collect2
202 %{_libdir}/gcc/*/*/include/*.h
203
204 %files c++
205 %defattr(644,root,root,755)
206 %doc gcc/cp/{ChangeLog,NEWS}
207 %attr(755,root,root) %{_bindir}/g++-*
208 %attr(755,root,root) %{_bindir}/*-g++-*
209 %attr(755,root,root) %{_bindir}/c++-*
210 %attr(755,root,root) %{_bindir}/*-c++-*
211 %attr(755,root,root) %{_libdir}/gcc/*/*/cc1plus
212 %{_libdir}/gcc/*/*/include/c++
213 %{_libdir}/gcc/*/*/libstdc++.a
214 %{_libdir}/gcc/*/*/libstdc++.la
215 %attr(755,root,root) %{_libdir}/gcc/*/*/libstdc++.so*
216 %{_libdir}/gcc/*/*/libsupc++.la
217 %{_libdir}/gcc/*/*/libsupc++.a
218 %{_mandir}/man1/g++-*.1*
This page took 0.102491 seconds and 3 git commands to generate.