From 64feea7049116fcc6a3cdac96dde03aaa797ddec Mon Sep 17 00:00:00 2001 From: Kevin Mihelich Date: Sat, 29 Jul 2023 11:53:43 +0000 Subject: [PATCH] extra/lensfun: add patch --- extra/lensfun/fix-python-module-install.patch | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 extra/lensfun/fix-python-module-install.patch diff --git a/extra/lensfun/fix-python-module-install.patch b/extra/lensfun/fix-python-module-install.patch new file mode 100644 index 000000000..dfe342888 --- /dev/null +++ b/extra/lensfun/fix-python-module-install.patch @@ -0,0 +1,36 @@ +diff --git a/apps/CMakeLists.txt b/apps/CMakeLists.txt +index 2f6f8f14..eb332288 100644 +--- a/apps/CMakeLists.txt ++++ b/apps/CMakeLists.txt +@@ -22,16 +22,17 @@ ENDIF(INSTALL_HELPER_SCRIPTS) + # Inspired by http://bloerg.net/2012/11/10/cmake-and-distutils.html + + FIND_PROGRAM(PYTHON "python3") +-IF(PYTHON) +- SET(SETUP_PY_IN "${CMAKE_CURRENT_SOURCE_DIR}/setup.py.in") +- SET(SETUP_PY "${CMAKE_CURRENT_BINARY_DIR}/setup.py") +- SET(DEPS_IN "${CMAKE_CURRENT_SOURCE_DIR}/lensfun/__init__.py.in") +- SET(DEPS "${CMAKE_CURRENT_BINARY_DIR}/lensfun/__init__.py") +- SET(OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/build/timestamp") + +- CONFIGURE_FILE(${SETUP_PY_IN} ${SETUP_PY}) +- CONFIGURE_FILE(${DEPS_IN} ${DEPS}) ++SET(SETUP_PY_IN "${CMAKE_CURRENT_SOURCE_DIR}/setup.py.in") ++SET(SETUP_PY "${CMAKE_CURRENT_BINARY_DIR}/setup.py") ++SET(DEPS_IN "${CMAKE_CURRENT_SOURCE_DIR}/lensfun/__init__.py.in") ++SET(DEPS "${CMAKE_CURRENT_BINARY_DIR}/lensfun/__init__.py") ++SET(OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/build/timestamp") + ++CONFIGURE_FILE(${SETUP_PY_IN} ${SETUP_PY}) ++CONFIGURE_FILE(${DEPS_IN} ${DEPS}) ++ ++IF(INSTALL_PYTHON_MODULE) + ADD_CUSTOM_COMMAND(OUTPUT ${OUTPUT} + COMMAND ${PYTHON} ${SETUP_PY} build + COMMAND ${CMAKE_COMMAND} -E touch ${OUTPUT} +@@ -43,4 +44,4 @@ IF(PYTHON) + SET(SETUP_PY_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") + ENDIF() + INSTALL(CODE "execute_process(COMMAND ${PYTHON} ${SETUP_PY} install --prefix=\$ENV{DESTDIR}${SETUP_PY_INSTALL_PREFIX})") +-ENDIF(PYTHON) ++ENDIF(INSTALL_PYTHON_MODULE)