commit: 4d461beb17e2237a8d31401bf8aae0e613dad9cf Author: Paul Zander <negril.nx+gentoo <AT> gmail <DOT> com> AuthorDate: Sun May 5 13:58:13 2024 +0000 Commit: Julien Roy <julien <AT> jroy <DOT> ca> CommitDate: Sun May 5 13:58:13 2024 +0000 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=4d461beb
dev-debug/lldb-mi: new package Used by dev-util/kdevelop. Bug: https://bugs.gentoo.org/730304 Signed-off-by: Paul Zander <negril.nx+gentoo <AT> gmail.com> dev-debug/lldb-mi/Manifest | 1 + .../files/lldb-mi-0.0.1-find_packages_GTest.patch | 37 +++++++++++++++ dev-debug/lldb-mi/lldb-mi-0.0.1.ebuild | 52 ++++++++++++++++++++++ dev-debug/lldb-mi/lldb-mi-9999.ebuild | 52 ++++++++++++++++++++++ dev-debug/lldb-mi/metadata.xml | 10 +++++ 5 files changed, 152 insertions(+) diff --git a/dev-debug/lldb-mi/Manifest b/dev-debug/lldb-mi/Manifest new file mode 100644 index 0000000000..aad3f02c3a --- /dev/null +++ b/dev-debug/lldb-mi/Manifest @@ -0,0 +1 @@ +DIST lldb-mi-0.0.1.tar.gz 190715 BLAKE2B c658f8a6943d0cc165dbdc5f4acb38081d0b1fc4a213795cb948a934be6558ad3dfb38a1d20611b60d9396aba23337f665839615c26a5029ddf48c977a12add8 SHA512 33488d254cd294f7f565f2c571ed399d63189f26f1d0567bf3a0a8a44bbb20a9e0690b190d3409a8678ecf237e33ff4dacd1c80ea671a3931b50ab91d690b147 diff --git a/dev-debug/lldb-mi/files/lldb-mi-0.0.1-find_packages_GTest.patch b/dev-debug/lldb-mi/files/lldb-mi-0.0.1-find_packages_GTest.patch new file mode 100644 index 0000000000..8a5d5a7732 --- /dev/null +++ b/dev-debug/lldb-mi/files/lldb-mi-0.0.1-find_packages_GTest.patch @@ -0,0 +1,37 @@ +diff --git a/test/unittests/CMakeLists.txt b/test/unittests/CMakeLists.txt +index 4d07cdb..976b8e5 100644 +--- a/test/unittests/CMakeLists.txt ++++ b/test/unittests/CMakeLists.txt +@@ -1,10 +1,7 @@ + cmake_minimum_required(VERSION 3.11) + +-include(FetchContent) +-FetchContent_Declare(gtest +- QUIET +- URL https://github.com/google/googletest/archive/refs/tags/release-1.11.0.zip +-) ++enable_testing() ++find_package(GTest REQUIRED) + + # Prevent overriding the parent project's linker settings, for Windows. + set(gtest_force_shared_crt ON CACHE BOOL "" FORCE) +@@ -15,10 +12,6 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "Clang") + add_compile_options("-Wno-error=covered-switch-default") + endif() + +-FetchContent_MakeAvailable(gtest) +- +-include(GoogleTest) +- + include_directories(../../src) + + set(UNITTESTS_ROOT ${CMAKE_CURRENT_LIST_DIR}) +@@ -39,7 +32,7 @@ function(add_lldb_mi_test NAME TEST) + endforeach(SRC) + + add_executable(${NAME} ${TEST} ${SOURCES_RELATIVE}) +- target_link_libraries(${NAME} gtest_main) ++ target_link_libraries(${NAME} GTest::gtest GTest::gtest_main) + set_target_properties(${NAME} PROPERTIES FOLDER "unittests") + + gtest_discover_tests(${NAME}) diff --git a/dev-debug/lldb-mi/lldb-mi-0.0.1.ebuild b/dev-debug/lldb-mi/lldb-mi-0.0.1.ebuild new file mode 100644 index 0000000000..5dc5173bbf --- /dev/null +++ b/dev-debug/lldb-mi/lldb-mi-0.0.1.ebuild @@ -0,0 +1,52 @@ +# Copyright 2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +LLVM_COMPAT=( {15..19} ) + +inherit cmake llvm-r1 + +DESCRIPTION="LLDB Machine Interface Driver" +HOMEPAGE="https://github.com/lldb-tools/lldb-mi" + +if [[ ${PV} = 9999* ]]; then + EGIT_REPO_URI="https://github.com/lldb-tools/lldb-mi.git" + EGIT_BRANCH="main" + inherit git-r3 +else + SRC_URI=" + https://github.com/lldb-tools/lldb-mi/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz + " + KEYWORDS="~amd64 ~x86" +fi + +LICENSE="Apache-2.0-with-LLVM-exceptions" +SLOT="0" + +IUSE="test" + +RESTRICT="!test? ( test )" + +RDEPEND=" + dev-debug/lldb:= + $(llvm_gen_dep ' + sys-devel/llvm:${LLVM_SLOT} + ') +" +DEPEND="${RDEPEND} + test? ( + dev-cpp/gtest + ) +" + +PATCHES=( + "${FILESDIR}/${PN}-0.0.1-find_packages_GTest.patch" +) + +src_configure() { + local mycmakeargs=( + -DINCLUDE_TESTS="$(usex test)" + ) + cmake_src_configure +} diff --git a/dev-debug/lldb-mi/lldb-mi-9999.ebuild b/dev-debug/lldb-mi/lldb-mi-9999.ebuild new file mode 100644 index 0000000000..5dc5173bbf --- /dev/null +++ b/dev-debug/lldb-mi/lldb-mi-9999.ebuild @@ -0,0 +1,52 @@ +# Copyright 2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +LLVM_COMPAT=( {15..19} ) + +inherit cmake llvm-r1 + +DESCRIPTION="LLDB Machine Interface Driver" +HOMEPAGE="https://github.com/lldb-tools/lldb-mi" + +if [[ ${PV} = 9999* ]]; then + EGIT_REPO_URI="https://github.com/lldb-tools/lldb-mi.git" + EGIT_BRANCH="main" + inherit git-r3 +else + SRC_URI=" + https://github.com/lldb-tools/lldb-mi/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz + " + KEYWORDS="~amd64 ~x86" +fi + +LICENSE="Apache-2.0-with-LLVM-exceptions" +SLOT="0" + +IUSE="test" + +RESTRICT="!test? ( test )" + +RDEPEND=" + dev-debug/lldb:= + $(llvm_gen_dep ' + sys-devel/llvm:${LLVM_SLOT} + ') +" +DEPEND="${RDEPEND} + test? ( + dev-cpp/gtest + ) +" + +PATCHES=( + "${FILESDIR}/${PN}-0.0.1-find_packages_GTest.patch" +) + +src_configure() { + local mycmakeargs=( + -DINCLUDE_TESTS="$(usex test)" + ) + cmake_src_configure +} diff --git a/dev-debug/lldb-mi/metadata.xml b/dev-debug/lldb-mi/metadata.xml new file mode 100644 index 0000000000..33dba739e4 --- /dev/null +++ b/dev-debug/lldb-mi/metadata.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>[email protected]</email> + </maintainer> + <upstream> + <remote-id type="github">lldb-tools/lldb-mi</remote-id> + </upstream> +</pkgmetadata>
