From c807a5d8e01ca6cdc62acf0b07db8d23142f504e Mon Sep 17 00:00:00 2001 From: Stephan Raue Date: Sun, 17 Apr 2011 10:16:28 +0200 Subject: [PATCH] new package: add package 'Imaging' Signed-off-by: Stephan Raue --- packages/mediacenter/xbmc/meta | 3 ++ packages/python/graphics/Imaging/build | 36 +++++++++++++++++++ packages/python/graphics/Imaging/install | 25 +++++++++++++ packages/python/graphics/Imaging/meta | 36 +++++++++++++++++++ .../Imaging-1.1.7-crosscompiling-0.1.patch | 34 ++++++++++++++++++ .../Imaging-1.1.7-setuptools-0.1.patch | 12 +++++++ 6 files changed, 146 insertions(+) create mode 100755 packages/python/graphics/Imaging/build create mode 100755 packages/python/graphics/Imaging/install create mode 100644 packages/python/graphics/Imaging/meta create mode 100644 packages/python/graphics/Imaging/patches/Imaging-1.1.7-crosscompiling-0.1.patch create mode 100644 packages/python/graphics/Imaging/patches/Imaging-1.1.7-setuptools-0.1.patch diff --git a/packages/mediacenter/xbmc/meta b/packages/mediacenter/xbmc/meta index b06ed9b17f..4896a4c568 100644 --- a/packages/mediacenter/xbmc/meta +++ b/packages/mediacenter/xbmc/meta @@ -73,3 +73,6 @@ fi if [ "$PS3REMOTE_SUPPORT" = yes ]; then PKG_DEPENDS="$PKG_DEPENDS PyBluez" fi + +# some python stuff needed for various addons + PKG_DEPENDS="$PKG_DEPENDS Imaging" diff --git a/packages/python/graphics/Imaging/build b/packages/python/graphics/Imaging/build new file mode 100755 index 0000000000..3d37a7f15b --- /dev/null +++ b/packages/python/graphics/Imaging/build @@ -0,0 +1,36 @@ +#!/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 -O1 --skip-build --prefix /usr --root .install + +find .install -name "*.py" -exec rm -rf "{}" ";" +find .install -name "*.pyo" -exec rm -rf "{}" ";" + +rm -rf .install/usr/bin diff --git a/packages/python/graphics/Imaging/install b/packages/python/graphics/Imaging/install new file mode 100755 index 0000000000..a9c8b9924b --- /dev/null +++ b/packages/python/graphics/Imaging/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/python/graphics/Imaging/meta b/packages/python/graphics/Imaging/meta new file mode 100644 index 0000000000..c7928a6268 --- /dev/null +++ b/packages/python/graphics/Imaging/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="Imaging" +PKG_VERSION="1.1.7" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="BSD" +PKG_SITE="http://www.pythonware.com/products/pil/" +PKG_URL="http://effbot.org/downloads/$PKG_NAME-$PKG_VERSION.tar.gz" +PKG_DEPENDS="Python distribute zlib freetype $LIBJPEG" +PKG_BUILD_DEPENDS="toolchain Python distribute distutilscross zlib freetype $LIBJPEG" +PKG_PRIORITY="optional" +PKG_SECTION="python/system" +PKG_SHORTDESC="pil: Imaging handling/processing for Python" +PKG_LONGDESC="The Python Imaging Library (PIL) adds image processing capabilities to your Python interpreter. This library supports many file formats, and provides powerful image processing and graphics capabilities." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/python/graphics/Imaging/patches/Imaging-1.1.7-crosscompiling-0.1.patch b/packages/python/graphics/Imaging/patches/Imaging-1.1.7-crosscompiling-0.1.patch new file mode 100644 index 0000000000..ccd7afde48 --- /dev/null +++ b/packages/python/graphics/Imaging/patches/Imaging-1.1.7-crosscompiling-0.1.patch @@ -0,0 +1,34 @@ +diff -Naur Imaging-1.1.7/setup.py Imaging-1.1.7.patch/setup.py +--- Imaging-1.1.7/setup.py 2011-04-17 09:31:07.000000000 +0200 ++++ Imaging-1.1.7.patch/setup.py 2011-04-17 09:54:20.880047886 +0200 +@@ -147,7 +147,6 @@ + add_directory(library_dirs, "/opt/local/lib") + add_directory(include_dirs, "/opt/local/include") + +- add_directory(library_dirs, "/usr/local/lib") + # FIXME: check /opt/stuff directories here? + + prefix = sysconfig.get_config_var("prefix") +@@ -199,22 +198,6 @@ + add_directory(include_dirs, include_root) + + # +- # add standard directories +- +- # look for tcl specific subdirectory (e.g debian) +- if _tkinter: +- tcl_dir = "/usr/include/tcl" + TCL_VERSION +- if os.path.isfile(os.path.join(tcl_dir, "tk.h")): +- add_directory(include_dirs, tcl_dir) +- +- # standard locations +- add_directory(library_dirs, "/usr/local/lib") +- add_directory(include_dirs, "/usr/local/include") +- +- add_directory(library_dirs, "/usr/lib") +- add_directory(include_dirs, "/usr/include") +- +- # + # insert new dirs *before* default libs, to avoid conflicts + # between Python PYD stub libs and real libraries + diff --git a/packages/python/graphics/Imaging/patches/Imaging-1.1.7-setuptools-0.1.patch b/packages/python/graphics/Imaging/patches/Imaging-1.1.7-setuptools-0.1.patch new file mode 100644 index 0000000000..a59ea79c5b --- /dev/null +++ b/packages/python/graphics/Imaging/patches/Imaging-1.1.7-setuptools-0.1.patch @@ -0,0 +1,12 @@ +diff -Naur Imaging-1.1.7/setup.py Imaging-1.1.7.patch/setup.py +--- Imaging-1.1.7/setup.py 2009-11-15 17:06:10.000000000 +0100 ++++ Imaging-1.1.7.patch/setup.py 2011-04-17 09:31:07.545708559 +0200 +@@ -83,7 +83,7 @@ + # -------------------------------------------------------------------- + + from distutils import sysconfig +-from distutils.core import Extension, setup ++from setuptools import Extension, setup + from distutils.command.build_ext import build_ext + + try: