summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2021-07-04 17:19:31 -0700
committerKhem Raj <raj.khem@gmail.com>2021-07-06 10:25:27 -0700
commit819413a527ad18a519763be3854da39d234739c4 (patch)
tree944c0dc2a6d63c288f1224012ecb6b605b5078d5
parent51bb5a946d614de0bbb9bc8142c764bc26a14b92 (diff)
downloadmeta-openembedded-819413a527ad18a519763be3854da39d234739c4.tar.gz
portaudio-v19: Use GNUInstallDirs to make it portable
libdir varies for different architectures therefore do not hardcode it to lib Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--meta-oe/recipes-support/portaudio/portaudio-v19/0001-cmake-Use-GNUInstallDirs.patch49
-rw-r--r--meta-oe/recipes-support/portaudio/portaudio-v19_19.7.0.bb1
2 files changed, 50 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/portaudio/portaudio-v19/0001-cmake-Use-GNUInstallDirs.patch b/meta-oe/recipes-support/portaudio/portaudio-v19/0001-cmake-Use-GNUInstallDirs.patch
new file mode 100644
index 000000000..892399de7
--- /dev/null
+++ b/meta-oe/recipes-support/portaudio/portaudio-v19/0001-cmake-Use-GNUInstallDirs.patch
@@ -0,0 +1,49 @@
1From ced7af0420c1df0ac02f0c25e7c3534431ebd7fd Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sun, 4 Jul 2021 17:09:49 -0700
4Subject: [PATCH] cmake: Use GNUInstallDirs
5
6Helps install cmakefiles in right libdir
7
8Upstream-Status: Submitted [https://github.com/PortAudio/portaudio/pull/610]
9Signed-off-by: Khem Raj <raj.khem@gmail.com>
10---
11 CMakeLists.txt | 12 +++++++-----
12 1 file changed, 7 insertions(+), 5 deletions(-)
13
14--- a/CMakeLists.txt
15+++ b/CMakeLists.txt
16@@ -6,6 +6,8 @@
17
18 CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
19
20+include(GNUInstallDirs)
21+
22 # Check if the user is building PortAudio stand-alone or as part of a larger
23 # project. If this is part of a larger project (i.e. the CMakeLists.txt has
24 # been imported by some other CMakeLists.txt), we don't want to trump over
25@@ -452,18 +454,18 @@ IF(NOT PA_OUTPUT_OSX_FRAMEWORK AND NOT P
26 CONFIGURE_FILE(cmake_support/portaudio-2.0.pc.in ${CMAKE_CURRENT_BINARY_DIR}/portaudio-2.0.pc @ONLY)
27 INSTALL(FILES README.md DESTINATION share/doc/portaudio)
28 INSTALL(FILES LICENSE.txt DESTINATION share/doc/portaudio)
29- INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/portaudio-2.0.pc DESTINATION lib/pkgconfig)
30+ INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/portaudio-2.0.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
31 INSTALL(FILES ${PA_PUBLIC_INCLUDES} DESTINATION include)
32 INSTALL(TARGETS ${PA_TARGETS}
33 EXPORT portaudio-targets
34- RUNTIME DESTINATION bin
35- LIBRARY DESTINATION lib
36- ARCHIVE DESTINATION lib)
37- INSTALL(EXPORT portaudio-targets FILE "portaudioTargets.cmake" DESTINATION "lib/cmake/portaudio")
38+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
39+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
40+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
41+ INSTALL(EXPORT portaudio-targets FILE "portaudioTargets.cmake" DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/portaudio")
42 EXPORT(TARGETS ${PA_TARGETS} FILE "${PROJECT_BINARY_DIR}/cmake/portaudio/portaudioTargets.cmake")
43 INSTALL(FILES "${CMAKE_BINARY_DIR}/cmake/portaudio/portaudioConfig.cmake"
44 "${CMAKE_BINARY_DIR}/cmake/portaudio/portaudioConfigVersion.cmake"
45- DESTINATION "lib/cmake/portaudio")
46+ DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/portaudio")
47
48 IF (NOT TARGET uninstall)
49 CONFIGURE_FILE(
diff --git a/meta-oe/recipes-support/portaudio/portaudio-v19_19.7.0.bb b/meta-oe/recipes-support/portaudio/portaudio-v19_19.7.0.bb
index 3a0f7894f..aec482b9b 100644
--- a/meta-oe/recipes-support/portaudio/portaudio-v19_19.7.0.bb
+++ b/meta-oe/recipes-support/portaudio/portaudio-v19_19.7.0.bb
@@ -8,6 +8,7 @@ PV = "v190700"
8SRC_URI = " \ 8SRC_URI = " \
9 git://github.com/PortAudio/portaudio.git \ 9 git://github.com/PortAudio/portaudio.git \
10 file://0001-Find-jack.patch \ 10 file://0001-Find-jack.patch \
11 file://0001-cmake-Use-GNUInstallDirs.patch \
11" 12"
12SRCREV = "147dd722548358763a8b649b3e4b41dfffbcfbb6" 13SRCREV = "147dd722548358763a8b649b3e4b41dfffbcfbb6"
13S = "${WORKDIR}/git" 14S = "${WORKDIR}/git"