mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-02-03 09:57:14 +08:00
rebuild scons to use python 2.
This commit is contained in:
parent
c618bf24e2
commit
3e621ce337
@ -1,22 +1,36 @@
|
||||
pkgname=scons
|
||||
pkgver=3.0.0
|
||||
pkgrel=1
|
||||
pkgrel=2
|
||||
pkgdesc="Extensible Python-based build utility"
|
||||
arch=('x86_64')
|
||||
arch=('any')
|
||||
url="http://scons.org"
|
||||
license=('custom')
|
||||
depends=('python3')
|
||||
source=(https://downloads.sourceforge.net/sourceforge/${pkgname}/${pkgname}-${pkgver}.tar.gz)
|
||||
md5sums=('1c99878d0eaf9b768b50721e913142d3')
|
||||
license=('MIT')
|
||||
depends=('python2')
|
||||
source=("http://downloads.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tar.gz"
|
||||
scons-support-python2-syntax.patch::"https://github.com/SConsProject/scons/commit/2e0de3c5.patch")
|
||||
md5sums=('1c99878d0eaf9b768b50721e913142d3'
|
||||
'7bcd903c70839301194931046e81b9b3')
|
||||
|
||||
prepare() {
|
||||
cd $pkgname-$pkgver
|
||||
patch -p2 -i ../scons-support-python2-syntax.patch # support Python 2 syntax in Sconsripts
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "${srcdir}/${pkgname}-${pkgver}"
|
||||
cd $pkgname-$pkgver
|
||||
|
||||
python3 setup.py install --standard-lib \
|
||||
--prefix=/usr \
|
||||
--install-data=/usr/share \
|
||||
--optimize=1 \
|
||||
--root="${pkgdir}"
|
||||
python2 setup.py install --standard-lib \
|
||||
--prefix=/usr \
|
||||
--install-data=/usr/share \
|
||||
--optimize=1 \
|
||||
--root="$pkgdir"
|
||||
|
||||
install -D -m644 LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
|
||||
# fix for python 2.7
|
||||
sed -i 's:^#!.*bin/env python:#!/usr/bin/env python2:' \
|
||||
"$pkgdir"/usr/bin/*
|
||||
|
||||
install -Dm644 LICENSE.txt \
|
||||
"$pkgdir/usr/share/licenses/$pkgname/LICENSE"
|
||||
}
|
||||
|
||||
# vim:set ts=2 sw=2 et:
|
||||
|
Loading…
Reference in New Issue
Block a user