public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Justin Lecher" <jlec@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/sci:master commit in: sci-libs/arrayfire/, sci-libs/arrayfire/files/
Date: Sat, 10 Jan 2015 18:03:23 +0000 (UTC)	[thread overview]
Message-ID: <1420909671.fb0a0e645db8b5066be7bfcfdda8f3545637b2f9.jlec@gentoo> (raw)

commit:     fb0a0e645db8b5066be7bfcfdda8f3545637b2f9
Author:     Marius Brehler <marbre <AT> linux <DOT> sungazer <DOT> de>
AuthorDate: Sat Jan 10 17:07:51 2015 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> 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)
+ 


             reply	other threads:[~2015-01-10 18:03 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-10 18:03 Justin Lecher [this message]
  -- strict thread matches above, loose matches on Subject: below --
2015-03-08 18:08 [gentoo-commits] proj/sci:master commit in: sci-libs/arrayfire/, sci-libs/arrayfire/files/ Justin Lecher
2015-09-15 13:34 Justin Lecher
2015-09-19 12:51 Justin Lecher
2016-05-19  7:14 Marius Brehler
2016-12-01  9:00 Marius Brehler
2017-04-11 14:52 Marius Brehler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1420909671.fb0a0e645db8b5066be7bfcfdda8f3545637b2f9.jlec@gentoo \
    --to=jlec@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox