commit: b52fa659442ac3afa6a16a1af96698cefd353e59 Author: Ben Sagal <bsagal <AT> gmail <DOT> com> AuthorDate: Mon Sep 19 13:02:33 2016 +0000 Commit: Mikhail Pukhlikov <cynede <AT> gentoo <DOT> org> CommitDate: Mon Sep 19 13:02:33 2016 +0000 URL: https://gitweb.gentoo.org/proj/dotnet.git/commit/?id=b52fa659
Add dontnet-cli 1.0.0-preview2-003131 for .NET core 1.0.1 closes gentoo/dotnet#242 .../dotnet-cli-1.0.0_pre2_p003131.ebuild | 127 +++++++++++++++++++++ .../coreclr-1.0.4-gcc6-github-pull-5304.patch | 28 +++++ .../files/coreclr-1.0.4-icu57-commit-352df35.patch | 42 +++++++ 3 files changed, 197 insertions(+) diff --git a/dev-dotnet/dotnet-cli/dotnet-cli-1.0.0_pre2_p003131.ebuild b/dev-dotnet/dotnet-cli/dotnet-cli-1.0.0_pre2_p003131.ebuild new file mode 100644 index 0000000..fc0d624 --- /dev/null +++ b/dev-dotnet/dotnet-cli/dotnet-cli-1.0.0_pre2_p003131.ebuild @@ -0,0 +1,127 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +#BASED ON https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=dotnet-cli + +EAPI="6" + +CORE_V=1.0.1 +CORECLR_V=1.0.4 +COREFX_V=1.0.0 + +BASE_PV=${PV%_p*} +P_BUILD=${PV##*_p} +DIST='debian-x64' + +MY_BASE_PV=${BASE_PV/_pre/-preview} + +MY_PV=${MY_BASE_PV}-${P_BUILD} +MY_P=${PN}-${MY_PV} + + +CORECLR=coreclr-${CORECLR_V} +COREFX=corefx-${COREFX_V} + +DESCRIPTION=".NET Core cli utility for building, testing, packaging and running projects" +HOMEPAGE="https://www.microsoft.com/net/core" +LICENSE="MIT" + +IUSE="" +SRC_URI="https://github.com/dotnet/coreclr/archive/v${CORECLR_V}.tar.gz -> ${CORECLR}.tar.gz + https://github.com/dotnet/corefx/archive/v${COREFX_V}.tar.gz -> ${COREFX}.tar.gz + https://download.microsoft.com/download/1/5/2/1523EBE1-3764-4328-8961-D1BD8ECA9295/dotnet-dev-${DIST}.${MY_PV}.tar.gz" + +SLOT="0" +KEYWORDS="~amd64" + +RDEPEND=" + >=sys-devel/llvm-3.7.1-r3[lldb] + >=sys-libs/libunwind-1.1-r1 + >=dev-libs/icu-57.1 + >=dev-util/lttng-ust-2.8.1 + >=dev-libs/openssl-1.0.2h-r2 + >=net-misc/curl-7.49.0 + >=app-crypt/mit-krb5-1.14.2 + >=sys-libs/zlib-1.2.8-r1 " +DEPEND="${RDEPEND} + >=dev-util/cmake-3.3.1-r1 + >=sys-devel/make-4.1-r1 + >=sys-devel/clang-3.7.1-r100 + >=sys-devel/gettext-0.19.7" + +PATCHES=( + "${FILESDIR}/${CORECLR}-icu57-commit-352df35.patch" + "${FILESDIR}/${CORECLR}-gcc6-github-pull-5304.patch" +) + +S=${WORKDIR} +CLI_S="${S}/dotnet_cli" +CORECLR_S="${S}/${CORECLR}" +COREFX_S="${S}/${COREFX}" + +CORECLR_FILES=( + 'libclrjit.so' + 'libcoreclr.so' + 'libcoreclrtraceptprovider.so' + 'libdbgshim.so' + 'libmscordaccore.so' + 'libmscordbi.so' + 'libsos.so' + 'libsosplugin.so' + 'System.Globalization.Native.so' +) + +COREFX_FILES=( + 'System.IO.Compression.Native.so' + 'System.Native.a' + 'System.Native.so' + 'System.Net.Http.Native.so' + 'System.Net.Security.Native.so' + 'System.Security.Cryptography.Native.so' +) + +src_unpack() { + unpack "${CORECLR}.tar.gz" "${COREFX}.tar.gz" + mkdir "${CLI_S}" || die + cd "${CLI_S}" || die + unpack "dotnet-dev-${DIST}.${MY_PV}.tar.gz" +} + +src_prepare() { + for file in "${CORECLR_FILES[@]}"; do + rm "${CLI_S}/shared/Microsoft.NETCore.App/${CORE_V}/${file}" + done + for file in "${COREFX_FILES[@]}"; do + rm "${CLI_S}/shared/Microsoft.NETCore.App/${CORE_V}/${file}" + done + default_src_prepare +} + +src_compile() { + cd "${S}/${CORECLR}" || die + ./build.sh x64 release || die + + cd "${S}/${COREFX}" || die + ./build.sh native x64 release || die +} + +src_install() { + local dest="/opt/dotnet_cli" + local ddest="${D}/${dest}" + local ddest_core="${ddest}/shared/Microsoft.NETCore.App/${CORE_V}/" + + dodir "${dest}" + cp -pPR "${CLI_S}"/* "${ddest}" || die + + for file in "${CORECLR_FILES[@]}"; do + cp -pP "${CORECLR}/bin/Product/Linux.x64.Release/${file}" "${ddest_core}" || die + done + + for file in "${COREFX_FILES[@]}"; do + cp -pP "${COREFX}/bin/Linux.x64.Release/Native/${file}" "${ddest_core}" || die + done + + dosym "../../opt/dotnet_cli/dotnet" "/usr/bin/dotnet" + +} diff --git a/dev-dotnet/dotnet-cli/files/coreclr-1.0.4-gcc6-github-pull-5304.patch b/dev-dotnet/dotnet-cli/files/coreclr-1.0.4-gcc6-github-pull-5304.patch new file mode 100644 index 0000000..4455740 --- /dev/null +++ b/dev-dotnet/dotnet-cli/files/coreclr-1.0.4-gcc6-github-pull-5304.patch @@ -0,0 +1,28 @@ +From 41912e3adb789b62f4cb46acffe915b6f1ab0e1e Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?J=C3=BCrgen=20H=C3=B6tzel?= <[email protected]> +Date: Mon, 30 May 2016 11:45:49 +0200 +Subject: [PATCH] Don't use libstdc++ wrappers for stdlib.h (#5304) + +This prevents #undef of min/max macros. Refs #5006. +--- + src/pal/src/include/pal/palinternal.h | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/pal/src/include/pal/palinternal.h b/src/pal/src/include/pal/palinternal.h +index 4c01be8..fdebc8d 100644 +--- a/coreclr-1.0.4/src/pal/src/include/pal/palinternal.h ++++ b/coreclr-1.0.4/src/pal/src/include/pal/palinternal.h +@@ -567,6 +567,10 @@ function_name() to call the system's implementation + #endif + #include <ctype.h> + ++// Don't use C++ wrappers for stdlib.h ++// https://gcc.gnu.org/ml/libstdc++/2016-01/msg00025.html ++#define _GLIBCXX_INCLUDE_NEXT_C_HEADERS 1 ++ + #define _WITH_GETLINE + #include <stdio.h> + #include <stdlib.h> +-- +2.9.0 + diff --git a/dev-dotnet/dotnet-cli/files/coreclr-1.0.4-icu57-commit-352df35.patch b/dev-dotnet/dotnet-cli/files/coreclr-1.0.4-icu57-commit-352df35.patch new file mode 100644 index 0000000..1b4797d --- /dev/null +++ b/dev-dotnet/dotnet-cli/files/coreclr-1.0.4-icu57-commit-352df35.patch @@ -0,0 +1,42 @@ +From 352df35c124104586ee4c977556cb50ce720af62 Mon Sep 17 00:00:00 2001 +From: Peter Jas <[email protected]> +Date: Mon, 30 May 2016 12:54:02 +0300 +Subject: [PATCH] Fix ucol_setMaxVariable detection for Gentoo Linux (#5309) + +The issue was the symbol is exported by the ICU lib. Including headers +was not enough. The linker requires the libraries to succeed. + +With this fix, CoreCLR successfully builds on Gentoo Linux 100%. +Tested with LXC gentoo container on Ubuntu machine. + +Steps to configure and build: +https://gist.github.com/jasonwilliams200OK/1a2e2c0e904ffa95faf6333fcd88d9b8 + +Fix #5160 +--- + src/corefx/System.Globalization.Native/configure.cmake | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/src/corefx/System.Globalization.Native/configure.cmake b/src/corefx/System.Globalization.Native/configure.cmake +index 4250c7c..138127e 100644 +--- a/coreclr-1.0.4/src/corefx/System.Globalization.Native/configure.cmake ++++ b/coreclr-1.0.4/src/corefx/System.Globalization.Native/configure.cmake +@@ -8,11 +8,18 @@ CHECK_CXX_SOURCE_COMPILES(" + int main() { UDateFormatSymbolType e = UDAT_STANDALONE_SHORTER_WEEKDAYS; } + " HAVE_UDAT_STANDALONE_SHORTER_WEEKDAYS) + ++if(NOT CLR_CMAKE_PLATFORM_DARWIN) ++ set(CMAKE_REQUIRED_LIBRARIES ${ICUUC} ${ICUI18N}) ++else() ++ set(CMAKE_REQUIRED_LIBRARIES ${ICUCORE}) ++endif() ++ + check_symbol_exists( + ucol_setMaxVariable + "unicode/ucol.h" + HAVE_SET_MAX_VARIABLE) + ++unset(CMAKE_REQUIRED_LIBRARIES) + unset(CMAKE_REQUIRED_INCLUDES) + + configure_file(
