[arch-commits] Commit in python/trunk (PKGBUILD dont-make-libpython-readonly.patch)

Felix Yan fyan at archlinux.org
Tue Sep 15 13:51:23 UTC 2015


    Date: Tuesday, September 15, 2015 @ 15:51:23
  Author: fyan
Revision: 246367

add patch for FS#45809 and make their build system respect our CFLAGS

Added:
  python/trunk/dont-make-libpython-readonly.patch
Modified:
  python/trunk/PKGBUILD

------------------------------------+
 PKGBUILD                           |   15 ++++++++++-----
 dont-make-libpython-readonly.patch |   13 +++++++++++++
 2 files changed, 23 insertions(+), 5 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2015-09-15 12:36:32 UTC (rev 246366)
+++ PKGBUILD	2015-09-15 13:51:23 UTC (rev 246367)
@@ -14,7 +14,7 @@
 license=('custom')
 url="http://www.python.org/"
 depends=('expat' 'bzip2' 'gdbm' 'openssl' 'libffi' 'zlib')
-makedepends=('tk' 'sqlite' 'valgrind' 'bluez-libs' 'mpdecimal' 'hardening-wrapper')
+makedepends=('tk' 'sqlite' 'valgrind' 'bluez-libs' 'mpdecimal')
 checkdepends=('gdb' 'xorg-server-xvfb')
 optdepends=('python-setuptools'
             'python-pip'
@@ -26,9 +26,11 @@
 provides=('python3')
 replaces=('python3')
 source=("http://www.python.org/ftp/python/${pkgver%rc*}/Python-${pkgver}.tar.xz"
-        test_gdb-version-fix.patch)
+        test_gdb-version-fix.patch
+        dont-make-libpython-readonly.patch)
 sha1sums=('871a06df9ab70984b7398ac53047fe125c757a70'
-          'ab86515aff465385675e2e6e593f09596e0a8db0')
+          'ab86515aff465385675e2e6e593f09596e0a8db0'
+          'c22b24324b8e53326702de439c401d97927ee3f2')
 
 prepare() {
   cd Python-${pkgver}
@@ -36,6 +38,9 @@
   # https://bugs.python.org/issue25096
   patch -p1 -i ../test_gdb-version-fix.patch
 
+  # FS#45809
+  patch -p1 -i ../dont-make-libpython-readonly.patch
+
   # FS#23997
   sed -i -e "s|^#.* /usr/local/bin/python|#!/usr/bin/python|" Lib/cgi.py
 
@@ -63,7 +68,7 @@
               --enable-loadable-sqlite-extensions \
               --without-ensurepip
 
-  make
+  make EXTRA_CFLAGS="$CFLAGS"
 }
 
 check() {
@@ -82,7 +87,7 @@
 
 package() {
   cd Python-${pkgver}
-  make DESTDIR="${pkgdir}" install maninstall
+  make DESTDIR="${pkgdir}" EXTRA_CFLAGS="$CFLAGS" install maninstall
 
   # Why are these not done by default...
   ln -s python3               "${pkgdir}"/usr/bin/python

Added: dont-make-libpython-readonly.patch
===================================================================
--- dont-make-libpython-readonly.patch	                        (rev 0)
+++ dont-make-libpython-readonly.patch	2015-09-15 13:51:23 UTC (rev 246367)
@@ -0,0 +1,13 @@
+diff --git a/Makefile.pre.in b/Makefile.pre.in
+index ce2c0aa..7d6dcf7 100644
+--- a/Makefile.pre.in
++++ b/Makefile.pre.in
+@@ -60,7 +60,7 @@ INSTALL_DATA=	@INSTALL_DATA@
+ # Shared libraries must be installed with executable mode on some systems;
+ # rather than figuring out exactly which, we always give them executable mode.
+ # Also, making them read-only seems to be a good idea...
+-INSTALL_SHARED= ${INSTALL} -m 555
++INSTALL_SHARED= ${INSTALL} -m 755
+ 
+ MKDIR_P=	@MKDIR_P@
+ 



More information about the arch-commits mailing list