From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 327BB138A1A for ; Sat, 10 Jan 2015 18:03:33 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 3608AE0854; Sat, 10 Jan 2015 18:03:29 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 0AA59E084B for ; Sat, 10 Jan 2015 18:03:28 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 60C3D3406EC for ; Sat, 10 Jan 2015 18:03:26 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id C7184F4B2 for ; Sat, 10 Jan 2015 18:03:23 +0000 (UTC) From: "Justin Lecher" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Justin Lecher" Message-ID: <1420909671.fb0a0e645db8b5066be7bfcfdda8f3545637b2f9.jlec@gentoo> Subject: [gentoo-commits] proj/sci:master commit in: sci-libs/arrayfire/, sci-libs/arrayfire/files/ X-VCS-Repository: proj/sci X-VCS-Files: sci-libs/arrayfire/arrayfire-9999.ebuild sci-libs/arrayfire/files/build_gtest.patch X-VCS-Directories: sci-libs/arrayfire/ sci-libs/arrayfire/files/ X-VCS-Committer: jlec X-VCS-Committer-Name: Justin Lecher X-VCS-Revision: fb0a0e645db8b5066be7bfcfdda8f3545637b2f9 X-VCS-Branch: master Date: Sat, 10 Jan 2015 18:03:23 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 624142aa-f389-4284-b2cd-d01fb782a9b7 X-Archives-Hash: 6e90075f7f4c721727853b9d0d6eb593 commit: fb0a0e645db8b5066be7bfcfdda8f3545637b2f9 Author: Marius Brehler linux sungazer de> AuthorDate: Sat Jan 10 17:07:51 2015 +0000 Commit: Justin Lecher gentoo org> CommitDate: Sat Jan 10 17:07:51 2015 +0000 URL: http://sources.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=fb0a0e64 Download gtest instead of using svn during compile --- sci-libs/arrayfire/arrayfire-9999.ebuild | 18 +++++++++-- sci-libs/arrayfire/files/build_gtest.patch | 51 ++++++++++++++++++++++++++++++ 2 files changed, 67 insertions(+), 2 deletions(-) diff --git a/sci-libs/arrayfire/arrayfire-9999.ebuild b/sci-libs/arrayfire/arrayfire-9999.ebuild index 667ca0b..c055da7 100644 --- a/sci-libs/arrayfire/arrayfire-9999.ebuild +++ b/sci-libs/arrayfire/arrayfire-9999.ebuild @@ -4,11 +4,12 @@ EAPI=5 -inherit cmake-utils git-r3 +inherit cmake-utils git-r3 unpacker DESCRIPTION="A general purpose GPU library." HOMEPAGE="http://www.arrayfire.com/" EGIT_REPO_URI="https://github.com/arrayfire/arrayfire.git" +SRC_URI="test? ( https://googletest.googlecode.com/files/gtest-1.7.0.zip )" KEYWORDS="~amd64" LICENSE="ArrayFire" @@ -22,15 +23,28 @@ RDEPEND=" cuda? ( >=dev-util/nvidia-cuda-toolkit-6.0 ) sci-libs/fftw:3.0" DEPEND="${RDEPEND} - test? ( dev-vcs/subversion )" + test? ( app-arch/unzip )" +BUILD_DIR="${S}/build" CMAKE_BUILD_TYPE=Release PATCHES=( "${FILESDIR}"/FindCBLAS.patch "${FILESDIR}"/CMakeLists_examples.patch + "${FILESDIR}"/build_gtest.patch ) +src_unpack() { + git-r3_src_unpack + + if use test; then + mkdir -p "${BUILD_DIR}"/third_party/src/ || die + cd "${BUILD_DIR}"/third_party/src/ || die + unpack_zip "${DISTDIR}/"gtest-1.7.0.zip + mv "${BUILD_DIR}"/third_party/src/gtest-1.7.0 "${BUILD_DIR}"/third_party/src/googletest || die + fi +} + src_configure() { if use cuda; then addwrite /dev/nvidiactl diff --git a/sci-libs/arrayfire/files/build_gtest.patch b/sci-libs/arrayfire/files/build_gtest.patch new file mode 100644 index 0000000..24e4b07 --- /dev/null +++ b/sci-libs/arrayfire/files/build_gtest.patch @@ -0,0 +1,51 @@ +--- CMakeModules/build_gtest.cmake 2015-01-10 11:27:52.007076159 +0100 ++++ CMakeModules/build_gtest.cmake 2015-01-10 17:36:23.000000000 +0100 +@@ -1,27 +1,4 @@ +-#Downloads and installs GTest into the third_party directory +- +-# We apply a patch to subversion, thus we need to find it. +-FIND_PACKAGE(Subversion REQUIRED) +- +-# Create patch file for gtest with MSVC 2012 +-if(MSVC_VERSION EQUAL 1700) +- file(WRITE "${CMAKE_BINARY_DIR}/gtest.patch" "Index: cmake/internal_utils.cmake\n") +- file(APPEND "${CMAKE_BINARY_DIR}/gtest.patch" "===================================================================\n") +- file(APPEND "${CMAKE_BINARY_DIR}/gtest.patch" "--- cmake/internal_utils.cmake (revision 660)\n") +- file(APPEND "${CMAKE_BINARY_DIR}/gtest.patch" "+++ cmake/internal_utils.cmake (working copy)\n") +- file(APPEND "${CMAKE_BINARY_DIR}/gtest.patch" "@@ -66,6 +66,9 @@\n") +- file(APPEND "${CMAKE_BINARY_DIR}/gtest.patch" " # Resolved overload was found by argument-dependent lookup.\n") +- file(APPEND "${CMAKE_BINARY_DIR}/gtest.patch" " set(cxx_base_flags \"\${cxx_base_flags} -wd4675\")\n") +- file(APPEND "${CMAKE_BINARY_DIR}/gtest.patch" " endif()\n") +- file(APPEND "${CMAKE_BINARY_DIR}/gtest.patch" "+ if (MSVC_VERSION EQUAL 1700)\n") +- file(APPEND "${CMAKE_BINARY_DIR}/gtest.patch" "+ set(cxx_base_flags \"\${cxx_base_flags} -D_VARIADIC_MAX=10\")\n") +- file(APPEND "${CMAKE_BINARY_DIR}/gtest.patch" "+ endif ()\n") +- file(APPEND "${CMAKE_BINARY_DIR}/gtest.patch" " set(cxx_base_flags \"\${cxx_base_flags} -D_UNICODE -DUNICODE -DWIN32 -D_WIN32\")\n") +- file(APPEND "${CMAKE_BINARY_DIR}/gtest.patch" " set(cxx_base_flags \"\${cxx_base_flags} -DSTRICT -DWIN32_LEAN_AND_MEAN\")\n") +- file(APPEND "${CMAKE_BINARY_DIR}/gtest.patch" " set(cxx_exception_flags \"-EHsc -D_HAS_EXCEPTIONS=1\")\n") +-else() +- file(WRITE "${CMAKE_BINARY_DIR}/gtest.patch" "") +-endif() ++#Installs GTest into the third_party directory + + # Enable ExternalProject CMake module + include(ExternalProject) +@@ -37,10 +14,6 @@ set_directory_properties(PROPERTIES EP_P + # Add gtest + ExternalProject_Add( + googletest +- SVN_REPOSITORY http://googletest.googlecode.com/svn/trunk/ +- SVN_REVISION -r 660 +- TIMEOUT 10 +- PATCH_COMMAND "${Subversion_SVN_EXECUTABLE}" patch "${CMAKE_BINARY_DIR}/gtest.patch" "${CMAKE_BINARY_DIR}/third_party/src/googletest" + # Force separate output paths for debug and release builds to allow easy + # identification of correct lib in subsequent TARGET_LINK_LIBRARIES commands + CMAKE_ARGS -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} +@@ -54,8 +27,6 @@ ExternalProject_Add( + # Disable install step + INSTALL_COMMAND "" + # Wrap download, configure and build steps in a script to log output +- LOG_DOWNLOAD 0 +- LOG_UPDATE 0 + LOG_CONFIGURE 0 + LOG_BUILD 0) +