initial import
This commit is contained in:
106
tauthon/PKGBUILD
Normal file
106
tauthon/PKGBUILD
Normal file
@@ -0,0 +1,106 @@
|
||||
# Maintainer: Jesus E. <heckyel@riseup.net>
|
||||
|
||||
# Based on python2 package
|
||||
|
||||
pkgname=tauthon
|
||||
pkgver=2.8.2
|
||||
pkgrel=5
|
||||
_basever=2.8
|
||||
pkgdesc="Fork of Python 2.7 with new syntax, builtins, and libraries backported from Python 3"
|
||||
arch=('i686' 'x86_64')
|
||||
license=('Python')
|
||||
url="https://github.com/naftaliharris/tauthon"
|
||||
depends=('bzip2' 'gdbm' 'libressl' 'zlib' 'expat' 'sqlite' 'libffi')
|
||||
makedepends=('quilt')
|
||||
replaces=('python2')
|
||||
conflicts=('python2')
|
||||
provides=('python2')
|
||||
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/naftaliharris/tauthon/archive/v${pkgver}.tar.gz")
|
||||
sha512sums=('32a88dcffa60af57a5a1824aa15b352722fcf07a25e53fd89596fe353ed1650eb9d4c098f534f38b06fa4a03a763b75fe855c0f96560ff8290911fb62e9cc291')
|
||||
|
||||
prepare() {
|
||||
cd ${pkgname}-${pkgver}
|
||||
|
||||
# Temporary workaround
|
||||
# See http://bugs.python.org/issue10835 for upstream report
|
||||
sed -i "/progname =/s/python/tauthon${_basever}/" Python/pythonrun.c
|
||||
|
||||
# Enable built-in SQLite module to load extensions
|
||||
sed -i "/SQLITE_OMIT_LOAD_EXTENSION/d" setup.py
|
||||
|
||||
sed -i -e "s|^#.* /usr/local/bin/python|#!/usr/bin/tauthon|" Lib/cgi.py
|
||||
|
||||
sed -i "s/python2.3/tauthon/g" Lib/distutils/tests/test_build_scripts.py \
|
||||
Lib/distutils/tests/test_install_scripts.py
|
||||
|
||||
# Ensure that we are using the system copy of various libraries (expat, zlib and libffi),
|
||||
# rather than copies shipped in the tarball
|
||||
rm -r Modules/expat
|
||||
rm -r Modules/zlib
|
||||
rm -r Modules/_ctypes/{darwin,libffi}*
|
||||
|
||||
# clean up #!s
|
||||
find . -name '*.py' | \
|
||||
xargs sed -i "s|#[ ]*![ ]*/usr/bin/env python$|#!/usr/bin/env tauthon|"
|
||||
|
||||
# Workaround asdl_c.py/makeopcodetargets.py errors after we touched the shebangs
|
||||
touch Include/Python-ast.h Python/Python-ast.c Python/opcode_targets.h
|
||||
}
|
||||
|
||||
build() {
|
||||
cd ${pkgname}-${pkgver}
|
||||
|
||||
export OPT="${CFLAGS}"
|
||||
./configure --prefix=/usr \
|
||||
--enable-shared \
|
||||
--with-threads \
|
||||
--enable-optimizations \
|
||||
--with-lto \
|
||||
--enable-ipv6 \
|
||||
--enable-unicode=ucs4 \
|
||||
--with-system-expat \
|
||||
--with-system-ffi \
|
||||
--with-dbmliborder=gdbm:ndbm \
|
||||
--without-ensurepip
|
||||
|
||||
make
|
||||
}
|
||||
|
||||
package() {
|
||||
cd ${pkgname}-${pkgver}
|
||||
|
||||
# Hack to avoid building again
|
||||
sed -i 's/^all:.*$/all: build_all/' Makefile
|
||||
|
||||
make DESTDIR="${pkgdir}" altinstall maninstall
|
||||
|
||||
rm "${pkgdir}"/usr/share/man/man1/tauthon.1
|
||||
|
||||
mv "${pkgdir}"/usr/bin/{python,tauthon}${_basever}-config
|
||||
|
||||
ln -sf tauthon${_basever} "${pkgdir}"/usr/bin/tauthon
|
||||
ln -sf tauthon${_basever}-config "${pkgdir}"/usr/bin/tauthon-config
|
||||
ln -sf tauthon${_basever}.1 "${pkgdir}"/usr/share/man/man1/tauthon.1
|
||||
|
||||
ln -sf tauthon-${_basever}.pc "${pkgdir}"/usr/lib/pkgconfig/tauthon.pc
|
||||
|
||||
ln -sf ../../libtauthon${_basever}.so "${pkgdir}"/usr/lib/tauthon${_basever}/config/libtauthon${_basever}.so
|
||||
|
||||
mv "${pkgdir}"/usr/bin/smtpd.py "${pkgdir}"/usr/lib/tauthon${_basever}/
|
||||
|
||||
# some useful "stuff"
|
||||
install -dm755 "${pkgdir}"/usr/lib/tauthon${_basever}/Tools/{i18n,scripts}
|
||||
install -m755 Tools/i18n/{msgfmt,pygettext}.py "${pkgdir}"/usr/lib/tauthon${_basever}/Tools/i18n/
|
||||
install -m755 Tools/scripts/{README,*py} "${pkgdir}"/usr/lib/tauthon${_basever}/Tools/scripts/
|
||||
|
||||
# fix conflicts with python
|
||||
mv "${pkgdir}"/usr/bin/idle{,2}
|
||||
mv "${pkgdir}"/usr/bin/pydoc{,2}
|
||||
mv "${pkgdir}"/usr/bin/2to3{,-2.8}
|
||||
|
||||
# clean-up reference to build directory
|
||||
sed -i "s#${srcdir}/${pkgname}-${pkgver}:##" "${pkgdir}"/usr/lib/tauthon${_basever}/config/Makefile
|
||||
|
||||
# license
|
||||
install -Dm644 LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
|
||||
}
|
||||
Reference in New Issue
Block a user