lensfun-fix-python-install-dir.patch 988 B

12345678910111213141516171819202122232425262728
  1. From 3b46bb2a4eada7f29e016d586229782f6d1c35bb Mon Sep 17 00:00:00 2001
  2. From: Pino Toscano <toscano.pino@tiscali.it>
  3. Date: Sat, 9 Jan 2016 11:47:37 +0100
  4. Subject: [PATCH] cmake: fix DESTDIR installation for python
  5. When running `setup.py install`, respect the value of the DESTDIR
  6. environment variable so staged installs (used by distros, for example)
  7. work.
  8. ---
  9. apps/CMakeLists.txt | 2 +-
  10. 1 file changed, 1 insertion(+), 1 deletion(-)
  11. diff --git a/apps/CMakeLists.txt b/apps/CMakeLists.txt
  12. index 70c77fd..2f6f8f1 100644
  13. --- a/apps/CMakeLists.txt
  14. +++ b/apps/CMakeLists.txt
  15. @@ -42,5 +42,5 @@ IF(PYTHON)
  16. IF(NOT DEFINED SETUP_PY_INSTALL_PREFIX)
  17. SET(SETUP_PY_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
  18. ENDIF()
  19. - INSTALL(CODE "execute_process(COMMAND ${PYTHON} ${SETUP_PY} install --prefix=${SETUP_PY_INSTALL_PREFIX})")
  20. + INSTALL(CODE "execute_process(COMMAND ${PYTHON} ${SETUP_PY} install --prefix=\$ENV{DESTDIR}${SETUP_PY_INSTALL_PREFIX})")
  21. ENDIF(PYTHON)
  22. --
  23. 2.6.4