Add python15

This commit is contained in:
Marti Raudsepp 2012-05-01 15:11:50 +03:00
commit 6c538efff7
3 changed files with 70 additions and 0 deletions

17
.SRCINFO Normal file
View file

@ -0,0 +1,17 @@
pkgbase = python15
pkgdesc = Yes, an ancient version of Python, lol
pkgver = 1.5.2
pkgrel = 1
url = http://www.python.org/
arch = i686
arch = x86_64
license = PSF
depends = bash
options = !makeflags
source = http://www.python.org/ftp/python/src/py152.tgz
source = getline.patch
sha1sums = 2d648d07b1aa1aab32a3a24851c33715141779b9
sha1sums = 4a7b8064f7e6eebd398694bc7c373b700b2e5535
pkgname = python15

41
PKGBUILD Normal file
View file

@ -0,0 +1,41 @@
# $Id: PKGBUILD 157114 2012-04-24 00:17:20Z stephane $
# Maintainer: Marti Raudsepp <marti@juffo.org>
pkgname=python15
pkgver=1.5.2
pkgrel=1
pkgdesc="Yes, an ancient version of Python, lol"
arch=('i686' 'x86_64')
license=('PSF')
url="http://www.python.org/"
depends=('bash')
makedepends=()
optdepends=()
options=('!makeflags')
source=(http://www.python.org/ftp/python/src/py152.tgz getline.patch)
sha1sums=('2d648d07b1aa1aab32a3a24851c33715141779b9'
'4a7b8064f7e6eebd398694bc7c373b700b2e5535')
build() {
cd "$srcdir/Python-$pkgver"
patch -p1 < $srcdir/getline.patch
export OPT="$CFLAGS"
./configure --prefix=/usr
make
}
package() {
cd "$srcdir/Python-$pkgver"
mkdir "$pkgdir/usr"
# Makefile doesn't understand DESTDIR
make INSTALL=install prefix="$pkgdir/usr" install
# Hack fix
rm "$pkgdir/usr/bin/python"
rm -r "$pkgdir/usr/man"
# Dunno why these have wrong mode... Easier to just work around :)
chmod 755 "$pkgdir/usr"/{bin,lib,include}
}

12
getline.patch Normal file
View file

@ -0,0 +1,12 @@
--- Python-1.5.2/Objects/fileobject.c.orig 2012-05-01 14:39:04.857802025 +0300
+++ Python-1.5.2/Objects/fileobject.c 2012-05-01 14:39:29.663531501 +0300
@@ -64,6 +64,9 @@
#include <errno.h>
+// Work around name conflict with newer stdio.h
+#define getline py_getline
+
typedef struct {
PyObject_HEAD
FILE *f_fp;