use optimization option

This commit is contained in:
Yiyang Kang 2021-02-24 14:05:05 +08:00
parent a057b43d34
commit 5a2433ad58
Signed by: kkyy
GPG key ID: 80FD317ECAF06CC3
3 changed files with 45 additions and 6 deletions

View file

@ -3,7 +3,7 @@
pkgname=python36
pkgver=3.6.13
pkgrel=1
pkgrel=2
_pybasever=3.6
_pymajver=3
pkgdesc="Major release 3.6 of the Python high-level programming language"
@ -14,12 +14,21 @@ depends=('expat' 'bzip2' 'gdbm' 'openssl' 'libffi' 'zlib')
makedepends=('tk' 'sqlite' 'bluez-libs' 'mpdecimal')
optdepends=('tk: for tkinter' 'sqlite')
options=('!makeflags')
source=(http://www.python.org/ftp/python/${pkgver}/Python-${pkgver}.tar.xz)
sha256sums=('a47a43a53abb42286a2c11965343ff56711b9e64e8d11bf2c6701a4fb8ce1a0f')
source=(
http://www.python.org/ftp/python/${pkgver}/Python-${pkgver}.tar.xz
fix-faulthandler._stack_overflow-on-GCC-10.patch
)
sha256sums=(
'a47a43a53abb42286a2c11965343ff56711b9e64e8d11bf2c6701a4fb8ce1a0f'
'4146f0bff3b79cd05940e2274c6800897a60ae0264d2f05a150137da7c620fda'
)
prepare() {
cd "${srcdir}/Python-${pkgver}"
# fix build with gcc10 #bpo-38965
patch --forward --strip=0 --input="${srcdir}/fix-faulthandler._stack_overflow-on-GCC-10.patch"
# FS#23997
sed -i -e "s|^#.* /usr/local/bin/python|#!/usr/bin/python|" Lib/cgi.py
@ -44,9 +53,10 @@ build() {
--with-system-libmpdec \
--with-system-ffi \
--enable-loadable-sqlite-extensions \
--without-ensurepip
--without-ensurepip \
--enable-optimizations
make
make -j$(nproc)
}
package() {