public
Last active

fixed python25 archlinux package

  • Download Gist
001_patch-svnversion.patch
Diff
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
--- configure.in
+++ configure.in
@@ -767,7 +767,7 @@
then
SVNVERSION="svnversion \$(srcdir)"
else
- SVNVERSION="echo exported"
+ SVNVERSION="echo Unversioned directory"
fi
case $MACHDEP in
--- Makefile.pre.in
+++ Makefile.pre.in
@@ -501,7 +501,7 @@
$(SIGNAL_OBJS) \
$(MODOBJS) \
$(srcdir)/Modules/getbuildinfo.c
- $(CC) -c $(PY_CFLAGS) -DSVNVERSION=\"`LC_ALL=C $(SVNVERSION)`\" -o $@ $(srcdir)/Modules/getbuildinfo.c
+ $(CC) -c $(PY_CFLAGS) -DSVNVERSION="\"`LC_ALL=C $(SVNVERSION)`\"" -o $@ $(srcdir)/Modules/getbuildinfo.c
Modules/getpath.o: $(srcdir)/Modules/getpath.c Makefile
$(CC) -c $(PY_CFLAGS) -DPYTHONPATH='"$(PYTHONPATH)"' \
--- Modules/getbuildinfo.c
+++ Modules/getbuildinfo.c
@@ -48,5 +48,5 @@
static const char svnversion[] = SVNVERSION;
if (svnversion[0] != '$')
return svnversion; /* it was interpolated, or passed on command line */
- return "exported";
+ return "Unversioned directory";
}
--- Python/sysmodule.c
+++ Python/sysmodule.c
@@ -1161,7 +1161,7 @@
svnversion = _Py_svnversion();
- if (strcmp(svnversion, "exported") != 0)
+ if (strcmp(svnversion, "Unversioned directory") != 0 && strcmp(svnversion, "exported") != 0)
svn_revision = svnversion;
else if (istag) {
len = strlen(_patchlevel_revision);
PKGBUILD
Shell
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
# Contributor: Mathieu Clabaut <mathieu.clabaut@gmail.com>
# Contributor: Kiril Zyapkov <kiril.zyapkov@gmail.com>
pkgname=python25
pkgver=2.5.6
pkgrel=3
pkgdesc="A high-level scripting language"
arch=(i686 x86_64)
license=('custom')
url="http://www.python.org"
depends=('db' 'bzip2' 'gdbm' 'openssl' 'zlib' 'gcc-libs' 'readline')
makedepends=('tk')
source=("http://www.python.org/ftp/python/$pkgver/Python-$pkgver.tar.bz2"
'001_patch-svnversion.patch')
options=('!makeflags')
md5sums=('5d45979c5f30fb2dd5f067c6b06b88e4'
'ffa026e28f375afc08cc7f50cfe7f8ab')
 
build() {
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$srcdir/Python-$pkgver
cd $srcdir/Python-$pkgver
patch -p0 < ../001_patch-svnversion.patch
./configure --prefix=/usr --enable-shared --with-threads --enable-unicode
make
}
 
package() {
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$srcdir/Python-$pkgver
cd $srcdir/Python-$pkgver
make DESTDIR=$pkgdir altinstall
#rm $pkgdir/usr/bin/python
#rm $pkgdir/usr/bin/python-config
 
# Rename all the scripts
pushd $pkgdir/usr/bin
mv idle idle2.5
mv pydoc pydoc2.5
mv smtpd.py smtpd2.5.py
popd
 
# license
install -D -m644 LICENSE $pkgdir/usr/share/licenses/${pkgname}/LICENSE
#mv $pkgdir/usr/share/man/man1/python.1 $pkgdir/usr/share/man/man1/python25.1
 
}

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.