diff options
Diffstat (limited to 'meta-networking/recipes-connectivity/libiec61850/files')
2 files changed, 15 insertions, 48 deletions
diff --git a/meta-networking/recipes-connectivity/libiec61850/files/0001-pyiec61850-Use-CMAKE_INSTALL_LIBDIR-from-GNUInstallD.patch b/meta-networking/recipes-connectivity/libiec61850/files/0001-pyiec61850-Use-CMAKE_INSTALL_LIBDIR-from-GNUInstallD.patch index e778e8158b..a33a6248a7 100644 --- a/meta-networking/recipes-connectivity/libiec61850/files/0001-pyiec61850-Use-CMAKE_INSTALL_LIBDIR-from-GNUInstallD.patch +++ b/meta-networking/recipes-connectivity/libiec61850/files/0001-pyiec61850-Use-CMAKE_INSTALL_LIBDIR-from-GNUInstallD.patch | |||
| @@ -7,7 +7,7 @@ Subject: [PATCH] pyiec61850: Use CMAKE_INSTALL_LIBDIR from GNUInstallDirs in | |||
| 7 | This ensures that it gets installed in platform specified system libdir | 7 | This ensures that it gets installed in platform specified system libdir |
| 8 | all platforms do not use /usr/lib as assumed here e.g. ppc64 uses lib64 | 8 | all platforms do not use /usr/lib as assumed here e.g. ppc64 uses lib64 |
| 9 | 9 | ||
| 10 | Upstream-Status: Submitted [https://github.com/mz-automation/libiec61850/pull/376] | 10 | Upstream-Status: Denied [https://github.com/mz-automation/libiec61850/pull/376 - closed without a word] |
| 11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | 11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
| 12 | --- | 12 | --- |
| 13 | pyiec61850/CMakeLists.txt | 6 ++++-- | 13 | pyiec61850/CMakeLists.txt | 6 ++++-- |
| @@ -15,15 +15,21 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
| 15 | 15 | ||
| 16 | --- a/pyiec61850/CMakeLists.txt | 16 | --- a/pyiec61850/CMakeLists.txt |
| 17 | +++ b/pyiec61850/CMakeLists.txt | 17 | +++ b/pyiec61850/CMakeLists.txt |
| 18 | @@ -31,7 +31,9 @@ endif() | 18 | @@ -31,14 +31,9 @@ swig_add_library(pyiec61850 |
| 19 | 19 | ||
| 20 | swig_link_libraries(iec61850 ${PYTHON_LIBRARIES} ${LIBS}) | 20 | swig_link_libraries(pyiec61850 ${LIBS}) |
| 21 | 21 | ||
| 22 | -install(FILES ${CMAKE_CURRENT_BINARY_DIR}/iec61850.py DESTINATION /usr/lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages) | 22 | -# Finding python modules install path |
| 23 | -install(TARGETS _iec61850 LIBRARY DESTINATION /usr/lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages) | 23 | -execute_process( |
| 24 | - COMMAND ${Python_EXECUTABLE} -c | ||
| 25 | - "from sysconfig import get_path; import sys; sys.stdout.write(get_path('platlib'))" | ||
| 26 | - OUTPUT_VARIABLE PYTHON_SITE_DIR | ||
| 27 | -) | ||
| 24 | +include(GNUInstallDirs) | 28 | +include(GNUInstallDirs) |
| 25 | + | ||
| 26 | +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/iec61850.py DESTINATION ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages) | ||
| 27 | +install(TARGETS _iec61850 LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}//python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages) | ||
| 28 | 29 | ||
| 29 | add_test(test_pyiec61850 ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_LIST_DIR}/test_pyiec61850.py) | 30 | -install(FILES ${CMAKE_CURRENT_BINARY_DIR}/pyiec61850.py DESTINATION ${PYTHON_SITE_DIR}) |
| 31 | -install(TARGETS pyiec61850 LIBRARY DESTINATION ${PYTHON_SITE_DIR}) | ||
| 32 | +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/pyiec61850.py DESTINATION ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/python${PYTHON_BASEVERSION}/site-packages) | ||
| 33 | +install(TARGETS pyiec61850 LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/python${PYTHON_BASEVERSION}/site-packages) | ||
| 34 | |||
| 35 | add_test(test_pyiec61850 ${Python_EXECUTABLE} ${CMAKE_CURRENT_LIST_DIR}/test_pyiec61850.py) | ||
diff --git a/meta-networking/recipes-connectivity/libiec61850/files/0001-pyiec61850-don-t-break-CMAKE_INSTALL_PATH-by-trying-.patch b/meta-networking/recipes-connectivity/libiec61850/files/0001-pyiec61850-don-t-break-CMAKE_INSTALL_PATH-by-trying-.patch deleted file mode 100644 index 3f0490cb80..0000000000 --- a/meta-networking/recipes-connectivity/libiec61850/files/0001-pyiec61850-don-t-break-CMAKE_INSTALL_PATH-by-trying-.patch +++ /dev/null | |||
| @@ -1,39 +0,0 @@ | |||
| 1 | From d4ddfc7a350011b7944ed8d6bca80f164dfd1387 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Romain Naour <romain.naour@smile.fr> | ||
| 3 | Date: Fri, 10 Jul 2020 17:08:34 +0200 | ||
| 4 | Subject: [PATCH] pyiec61850: don't break CMAKE_INSTALL_PATH by trying to find | ||
| 5 | python modules install path (site-packages) | ||
| 6 | |||
| 7 | https://stackoverflow.com/questions/1242904/finding-python-site-packages-directory-with-cmake | ||
| 8 | |||
| 9 | Signed-off-by: Romain Naour <romain.naour@smile.fr> | ||
| 10 | --- | ||
| 11 | Upstream-Status: Pending | ||
| 12 | |||
| 13 | pyiec61850/CMakeLists.txt | 11 ++--------- | ||
| 14 | 1 file changed, 2 insertions(+), 9 deletions(-) | ||
| 15 | |||
| 16 | diff --git a/pyiec61850/CMakeLists.txt b/pyiec61850/CMakeLists.txt | ||
| 17 | index 159ef4b..d1732a1 100644 | ||
| 18 | --- a/pyiec61850/CMakeLists.txt | ||
| 19 | +++ b/pyiec61850/CMakeLists.txt | ||
| 20 | @@ -31,14 +31,7 @@ endif() | ||
| 21 | |||
| 22 | swig_link_libraries(iec61850 ${PYTHON_LIBRARIES} ${LIBS}) | ||
| 23 | |||
| 24 | -# Finding python modules install path | ||
| 25 | -execute_process( | ||
| 26 | - COMMAND ${PYTHON_EXECUTABLE} -c | ||
| 27 | - "from distutils.sysconfig import get_python_lib; import sys; sys.stdout.write(get_python_lib())" | ||
| 28 | - OUTPUT_VARIABLE PYTHON_SITE_DIR | ||
| 29 | -) | ||
| 30 | - | ||
| 31 | -install(FILES ${CMAKE_CURRENT_BINARY_DIR}/iec61850.py DESTINATION ${PYTHON_SITE_DIR}) | ||
| 32 | -install(TARGETS _iec61850 LIBRARY DESTINATION ${PYTHON_SITE_DIR}) | ||
| 33 | +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/iec61850.py DESTINATION /usr/lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages) | ||
| 34 | +install(TARGETS _iec61850 LIBRARY DESTINATION /usr/lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages) | ||
| 35 | |||
| 36 | add_test(test_pyiec61850 ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_LIST_DIR}/test_pyiec61850.py) | ||
| 37 | -- | ||
| 38 | 2.31.1 | ||
| 39 | |||
