commit:     b44ecb18a3c1971230dea2bd30f899bd9c39a042
Author:     Marius Brehler <marbre <AT> linux <DOT> sungazer <DOT> de>
AuthorDate: Fri Jun  5 13:26:46 2015 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Fri Jun  5 13:26:46 2015 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=b44ecb18

sci-libs/clfft: Drop old; Install cmake configuration

Package-Manager: portage-2.2.18

 sci-libs/clfft/ChangeLog                           |   8 ++
 sci-libs/clfft/clfft-0.9999.ebuild                 |   1 +
 sci-libs/clfft/clfft-2.2.ebuild                    |   1 -
 .../{clfft-2.4.ebuild => clfft-2.4-r1.ebuild}      |   1 +
 sci-libs/clfft/clfft-9999.ebuild                   |   4 +
 .../files/clfft-2.4-fix-cmake-config-install.patch | 128 +++++++++++++++++++++
 ...ll-cmake-configuration-to-lib-cmake-clFFT.patch |  25 ++++
 7 files changed, 167 insertions(+), 1 deletion(-)

diff --git a/sci-libs/clfft/ChangeLog b/sci-libs/clfft/ChangeLog
index 1052fa2..eb09913 100644
--- a/sci-libs/clfft/ChangeLog
+++ b/sci-libs/clfft/ChangeLog
@@ -2,6 +2,14 @@
 # Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
 # $Header: $
 
+*clfft-2.4-r1 (05 Jun 2015)
+
+  05 Jun 2015; Marius Brehler <[email protected]> +clfft-2.4-r1.ebuild,
+  +files/clfft-2.4-fix-cmake-config-install.patch,
+  +files/clfft-9999-Install-cmake-configuration-to-lib-cmake-clFFT.patch,
+  -clfft-2.2.ebuild, -clfft-2.4.ebuild, clfft-0.9999.ebuild, clfft-9999.ebuild:
+  sci-libs/clfft: Drop old; Install cmake configuration
+
   05 Jun 2015; Marius Brehler <[email protected]> clfft-0.9999.ebuild,
   clfft-2.4.ebuild, clfft-9999.ebuild:
   sci-libs/clfft: Cleanup ebuilds

