[arch-commits] Commit in gdb/trunk (PKGBUILD python-3.8.patch)

2020-02-08 Thread Anatol Pomozov via arch-commits
Date: Saturday, February 8, 2020 @ 21:24:14
  Author: anatolik
Revision: 375012

upgpkg: gdb 9.1-1

Modified:
  gdb/trunk/PKGBUILD
Deleted:
  gdb/trunk/python-3.8.patch

--+
 PKGBUILD |   25 --
 python-3.8.patch |  128 -
 2 files changed, 11 insertions(+), 142 deletions(-)

Modified: PKGBUILD
===
--- PKGBUILD2020-02-08 16:15:41 UTC (rev 375011)
+++ PKGBUILD2020-02-08 21:24:14 UTC (rev 375012)
@@ -5,25 +5,21 @@
 # gdb-common is a package that contains files common for all cross compiled 
versions
 # of gdb (for arm/avr/...)
 pkgname=(gdb gdb-common)
-pkgver=8.3.1
-pkgrel=4
+pkgver=9.1
+pkgrel=1
 pkgdesc='The GNU Debugger'
 arch=(x86_64)
 url='https://www.gnu.org/software/gdb/'
 license=(GPL3)
 makedepends=(texinfo python guile2.0 ncurses expat xz)
-source=(https://ftp.gnu.org/gnu/gdb/${pkgname}-${pkgver}.tar.xz{,.sig}
-python-3.8.patch)
-sha1sums=('d403ba208945bbf04f8130ea4853730cdf0c8fc7'
-  'SKIP'
-  '14e76d9f9806168cd8a7f5052ce6421a980371a3')
+source=(https://ftp.gnu.org/gnu/gdb/${pkgname}-${pkgver}.tar.xz{,.sig})
+sha1sums=('a50e13e1eecea468ea28c4a23d8c5a84f4db25be'
+  'SKIP')
 validpgpkeys=('F40ADB902B24264AA42E50BF92EDB04BFF325CF3') # Joel Brobecker
 
 prepare() {
   cd gdb-$pkgver
 
-  patch -Np1 -i ../python-3.8.patch
-
   # hack! - libiberty configure tests for header files using "$CPP $CPPFLAGS"
   sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" libiberty/configure
 }
@@ -30,10 +26,11 @@
 
 build() {
   cd gdb-$pkgver
-  
-  ./configure --prefix=/usr --disable-nls \
+
+  mkdir -p build && cd build
+  ../configure --prefix=/usr --disable-nls \
 --with-system-readline \
---with-python=/usr/bin/python3 \
+--with-python=/usr/bin/python \
 --with-guile=guile-2.0 \
 --with-system-gdbinit=/etc/gdb/gdbinit
   make
@@ -42,7 +39,7 @@
 package_gdb-common() {
   depends=(python guile2.0)
 
-  cd gdb-$pkgver
+  cd gdb-$pkgver/build
   make -C gdb/data-directory DESTDIR=$pkgdir install
 }
 
@@ -50,7 +47,7 @@
   depends=(ncurses expat xz mpfr gdb-common=$pkgver)
   backup=(etc/gdb/gdbinit)
 
-  cd gdb-$pkgver
+  cd gdb-$pkgver/build
   make -C gdb DESTDIR=$pkgdir install
 
   # install "custom" system gdbinit

Deleted: python-3.8.patch
===
--- python-3.8.patch2020-02-08 16:15:41 UTC (rev 375011)
+++ python-3.8.patch2020-02-08 21:24:14 UTC (rev 375012)
@@ -1,128 +0,0 @@
-From b6484282f85bf7f11451b2441599c241d302ad9d Mon Sep 17 00:00:00 2001
-From: Raul Tambre 
-Date: Sat, 4 May 2019 15:48:17 -0400
-Subject: [PATCH] Fix incorrect use of 'is' operator for comparison in
- python/lib/gdb/command/prompt.py
-
-The 'is' operator is not meant to be used for comparisons. It currently working
-is an implementation detail of CPython.  CPython 3.8 has added a SyntaxWarning
-for this.
-
-diff --git a/gdb/python/lib/gdb/command/prompt.py 
b/gdb/python/lib/gdb/command/prompt.py
-index 3d662a7..04b9e49 100644
 a/gdb/python/lib/gdb/command/prompt.py
-+++ b/gdb/python/lib/gdb/command/prompt.py
-@@ -45,7 +45,7 @@ The currently defined substitutions are:
- self.hook_set = False
- 
- def get_show_string (self, pvalue):
--if self.value is not '':
-+if self.value:
-return "The extended prompt is: " + self.value
- else:
-return "The extended prompt is not set."
-@@ -57,7 +57,7 @@ The currently defined substitutions are:
- return ""
- 
- def before_prompt_hook(self, current):
--if self.value is not '':
-+if self.value:
- return gdb.prompt.substitute_prompt(self.value)
- else:
- return None
-
-From d9c4ba536c522b8dc2194d4100270a159be7894a Mon Sep 17 00:00:00 2001
-From: Sergio Durigan Junior 
-Date: Sun, 25 Aug 2019 12:10:35 -0400
-Subject: [PATCH] Use raw strings on gdb.python/py-xmethods.exp (and fix Python
- 3.8's "SyntaxWarning: invalid escape sequence")
-
-The way unrecognized escape sequences are handled has changed in
-Python 3.8: users now see a SyntaxWarning message, which will
-eventually become a SyntaxError in future versions of Python:
-
-  (gdb) source /blabla/gdb.python/py-xmethods/py-xmethods.py
-  /blabla/gdb.python/py-xmethods/py-xmethods.py:204: SyntaxWarning: invalid 
escape seque
-  nce \+
-'operator\+',
-  /blabla/gdb.python/py-xmethods/py-xmethods.py:211: SyntaxWarning: invalid 
escape seque
-  nce \+
-'operator\+\+',
-
-One of our testcases, gdb.python/py-xmethods.exp, contains strings in
-the form of "operator\+".  This is not recognized by Python, but is
-still needed by the testsuite to work properly.  The solution is
-simple: we just have to make sure these strings are marked as
-raw (i.e, r"").  This is what this patch does.  I took the opportunity
-to also convert other strings to raw, which, in two 

[arch-commits] Commit in gdb/trunk (PKGBUILD python-3.8.patch)

2019-11-14 Thread Evangelos Foutras via arch-commits
Date: Thursday, November 14, 2019 @ 11:07:27
  Author: foutrelis
Revision: 368487

upgpkg: gdb 8.3.1-4

Grab two Python fixes from upstream (FS#64493).

Added:
  gdb/trunk/python-3.8.patch
Modified:
  gdb/trunk/PKGBUILD

--+
 PKGBUILD |   10 ++--
 python-3.8.patch |  128 +
 2 files changed, 135 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===
--- PKGBUILD2019-11-14 10:40:21 UTC (rev 368486)
+++ PKGBUILD2019-11-14 11:07:27 UTC (rev 368487)
@@ -6,20 +6,24 @@
 # of gdb (for arm/avr/...)
 pkgname=(gdb gdb-common)
 pkgver=8.3.1
-pkgrel=3
+pkgrel=4
 pkgdesc='The GNU Debugger'
 arch=(x86_64)
 url='https://www.gnu.org/software/gdb/'
 license=(GPL3)
 makedepends=(texinfo python guile2.0 ncurses expat xz)
-source=(https://ftp.gnu.org/gnu/gdb/${pkgname}-${pkgver}.tar.xz{,.sig})
+source=(https://ftp.gnu.org/gnu/gdb/${pkgname}-${pkgver}.tar.xz{,.sig}
+python-3.8.patch)
 sha1sums=('d403ba208945bbf04f8130ea4853730cdf0c8fc7'
-  'SKIP')
+  'SKIP'
+  '14e76d9f9806168cd8a7f5052ce6421a980371a3')
 validpgpkeys=('F40ADB902B24264AA42E50BF92EDB04BFF325CF3') # Joel Brobecker
 
 prepare() {
   cd gdb-$pkgver
 
+  patch -Np1 -i ../python-3.8.patch
+
   # hack! - libiberty configure tests for header files using "$CPP $CPPFLAGS"
   sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" libiberty/configure
 }

Added: python-3.8.patch
===
--- python-3.8.patch(rev 0)
+++ python-3.8.patch2019-11-14 11:07:27 UTC (rev 368487)
@@ -0,0 +1,128 @@
+From b6484282f85bf7f11451b2441599c241d302ad9d Mon Sep 17 00:00:00 2001
+From: Raul Tambre 
+Date: Sat, 4 May 2019 15:48:17 -0400
+Subject: [PATCH] Fix incorrect use of 'is' operator for comparison in
+ python/lib/gdb/command/prompt.py
+
+The 'is' operator is not meant to be used for comparisons. It currently working
+is an implementation detail of CPython.  CPython 3.8 has added a SyntaxWarning
+for this.
+
+diff --git a/gdb/python/lib/gdb/command/prompt.py 
b/gdb/python/lib/gdb/command/prompt.py
+index 3d662a7..04b9e49 100644
+--- a/gdb/python/lib/gdb/command/prompt.py
 b/gdb/python/lib/gdb/command/prompt.py
+@@ -45,7 +45,7 @@ The currently defined substitutions are:
+ self.hook_set = False
+ 
+ def get_show_string (self, pvalue):
+-if self.value is not '':
++if self.value:
+return "The extended prompt is: " + self.value
+ else:
+return "The extended prompt is not set."
+@@ -57,7 +57,7 @@ The currently defined substitutions are:
+ return ""
+ 
+ def before_prompt_hook(self, current):
+-if self.value is not '':
++if self.value:
+ return gdb.prompt.substitute_prompt(self.value)
+ else:
+ return None
+
+From d9c4ba536c522b8dc2194d4100270a159be7894a Mon Sep 17 00:00:00 2001
+From: Sergio Durigan Junior 
+Date: Sun, 25 Aug 2019 12:10:35 -0400
+Subject: [PATCH] Use raw strings on gdb.python/py-xmethods.exp (and fix Python
+ 3.8's "SyntaxWarning: invalid escape sequence")
+
+The way unrecognized escape sequences are handled has changed in
+Python 3.8: users now see a SyntaxWarning message, which will
+eventually become a SyntaxError in future versions of Python:
+
+  (gdb) source /blabla/gdb.python/py-xmethods/py-xmethods.py
+  /blabla/gdb.python/py-xmethods/py-xmethods.py:204: SyntaxWarning: invalid 
escape seque
+  nce \+
+'operator\+',
+  /blabla/gdb.python/py-xmethods/py-xmethods.py:211: SyntaxWarning: invalid 
escape seque
+  nce \+
+'operator\+\+',
+
+One of our testcases, gdb.python/py-xmethods.exp, contains strings in
+the form of "operator\+".  This is not recognized by Python, but is
+still needed by the testsuite to work properly.  The solution is
+simple: we just have to make sure these strings are marked as
+raw (i.e, r"").  This is what this patch does.  I took the opportunity
+to also convert other strings to raw, which, in two cases, allowed the
+removal of an extra backslash.
+
+I tested this using Python 3.7 and Python 3.8, and everything works
+fine.
+
+I think I could push this as obvious, but decided to send it to
+gdb-patches just in case.
+
+gdb/testsuite/ChangeLog:
+2019-08-26  Sergio Durigan Junior  
+
+   * gdb.python/py-xmethods.exp: Use raw strings when passing
+   arguments to SimpleXMethodMatcher.
+
+diff --git a/gdb/testsuite/gdb.python/py-xmethods.py 
b/gdb/testsuite/gdb.python/py-xmethods.py
+index 587842d7360..cea48b80d8c 100644
+--- a/gdb/testsuite/gdb.python/py-xmethods.py
 b/gdb/testsuite/gdb.python/py-xmethods.py
+@@ -199,34 +199,34 @@ def match(self, class_type, method_name):
+ 
+ 
+ global_dm_list = [
+-SimpleXMethodMatcher('A_plus_A',
+- '^dop::A$',
+- 'operator\+',
++