network/pyzor: Added patch for better compatibility with python 2.7.

Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
This commit is contained in:
LukenShiro 2012-12-28 19:40:55 +01:00 committed by Matteo Bernardini
parent 0ef8e082da
commit 85d946e291
2 changed files with 19 additions and 3 deletions

View file

@ -0,0 +1,8 @@
--- pyzor-0.5.0.orig/scripts/pyzor 2009-04-29 17:53:50.000000000 -0300
+++ pyzor-0.5.0/scripts/pyzor 2012-11-30 19:42:39.601001128 -0200
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python -Wignore::DeprecationWarning
import os
# set umask

View file

@ -2,7 +2,7 @@
# Slackware build script for pyzor
# Copyright 2009 LukenShiro <lukenshiro@ngi.it>
# Copyright 2009-2013 LukenShiro <lukenshiro@ngi.it>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@ -22,9 +22,11 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# Thanks to Carlos Xavier for a patch with better compatibility against Python 2.7
PRGNAM=pyzor
VERSION=${VERSION:-0.5.0}
BUILD=${BUILD:-1}
BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
# Automatically determine the architecture we're building on:
@ -54,7 +56,13 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
chmod -R u+w,go+r-w,a-s .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
-exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
patch -p1 < $CWD/better-py27-compat.patch
# Avoid /usr/share/doc html file's installation
sed -r -i "s|share/doc/pyzor|doc/pyzor-$VERSION|g" setup.py