new package: add package 'pycurl'

Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
Stephan Raue 2011-09-29 14:46:31 +02:00
parent efe0a2f1fb
commit 92a8ca0a72
6 changed files with 144 additions and 0 deletions

33
packages/3rdparty/web/pycurl/build vendored Executable file
View File

@ -0,0 +1,33 @@
#!/bin/sh
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv)
#
# This Program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This Program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenELEC.tv; see the file COPYING. If not, write to
# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
# http://www.gnu.org/copyleft/gpl.html
################################################################################
. config/options $1
export PYTHONXCPREFIX="$SYSROOT_PREFIX/usr"
export LDFLAGS="$LDFLAGS -L$SYSROOT_PREFIX/usr/lib -L$SYSROOT_PREFIX/lib"
cd $PKG_BUILD
python setup.py build --cross-compile
python setup.py install -O0 --no-compile --prefix /usr --root .install
rm -rf .install/usr/bin

25
packages/3rdparty/web/pycurl/install vendored Executable file
View File

@ -0,0 +1,25 @@
#!/bin/sh
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv)
#
# This Program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This Program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenELEC.tv; see the file COPYING. If not, write to
# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
# http://www.gnu.org/copyleft/gpl.html
################################################################################
. config/options $1
cp -PR $PKG_BUILD/.install/* $INSTALL

36
packages/3rdparty/web/pycurl/meta vendored Normal file
View File

@ -0,0 +1,36 @@
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv)
#
# This Program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This Program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenELEC.tv; see the file COPYING. If not, write to
# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
# http://www.gnu.org/copyleft/gpl.html
################################################################################
PKG_NAME="pycurl"
PKG_VERSION="7.19.0"
PKG_REV="1"
PKG_ARCH="any"
PKG_LICENSE="GPL-2"
PKG_SITE="http://pycurl.sourceforge.net/"
PKG_URL="http://pycurl.sourceforge.net/download/$PKG_NAME-$PKG_VERSION.tar.gz"
PKG_DEPENDS="Python distribute curl"
PKG_BUILD_DEPENDS="toolchain Python distribute distutilscross curl"
PKG_PRIORITY="optional"
PKG_SECTION="python/web"
PKG_SHORTDESC="pycurl: a Python interface to libcurl"
PKG_LONGDESC="PycURL is a Python interface to libcurl. PycURL can be used to fetch objects identified by a URL from a Python program, similar to the urllib Python module. PycURL is mature, very fast, and supports a lot of features."
PKG_IS_ADDON="no"
PKG_AUTORECONF="no"

View File

@ -0,0 +1,24 @@
--- a/src/pycurl.c
+++ a/src/pycurl.c
@@ -1452,6 +1452,7 @@ do_curl_reset(CurlObject *self)
}
}
+ Py_INCREF(Py_None);
return Py_None;
}
--- a/tests/test_internals.py
+++ a/tests/test_internals.py
@@ -245,6 +245,11 @@ if 1 and gc:
if opts.verbose >= 1:
print "Tracked objects:", len(gc.get_objects())
+if 1:
+ # Ensure that the refcounting error in "reset" is fixed:
+ for i in xrange(100000):
+ c = Curl()
+ c.reset()
# /***********************************************************************
# // done

View File

@ -0,0 +1,12 @@
--- pycurl/setup.py~ 2008-04-22 17:00:45.000000000 +0300
+++ pycurl/setup.py 2008-07-03 21:53:36.000000000 +0300
@@ -97,8 +97,7 @@
else:
extra_compile_args.append(e)
libs = split_quoted(
- os.popen("'%s' --libs" % CURL_CONFIG).read()+\
- os.popen("'%s' --static-libs" % CURL_CONFIG).read())
+ os.popen("'%s' --libs" % CURL_CONFIG).read())
for e in libs:
if e[:2] == "-l":
libraries.append(e[2:])

View File

@ -0,0 +1,14 @@
diff -Naur pycurl-7.19.0/setup.py pycurl-7.19.0.patch/setup.py
--- pycurl-7.19.0/setup.py 2008-09-09 19:40:34.000000000 +0200
+++ pycurl-7.19.0.patch/setup.py 2011-09-29 02:07:22.584412664 +0200
@@ -11,8 +11,8 @@
import glob, os, re, sys, string
import distutils
-from distutils.core import setup
-from distutils.extension import Extension
+from setuptools import setup
+from setuptools import Extension
from distutils.util import split_quoted
from distutils.version import LooseVersion