gnu: libexpected: Update to 1.1.0.

* gnu/packages/patches/libexpected-use-provided-catch2.patch: Add new patch.
* gnu/packages/patches/libexpected-nofetch.patch: Remove unused patch.
* gnu/local.mk (dist_patch_DATA): Register changes.
* gnu/packages/cpp.scm (libexpected): Update to 1.1.0, and use new patch.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
Josselin Poiret 2023-04-27 15:08:25 +02:00 committed by Ludovic Courtès
parent 8a8bd15bfa
commit 4884ee6dd4
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5
4 changed files with 47 additions and 39 deletions

View file

@ -1443,7 +1443,7 @@ dist_patch_DATA = \
%D%/packages/patches/libcanberra-wayland-crash.patch \
%D%/packages/patches/libcroco-CVE-2020-12825.patch \
%D%/packages/patches/libcyaml-libyaml-compat.patch \
%D%/packages/patches/libexpected-nofetch.patch \
%D%/packages/patches/libexpected-use-provided-catch2.patch \
%D%/packages/patches/libgda-cve-2021-39359.patch \
%D%/packages/patches/libgda-fix-build.patch \
%D%/packages/patches/libgda-fix-missing-initialization.patch \

View file

@ -1363,7 +1363,7 @@ (define-public aws-sdk-cpp
(define-public libexpected
(package
(name "libexpected")
(version "1.0.0")
(version "1.1.0")
(source
(origin
(method git-fetch)
@ -1374,18 +1374,10 @@ (define-public libexpected
;; repository. Should not affect reproducibility.
(recursive? #t)))
(file-name (git-file-name name version))
;; NOTE: This patch will be unnecessary on subsequent tags.
(patches (search-patches "libexpected-nofetch.patch"))
(sha256
(base32 "1ckzfrljzzdw9wf8hvdfjz4wjx5na57iwxc48mbv9rf5067m21a5"))))
(base32 "17akrv80h0n4cfmxwvlvbb8ycqza7y3qqygjyphv95rrabqm9r02"))
(patches (search-patches "libexpected-use-provided-catch2.patch"))))
(build-system cmake-build-system)
;; TODO: Clean up install phase.
(arguments
`(#:phases
(modify-phases %standard-phases
(replace 'check
(lambda _
(invoke "./tests"))))))
(native-inputs
(list catch2))
(synopsis "C++11/14/17 std::expected with functional-style extensions")

View file

@ -1,27 +0,0 @@
Description: Disable FetchContent module
No online operations are permitted during build package.
Author: Nicholas Guriev <guriev-ns@ya.ru>
Last-Update: Wed, 22 Jan 2020 21:51:33 +0300
Modified by Brett Gilio <brettg@gnu.org> on Dec 5, 2020
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -4,16 +4,7 @@ project(tl-expected VERSION 1.0.0 LANGUAGES CXX)
option(EXPECTED_ENABLE_TESTS "Enable tests." ON)
-include(FetchContent)
-FetchContent_Declare(
- tl_cmake
- GIT_REPOSITORY https://github.com/TartanLlama/tl-cmake.git
-)
-FetchContent_GetProperties(tl_cmake)
-if(NOT tl_cmake_POPULATED)
- FetchContent_Populate(tl_cmake)
- set(CMAKE_MODULE_PATH ${tl_cmake_SOURCE_DIR} ${CMAKE_MODULE_PATH})
-endif()
+set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/tl-cmake ${CMAKE_MODULE_PATH})
include(add-tl)
tl_add_library(expected SOURCES

View file

@ -0,0 +1,43 @@
From 8f03ca270d1aa5dcafa945c941cf52ff14cb47da Mon Sep 17 00:00:00 2001
Message-Id: <8f03ca270d1aa5dcafa945c941cf52ff14cb47da.1682600200.git.dev@jpoiret.xyz>
From: Josselin Poiret <dev@jpoiret.xyz>
Date: Thu, 27 Apr 2023 14:51:51 +0200
Subject: [PATCH] Use provided catch2
From: Josselin Poiret <dev@jpoiret.xyz>
---
CMakeLists.txt | 10 +---------
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ddab64e..2d5eac8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -8,7 +8,6 @@ project(tl-expected
include(CMakePackageConfigHelpers)
include(CMakeDependentOption)
include(GNUInstallDirs)
-include(FetchContent)
include(CTest)
if (NOT DEFINED CMAKE_CXX_STANDARD)
@@ -63,14 +62,7 @@ install(FILES
install(DIRECTORY "include/" TYPE INCLUDE)
if(EXPECTED_BUILD_TESTS)
- set(CMAKE_POLICY_DEFAULT_CMP0077 NEW)
- set(CATCH_INSTALL_HELPERS OFF)
- set(CATCH_BUILD_TESTING OFF)
- set(CATCH_INSTALL_DOCS OFF)
- FetchContent_Declare(Catch2 URL
- https://github.com/catchorg/Catch2/archive/v2.13.10.zip)
- FetchContent_MakeAvailable(Catch2)
-
+ find_package(Catch2 CONFIG)
file(GLOB test-sources CONFIGURE_DEPENDS tests/*.cpp)
list(FILTER test-sources EXCLUDE REGEX "tests/test.cpp")
add_executable(${PROJECT_NAME}-tests "${test-sources}")
--
2.39.2