summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-cpp/elfio')
-rw-r--r--dev-cpp/elfio/Manifest1
-rw-r--r--dev-cpp/elfio/elfio-3.11.ebuild32
-rw-r--r--dev-cpp/elfio/files/elfio-3.11-system-gtest.patch33
3 files changed, 66 insertions, 0 deletions
diff --git a/dev-cpp/elfio/Manifest b/dev-cpp/elfio/Manifest
index 5e626b46552f..3293acb2df14 100644
--- a/dev-cpp/elfio/Manifest
+++ b/dev-cpp/elfio/Manifest
@@ -1 +1,2 @@
DIST elfio-3.10.tar.gz 4243841 BLAKE2B a4cd5e7cb8b2f13cd7341adacb623b996e07e8ac761cd0f1e8eb20a87770fa936bf97ad79a0ff8d700ac41278bae7c5dd00d277f4c2d47e73340aaf607b7ee49 SHA512 f609fe5162d1609d1d65f441dbf01011ca5ae36195d8b3a74dec2b72891e9f8f90d3fdbc9bf893f7186494071606e898e5519fda18665fc88ae9781c504cd4a9
+DIST elfio-3.11.tar.gz 4150700 BLAKE2B 2e0270384f1fdbc8f8374c1a42b5bd0c6ba6faa8c8a7125063b682cd9808fbb3f330e2a0fa4646c8828f6d276ad8f92e36b69ab7916c3bd2b1b2ecad6708fcc1 SHA512 3a254aad62e707f2809e2997998aab6a9794d70791dc535a6de90bad3e9de3cbcc4f8e7787067ca7cd47ce2dc71cf52809747267bc36cfb08369b49a6b92cf5e
diff --git a/dev-cpp/elfio/elfio-3.11.ebuild b/dev-cpp/elfio/elfio-3.11.ebuild
new file mode 100644
index 000000000000..0c82a247cdd9
--- /dev/null
+++ b/dev-cpp/elfio/elfio-3.11.ebuild
@@ -0,0 +1,32 @@
+# Copyright 2020-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake
+
+DESCRIPTION="ELF reader/producer header-only C++ library"
+HOMEPAGE="https://github.com/serge1/ELFIO"
+SRC_URI="https://github.com/serge1/${PN}/archive/Release_${PV}.tar.gz -> ${P}.tar.gz"
+S="${WORKDIR}"/${PN^^}-Release_${PV}
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="test"
+RESTRICT="!test? ( test )"
+
+DEPEND="test? ( dev-cpp/gtest )"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-3.11-system-gtest.patch
+)
+
+src_configure() {
+ local mycmakeargs=(
+ -DFETCHCONTENT_FULLY_DISCONNECTED=ON
+ -DELFIO_BUILD_TESTS=$(usex test)
+ )
+
+ cmake_src_configure
+}
diff --git a/dev-cpp/elfio/files/elfio-3.11-system-gtest.patch b/dev-cpp/elfio/files/elfio-3.11-system-gtest.patch
new file mode 100644
index 000000000000..2110086c69d6
--- /dev/null
+++ b/dev-cpp/elfio/files/elfio-3.11-system-gtest.patch
@@ -0,0 +1,33 @@
+https://github.com/serge1/ELFIO/pull/113
+
+From 4c47fd4c783f286a73605e43e362f1e14b0296a9 Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Sat, 19 Nov 2022 02:56:22 +0000
+Subject: [PATCH] tests: allow using system gtest copy
+
+Distributions often do builds with no network access available
+for both security reasons and also to ensure reproducibility.
+
+This change tells CMake to query the system for a copy of gtest,
+but if it's not available, it'll fall back to downloading via
+FetchContent.
+--- a/tests/CMakeLists.txt
++++ b/tests/CMakeLists.txt
+@@ -3,6 +3,7 @@ include(FetchContent)
+ FetchContent_Declare(
+ googletest
+ URL https://github.com/google/googletest/archive/9a32aee22d771387c494be2d8519fbdf46a713b2.zip
++ FIND_PACKAGE_ARGS NAMES GTest
+ )
+
+ # For Windows: Prevent overriding the parent project's compiler/linker settings
+@@ -44,7 +45,8 @@ target_link_libraries(
+ ELFIOTest
+ PRIVATE
+ elfio::elfio
+- gtest_main)
++ gtest_main
++ GTest::gtest_main)
+
+ add_test(
+ NAME