summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCraig Andrews <candrews@gentoo.org>2018-12-13 23:05:22 -0500
committerCraig Andrews <candrews@gentoo.org>2019-01-14 15:25:38 -0500
commitd93b1da0473409053475d30a3d15bd659a479bd4 (patch)
tree3b42577b95ea320d426e492bf229534d4c90f068 /dev-libs/rocr-runtime/files/rocr-runtime-2.0.0-cmake-install-paths.patch
parentdev-libs/roct-thunk-interface: Radeon Open Compute Thunk Interface (diff)
downloadgentoo-d93b1da0473409053475d30a3d15bd659a479bd4.tar.gz
gentoo-d93b1da0473409053475d30a3d15bd659a479bd4.tar.bz2
gentoo-d93b1da0473409053475d30a3d15bd659a479bd4.zip
dev-libs/rocr-runtime: Radeon Open Compute Runtime
Bug: https://bugs.gentoo.org/650804 Package-Manager: Portage-2.3.52, Repoman-2.3.12 Signed-off-by: Craig Andrews <candrews@gentoo.org>
Diffstat (limited to 'dev-libs/rocr-runtime/files/rocr-runtime-2.0.0-cmake-install-paths.patch')
-rw-r--r--dev-libs/rocr-runtime/files/rocr-runtime-2.0.0-cmake-install-paths.patch42
1 files changed, 42 insertions, 0 deletions
diff --git a/dev-libs/rocr-runtime/files/rocr-runtime-2.0.0-cmake-install-paths.patch b/dev-libs/rocr-runtime/files/rocr-runtime-2.0.0-cmake-install-paths.patch
new file mode 100644
index 000000000000..ece1571ab406
--- /dev/null
+++ b/dev-libs/rocr-runtime/files/rocr-runtime-2.0.0-cmake-install-paths.patch
@@ -0,0 +1,42 @@
+From 866c2fbcf1efa3e84e6f25bebc12dc1d4caa4e74 Mon Sep 17 00:00:00 2001
+From: Craig Andrews <candrews@integralblue.com>
+Date: Mon, 7 Jan 2019 21:06:14 -0500
+Subject: [PATCH] Correctly install the library into the system
+
+Install to standard locations in /usr/{lib,include}/lib (as opposed to /usr/hsa/{lib,include}/hsa)
+Use CMAKE_INSTALL_LIBDIR and CMAKE_INSTALL_INCLUDEDIR from GNUInstallDirs instead of using "lib" and "include"
+---
+ src/CMakeLists.txt | 11 +++++------
+ 1 file changed, 5 insertions(+), 6 deletions(-)
+
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index 37a9b09..e39f3d2 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -53,6 +53,7 @@ project( ${CORE_RUNTIME_TARGET} )
+
+ list ( APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules" )
+ include ( utils )
++include ( GNUInstallDirs )
+ include ( hsa_common )
+
+ ## Find LibElf
+@@ -177,14 +178,12 @@ if ( "${CMAKE_BUILD_TYPE}" STREQUAL Release )
+ endif ()
+
+ ## Create symlinks for packaging and install
+-add_custom_target ( hsa-link ALL WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${CMAKE_COMMAND} -E create_symlink ../hsa/include/hsa hsa-link )
+-add_custom_target ( ${CORE_RUNTIME_TARGET}.so-link ALL WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${CMAKE_COMMAND} -E create_symlink ../hsa/lib/${CORE_RUNTIME_LIBRARY}.so ${CORE_RUNTIME_LIBRARY}.so-link )
++add_custom_target ( ${CORE_RUNTIME_TARGET}.so-link ALL WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${CMAKE_COMMAND} -E create_symlink hsa/${CORE_RUNTIME_LIBRARY}.so ${CORE_RUNTIME_LIBRARY}.so-link )
+
+ ## Set install information
+-install ( TARGETS ${CORE_RUNTIME_TARGET} LIBRARY DESTINATION hsa/lib )
+-install ( DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/inc/ DESTINATION hsa/include/hsa )
+-install ( FILES ${CMAKE_CURRENT_BINARY_DIR}/hsa-link DESTINATION include PERMISSIONS OWNER_WRITE OWNER_READ RENAME hsa )
+-install ( FILES ${CMAKE_CURRENT_BINARY_DIR}/${CORE_RUNTIME_LIBRARY}.so-link DESTINATION lib PERMISSIONS OWNER_WRITE OWNER_READ RENAME ${CORE_RUNTIME_LIBRARY}.so )
++install ( TARGETS ${CORE_RUNTIME_TARGET} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/hsa )
++install ( DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/inc/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/hsa )
++install ( FILES ${CMAKE_CURRENT_BINARY_DIR}/${CORE_RUNTIME_LIBRARY}.so-link DESTINATION ${CMAKE_INSTALL_LIBDIR} PERMISSIONS OWNER_WRITE OWNER_READ RENAME ${CORE_RUNTIME_LIBRARY}.so )
+
+ ## Packaging directives
+ set ( CPACK_PACKAGE_NAME "hsa-rocr-dev" )