summaryrefslogtreecommitdiff
path: root/community/pypy3/PKGBUILD
blob: 1cfc627209ef24aa321d839c3bf68344d89e21c2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# $Id: PKGBUILD 95035 2013-08-04 09:44:24Z svenstaro $
# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com>

#_hgrev=63547

pkgname=pypy3
pkgver=2.1beta1
_pkgver=2.1-beta1
#[[ -n $_hgrev ]] && pkgver=2.0beta2.$_hgrev
pkgrel=2
pkgdesc="A Python3 implementation written in Python, JIT enabled"
url="http://pypy.org"
arch=('i686' 'x86_64')
depends=('libffi')
provides=('python')
options=(!buildflags)
makedepends=('python' 'mercurial' 'python2' 'tk')
optdepends=('openssl: openssl module'
            'expat: pyexpat module'
            'ncurses: ncurses module'
            'zlib: zlib module'
            'bzip2: bz2 module'
            'tk: tk module')
license=('custom:MIT')
#source=("hg+https://bitbucket.org/pypy/pypy#revision=$_hgrev")
source=("https://bitbucket.org/pypy/pypy/downloads/$pkgname-$_pkgver-src.tar.bz2")
md5sums=('bc2013d1927dc1c0c91228e566abd8da')

build() {
  cd "${srcdir}"/${pkgname}-${_pkgver}-src/pypy/goal

  python2 ../../rpython/bin/rpython -Ojit targetpypystandalone
}

package() {
  cd "${srcdir}"/${pkgname}-${_pkgver}-src/pypy/tool/release

  python2 package.py ../../../ pypy3 pypy-c "${srcdir}"/${pkgname}.tar.bz2

  mkdir -p "${pkgdir}"/opt
  tar x -C "${pkgdir}"/opt -f "${srcdir}"/${pkgname}.tar.bz2

  mkdir -p "${pkgdir}"/usr/bin
  ln -s /opt/pypy3/bin/pypy-c "${pkgdir}"/usr/bin/pypy3

  install -Dm644 "${pkgdir}"/opt/pypy3/LICENSE "${pkgdir}"/usr/share/licenses/pypy3/LICENSE
}
# vim: ts=2 sw=2 et: