Skip to content

Commit

Permalink
.NET Core SDK 7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
kristapsk committed Jan 16, 2023
1 parent 1cc9387 commit 1605277
Show file tree
Hide file tree
Showing 4 changed files with 144 additions and 0 deletions.
3 changes: 3 additions & 0 deletions dev-dotnet/dotnetcore-sdk-bin-common/Manifest
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@ DIST dotnet-sdk-5.0.405-linux-x64.tar.gz 142442372 BLAKE2B 664549356de17535a8680
DIST dotnet-sdk-6.0.102-linux-arm.tar.gz 169190305 BLAKE2B 4f3aa3e2de89f8c360505c4287207bc285090f79e808e8b7637a3e92bbaaf69a6ea12c7296dfb729cb56a6c6e226ee276ff5e8776b439c140aeab5bcedd05824 SHA512 a72a0e81c62478b0dc662ef0aaeb7f96e7dd534e90b3ac1bdab1ca98dd93a4605881dba6e9ed2315781fdf71f5b33acb1aa5e28090c7a1693405bebed5853094
DIST dotnet-sdk-6.0.102-linux-arm64.tar.gz 167109725 BLAKE2B e687b702ce7e2ad5f8abf87eb63716c2e29880b9fa8c10f37ede05f2d59f2426433549a8d535b71f7243f698a014871b6f2de8a2c2b06600bbe8a74fbdb4a8c5 SHA512 790cbf322ca8fed32eaf574f19d0bdc05656c5a88a65aa4dba8269cfce1443cd7cdeecdd3a40e353c368f055490b70592ca7f15f981a66c5b3a9517d0b09e4cb
DIST dotnet-sdk-6.0.102-linux-x64.tar.gz 173139326 BLAKE2B cac49a69635c4f90bafc8e04b42c36e3196f6af8c39da152f16d771a3eff56fa39271c4af441a687cd9189031f6c68de3063a17aa1d21bc303a8172980c802de SHA512 edd79ebad3327032ea0aaa8504c14e3270050bb459b098202676776b41a3a1d282aaefd1e5e8aa09ef7f7cf7c4601c4783a57112ff6e3d427507e8eec2bfb748
DIST dotnet-sdk-7.0.102-linux-arm.tar.gz 190372161 BLAKE2B 29d3ac45b1e8e32f4d086be2ff7b6bb71c7051477c3150e7ecea7a79d521ae732402bdb3e3dd6da1cf33b46f3786bb9fabdb097d58059e103f01b465055c1deb SHA512 67db0338992e39b5ae83756d7f89f1e9195b624c24ba08124ee25cc5e3ce4f09af6d5aa45cd301585cd41f9b71e9de1a82d6afa4a16149d1098377e6e44886f8
DIST dotnet-sdk-7.0.102-linux-arm64.tar.gz 190421818 BLAKE2B 4da3175d5c0cd314ca5f5da6d384f5d5d8f13de04be07f2079e99fbf70a4baf790434a6db64dd83c7218f86900f3c53de88d25377bef32962e088d20bbeb3c11 SHA512 a98abed737214bd61266d1a5d5096ae34537c6bef04696670d88684e9783bab6f6d45823f775648d723c4e031b1bd341f771baa6b265d2b6e5f5158213721627
DIST dotnet-sdk-7.0.102-linux-x64.tar.gz 194841646 BLAKE2B e1a52c149b3fa11ef2a5cc623ed6098c1b97d09d8b23f8a9b3eb8b97d276a05d35d54251eb04852bb4696aae5e003f5fe2a6c4a8f8bab1fd5f4bb524213e29ec SHA512 7667aae20a9e50d31d1fc004cdc5cb033d2682d3aa793dde28fa2869de5ac9114e8215a87447eb734e87073cfe9496c1c9b940133567f12b3a7dea31a813967f
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI="7"

inherit eutils

MY_PV="${PV}"

DESCRIPTION="Common files shared between multiple slots of .NET Core"
HOMEPAGE="https://www.microsoft.com/net/core"
LICENSE="MIT"

