diff options
-rw-r--r-- | meta-oe/recipes-support/srecord/files/0001-cmake-respect-explicit-install-prefix.patch | 31 | ||||
-rw-r--r-- | meta-oe/recipes-support/srecord/srecord_1.65.0.bb | 3 |
2 files changed, 33 insertions, 1 deletions
diff --git a/meta-oe/recipes-support/srecord/files/0001-cmake-respect-explicit-install-prefix.patch b/meta-oe/recipes-support/srecord/files/0001-cmake-respect-explicit-install-prefix.patch new file mode 100644 index 0000000000..5a74323bca --- /dev/null +++ b/meta-oe/recipes-support/srecord/files/0001-cmake-respect-explicit-install-prefix.patch | |||
@@ -0,0 +1,31 @@ | |||
1 | From 4aa8cf8c93e1fa6ffeb40fc3473f32b1b83af141 Mon Sep 17 00:00:00 2001 | ||
2 | From: "Ilya A. Kriveshko" <iillyyaa@gmail.com> | ||
3 | Date: Tue, 2 Jan 2024 15:37:10 -0500 | ||
4 | Subject: [PATCH] cmake: respect explicit install prefix | ||
5 | |||
6 | If CMAKE_INSTALL_PREFIX was supplied externally, use it. This follows | ||
7 | the pattern suggested by cmake documentation in: | ||
8 | https://cmake.org/cmake/help/latest/variable/CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT.html | ||
9 | |||
10 | Upstream-status: Submitted [https://github.com/sierrafoxtrot/srecord/pull/68] | ||
11 | --- | ||
12 | CMakeLists.txt | 6 +++--- | ||
13 | 1 file changed, 3 insertions(+), 3 deletions(-) | ||
14 | |||
15 | diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
16 | index 74b8108c..ac9f464e 100644 | ||
17 | --- a/CMakeLists.txt | ||
18 | +++ b/CMakeLists.txt | ||
19 | @@ -30,9 +30,9 @@ include(InstallRequiredSystemLibraries) | ||
20 | include(GNUInstallDirs) | ||
21 | |||
22 | # FHS compliant paths for Linux installation | ||
23 | -if(NOT WIN32 AND CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR) | ||
24 | -# set(CMAKE_INSTALL_PREFIX "/opt/${PROJECT_NAME}") | ||
25 | - set(CMAKE_INSTALL_PREFIX "/usr") | ||
26 | +if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT | ||
27 | + AND NOT WIN32 AND CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR) | ||
28 | + set(CMAKE_INSTALL_PREFIX "/usr" CACHE PATH "Install prefix" FORCE) | ||
29 | endif() | ||
30 | |||
31 | # Pull in the rest of the pieces | ||
diff --git a/meta-oe/recipes-support/srecord/srecord_1.65.0.bb b/meta-oe/recipes-support/srecord/srecord_1.65.0.bb index 06ce48e65c..3e8a87d07f 100644 --- a/meta-oe/recipes-support/srecord/srecord_1.65.0.bb +++ b/meta-oe/recipes-support/srecord/srecord_1.65.0.bb | |||
@@ -6,7 +6,8 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=d32239bcb673463ab874e80d47fae504" | |||
6 | SRC_URI = " \ | 6 | SRC_URI = " \ |
7 | https://sourceforge.net/projects/${BPN}/files/srecord/${@oe.utils.trim_version('${PV}', 2)}/${BP}-Source.tar.gz \ | 7 | https://sourceforge.net/projects/${BPN}/files/srecord/${@oe.utils.trim_version('${PV}', 2)}/${BP}-Source.tar.gz \ |
8 | file://0001-Disable-doxygen.patch \ | 8 | file://0001-Disable-doxygen.patch \ |
9 | file://0001-cmake-Do-not-try-to-compute-library-dependencies-dur.patch" | 9 | file://0001-cmake-Do-not-try-to-compute-library-dependencies-dur.patch \ |
10 | file://0001-cmake-respect-explicit-install-prefix.patch" | ||
10 | SRC_URI[sha256sum] = "81c3d07cf15ce50441f43a82cefd0ac32767c535b5291bcc41bd2311d1337644" | 11 | SRC_URI[sha256sum] = "81c3d07cf15ce50441f43a82cefd0ac32767c535b5291bcc41bd2311d1337644" |
11 | S = "${WORKDIR}/${BP}-Source" | 12 | S = "${WORKDIR}/${BP}-Source" |
12 | 13 | ||