summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author Alexander Verbovetsky <alik@ejik.org>2018-07-29 08:25:07 +0700
committer Willy Sudiarto Raharjo <willysr@slackbuilds.org>2018-07-29 08:25:07 +0700
commitcfe649a01bd5f52785f4533100ac4e5a370c9855 (patch)
treeeb8cfc0c04b07f54e9e39863e1b85745a0cdce68
parent5ada6ca2402df7c6853515a6b1b6b28cb2e1e8cc (diff)
downloadslackbuilds-cfe649a01bd5f52785f4533100ac4e5a370c9855.tar.gz
slackbuilds-cfe649a01bd5f52785f4533100ac4e5a370c9855.tar.xz
libraries/lensfun: Fix Python build.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r--libraries/lensfun/lensfun-fix-python-install-dir.patch27
-rw-r--r--libraries/lensfun/lensfun.SlackBuild3
2 files changed, 29 insertions, 1 deletions
diff --git a/libraries/lensfun/lensfun-fix-python-install-dir.patch b/libraries/lensfun/lensfun-fix-python-install-dir.patch
new file mode 100644
index 0000000000..e6713f9bb6
--- /dev/null
+++ b/libraries/lensfun/lensfun-fix-python-install-dir.patch
@@ -0,0 +1,27 @@
+From 3b46bb2a4eada7f29e016d586229782f6d1c35bb Mon Sep 17 00:00:00 2001
+From: Pino Toscano <toscano.pino@tiscali.it>
+Date: Sat, 9 Jan 2016 11:47:37 +0100
+Subject: [PATCH] cmake: fix DESTDIR installation for python
+
+When running `setup.py install`, respect the value of the DESTDIR
+environment variable so staged installs (used by distros, for example)
+work.
+---
+ apps/CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/apps/CMakeLists.txt b/apps/CMakeLists.txt
+index 70c77fd..2f6f8f1 100644
+--- a/apps/CMakeLists.txt
++++ b/apps/CMakeLists.txt
+@@ -42,5 +42,5 @@ IF(PYTHON)
+ IF(NOT DEFINED SETUP_PY_INSTALL_PREFIX)
+ SET(SETUP_PY_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
+ ENDIF()
+- INSTALL(CODE "execute_process(COMMAND ${PYTHON} ${SETUP_PY} install --prefix=${SETUP_PY_INSTALL_PREFIX})")
++ INSTALL(CODE "execute_process(COMMAND ${PYTHON} ${SETUP_PY} install --prefix=\$ENV{DESTDIR}${SETUP_PY_INSTALL_PREFIX})")
+ ENDIF(PYTHON)
+--
+2.6.4
+
+
diff --git a/libraries/lensfun/lensfun.SlackBuild b/libraries/lensfun/lensfun.SlackBuild
index e509409428..6e9fc0a567 100644
--- a/libraries/lensfun/lensfun.SlackBuild
+++ b/libraries/lensfun/lensfun.SlackBuild
@@ -25,7 +25,7 @@
PRGNAM=lensfun
VERSION=${VERSION:-0.3.2}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@@ -70,6 +70,7 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+patch -p1 < $CWD/lensfun-fix-python-install-dir.patch
mkdir -p build
cd build
cmake \