SRC_URI="
amd64? ( https://dotnetcli.azureedge.net/dotnet/Sdk/${MY_PV}/dotnet-sdk-${MY_PV}-linux-x64.tar.gz )
arm? ( https://dotnetcli.azureedge.net/dotnet/Sdk/${MY_PV}/dotnet-sdk-${MY_PV}-linux-arm.tar.gz )
arm64? ( https://dotnetcli.azureedge.net/dotnet/Sdk/${MY_PV}/dotnet-sdk-${MY_PV}-linux-arm64.tar.gz )
"

SLOT="0"
KEYWORDS=""

QA_PREBUILT="*"
RESTRICT="splitdebug"

# The sdk includes the runtime-bin and aspnet-bin so prevent from installing at the same time
# dotnetcore-sdk is the source based build

RDEPEND="
~dev-dotnet/dotnetcore-sdk-bin-${PV}
!dev-dotnet/dotnet-sdk[dotnet-symlink(+)]
!dev-dotnet/dotnet-sdk-bin[dotnet-symlink(+)]
"

S=${WORKDIR}

src_prepare() {
default

# For current .NET Core versions, all the directories contain versioned files,
# but the top-level files (the dotnet binary for example) are shared between versions,
# and those are backward-compatible.
# The exception from this above rule is packs/NETStandard.Library.Ref which is shared between >=3.0 versions.
# These common files are installed by the non-slotted dev-dotnet/dotnetcore-sdk-bin-common
# package, while the directories are installed by dev-dotnet/dotnetcore-sdk-bin which uses
# slots depending on major .NET Core version.
# This makes it possible to install multiple major versions at the same time.

# Skip the versioned files (which are located inside sub-directories)
find . -maxdepth 1 -type d ! -name . ! -name packs -exec rm -rf {} \; || die
find ./packs -maxdepth 1 -type d ! -name packs ! -name NETStandard.Library.Ref -exec rm -rf {} \; || die
}

src_install() {
local dest="opt/dotnet_core"
dodir "${dest}"

local ddest="${D}/${dest}"
cp -a "${S}"/* "${ddest}/" || die
dosym "/${dest}/dotnet" "/usr/bin/dotnet"

# set an env-variable for 3rd party tools
echo -n "DOTNET_ROOT=/${dest}" > "${T}/90dotnet"
doenvd "${T}/90dotnet"
}
3 changes: 3 additions & 0 deletions dev-dotnet/dotnetcore-sdk-bin/Manifest
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@ DIST dotnet-sdk-5.0.405-linux-x64.tar.gz 142442372 BLAKE2B 664549356de17535a8680
DIST dotnet-sdk-6.0.102-linux-arm.tar.gz 169190305 BLAKE2B 4f3aa3e2de89f8c360505c4287207bc285090f79e808e8b7637a3e92bbaaf69a6ea12c7296dfb729cb56a6c6e226ee276ff5e8776b439c140aeab5bcedd05824 SHA512 a72a0e81c62478b0dc662ef0aaeb7f96e7dd534e90b3ac1bdab1ca98dd93a4605881dba6e9ed2315781fdf71f5b33acb1aa5e28090c7a1693405bebed5853094
DIST dotnet-sdk-6.0.102-linux-arm64.tar.gz 167109725 BLAKE2B e687b702ce7e2ad5f8abf87eb63716c2e29880b9fa8c10f37ede05f2d59f2426433549a8d535b71f7243f698a014871b6f2de8a2c2b06600bbe8a74fbdb4a8c5 SHA512 790cbf322ca8fed32eaf574f19d0bdc05656c5a88a65aa4dba8269cfce1443cd7cdeecdd3a40e353c368f055490b70592ca7f15f981a66c5b3a9517d0b09e4cb
DIST dotnet-sdk-6.0.102-linux-x64.tar.gz 173139326 BLAKE2B cac49a69635c4f90bafc8e04b42c36e3196f6af8c39da152f16d771a3eff56fa39271c4af441a687cd9189031f6c68de3063a17aa1d21bc303a8172980c802de SHA512 edd79ebad3327032ea0aaa8504c14e3270050bb459b098202676776b41a3a1d282aaefd1e5e8aa09ef7f7cf7c4601c4783a57112ff6e3d427507e8eec2bfb748
DIST dotnet-sdk-7.0.102-linux-arm.tar.gz 190372161 BLAKE2B 29d3ac45b1e8e32f4d086be2ff7b6bb71c7051477c3150e7ecea7a79d521ae732402bdb3e3dd6da1cf33b46f3786bb9fabdb097d58059e103f01b465055c1deb SHA512 67db0338992e39b5ae83756d7f89f1e9195b624c24ba08124ee25cc5e3ce4f09af6d5aa45cd301585cd41f9b71e9de1a82d6afa4a16149d1098377e6e44886f8
DIST dotnet-sdk-7.0.102-linux-arm64.tar.gz 190421818 BLAKE2B 4da3175d5c0cd314ca5f5da6d384f5d5d8f13de04be07f2079e99fbf70a4baf790434a6db64dd83c7218f86900f3c53de88d25377bef32962e088d20bbeb3c11 SHA512 a98abed737214bd61266d1a5d5096ae34537c6bef04696670d88684e9783bab6f6d45823f775648d723c4e031b1bd341f771baa6b265d2b6e5f5158213721627
DIST dotnet-sdk-7.0.102-linux-x64.tar.gz 194841646 BLAKE2B e1a52c149b3fa11ef2a5cc623ed6098c1b97d09d8b23f8a9b3eb8b97d276a05d35d54251eb04852bb4696aae5e003f5fe2a6c4a8f8bab1fd5f4bb524213e29ec SHA512 7667aae20a9e50d31d1fc004cdc5cb033d2682d3aa793dde28fa2869de5ac9114e8215a87447eb734e87073cfe9496c1c9b940133567f12b3a7dea31a813967f
73 changes: 73 additions & 0 deletions dev-dotnet/dotnetcore-sdk-bin/dotnetcore-sdk-bin-7.0.102.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI="7"

inherit eutils

MY_PV="${PV}"

DESCRIPTION=".NET Core SDK - binary precompiled for glibc"
HOMEPAGE="https://www.microsoft.com/net/core"
LICENSE="MIT"

SRC_URI="
amd64? ( https://dotnetcli.azureedge.net/dotnet/Sdk/${MY_PV}/dotnet-sdk-${MY_PV}-linux-x64.tar.gz )
arm? ( https://dotnetcli.azureedge.net/dotnet/Sdk/${MY_PV}/dotnet-sdk-${MY_PV}-linux-arm.tar.gz )
arm64? ( https://dotnetcli.azureedge.net/dotnet/Sdk/${MY_PV}/dotnet-sdk-${MY_PV}-linux-arm64.tar.gz )
"

SLOT="7.0"
KEYWORDS=""

QA_PREBUILT="*"
RESTRICT="splitdebug"

# The sdk includes the runtime-bin and aspnet-bin so prevent from installing at the same time
# dotnetcore-sdk is the source based build

RDEPEND="
app-crypt/mit-krb5
>=dev-dotnet/dotnetcore-sdk-bin-common-${PV}
dev-libs/icu
|| ( dev-libs/openssl dev-libs/openssl-compat:1.0.0 )
dev-util/lldb
dev-util/lttng-ust
net-misc/curl
sys-apps/lsb-release
sys-devel/llvm
sys-libs/libunwind
sys-libs/zlib"

S=${WORKDIR}

src_prepare() {
default

# For current .NET Core versions, all the directories contain versioned files,
# but the top-level files (the dotnet binary for example) are shared between versions,
# and those are backward-compatible.
# The exception from this above rule is packs/NETStandard.Library.Ref which is shared between >=3.0 versions.
# These common files are installed by the non-slotted dev-dotnet/dotnetcore-sdk-bin-common
# package, while the directories are installed by dev-dotnet/dotnetcore-sdk-bin which uses
# slots depending on major .NET Core version.
# This makes it possible to install multiple major versions at the same time.

# Skip the common files
find . -maxdepth 1 -type f -exec rm -f {} \; || die
rm -rf ./packs/NETStandard.Library.Ref || die

# 6.0.100 is SDK feature band which will not change between minor increases, so 6.0.101, 6.102
# will still have same 6.0.100 SDK feature band in the name. Thus I have to hard code this
# https://github.com/dotnet/sdk/pull/18823#issuecomment-915603684
local workloads="metadata/workloads/${SLOT}.100"
{ mkdir -p "${workloads}" && touch "${workloads}/userlocal"; } || die
}

src_install() {
local dest="opt/dotnet_core"
dodir "${dest}"

local ddest="${D}/${dest}"
cp -a "${S}"/* "${ddest}/" || die
}

0 comments on commit 1605277

Please sign in to comment.