+# NOTE: despite lower soname, libffi is newer than standalone 3.0.9
#
# TODO:
# - gconf peer? (but libgcj needs split anyway)
# /usr/bin/gjdoc
# /usr/share/man/man1/aot-compile.1.gz
# /usr/share/man/man1/gjdoc.1.gz
-# /usr/share/gcc-4.5.0/python/libstdcxx/__init__.py (gdb stuff?)
-# /usr/share/gcc-4.5.0/python/libstdcxx/v6/__init__.py
-# /usr/share/gcc-4.5.0/python/libstdcxx/v6/printers.py
# /usr/share/python/aotcompile.py
# /usr/share/python/classfile.py
#
-# - thin about cooperate with (or drop some parts of) 'python-gdb' package which also contains:
-# /usr/lib{,64}/libstdc++.so.6.0.*-gdb.py
-# /usr/share/python2.6/site-packages/libstdcxx
-# ^--- our gdb.spec backported the stuff (like fc), so package here and rm in gdb package?
-#
# Conditional build:
%bcond_without ada # build without ADA support
%bcond_without cxx # build without C++ support
%bcond_without alsa # don't build libgcj ALSA MIDI interface
%bcond_without dssi # don't build libgcj DSSI MIDI interface
%bcond_without gtk # don't build libgcj GTK peer
+%bcond_without apidocs # do not build and package API docs
%bcond_with mozilla # don't build libgcjwebplugin (needs fix for new xulrunner)
%bcond_with qt # build libgcj Qt peer (currently doesn't build with libtool-2.x)
%bcond_without x # don't build libgcj Xlib-dependent AWTs (incl. GTK/Qt)
%bcond_without multilib # build without multilib support (it needs glibc[32&64]-devel)
%bcond_with profiling # build with profiling
+%bcond_without python # build without libstdc++ python pretty printers for gdb
%bcond_without bootstrap # omit 3-stage bootstrap
%bcond_with tests # torture gcc
Summary(pt_BR.UTF-8): Coleção dos compiladores GNU: o compilador C e arquivos compartilhados
Name: gcc
Version: %{major_ver}.%{minor_ver}
-Release: 2
+Release: 4
Epoch: 6
License: GPL v3+
Group: Development/Languages
Patch10: %{name}-moresparcs.patch
Patch11: %{name}-build-id.patch
Patch12: %{name}-plugin-decl-hook.patch
+Patch13: %{name}-python-pretty-printer-bool-vector.patch
URL: http://gcc.gnu.org/
BuildRequires: autoconf
%{?with_tests:BuildRequires: autogen}
BuildRequires: gmp-devel >= 4.1
BuildRequires: libmpc-devel
BuildRequires: mpfr-devel >= 2.3.0
+%if %{with python}
+BuildRequires: python-devel
+BuildRequires: rpm-pythonprov
+%endif
BuildRequires: rpmbuild(macros) >= 1.211
BuildRequires: texinfo >= 4.1
BuildRequires: zlib-devel
%endif
%{?with_mozilla:BuildRequires: xulrunner-devel >= 1.8.1.3-1.20070321.5}
%endif
+BuildConflicts: pdksh < 5.2.14-50
Requires: binutils >= 3:2.20.51.0.2
Requires: libgcc = %{epoch}:%{version}-%{release}
Provides: cpp = %{epoch}:%{version}-%{release}
%define filterout -fwrapv -fno-strict-aliasing -fsigned-char
%define filterout_ld -Wl,--as-needed
+%define skip_post_check_so '.*(libmudflap|libmudflapth|libxmlj|lib-gnu-awt-xlib)\.so.*'
+
%description
A compiler aimed at integrating all the optimizations and features
necessary for a high-performance and stable development environment.
written in Ada.
%description -n libgnat-multilib-static -l pl.UTF-8
-Ten pakiet zawiera 32-bitowe wersje bibliotek statycznych dla programów
-napisanych w Adzie.
+Ten pakiet zawiera 32-bitowe wersje bibliotek statycznych dla
+programów napisanych w Adzie.
%package c++
Summary: C++ support for gcc
Ten pakiet ten zawiera 32-bitową wersję implementacji GNU biblioteki
standardowej C++.
+%package -n libstdc++-gdb
+Summary: libstdc++ pretty printers for GDB
+Group: Development/Debuggers
+Requires: python-gdb
+
+%description -n libstdc++-gdb
+This package contains Python scripts for GDB pretty printing of the
+libstdc++ types/containers.
+
%package -n libstdc++-devel
Summary: Header files and documentation for C++ development
Summary(de.UTF-8): Header-Dateien zur Entwicklung mit C++
Requires: libstdc++-multilib = %{epoch}:%{version}-%{release}
%description -n libstdc++-multilib-devel
-This package contains the development files for 32-bit version of
-the GNU implementation of the standard C++ library.
+This package contains the development files for 32-bit version of the
+GNU implementation of the standard C++ library.
%description -n libstdc++-multilib-devel -l pl.UTF-8
Ten pakiet zawiera pliki programistyczne 32-bitowej wersji
%description -n libstdc++-multilib-static -l pl.UTF-8
Statyczna biblioteka standardowa C++ - wersja 32-bitowa.
+%package -n libstdc++-apidocs
+Summary: C++ standard library API documentation
+Group: Documentation
+
+%description apidocs
+API and internal documentation for C++ standard library.
+
%package fortran
Summary: Fortran 95 support for gcc
Summary(es.UTF-8): Soporte de Fortran 95 para gcc
%patch10 -p0
%patch11 -p0
%patch12 -p0
+%patch13 -p0
mv ChangeLog ChangeLog.general
rm -rf $gccdir/install-tools
rm -rf $gccdir/include-fixed
+%if %{with python}
+for LIB in lib lib64; do
+ LIBPATH="$RPM_BUILD_ROOT%{_datadir}/gdb/auto-load%{_prefix}/$LIB"
+ install -d $LIBPATH
+ # basename is being run only for the native (non-biarch) file.
+ sed -e 's,@pythondir@,%{_datadir}/gdb,' \
+ -e 's,@toolexeclibdir@,%{_prefix}/'"$LIB," \
+ < libstdc++-v3/python/hook.in \
+ > $LIBPATH/$(basename $RPM_BUILD_ROOT/%{_prefix}/%{_lib}/libstdc++.so.*.*.*)-gdb.py
+done
+install -d $RPM_BUILD_ROOT%{py_sitescriptdir}
+cp -a libstdc++-v3/python/libstdcxx $RPM_BUILD_ROOT%{py_sitescriptdir}
+%py_ocomp $RPM_BUILD_ROOT%{py_sitescriptdir}
+%py_comp $RPM_BUILD_ROOT%{py_sitescriptdir}
+%py_postclean
+%endif
+
%find_lang gcc
%find_lang cpplib
cat cpplib.lang >> gcc.lang
%attr(755,root,root) %ghost %{_libdir32}/libstdc++.so.6
%endif
+%if %{with python}
+%files -n libstdc++-gdb
+%defattr(644,root,root,755)
+%dir %{py_sitescriptdir}/libstdcxx
+%{py_sitescriptdir}/libstdcxx/*.py[co]
+%dir %{py_sitescriptdir}/libstdcxx/v6
+%{py_sitescriptdir}/libstdcxx/v6/*.py[co]
+%{_datadir}/gdb/auto-load/%{_prefix}/lib*/libstdc++.so.6.0.14-gdb.py
+%endif
+
%files -n libstdc++-devel
%defattr(644,root,root,755)
-%doc libstdc++-v3/doc/html
%attr(755,root,root) %{_libdir}/libstdc++.so
%{_libdir}/libstdc++.la
%dir %{_includedir}/c++
%exclude %{_includedir}/c++/%{version}/sun
%endif
+%if %{with apidocs}
+%files libstdc++-apidocs
+%defattr(644,root,root,755)
+%doc libstdc++-v3/doc/html/*
+%endif
+
%if %{with multilib}
%files -n libstdc++-multilib-devel
%defattr(644,root,root,755)