[gdb] - Remove --with-pythondir as no longer valid. - Provide %{_bindir}gdb-add-index even on RHEL-5. - Pr

Jan Kratochvil jankratochvil at fedoraproject.org
Fri Jan 14 06:17:37 UTC 2011


commit 0bba59c99fb2d79f5d923149180e27564023e93a
Author: Jan Kratochvil <jan.kratochvil at redhat.com>
Date:   Fri Jan 14 07:17:24 2011 +0100

    - Remove --with-pythondir as no longer valid.
    - Provide %{_bindir}gdb-add-index even on RHEL-5.
    - Provide again libstdc++ pretty printers for any RHEL.

 .gitignore |    1 +
 gdb.spec   |   50 +++++++++++++++++++++++++++++++++++++++++++-------
 sources    |    1 +
 3 files changed, 45 insertions(+), 7 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 6c4f28d..8222652 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
 /gdb-7.2.50.20110107.tar.bz2
+/libstdc++-v3-python-r155978.tar.bz2
diff --git a/gdb.spec b/gdb.spec
index cbfa8bd..8be57df 100644
--- a/gdb.spec
+++ b/gdb.spec
@@ -27,7 +27,7 @@ Version: 7.2.50.20110107
 
 # The release always contains a leading reserved number, start it at 1.
 # `upstream' is not a part of `name' to stay fully rpm dependencies compatible for the testing.
-Release: 8%{?_with_upstream:.upstream}%{dist}
+Release: 9%{?_with_upstream:.upstream}%{dist}
 
 License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ and GPLv2+ with exceptions and GPL+ and LGPLv2+ and GFDL and BSD and Public Domain
 Group: Development/Debuggers
@@ -91,6 +91,12 @@ Source3: gdb-gstack.man
 #=fedora
 Source4: gdbinit
 
+%if 0%{?rhel:1}
+# libstdc++ pretty printers from GCC SVN HEAD (4.5 experimental).
+%define libstdcxxpython libstdc++-v3-python-r155978
+Source4: %{libstdcxxpython}.tar.bz2
+%endif # 0%{?rhel:1}
+
 # Work around out-of-date dejagnu that does not have KFAIL
 #=drop: That dejagnu is too old to be supported.
 Patch1: gdb-6.3-rh-dummykfail-20041202.patch
@@ -534,6 +540,12 @@ Requires: python-libs%{?_isa}
 Requires: python-libs-%{_arch} >= 2.4.3-32.el5
 %endif
 BuildRequires: python-devel%{?_isa}
+%if 0%{?rhel:1}
+# Temporarily before python files get moved to libstdc++.rpm
+# libstdc++%{bits_other} is not present in Koji, the .spec script generating
+# gdb/python/libstdcxx/ also does not depend on the %{bits_other} files.
+BuildRequires: libstdc++%{?_isa}
+%endif # 0%{?rhel:1}
 %endif # 0%{!?_without_python:1}
 
 %if 0%{?_with_testsuite:1}
@@ -634,9 +646,10 @@ machine than the one which is running the program being debugged.
 
 %setup -q -n %{gdb_src}
 
+%if 0%{?rhel:1}
 # libstdc++ pretty printers.
-# Disabled now for F-14 before rebase.
-#tar xjf %{SOURCE4}
+tar xjf %{SOURCE4}
+%endif # 0%{?rhel:1}
 
 # Files have `# <number> <file>' statements breaking VPATH / find-debuginfo.sh .
 rm -f gdb/ada-exp.c gdb/ada-lex.c gdb/c-exp.c gdb/cp-name-parser.c gdb/f-exp.c
@@ -743,8 +756,6 @@ rm -f gdb/jv-exp.c gdb/m2-exp.c gdb/objc-exp.c gdb/p-exp.c
 %patch470 -p1
 %patch475 -p1
 %patch486 -p1
-# This patch should be applied to gcc-4.5+.src.rpm:
-#patch487 -p1
 %patch415 -p1
 %patch519 -p1
 %patch491 -p1
