summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Henke <Jan.Henke@taujhe.de>2020-06-14 14:32:40 +0200
committerGeorgy Yakovlev <gyakovlev@gentoo.org>2020-06-14 13:28:30 -0700
commite5da0f47e9281acdc6bbd58adb677e78ccd97496 (patch)
treedc027a7d6411d0da0ec8985070502d66b12f7ed6 /dev-cpp
parentnet-dns/bind-tools: stable 9.14.12 for ppc (diff)
downloadgentoo-e5da0f47e9281acdc6bbd58adb677e78ccd97496.tar.gz
gentoo-e5da0f47e9281acdc6bbd58adb677e78ccd97496.tar.bz2
gentoo-e5da0f47e9281acdc6bbd58adb677e78ccd97496.zip
dev-cpp/ms-gsl: Version bump 3.1.0
Package-Manager: Portage-2.3.99, Repoman-2.3.22 Signed-off-by: Jan Henke <Jan.Henke@taujhe.de> Closes: https://github.com/gentoo/gentoo/pull/16237 Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
Diffstat (limited to 'dev-cpp')
-rw-r--r--dev-cpp/ms-gsl/Manifest1
-rw-r--r--dev-cpp/ms-gsl/files/ms-gsl-3.0.0-use_system_gtest.patch82
-rw-r--r--dev-cpp/ms-gsl/ms-gsl-3.1.0.ebuild34
-rw-r--r--dev-cpp/ms-gsl/ms-gsl-9999.ebuild9
4 files changed, 121 insertions, 5 deletions
diff --git a/dev-cpp/ms-gsl/Manifest b/dev-cpp/ms-gsl/Manifest
index c8a967495689..3a53ce074972 100644
--- a/dev-cpp/ms-gsl/Manifest
+++ b/dev-cpp/ms-gsl/Manifest
@@ -1,2 +1,3 @@
DIST ms-gsl-2.0.0.tar.gz 64726 BLAKE2B ab40725aa38af7c5651e22ebf32d4bd9c27a10be2e206fd4c3c0173ad21da262beddef022b7b158653b185cfc3269f2b6e80d99fe65f601ffc3e770b143b03f8 SHA512 7339527222c8a97a94c0bb4038b3d142045ec5d80995e628574ac96f4d9d13c41ad70fbe0d8390586dc0db8d9ea55107dbc95de80f7335eb78ef9d2e7047d726
DIST ms-gsl-2.1.0.tar.gz 67289 BLAKE2B 5a247028b71521d7851a6aa5f24936dfb1c7f283854724d8d4bf2d9d9ac3a928c0e5b42a280d8a0a0254d9f6fa958bf1283dab674c649bdaaa7b38ef38f3b1ba SHA512 4382b8feadf4608b06b66a78ca51b0f60a6e8b41b183aec6ac8f8e2e9f0b39705dea513fd708012ed8390c1a4f88d7df454f05166b76bee24ae843835cd4a2ca
+DIST ms-gsl-3.1.0.tar.gz 78196 BLAKE2B 32334891a11004a6919645814154fdb108a4582a00ac0002c0af9a524978cc8316bebb07192e260b800f462d5424c476fc22be59cca59c0f3d9d7606ab8c4181 SHA512 2916df9ee165fc803ffae0a56518f2ba92870e279984913ff591559e1459943c3ffbc1f5a0d819ad8233f0c9034012de3616aa4e10557d87c7285d8425d10696
diff --git a/dev-cpp/ms-gsl/files/ms-gsl-3.0.0-use_system_gtest.patch b/dev-cpp/ms-gsl/files/ms-gsl-3.0.0-use_system_gtest.patch
new file mode 100644
index 000000000000..fa8d09aafe74
--- /dev/null
+++ b/dev-cpp/ms-gsl/files/ms-gsl-3.0.0-use_system_gtest.patch
@@ -0,0 +1,82 @@
+From 727e9b8312c7ae011b667152606afc0e04ea197a Mon Sep 17 00:00:00 2001
+From: Jan Henke <Jan.Henke@taujhe.de>
+Date: Sun, 14 Jun 2020 14:12:02 +0200
+Subject: [PATCH] Use system gtest instead of downloading and building it
+
+---
+ CMakeLists.txt | 1 -
+ tests/CMakeLists.txt | 30 ++++--------------------------
+ 2 files changed, 4 insertions(+), 27 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 740cd31..f1bf7a2 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -3,7 +3,6 @@ cmake_minimum_required(VERSION 3.1.3...3.16)
+ project(GSL VERSION 3.1.0 LANGUAGES CXX)
+
+ include(ExternalProject)
+-find_package(Git)
+
+ # Use GNUInstallDirs to provide the right locations on all platforms
+ include(GNUInstallDirs)
+diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
+index 2bd1bbe..c42afb7 100644
+--- a/tests/CMakeLists.txt
++++ b/tests/CMakeLists.txt
+@@ -5,32 +5,9 @@ project(GSLTests CXX)
+ # will make visual studio generated project group files
+ set_property(GLOBAL PROPERTY USE_FOLDERS ON)
+
+-configure_file(CMakeLists.txt.in googletest-download/CMakeLists.txt)
+-execute_process(
+- COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" .
+- RESULT_VARIABLE result
+- WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/googletest-download
+-)
+-if(result)
+- message(FATAL_ERROR "CMake step for googletest failed: ${result}")
+-endif()
+-
+-execute_process(
+- COMMAND ${CMAKE_COMMAND} --build .
+- RESULT_VARIABLE result
+- WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/googletest-download
+-)
+-if(result)
+- message(FATAL_ERROR "CMake step for googletest failed: ${result}")
+-endif()
+-
+ set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
+
+-add_subdirectory(
+- ${CMAKE_CURRENT_BINARY_DIR}/googletest-src
+- ${CMAKE_CURRENT_BINARY_DIR}/googletest-build
+- EXCLUDE_FROM_ALL
+-)
++find_package(GTest REQUIRED)
+
+ if (MSVC AND (GSL_CXX_STANDARD EQUAL 17))
+ set(GSL_CPLUSPLUS_OPT -Zc:__cplusplus -permissive-)
+@@ -139,7 +116,7 @@ endif(MSVC)
+
+ # for tests to find the gtest header
+ target_include_directories(gsl_tests_config SYSTEM INTERFACE
+- googletest/googletest/include
++ ${GTest_INCLUDE_DIRS}
+ )
+
+ set_property(TARGET PROPERTY FOLDER "GSL_tests")
+@@ -149,7 +126,8 @@ function(add_gsl_test name)
+ target_link_libraries(${name}
+ GSL
+ gsl_tests_config
+- gtest_main
++ GTest::GTest
++ GTest::Main
+ )
+ add_test(
+ ${name}
+--
+2.26.2
+
diff --git a/dev-cpp/ms-gsl/ms-gsl-3.1.0.ebuild b/dev-cpp/ms-gsl/ms-gsl-3.1.0.ebuild
new file mode 100644
index 000000000000..a83f3f082bb8
--- /dev/null
+++ b/dev-cpp/ms-gsl/ms-gsl-3.1.0.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake-utils
+
+DESCRIPTION="Guideline Support Library implementation by Microsoft"
+HOMEPAGE="https://github.com/Microsoft/GSL"
+SRC_URI="https://github.com/Microsoft/GSL/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+S="${WORKDIR}/GSL-${PV}"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc64 ~x86"
+IUSE="test"
+RESTRICT="!test? ( test )"
+
+# header only library
+RDEPEND=""
+DEPEND="test? ( >=dev-cpp/gtest-1.9.0_pre20190607 )"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-1.0.0-disable_Werror-644042.patch"
+ "${FILESDIR}/${PN}-3.0.0-use_system_gtest.patch"
+)
+
+src_configure() {
+ local mycmakeargs=(
+ -DGSL_TEST=$(usex test)
+ )
+ cmake-utils_src_configure
+}
diff --git a/dev-cpp/ms-gsl/ms-gsl-9999.ebuild b/dev-cpp/ms-gsl/ms-gsl-9999.ebuild
index 767d0523e267..3c5a14efe718 100644
--- a/dev-cpp/ms-gsl/ms-gsl-9999.ebuild
+++ b/dev-cpp/ms-gsl/ms-gsl-9999.ebuild
@@ -1,7 +1,7 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=6
+EAPI=7
inherit cmake-utils git-r3
@@ -18,17 +18,16 @@ RESTRICT="!test? ( test )"
# header only library
RDEPEND=""
-DEPEND="test? ( dev-cpp/catch:1 )"
+DEPEND="test? ( >=dev-cpp/gtest-1.9.0_pre20190607 )"
PATCHES=(
- "${FILESDIR}/${PN}-1.0.0-use_system_catch-636828.patch"
"${FILESDIR}/${PN}-1.0.0-disable_Werror-644042.patch"
+ "${FILESDIR}/${PN}-3.0.0-use_system_gtest.patch"
)
src_configure() {
local mycmakeargs=(
-DGSL_TEST=$(usex test)
)
- use test && mycmakeargs+=( -DFORCE_SYSTEM_CATCH=ON )
cmake-utils_src_configure
}