public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Jan Kratochvil <jkratoch@fedoraproject.org>
To: git-commits@fedoraproject.org
Subject: [rpms/gdb] gdb-17.2-rebase-f44: - Include bundled libstdc++ python; it will be in libstdc++-devel since
Date: Sat, 27 Jun 2026 23:54:25 GMT	[thread overview]
Message-ID: <178260446582.1.15195114104524091925.rpms-gdb-8ae3364a4f98@fedoraproject.org> (raw)

        A new commit has been pushed.

        Repo   : rpms/gdb
        Branch : gdb-17.2-rebase-f44
        Commit : 8ae3364a4f98db483829189087cb61bfba5833e2
        Author : Jan Kratochvil <jkratoch@fedoraproject.org>
        Date   : 2009-09-17T22:00:12+00:00
        Stats  : +53/-1 in 4 file(s)
        URL    : https://src.fedoraproject.org/rpms/gdb/c/8ae3364a4f98db483829189087cb61bfba5833e2?branch=gdb-17.2-rebase-f44

        Log:
        - Include bundled libstdc++ python; it will be in libstdc++-devel since
gcc-4.5.

---
diff --git a/.cvsignore b/.cvsignore
index d5a29d0..8522cd4 100644
--- a/.cvsignore
+++ b/.cvsignore
@@ -1 +1,2 @@
 gdb-6.8.91.20090917.tar.bz2
+libstdc++-v3-python-r151798.tar.xz

diff --git a/gdb.spec b/gdb.spec
index 45e28f9..165c11f 100644
--- a/gdb.spec
+++ b/gdb.spec
@@ -14,7 +14,7 @@ Version: 6.8.91.20090917
 
 # 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: 1%{?_with_upstream:.upstream}%{?dist}
+Release: 2%{?_with_upstream:.upstream}%{?dist}
 
 License: GPLv3+
 Group: Development/Debuggers
@@ -54,6 +54,10 @@ Source2: gdb-orphanripper.c
 # Man page for gstack(1).
 Source3: gdb-gstack.man
 
+# libstdc++ pretty printers from GCC SVN HEAD (4.5 experimental).
+%define libstdcxxpython libstdc++-v3-python-r151798
+Source4: %{libstdcxxpython}.tar.xz
+
 # Work around out-of-date dejagnu that does not have KFAIL
 Patch1: gdb-6.3-rh-dummykfail-20041202.patch
 
@@ -357,6 +361,9 @@ Patch360: gdb-6.8-bz457187-largefile-test.patch
 # Fix compatibility of --with-system-readline and readline-6.0+.
 Patch375: gdb-readline-6.0.patch
 
+# Fix python pretty printers lookup on x86_64.
+Patch376: libstdc++-v3-python-common-prefix.patch
+
 BuildRequires: ncurses-devel texinfo gettext flex bison expat-devel
 Requires: readline
 BuildRequires: readline-devel
@@ -367,6 +374,8 @@ BuildRequires: rpm-devel
 %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
 Requires: python-libs
 BuildRequires: python-devel
+# Temporarily before it gets moved to libstdc++.rpm
+BuildRequires: libstdc++
 %endif	# 0%{!?_without_python:1}
 
 %if 0%{?_with_testsuite:1}
@@ -430,6 +439,9 @@ This package provides a program that allows you to run GDB on a different machin
 
 %setup -q -n %{gdb_src}
 
+# libstdc++ pretty printers.
+xz -dc %{SOURCE4} | tar xf -
+
 # 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
 rm -f gdb/jv-exp.c gdb/m2-exp.c gdb/objc-exp.c gdb/p-exp.c
@@ -544,6 +556,7 @@ rm -f gdb/jv-exp.c gdb/m2-exp.c gdb/objc-exp.c gdb/p-exp.c
 %patch352 -p1
 %patch360 -p1
 %patch375 -p1
+%patch376 -p1
 %patch124 -p1
 
 find -name "*.orig" | xargs rm -f
@@ -741,6 +754,22 @@ ln -sf gdb $RPM_BUILD_ROOT%{_prefix}/bin/gdbtui
 cmp $RPM_BUILD_ROOT%{_mandir}/*/gdb.1 $RPM_BUILD_ROOT%{_mandir}/*/gdbtui.1
 ln -sf gdb.1 $RPM_BUILD_ROOT%{_mandir}/*/gdbtui.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,@pythondir@,%{python_sitelib}/gdb,'			\
+      -e 's,@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%{python_sitelib}/gdb/libstdcxx
+cp -a $RPM_BUILD_DIR/%{gdb_src}/%{libstdcxxpython}/libstdcxx	\
+      $RPM_BUILD_ROOT%{python_sitelib}/gdb/libstdcxx
+%endif	# 0%{!?_without_python: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
@@ -818,6 +847,9 @@ fi
 %endif
 
 %changelog
+* Thu Sep 17 2009 Jan Kratochvil <jan.kratochvil@redhat.com> - 6.8.91.20090917-2
+- Include bundled libstdc++ python; it will be in libstdc++-devel since gcc-4.5.
+
 * Thu Sep 17 2009 Jan Kratochvil <jan.kratochvil@redhat.com> - 6.8.91.20090917-1
 - Upgrade to the FSF GDB gdb-7.0 branch and snapshot: 6.8.91.20090917
 - archer-jankratochvil-fedora12 commit: 16f3f01cc2cbc15283462eaabdfcde92cf42cdc6

diff --git a/libstdc++-v3-python-common-prefix.patch b/libstdc++-v3-python-common-prefix.patch
new file mode 100644
index 0000000..7409c9a
--- /dev/null
+++ b/libstdc++-v3-python-common-prefix.patch
@@ -0,0 +1,18 @@
+On x86_64 host with:
+pythondir: /usr/lib/python2.6/site-packages/gdb
+libdir:    /usr/lib64
+
+prefix got set to "/usr/lib" but the code expects a trailing "/" (missing then
+one "../" path component).
+
+--- ./libstdc++-v3-python-r151798/hook.in-orig	2009-06-18 21:12:37.000000000 +0200
++++ ./libstdc++-v3-python-r151798/hook.in	2009-09-17 23:37:35.000000000 +0200
+@@ -40,7 +40,7 @@ if gdb.current_objfile () is not None:
+     # In some bizarre configuration we might have found a match in the
+     # middle of a directory name.
+     if prefix[-1] != '/':
+-        prefix = os.path.dirname (prefix)
++        prefix = os.path.dirname (prefix) + '/'
+ 
+     # Strip off the prefix.
+     pythondir = pythondir[len (prefix):]

diff --git a/sources b/sources
index bdf9cb0..6489cec 100644
--- a/sources
+++ b/sources
@@ -1 +1,2 @@
 eaed9150b219c8ee56bb676e32a9d2a5  gdb-6.8.91.20090917.tar.bz2
+1e3a26040dcdd3579d75967085eb92b9  libstdc++-v3-python-r151798.tar.xz

                 reply	other threads:[~2026-06-27 23:54 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178260446582.1.15195114104524091925.rpms-gdb-8ae3364a4f98@fedoraproject.org \
    --to=jkratoch@fedoraproject.org \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox