summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-dotnet/netcoredbg/netcoredbg-3.0.0.1012.ebuild')
-rw-r--r--dev-dotnet/netcoredbg/netcoredbg-3.0.0.1012.ebuild238
1 files changed, 238 insertions, 0 deletions
diff --git a/dev-dotnet/netcoredbg/netcoredbg-3.0.0.1012.ebuild b/dev-dotnet/netcoredbg/netcoredbg-3.0.0.1012.ebuild
new file mode 100644
index 000000000000..a54b30a02cb2
--- /dev/null
+++ b/dev-dotnet/netcoredbg/netcoredbg-3.0.0.1012.ebuild
@@ -0,0 +1,238 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+MY_PV="$(ver_cut 1-3)-$(ver_cut 4)"
+DOTNET_RUNTIME_V="7.0.14"
+
+CMAKE_IN_SOURCE_BUILD="ON"
+
+NUGETS="
+microsoft.codeanalysis.analyzers@1.1.0
+microsoft.codeanalysis.common@2.3.0
+microsoft.codeanalysis.csharp.scripting@2.3.0
+microsoft.codeanalysis.csharp@2.3.0
+microsoft.codeanalysis.scripting.common@2.3.0
+microsoft.csharp@4.4.0
+microsoft.diagnostics.dbgshim.linux-arm64@8.0.452401
+microsoft.diagnostics.dbgshim.linux-arm@8.0.452401
+microsoft.diagnostics.dbgshim.linux-musl-arm64@8.0.452401
+microsoft.diagnostics.dbgshim.linux-musl-arm@8.0.452401
+microsoft.diagnostics.dbgshim.linux-musl-x64@8.0.452401
+microsoft.diagnostics.dbgshim.linux-x64@8.0.452401
+microsoft.diagnostics.dbgshim.osx-arm64@8.0.452401
+microsoft.diagnostics.dbgshim.osx-x64@8.0.452401
+microsoft.diagnostics.dbgshim.win-arm64@8.0.452401
+microsoft.diagnostics.dbgshim.win-arm@8.0.452401
+microsoft.diagnostics.dbgshim.win-x64@8.0.452401
+microsoft.diagnostics.dbgshim.win-x86@8.0.452401
+microsoft.diagnostics.dbgshim@8.0.452401
+microsoft.netcore.platforms@1.1.0
+microsoft.netcore.targets@1.1.0
+netstandard.library@2.0.3
+runtime.any.system.collections@4.3.0
+runtime.any.system.diagnostics.tools@4.3.0
+runtime.any.system.diagnostics.tracing@4.3.0
+runtime.any.system.globalization.calendars@4.3.0
+runtime.any.system.globalization@4.3.0
+runtime.any.system.io@4.3.0
+runtime.any.system.reflection.extensions@4.3.0
+runtime.any.system.reflection.primitives@4.3.0
+runtime.any.system.reflection@4.3.0
+runtime.any.system.resources.resourcemanager@4.3.0
+runtime.any.system.runtime.handles@4.3.0
+runtime.any.system.runtime.interopservices@4.3.0
+runtime.any.system.runtime@4.3.0
+runtime.any.system.text.encoding.extensions@4.3.0
+runtime.any.system.text.encoding@4.3.0
+runtime.any.system.threading.tasks@4.3.0
+runtime.debian.8-x64.runtime.native.system.security.cryptography.openssl@4.3.0
+runtime.fedora.23-x64.runtime.native.system.security.cryptography.openssl@4.3.0
+runtime.fedora.24-x64.runtime.native.system.security.cryptography.openssl@4.3.0
+runtime.native.system.io.compression@4.3.0
+runtime.native.system.net.http@4.3.0
+runtime.native.system.security.cryptography.apple@4.3.0
+runtime.native.system.security.cryptography.openssl@4.3.0
+runtime.native.system@4.3.0
+runtime.opensuse.13.2-x64.runtime.native.system.security.cryptography.openssl@4.3.0
+runtime.opensuse.42.1-x64.runtime.native.system.security.cryptography.openssl@4.3.0
+runtime.osx.10.10-x64.runtime.native.system.security.cryptography.apple@4.3.0
+runtime.osx.10.10-x64.runtime.native.system.security.cryptography.openssl@4.3.0
+runtime.rhel.7-x64.runtime.native.system.security.cryptography.openssl@4.3.0
+runtime.ubuntu.14.04-x64.runtime.native.system.security.cryptography.openssl@4.3.0
+runtime.ubuntu.16.04-x64.runtime.native.system.security.cryptography.openssl@4.3.0
+runtime.ubuntu.16.10-x64.runtime.native.system.security.cryptography.openssl@4.3.0
+runtime.unix.system.console@4.3.0
+runtime.unix.system.diagnostics.debug@4.3.0
+runtime.unix.system.io.filesystem@4.3.0
+runtime.unix.system.private.uri@4.3.0
+runtime.unix.system.runtime.extensions@4.3.0
+system.appcontext@4.3.0
+system.buffers@4.3.0
+system.collections.concurrent@4.3.0
+system.collections.immutable@1.3.1
+system.collections@4.3.0
+system.console@4.3.0
+system.diagnostics.debug@4.3.0
+system.diagnostics.fileversioninfo@4.3.0
+system.diagnostics.stacktrace@4.3.0
+system.diagnostics.tools@4.3.0
+system.diagnostics.tracing@4.3.0
+system.dynamic.runtime@4.3.0
+system.globalization.calendars@4.3.0
+system.globalization@4.3.0
+system.io.compression@4.3.0
+system.io.filesystem.primitives@4.3.0
+system.io.filesystem@4.3.0
+system.io@4.3.0
+system.linq.expressions@4.3.0
+system.linq@4.3.0
+system.objectmodel@4.3.0
+system.private.uri@4.3.0
+system.reflection.emit.ilgeneration@4.3.0
+system.reflection.emit.lightweight@4.3.0
+system.reflection.emit@4.3.0
+system.reflection.extensions@4.3.0
+system.reflection.metadata@1.4.2
+system.reflection.primitives@4.3.0
+system.reflection.typeextensions@4.3.0
+system.reflection@4.3.0
+system.resources.resourcemanager@4.3.0
+system.runtime.extensions@4.3.0
+system.runtime.handles@4.3.0
+system.runtime.interopservices@4.3.0
+system.runtime.numerics@4.3.0
+system.runtime@4.3.0
+system.security.cryptography.algorithms@4.3.0
+system.security.cryptography.cng@4.3.0
+system.security.cryptography.csp@4.3.0
+system.security.cryptography.encoding@4.3.0
+system.security.cryptography.openssl@4.3.0
+system.security.cryptography.primitives@4.3.0
+system.security.cryptography.x509certificates@4.3.0
+system.text.encoding.codepages@4.3.0
+system.text.encoding.extensions@4.3.0
+system.text.encoding@4.3.0
+system.text.regularexpressions@4.3.0
+system.threading.tasks.extensions@4.3.0
+system.threading.tasks.parallel@4.3.0
+system.threading.tasks@4.3.0
+system.threading.thread@4.3.0
+system.threading@4.3.0
+system.valuetuple@4.3.0
+system.xml.readerwriter@4.3.0
+system.xml.xdocument@4.3.0
+system.xml.xmldocument@4.3.0
+system.xml.xpath.xdocument@4.3.0
+system.xml.xpath@4.3.0
+"
+
+inherit check-reqs cmake flag-o-matic nuget
+
+DESCRIPTION="NetCoreDbg is a managed code debugger with MI interface for CoreCLR"
+HOMEPAGE="https://github.com/Samsung/netcoredbg/"
+
+if [[ "${PV}" == *9999* ]] ; then
+ inherit git-r3
+
+ EGIT_REPO_URI="https://github.com/Samsung/${PN}.git"
+else
+ SRC_URI="https://github.com/Samsung/${PN}/archive/refs/tags/${MY_PV}.tar.gz
+ -> ${P}.tar.gz"
+ S="${WORKDIR}/${PN}-${MY_PV}"
+
+ KEYWORDS="~amd64"
+fi
+
+# .NET runtime that would have otherwise be downloaded via git.
+SRC_URI+="
+ https://github.com/dotnet/runtime/archive/refs/tags/v${DOTNET_RUNTIME_V}.tar.gz
+ -> dotnet_runtime-${DOTNET_RUNTIME_V}.tar.gz
+"
+CORECLR_S="${WORKDIR}/runtime-${DOTNET_RUNTIME_V}/src/coreclr"
+
+SRC_URI+="
+ ${NUGET_URIS}
+"
+
+LICENSE="MIT"
+SLOT="0/${MY_PV}"
+
+RDEPEND="
+ >=virtual/dotnet-sdk-6.0
+"
+BDEPEND="
+ ${RDEPEND}
+ dev-dotnet/csharp-gentoodotnetinfo
+"
+
+CHECKREQS_DISK_BUILD="1400M"
+PATCHES=(
+ "${FILESDIR}/${PN}-3.0.0.1012-compileoptions.patch"
+ "${FILESDIR}/${PN}-3.0.0.1012-types-cstdint.patch"
+)
+QA_FLAGS_IGNORED=".*/libdbgshim.so"
+
+DOCS=( README.md docs/{interop,stepping}.md )
+
+pkg_setup() {
+ if [[ "${MERGE_TYPE}" != binary ]] ; then
+ check-reqs_pkg_setup
+ fi
+}
+
+src_unpack() {
+ nuget_link-system-nugets
+ nuget_link-nuget-archives
+ nuget_unpack-non-nuget-archives
+
+ if [[ -n "${EGIT_REPO_URI}" ]] ; then
+ git-r3_src_unpack
+ fi
+}
+
+src_prepare() {
+ if [[ -z "${DOTNET_ROOT}" ]] ; then
+ die "DOTNET_ROOT is not set"
+ fi
+
+ export DOTNET_CLI_TELEMETRY_OPTOUT=1
+ export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
+ export MSBUILDDISABLENODEREUSE=1
+ export UseSharedCompilation=false
+
+ cat <<EOF > nuget.config || die
+<?xml version="1.0" encoding="utf-8"?>
+<configuration>
+<packageSources>
+<clear />
+<add key="nuget" value="${NUGET_PACKAGES}" />
+</packageSources>
+</configuration>
+EOF
+ cp nuget.config tools/generrmsg/nuget.xml || die
+
+ cmake_src_prepare
+}
+
+src_configure() {
+ INSTALL_PREFIX="/usr/$(get_libdir)/${PN}"
+ gentoo-dotnet-info || die
+ append-cxxflags -fpermissive
+
+ local -a mycmakeargs=(
+ -DBUILD_MANAGED=1
+ -DCMAKE_INSTALL_PREFIX="${INSTALL_PREFIX}"
+ -DCORECLR_DIR="${CORECLR_S}"
+ -DDOTNET_DIR="${DOTNET_ROOT}"
+ )
+ cmake_src_configure
+}
+
+src_install() {
+ cmake_src_install
+
+ dosym -r "${INSTALL_PREFIX}/${PN}" "/usr/bin/${PN}"
+ einstalldocs
+}