diff --git a/packages/3rdparty/web/pycurl/build b/packages/3rdparty/web/pycurl/build new file mode 100755 index 0000000000..a443bc7610 --- /dev/null +++ b/packages/3rdparty/web/pycurl/build @@ -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 diff --git a/packages/3rdparty/web/pycurl/install b/packages/3rdparty/web/pycurl/install new file mode 100755 index 0000000000..a9c8b9924b --- /dev/null +++ b/packages/3rdparty/web/pycurl/install @@ -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 diff --git a/packages/3rdparty/web/pycurl/meta b/packages/3rdparty/web/pycurl/meta new file mode 100644 index 0000000000..2f193ebdfd --- /dev/null +++ b/packages/3rdparty/web/pycurl/meta @@ -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" diff --git a/packages/3rdparty/web/pycurl/patches/pycurl-7.19.0-fix-do_curl_reset-refcount.patch b/packages/3rdparty/web/pycurl/patches/pycurl-7.19.0-fix-do_curl_reset-refcount.patch new file mode 100644 index 0000000000..7e20b15c2f --- /dev/null +++ b/packages/3rdparty/web/pycurl/patches/pycurl-7.19.0-fix-do_curl_reset-refcount.patch @@ -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 diff --git a/packages/3rdparty/web/pycurl/patches/pycurl-7.19.0-no-static-libs.patch b/packages/3rdparty/web/pycurl/patches/pycurl-7.19.0-no-static-libs.patch new file mode 100644 index 0000000000..06ac2c1f1e --- /dev/null +++ b/packages/3rdparty/web/pycurl/patches/pycurl-7.19.0-no-static-libs.patch @@ -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:]) diff --git a/packages/3rdparty/web/pycurl/patches/pycurl-7.19.0-setuptools-0.1.patch b/packages/3rdparty/web/pycurl/patches/pycurl-7.19.0-setuptools-0.1.patch new file mode 100644 index 0000000000..8ceba310a2 --- /dev/null +++ b/packages/3rdparty/web/pycurl/patches/pycurl-7.19.0-setuptools-0.1.patch @@ -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 +