aboutsummaryrefslogtreecommitdiff
path: root/libraries/python3-pillow
diff options
context:
space:
mode:
authorPhilip Lacroix <slackph at posteo dot de>2015-12-18 23:28:12 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2015-12-19 07:23:11 +0700
commitf356912de46653f1d50a742e4bb5eebddffdcbdc (patch)
treef7e7d3b3a74074e05f1a7c2f1aa430789dc2c85a /libraries/python3-pillow
parent89b1f941a5da11dc5b2c23b1b837f4fdb32253b2 (diff)
libraries/python3-pillow: Added (Python3 support for python-pillow).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'libraries/python3-pillow')
-rw-r--r--libraries/python3-pillow/README13
-rw-r--r--libraries/python3-pillow/python3-pillow.SlackBuild110
-rw-r--r--libraries/python3-pillow/python3-pillow.info10
-rw-r--r--libraries/python3-pillow/slack-desc19
4 files changed, 152 insertions, 0 deletions
diff --git a/libraries/python3-pillow/README b/libraries/python3-pillow/README
new file mode 100644
index 0000000000000..94f59fd66a3b9
--- /dev/null
+++ b/libraries/python3-pillow/README
@@ -0,0 +1,13 @@
+The Python Imaging Library (PIL) adds image processing capabilities to
+your Python environment. This library provides extensive file format
+support, an efficient internal representation, and powerful image
+processing capabilities.
+
+This SlackBuild provides the PIL libraries with support for Python3.
+It is intended to be a complement to python-pillow, not to replace it.
+
+***Warning***
+
+Pillow and PIL CANNOT co-exist in the same environment. Before
+installing Pillow, please uninstall PIL.
+https://pillow.readthedocs.org/en/latest/installation.html
diff --git a/libraries/python3-pillow/python3-pillow.SlackBuild b/libraries/python3-pillow/python3-pillow.SlackBuild
new file mode 100644
index 0000000000000..f714695546426
--- /dev/null
+++ b/libraries/python3-pillow/python3-pillow.SlackBuild
@@ -0,0 +1,110 @@
+#!/bin/sh
+
+# Slackware build script for python3-pillow
+
+# Copyright 2015 by Philip Lacroix <slackph at posteo dot de>
+#
+# Based on the build script for python-pillow by the following authors:
+# Copyright 2009, 2010, 2013, 2014 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2014 Heinz Wiesinger, Amsterdam, The Netherlands
+# Copyright 2015 Brenton Earl <brent at exitstatusone dot com>
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+# This SlackBuild provides PIL libraries with support for Python3. It is a
+# complement to python-pillow, not a replacement, and as such it doesn't
+# include the scripts in $PKG/usr/bin.
+
+PRGNAM=python3-pillow
+SRCNAM=Pillow
+VERSION=${VERSION:-3.0.0}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i486 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $SRCNAM-$VERSION
+tar xvf $CWD/$SRCNAM-$VERSION.tar.gz
+
+cd $SRCNAM-$VERSION
+chown -R root:root .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
+ -o -perm 511 \) -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+
+# Do not install scripts that would go to /usr/bin, as they
+# are already part of python-pillow.
+sed -i -e "s~.*scripts=glob.glob(\"Scripts/\*.py\"),~~" setup.py
+
+python3 setup.py install --root=$PKG
+
+# Safety check to prevent changes in the install process of a
+# different version of Pillow that might allow files in /usr/bin.
+if [ -e $PKG/usr/bin ]; then
+ echo 'Warning - This package should not put files in /usr/bin: exiting'
+ exit
+fi
+
+find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" \
+ | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+PRGDOC=$PKG/usr/doc/$PRGNAM-$VERSION
+
+# Install documentation.
+mkdir -p $PRGDOC
+cat $CWD/README > $PRGDOC/README
+cat $CWD/$PRGNAM.SlackBuild > $PRGDOC/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/libraries/python3-pillow/python3-pillow.info b/libraries/python3-pillow/python3-pillow.info
new file mode 100644
index 0000000000000..6a9147c153602
--- /dev/null
+++ b/libraries/python3-pillow/python3-pillow.info
@@ -0,0 +1,10 @@
+PRGNAM="python3-pillow"
+VERSION="3.0.0"
+HOMEPAGE="http://python-pillow.github.io/"
+DOWNLOAD="https://pypi.python.org/packages/source/P/Pillow/Pillow-3.0.0.tar.gz"
+MD5SUM="fc8ac44e93da09678eac7e30c9b7377d"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES="python3 python-pillow %README%"
+MAINTAINER="Philip Lacroix"
+EMAIL="slackph at posteo dot de"
diff --git a/libraries/python3-pillow/slack-desc b/libraries/python3-pillow/slack-desc
new file mode 100644
index 0000000000000..e97ef968a7156
--- /dev/null
+++ b/libraries/python3-pillow/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+python3-pillow: python3-pillow (Python3 support for python-pillow)
+python3-pillow:
+python3-pillow: The Python Imaging Library (PIL) adds image processing capabilities
+python3-pillow: to your Python environment. This library provides extensive file
+python3-pillow: format support, an efficient internal representation, and powerful
+python3-pillow: image processing capabilities.
+python3-pillow:
+python3-pillow: This package provides the PIL libraries with support for Python3. It
+python3-pillow: is intended to be a complement to python-pillow, not to replace it.
+python3-pillow:
+python3-pillow: PIL homepage: https://python3-pillow.github.io/