@@ -763,6 +774,9 @@ rm -f gdb/jv-exp.c gdb/m2-exp.c gdb/objc-exp.c gdb/p-exp.c
 %patch393 -p1 -R
 %patch335 -p1 -R
 %endif
+%if 0%{?rhel:1}
+%patch487 -p1
+%endif # 0%{?rhel:1}
 
 find -name "*.orig" | xargs rm -f
 ! find -name "*.rej" # Should not happen.
@@ -818,7 +832,6 @@ CFLAGS="$CFLAGS -O0 -ggdb2"
 	--infodir=%{_infodir}					\
 	--with-system-gdbinit=%{_sysconfdir}/gdbinit		\
 	--with-gdb-datadir=%{_datadir}/gdb			\
-	--with-pythondir=%{_datadir}/gdb/python			\
 	--enable-gdb-build-warnings=,-Wno-unused		\
 %ifnarch %{ix86} alpha ia64 ppc s390 s390x x86_64 ppc64 sparcv9 sparc64
 	--disable-werror					\
@@ -1036,6 +1049,24 @@ do
   touch -r $RPM_BUILD_DIR/%{gdb_src}/gdb/ChangeLog $i
 done
 
+%if 0%{?rhel:1}
+%if 0%{!?_without_python:1}
+# Temporarily now:
+for LIB in lib lib64;do
+  LIBPATH="$RPM_BUILD_ROOT%{_datadir}/gdb/auto-load%{_prefix}/$LIB"
+  mkdir -p $LIBPATH
+  # basename is being run only for the native (non-biarch) file.
+  sed -e 's, at pythondir@,%{_datadir}/gdb/python,'		\
+      -e 's, at toolexeclibdir@,%{_prefix}/'"$LIB,"		\
+      < $RPM_BUILD_DIR/%{gdb_src}/%{libstdcxxpython}/hook.in	\
+      > $LIBPATH/$(basename %{_prefix}/%{_lib}/libstdc++.so.6.*)-gdb.py
+done
+test ! -e $RPM_BUILD_ROOT%{_datadir}/gdb/python/libstdcxx
+cp -a $RPM_BUILD_DIR/%{gdb_src}/%{libstdcxxpython}/libstdcxx	\
+      $RPM_BUILD_ROOT%{_datadir}/gdb/python/libstdcxx
+%endif # 0%{!?_without_python:1}
+%endif # 0%{?rhel:1}
+
 # Remove the files that are part of a gdb build but that are owned and
 # provided by other packages.
 # These are part of binutils
@@ -1105,9 +1136,9 @@ fi
 %if 0%{!?_with_upstream:1}
 %{_bindir}/gstack
 %{_mandir}/*/gstack.1*
+%{_bindir}/gdb-add-index
 %if 0%{!?el5:1}
 %{_bindir}/pstack
-%{_bindir}/gdb-add-index
 %{_mandir}/*/pstack.1*
 %endif # 0%{!?el5:1}
 %endif # 0%{!?_with_upstream:1}
@@ -1132,6 +1163,11 @@ fi
 %endif
 
 %changelog
+* Fri Jan  7 2011 Jan Kratochvil <jan.kratochvil at redhat.com> - 7.2.50.20110107-9.fc15
+- Remove --with-pythondir as no longer valid.
+- Provide %{_bindir}gdb-add-index even on RHEL-5.
+- Provide again libstdc++ pretty printers for any RHEL.
+
 * Fri Jan  7 2011 Jan Kratochvil <jan.kratochvil at redhat.com> - 7.2.50.20110107-8.fc15
 - Rebase to FSF GDB 7.2.50.20110107 (which is a 7.3 pre-release).
 - Import archer-tromey-python (BZ 666177, branch update by Phil Muldoon).
diff --git a/sources b/sources
index cc8115a..8832fe9 100644
--- a/sources
+++ b/sources
@@ -1 +1,2 @@
 a409209e95cd717274431b2eaa77dac0  gdb-7.2.50.20110107.tar.bz2
+04e5c4b1b9e633422cc48990fe61958d  libstdc++-v3-python-r155978.tar.bz2


More information about the scm-commits mailing list