nixpkgs/pkgs/desktops/kde-4.6/bindings/python-site-packages-install-dir.diff
Yury G. Kudryashov 58ca4111ad Start kde-4.6: copy 4.5, remove from release
svn path=/nixpkgs/trunk/; revision=25279
2010-12-26 15:26:01 +00:00

55 lines
3.1 KiB
Diff

diff --git a/python/pykde4/CMakeLists.txt b/python/pykde4/CMakeLists.txt
index 01b69dc..375661d 100644
--- a/python/pykde4/CMakeLists.txt
+++ b/python/pykde4/CMakeLists.txt
@@ -188,12 +188,12 @@ IF(POLKITQT_FOUND)
SET(PYKDE_MODULES "${PYKDE_MODULES} polkitqt")
ENDIF(POLKITQT_FOUND)
-PYTHON_INSTALL(__init__.py ${PYTHON_SITE_PACKAGES_DIR}/PyKDE4)
+PYTHON_INSTALL(__init__.py ${PYTHON_SITE_PACKAGES_INSTALL_DIR}/PyKDE4)
MESSAGE(STATUS "KDE_VERSION: ${KDE_VERSION}")
MESSAGE(STATUS "KDE4_INCLUDE_DIR: ${KDE4_INCLUDE_DIR}")
MESSAGE(STATUS "KDE4_LIB_DIR: ${KDE4_LIB_DIR}")
-MESSAGE(STATUS "PYTHON_SITE_PACKAGES_DIR: ${PYTHON_SITE_PACKAGES_DIR}")
+MESSAGE(STATUS "PYTHON_SITE_PACKAGES_INSTALL_DIR: ${PYTHON_SITE_PACKAGES_INSTALL_DIR}")
# Setup and install pykdeconfig.py
@@ -225,7 +225,7 @@ _pkg_config = {
'konsolepart': 'False',
'libdir': '${LIB_DIR}',
'pykde_kde_sip_flags': '${_SIP_TAGS} ${_SIP_X} ${SIP_EXTRA_OPTIONS}',
- 'pykde_mod_dir': '${PYTHON_SITE_PACKAGES_DIR}/PyKDE4',
+ 'pykde_mod_dir': '${PYTHON_SITE_PACKAGES_INSTALL_DIR}/PyKDE4',
'pykde_modules': '${PYKDE_MODULES}',
'pykde_sip_dir': '${SIP_DEFAULT_SIP_DIR}/PyKDE4',
'pykde_version': kde_version_hex,
@@ -235,7 +235,7 @@ _pkg_config = {
_default_macros = None")
CONFIGURE_FILE(pykdeconfig.py.in ${CMAKE_CURRENT_BINARY_DIR}/pykdeconfig.py)
-PYTHON_INSTALL(${CMAKE_CURRENT_BINARY_DIR}/pykdeconfig.py ${PYTHON_SITE_PACKAGES_DIR}/PyKDE4)
+PYTHON_INSTALL(${CMAKE_CURRENT_BINARY_DIR}/pykdeconfig.py ${PYTHON_SITE_PACKAGES_INSTALL_DIR}/PyKDE4)
# Install the .sip files for anyone that wants to build bindings on top of PyKDE4.
# (Don't forget the / at the end of sip/.)
diff --git a/python/pykde4/tools/pykdeuic4/CMakeLists.txt b/python/pykde4/tools/pykdeuic4/CMakeLists.txt
index ea711ba..115c777 100644
--- a/python/pykde4/tools/pykdeuic4/CMakeLists.txt
+++ b/python/pykde4/tools/pykdeuic4/CMakeLists.txt
@@ -1,5 +1,9 @@
-PYTHON_INSTALL(kde4.py ${PYTHON_SITE_PACKAGES_DIR}/PyQt4/uic/widget-plugins/)
-PYTHON_INSTALL(pykdeuic4.py ${PYTHON_SITE_PACKAGES_DIR}/PyQt4/uic/)
+PYTHON_INSTALL(kde4.py ${PYTHON_SITE_PACKAGES_INSTALL_DIR}/PyQt4/uic/widget-plugins/)
+PYTHON_INSTALL(pykdeuic4.py ${PYTHON_SITE_PACKAGES_INSTALL_DIR}/PyQt4/uic/)
find_path(cmake_module_dir create_exe_symlink.cmake ${CMAKE_MODULE_PATH})
-INSTALL(CODE "EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -DTARGET=${PYTHON_SITE_PACKAGES_DIR}/PyQt4/uic/pykdeuic4.py -DLINK_NAME=${BIN_INSTALL_DIR}/pykdeuic4 -P ${cmake_module_dir}/create_exe_symlink.cmake)" )
+IF(IS_ABSOLUTE ${PYTHON_SITE_PACKAGES_INSTALL_DIR})
+ INSTALL(CODE "EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -DTARGET=${PYTHON_SITE_PACKAGES_INSTALL_DIR}/PyQt4/uic/pykdeuic4.py -DLINK_NAME=${BIN_INSTALL_DIR}/pykdeuic4 -P ${cmake_module_dir}/create_exe_symlink.cmake)" )
+ELSE(IS_ABSOLUTE ${PYTHON_SITE_PACKAGES_INSTALL_DIR})
+ INSTALL(CODE "EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -DTARGET=${CMAKE_INSTALL_PREFIX}/${PYTHON_SITE_PACKAGES_INSTALL_DIR}/PyQt4/uic/pykdeuic4.py -DLINK_NAME=${BIN_INSTALL_DIR}/pykdeuic4 -P ${cmake_module_dir}/create_exe_symlink.cmake)" )
+ENDIF(IS_ABSOLUTE ${PYTHON_SITE_PACKAGES_INSTALL_DIR})