summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatteo Bernardini <ponce@slackbuilds.org>2013-05-28 17:45:31 +0200
committerRobby Workman <rworkman@slackbuilds.org>2013-11-11 10:58:08 -0600
commit6c1b1f484e588fac5d47606c8bd77f4d48eb1d40 (patch)
tree5eca55a07ad2fc8eca79d4ea2fdf4d700b4fce75
parentab0a12d213fc6a4c7731941be5893bd1ca217291 (diff)
downloadslackbuilds-6c1b1f484e588fac5d47606c8bd77f4d48eb1d40.tar.gz
python/python-magick: Fixed the build system.
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
-rw-r--r--python/python-magick/patches/__init__-fixup (renamed from python/python-magick/__init__-fixup)0
-rw-r--r--python/python-magick/patches/pythonmagick-0.9.1-use_active_python_version.patch21
-rw-r--r--python/python-magick/patches/pythonmagick-0.9.2-fix_detection_of_python_includedir.patch11
-rw-r--r--python/python-magick/python-magick.SlackBuild18
4 files changed, 43 insertions, 7 deletions
diff --git a/python/python-magick/__init__-fixup b/python/python-magick/patches/__init__-fixup
index 76154ef209..76154ef209 100644
--- a/python/python-magick/__init__-fixup
+++ b/python/python-magick/patches/__init__-fixup
diff --git a/python/python-magick/patches/pythonmagick-0.9.1-use_active_python_version.patch b/python/python-magick/patches/pythonmagick-0.9.1-use_active_python_version.patch
new file mode 100644
index 0000000000..4293fc17df
--- /dev/null
+++ b/python/python-magick/patches/pythonmagick-0.9.1-use_active_python_version.patch
@@ -0,0 +1,21 @@
+--- m4/ax_python.m4
++++ m4/ax_python.m4
+@@ -58,13 +58,14 @@
+ AC_DEFUN([AX_PYTHON],
+ [AC_MSG_CHECKING(for python build information)
+ AC_MSG_RESULT([])
+-for python in python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python; do
++for python in python python2.6 python2.5 python2.4 python2.3 python2.2 python2.1; do
+ AC_CHECK_PROGS(PYTHON_BIN, [$python])
+ ax_python_bin=$PYTHON_BIN
+ if test x$ax_python_bin != x; then
+- AC_CHECK_LIB($ax_python_bin, main, ax_python_lib=$ax_python_bin, ax_python_lib=no)
+- AC_CHECK_HEADER([$ax_python_bin/Python.h],
+- [[ax_python_header=`locate $ax_python_bin/Python.h | sed -e s,/Python.h,,`]],
++ [python_version=`$ax_python_bin -c 'import sys; print(".".join(str(x) for x in sys.version_info[:2]))'`]
++ AC_CHECK_LIB(python$python_version, main, ax_python_lib=python$python_version, ax_python_lib=no)
++ AC_CHECK_HEADER([python$python_version/Python.h],
++ [[ax_python_header=`locate python$python_version/Python.h | sed -e s,/Python.h,,`]],
+ ax_python_header=no)
+ if test $ax_python_lib != no; then
+ if test $ax_python_header != no; then
diff --git a/python/python-magick/patches/pythonmagick-0.9.2-fix_detection_of_python_includedir.patch b/python/python-magick/patches/pythonmagick-0.9.2-fix_detection_of_python_includedir.patch
new file mode 100644
index 0000000000..6d14363b3d
--- /dev/null
+++ b/python/python-magick/patches/pythonmagick-0.9.2-fix_detection_of_python_includedir.patch
@@ -0,0 +1,11 @@
+--- m4/ax_python.m4
++++ m4/ax_python.m4
+@@ -65,7 +65,7 @@
+ [python_version=`$ax_python_bin -c 'import sys; print(".".join(str(x) for x in sys.version_info[:2]))'`]
+ AC_CHECK_LIB(python$python_version, main, ax_python_lib=python$python_version, ax_python_lib=no)
+ AC_CHECK_HEADER([python$python_version/Python.h],
+- [[ax_python_header=`locate python$python_version/Python.h | sed -e s,/Python.h,,`]],
++ [[ax_python_header=`$ax_python_bin -c 'import sys; print(sys.prefix + "/include/python%s.%s" % sys.version_info[:2])'`]],
+ ax_python_header=no)
+ if test $ax_python_lib != no; then
+ if test $ax_python_header != no; then
diff --git a/python/python-magick/python-magick.SlackBuild b/python/python-magick/python-magick.SlackBuild
index dd317dbe4c..5ad3eab515 100644
--- a/python/python-magick/python-magick.SlackBuild
+++ b/python/python-magick/python-magick.SlackBuild
@@ -24,7 +24,7 @@
PRGNAM=python-magick
SRCNAM=PythonMagick
VERSION=${VERSION:-0.9.8}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@@ -72,13 +72,17 @@ find . \
-exec chmod 644 {} \;
# Provide all objects in PythonMagick
-patch -p1 < $CWD/__init__-fixup
+patch -p1 < $CWD/patches/__init__-fixup
-# Cheat! Achtung!
-sed -i \
- -e "s|in\ python2\.6\ python2\.5|in python2.7 python2.6|" \
- -e "s|PREFIX/lib/python|PREFIX/lib${LIBDIRSUFFIX}/python|" \
- configure
+# Use the default python on the system and fix detection of the python
+# include dir (thanks Gentoo)
+patch -p0 < $CWD/patches/pythonmagick-0.9.1-use_active_python_version.patch
+patch -p0 < $CWD/patches/pythonmagick-0.9.2-fix_detection_of_python_includedir.patch
+
+# We have 1.11.5 so it must suffice
+sed -i "s|1\.12|1.11.5|" configure.ac
+
+autoreconf -fi
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \