summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Bershatsky2018-07-13 18:29:23 +0300
committerDaniel Bershatsky2018-07-13 18:29:23 +0300
commit62156f6bef3a6c38445334839650a0228974292b (patch)
tree89b58b8bf174cc346c8e60be2743d49c10f04d9e
downloadaur-62156f6bef3a6c38445334839650a0228974292b.tar.gz
Inital commimt.
-rw-r--r--.SRCINFO28
-rw-r--r--PKGBUILD92
-rw-r--r--dont-make-libpython-readonly.patch13
3 files changed, 133 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..f704919b2354
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,28 @@
+pkgbase = python-dbg
+ pkgdesc = Python 3 debug symbols.
+ pkgver = 3.6.6
+ pkgrel = 1
+ epoch = 0
+ url = http://www.python.org/
+ arch = i686
+ arch = x86_64
+ license = custom
+ makedepends = gcc
+ makedepends = make
+ makedepends = m4
+ makedepends = autoconf
+ depends = expat
+ depends = bzip2
+ depends = gdbm
+ depends = openssl
+ depends = libffi
+ depends = zlib
+ options = !debug
+ options = !strip
+ source = https://www.python.org/ftp/python/3.6.6/Python-3.6.6.tar.xz
+ source = dont-make-libpython-readonly.patch
+ md5sums = c3f30a0aff425dda77d19e02f420d6ba
+ md5sums = 60c9f7d02384f22834df06de5eb9c46a
+
+pkgname = python-dbg
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..a4f1a429d2c2
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,92 @@
+# Maintainer: Daniel Bershatsky <bepshatsky@yandex.ru>
+
+pkgname=python-dbg
+pkgver=3.6.6
+pkgrel=1
+epoch=0
+pkgdesc="Python 3 debug symbols."
+arch=('i686' 'x86_64')
+url='http://www.python.org/'
+license=('custom')
+depends=('expat' 'bzip2' 'gdbm' 'openssl' 'libffi' 'zlib')
+makedepends=('gcc' 'make' 'm4' 'autoconf')
+checkdepends=()
+optdepends=()
+provides=('python')
+conflicts=()
+replaces=()
+backup=()
+options=(!debug !strip)
+
+source=("https://www.python.org/ftp/python/${pkgver%rc*}/Python-${pkgver}.tar.xz"
+ dont-make-libpython-readonly.patch)
+md5sums=('c3f30a0aff425dda77d19e02f420d6ba'
+ '60c9f7d02384f22834df06de5eb9c46a')
+
+prepare() {
+ cd Python-${pkgver}
+
+ # 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
+
+ # Ensure that we are using the system copy of various libraries (expat, libffi, and libmpdec),
+ # rather than copies shipped in the tarball
+ rm -r Modules/expat
+ rm -r Modules/_ctypes/{darwin,libffi}*
+ rm -r Modules/_decimal/libmpdec
+}
+
+build() {
+ cd Python-${pkgver}
+
+ # Disable bundled pip & setuptools
+ ./configure --prefix=/usr \
+ --enable-ipv6 \
+ --enable-loadable-sqlite-extensions \
+ --enable-optimizations \
+ --enable-shared \
+ --with-computed-gotos \
+ --with-dbmliborder=gdbm:ndbm \
+ --with-lto \
+ --with-system-expat \
+ --with-system-ffi \
+ --with-system-libmpdec \
+ --with-threads \
+ --with-pydebug \
+ --without-ensurepip
+
+
+ # Obtain next free server number for xvfb-run; this even works in a chroot environment.
+ #export servernum=99
+ #while ! xvfb-run -a -n "$servernum" /bin/true 2>/dev/null; do servernum=$((servernum+1)); done
+
+ LC_CTYPE=en_US.UTF-8 make EXTRA_CFLAGS="$CFLAGS" -j4
+}
+
+package() {
+ cd Python-${pkgver}
+
+ # Hack to avoid building again
+ sed -i 's/^all:.*$/all: build_all/' Makefile
+
+ make DESTDIR="${pkgdir}" EXTRA_CFLAGS="$CFLAGS" install
+ find . -iname '*.so' -exec objcopy --only-keep-debug '{}' '{}.debug' \;
+
+ # Why are these not done by default...
+ ln -s python3 "${pkgdir}"/usr/bin/python
+ ln -s python3-config "${pkgdir}"/usr/bin/python-config
+ ln -s idle3 "${pkgdir}"/usr/bin/idle
+ ln -s pydoc3 "${pkgdir}"/usr/bin/pydoc
+ ln -s python${_pybasever}.1 "${pkgdir}"/usr/share/man/man1/python.1
+
+ # some useful "stuff" FS#46146
+ install -dm755 "${pkgdir}"/usr/lib/python${_pybasever}/Tools/{i18n,scripts}
+ install -m755 Tools/i18n/{msgfmt,pygettext}.py "${pkgdir}"/usr/lib/python${_pybasever}/Tools/i18n/
+ install -m755 Tools/scripts/{README,*py} "${pkgdir}"/usr/lib/python${_pybasever}/Tools/scripts/
+
+ # License
+ install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+}
diff --git a/dont-make-libpython-readonly.patch b/dont-make-libpython-readonly.patch
new file mode 100644
index 000000000000..92308bfe97bf
--- /dev/null
+++ b/dont-make-libpython-readonly.patch
@@ -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@
+