diff --git a/sci-libs/clfft/clfft-0.9999.ebuild 
b/sci-libs/clfft/clfft-0.9999.ebuild
index c2a4197..0aebebb 100644
--- a/sci-libs/clfft/clfft-0.9999.ebuild
+++ b/sci-libs/clfft/clfft-0.9999.ebuild
@@ -34,6 +34,7 @@ RESTRICT="test"
 PATCHES=(
        "${FILESDIR}"/clfft-client_CMakeLists.patch
        "${FILESDIR}"/clfft-scripts_perf_CMakeLists.patch
+       "${FILESDIR}"/clfft-2.4-fix-cmake-config-install.patch
 )
 
 pkg_pretend() {

diff --git a/sci-libs/clfft/clfft-2.2.ebuild b/sci-libs/clfft/clfft-2.2.ebuild
deleted file mode 120000
index cd68df3..0000000
--- a/sci-libs/clfft/clfft-2.2.ebuild
+++ /dev/null
@@ -1 +0,0 @@
-clfft-2.4.ebuild
\ No newline at end of file

diff --git a/sci-libs/clfft/clfft-2.4.ebuild 
b/sci-libs/clfft/clfft-2.4-r1.ebuild
similarity index 95%
rename from sci-libs/clfft/clfft-2.4.ebuild
rename to sci-libs/clfft/clfft-2.4-r1.ebuild
index 52c3156..6b98938 100644
--- a/sci-libs/clfft/clfft-2.4.ebuild
+++ b/sci-libs/clfft/clfft-2.4-r1.ebuild
@@ -35,6 +35,7 @@ RESTRICT="test"
 PATCHES=(
        "${FILESDIR}"/clfft-client_CMakeLists.patch
        "${FILESDIR}"/clfft-scripts_perf_CMakeLists.patch
+       "${FILESDIR}"/clfft-2.4-fix-cmake-config-install.patch
 )
 
 pkg_pretend() {

diff --git a/sci-libs/clfft/clfft-9999.ebuild b/sci-libs/clfft/clfft-9999.ebuild
index b87b3fb..96b7dcd 100644
--- a/sci-libs/clfft/clfft-9999.ebuild
+++ b/sci-libs/clfft/clfft-9999.ebuild
@@ -32,6 +32,10 @@ DEPEND="${RDEPEND}"
 # Therefore src_test() won't execute any test.
 RESTRICT="test"
 
+PATCHES=(
+       
"${FILESDIR}"/clfft-9999-Install-cmake-configuration-to-lib-cmake-clFFT.patch
+)
+
 pkg_pretend() {
        if [[ ${MERGE_TYPE} != binary ]]; then
                if [[ $(gcc-major-version) -lt 4 ]] || ( [[ 
$(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 6 ]] ) ; then

diff --git a/sci-libs/clfft/files/clfft-2.4-fix-cmake-config-install.patch 
b/sci-libs/clfft/files/clfft-2.4-fix-cmake-config-install.patch
new file mode 100644
index 0000000..6dd1e15
--- /dev/null
+++ b/sci-libs/clfft/files/clfft-2.4-fix-cmake-config-install.patch
@@ -0,0 +1,128 @@
+Upstream patch, with modified destdir
+https://github.com/clMathLibraries/clFFT/pull/88
+
+
+Description: install missing cmake config module
+Author: <kent.knox@amd>
+Origin: upstream
+Forwarded: not-needed
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -283,6 +283,29 @@ else( )
+       message( "GoogleTest unit tests will NOT be built" )
+ endif( )
+ 
++if( BUILD_EXAMPLES )
++    add_subdirectory( examples )
++endif()
++
++if(WIN32)
++  set(destdir CMake)
++else()
++  set(destdir lib${SUFFIX_LIB}/cmake/clFFT)
++endif()
++string(REGEX REPLACE "[^/]+" ".." reldir "${destdir}")
++configure_file(
++  ${CMAKE_CURRENT_SOURCE_DIR}/clFFTConfigVersion.cmake.in
++  ${CMAKE_CURRENT_BINARY_DIR}/clFFTConfigVersion.cmake
++  @ONLY)
++configure_file(
++  ${CMAKE_CURRENT_SOURCE_DIR}/clFFTConfig.cmake.in
++  ${CMAKE_CURRENT_BINARY_DIR}/clFFTConfig.cmake
++  @ONLY)
++install(EXPORT Library DESTINATION ${destdir} FILE clFFTTargets.cmake)
++install(FILES ${CMAKE_CURRENT_BINARY_DIR}/clFFTConfigVersion.cmake
++  ${CMAKE_CURRENT_BINARY_DIR}/clFFTConfig.cmake
++  DESTINATION ${destdir})
++
+ # The following code is setting variables to control the behavior of CPack to 
generate our
+ if( WIN32 )
+       set( CPACK_SOURCE_GENERATOR "ZIP" )
+diff --git a/src/clFFTConfig.cmake.in b/src/clFFTConfig.cmake.in
+new file mode 100644
+index 0000000..5b58c35
+--- /dev/null
++++ b/src/clFFTConfig.cmake.in
+@@ -0,0 +1,3 @@
++include(${CMAKE_CURRENT_LIST_DIR}/clFFTTargets.cmake)
++get_filename_component(CLFFT_INCLUDE_DIRS 
${CMAKE_CURRENT_LIST_DIR}/@reldir@/include ABSOLUTE)
++set(CLFFT_LIBRARIES clFFT)
+diff --git a/src/clFFTConfigVersion.cmake.in b/src/clFFTConfigVersion.cmake.in
+new file mode 100644
+index 0000000..e358473
+--- /dev/null
++++ b/src/clFFTConfigVersion.cmake.in
+@@ -0,0 +1,46 @@
++# This is a basic version file for the Config-mode of find_package().
++# It is used by write_basic_package_version_file() as input file for 
configure_file()
++# to create a version-file which can be installed along a config.cmake file.
++#
++# The created file sets PACKAGE_VERSION_EXACT if the current version string 
and
++# the requested version string are exactly the same and it sets
++# PACKAGE_VERSION_COMPATIBLE if the current version is >= requested version,
++# but only if the requested major version is the same as the current one.
++# The variable CLFFT_VERSION must be set before calling configure_file().
++
++
++set(PACKAGE_VERSION "@CLFFT_VERSION@")
++
++if("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}" )
++  set(PACKAGE_VERSION_COMPATIBLE FALSE)
++else()
++
++  if("@CLFFT_VERSION@" MATCHES "^([0-9]+)\\.")
++    set(CLFFT_VERSION_MAJOR "${CMAKE_MATCH_1}")
++  else()
++    set(CLFFT_VERSION_MAJOR "@CLFFT_VERSION@")
++  endif()
++
++  if("${PACKAGE_FIND_VERSION_MAJOR}" STREQUAL "${CLFFT_VERSION_MAJOR}")
++    set(PACKAGE_VERSION_COMPATIBLE TRUE)
++  else()
++    set(PACKAGE_VERSION_COMPATIBLE FALSE)
++  endif()
++
++  if( "${PACKAGE_FIND_VERSION}" STREQUAL "${PACKAGE_VERSION}")
++      set(PACKAGE_VERSION_EXACT TRUE)
++  endif()
++endif()
++
++
++# if the installed or the using project don't have CMAKE_SIZEOF_VOID_P set, 
ignore it:
++if("${CMAKE_SIZEOF_VOID_P}"  STREQUAL ""  OR "@CMAKE_SIZEOF_VOID_P@" STREQUAL 
"")
++   return()
++endif()
++
++# check that the installed version has the same 32/64bit-ness as the one 
which is currently searching:
++if(NOT "${CMAKE_SIZEOF_VOID_P}" STREQUAL "@CMAKE_SIZEOF_VOID_P@")
++  math(EXPR installedBits "@CMAKE_SIZEOF_VOID_P@ * 8")
++  set(PACKAGE_VERSION "${PACKAGE_VERSION} (${installedBits}bit)")
++  set(PACKAGE_VERSION_UNSUITABLE TRUE)
++endif()
+diff --git a/src/library/CMakeLists.txt b/src/library/CMakeLists.txt
+index 63ac0f9..0d400d8 100644
+--- a/src/library/CMakeLists.txt
++++ b/src/library/CMakeLists.txt
+@@ -95,6 +95,7 @@ endif( )
+ 
+ # CPack configuration; include the executable into the package
+ install( TARGETS clFFT
++        EXPORT Library
+         RUNTIME DESTINATION bin${SUFFIX_BIN}
+         LIBRARY DESTINATION lib${SUFFIX_LIB}
+         ARCHIVE DESTINATION lib${SUFFIX_LIB}/import
+diff --git a/src/statTimer/CMakeLists.txt b/src/statTimer/CMakeLists.txt
+index a635bf1..3dc026f 100644
+--- a/src/statTimer/CMakeLists.txt
++++ b/src/statTimer/CMakeLists.txt
+@@ -80,6 +80,7 @@ endif( )
+ 
+ # CPack configuration; include the executable into the package
+ install( TARGETS StatTimer
++        EXPORT Library
+         RUNTIME DESTINATION bin${SUFFIX_BIN}
+         LIBRARY DESTINATION lib${SUFFIX_LIB}
+         ARCHIVE DESTINATION lib${SUFFIX_LIB}/import
+-- 
+2.1.4
+

diff --git 
a/sci-libs/clfft/files/clfft-9999-Install-cmake-configuration-to-lib-cmake-clFFT.patch
 
b/sci-libs/clfft/files/clfft-9999-Install-cmake-configuration-to-lib-cmake-clFFT.patch
new file mode 100644
index 0000000..dc317d4
--- /dev/null
+++ 
b/sci-libs/clfft/files/clfft-9999-Install-cmake-configuration-to-lib-cmake-clFFT.patch
@@ -0,0 +1,25 @@
+From 6a3ba77529987d5906ba6f734bc2fa66a9155a1c Mon Sep 17 00:00:00 2001
+From: Marius Brehler <[email protected]>
+Date: Fri, 5 Jun 2015 14:59:29 +0200
+Subject: [PATCH] Install cmake configuration to lib/cmake/clFFT
+
+---
+ src/CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index ad15e4a..73200fa 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -290,7 +290,7 @@ endif()
+ if(WIN32)
+   set(destdir CMake)
+ else()
+-  set(destdir share/clFFT)
++  set(destdir lib${SUFFIX_LIB}/cmake/clFFT)
+ endif()
+ string(REGEX REPLACE "[^/]+" ".." reldir "${destdir}")
+ configure_file(
+-- 
+2.0.5
+

Reply via email to