commit: 6747077fa58f0ab09aaa000e182a88d14c3ba456 Author: ArsenShnurkov <Arsen.Shnurkov <AT> gmail <DOT> com> AuthorDate: Fri Sep 2 07:06:31 2016 +0000 Commit: Mikhail Pukhlikov <cynede <AT> gentoo <DOT> org> CommitDate: Fri Sep 2 07:06:31 2016 +0000 URL: https://gitweb.gentoo.org/proj/dotnet.git/commit/?id=6747077f
initial version .../files/Microsoft.AspNet.Mvc.nuspec | 24 ++++++ .../files/disable-warning-as-error-in-mvc.patch | 11 +++ .../files/disable-warning-as-error.patch | 11 +++ dev-dotnet/system-web-mvc/metadata.xml | 12 +++ .../system-web-mvc-5.2.3_p2014092400.ebuild | 92 ++++++++++++++++++++++ 5 files changed, 150 insertions(+) diff --git a/dev-dotnet/system-web-mvc/files/Microsoft.AspNet.Mvc.nuspec b/dev-dotnet/system-web-mvc/files/Microsoft.AspNet.Mvc.nuspec new file mode 100644 index 0000000..13e3970 --- /dev/null +++ b/dev-dotnet/system-web-mvc/files/Microsoft.AspNet.Mvc.nuspec @@ -0,0 +1,24 @@ +<?xml version="1.0"?> +<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd"> + <metadata> + <id>Microsoft.AspNet.Mvc</id> + <version>$BuildVersion$</version> + <title>Microsoft ASP.NET MVC</title> + <authors>Microsoft</authors> + <owners>Microsoft,aspnet</owners> + <licenseUrl>http://www.microsoft.com/web/webpi/eula/net_library_eula_ENU.htm</licenseUrl> + <projectUrl>http://www.asp.net/mvc</projectUrl> + <iconUrl>http://go.microsoft.com/fwlink/?LinkID=288859</iconUrl> + <requireLicenseAcceptance>true</requireLicenseAcceptance> + <description>This package contains the runtime assemblies for ASP.NET MVC. ASP.NET MVC gives you a powerful, patterns-based way to build dynamic websites that enables a clean separation of concerns and that gives you full control over markup.</description> + <summary>This package contains the runtime assemblies for ASP.NET MVC.</summary> + <releaseNotes>Please visit http://go.microsoft.com/fwlink/?LinkID=403009 to view the release notes.</releaseNotes> + <copyright>© Microsoft Corporation. All rights reserved.</copyright> + <language>en-US</language> + <tags>Microsoft AspNet Mvc AspNetMvc</tags> + <dependencies> + <dependency id="Microsoft.AspNet.WebPages" version="[3.2.3, 3.3.0)" /> + <dependency id="Microsoft.AspNet.Razor" version="[3.2.3, 3.3.0)" /> + </dependencies> + </metadata> +</package> \ No newline at end of file diff --git a/dev-dotnet/system-web-mvc/files/disable-warning-as-error-in-mvc.patch b/dev-dotnet/system-web-mvc/files/disable-warning-as-error-in-mvc.patch new file mode 100644 index 0000000..3c70a57 --- /dev/null +++ b/dev-dotnet/system-web-mvc/files/disable-warning-as-error-in-mvc.patch @@ -0,0 +1,11 @@ +diff -u a/src/System.Web.Mvc/System.Web.Mvc.csproj b/src/System.Web.Mvc/System.Web.Mvc.csproj +--- a/src/System.Web.Mvc/System.Web.Mvc.csproj 2014-09-25 08:41:35.000000000 +0400 ++++ b/src/System.Web.Mvc/System.Web.Mvc.csproj 2016-09-02 09:56:20.154191569 +0300 +@@ -11,6 +11,7 @@ + <RunCodeAnalysis>$(CodeAnalysis)</RunCodeAnalysis> + <CodeAnalysisRuleSet>..\Strict.ruleset</CodeAnalysisRuleSet> + <DefineConstants>$(DefineConstants);ASPNETMVC</DefineConstants> ++ <TreatWarningsAsErrors>false</TreatWarningsAsErrors> + <NoWarn>1591</NoWarn> + <BaseAddress>1609891840</BaseAddress> + </PropertyGroup> diff --git a/dev-dotnet/system-web-mvc/files/disable-warning-as-error.patch b/dev-dotnet/system-web-mvc/files/disable-warning-as-error.patch new file mode 100644 index 0000000..d8fbfbf --- /dev/null +++ b/dev-dotnet/system-web-mvc/files/disable-warning-as-error.patch @@ -0,0 +1,11 @@ +diff -u a/src/System.Web.WebPages/System.Web.WebPages.csproj b/src/System.Web.WebPages/System.Web.WebPages.csproj +--- a/src/System.Web.WebPages/System.Web.WebPages.csproj 2016-09-02 07:36:21.000000000 +0300 ++++ b/src/System.Web.WebPages/System.Web.WebPages.csproj 2016-09-02 07:39:47.965011321 +0300 +@@ -11,6 +11,7 @@ + <RunCodeAnalysis>$(CodeAnalysis)</RunCodeAnalysis> + <CodeAnalysisRuleSet>..\Strict.ruleset</CodeAnalysisRuleSet> + <DefineConstants>$(DefineConstants);ASPNETWEBPAGES</DefineConstants> ++ <TreatWarningsAsErrors>false</TreatWarningsAsErrors> + <NoWarn>1591</NoWarn> + </PropertyGroup> + <ItemGroup> diff --git a/dev-dotnet/system-web-mvc/metadata.xml b/dev-dotnet/system-web-mvc/metadata.xml new file mode 100644 index 0000000..166e76b --- /dev/null +++ b/dev-dotnet/system-web-mvc/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>[email protected]</email> + <description>Gentoo Dotnet Project</description> + </maintainer> + <use> + <flag name='developer'>enables debug information for any of debug and release builds</flag> + <flag name='nupkg'>creates local nuget package</flag> + </use> +</pkgmetadata> diff --git a/dev-dotnet/system-web-mvc/system-web-mvc-5.2.3_p2014092400.ebuild b/dev-dotnet/system-web-mvc/system-web-mvc-5.2.3_p2014092400.ebuild new file mode 100644 index 0000000..9ad1b47 --- /dev/null +++ b/dev-dotnet/system-web-mvc/system-web-mvc-5.2.3_p2014092400.ebuild @@ -0,0 +1,92 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=6 +inherit mono-env gac nupkg + +REPO_NAME="aspnetwebstack" +HOMEPAGE="https://github.com/ASP-NET-MVC/aspnetwebstack" + +EGIT_BRANCH="master" +EGIT_COMMIT="4e40cdef9c8a8226685f95ef03b746bc8322aa92" +SRC_URI="${HOMEPAGE}/archive/${EGIT_BRANCH}/${EGIT_COMMIT}.tar.gz -> ${REPO_NAME}-${EGIT_COMMIT}.tar.gz" +RESTRICT="mirror" +#S="${WORKDIR}/${REPO_NAME}-${EGIT_COMMIT}" +S="${WORKDIR}/${REPO_NAME}-${EGIT_BRANCH}" + +SLOT="0" + +DESCRIPTION="parser and code generation infrastructure for Razor markup syntax" +LICENSE="Apache-2.0" +KEYWORDS="~amd64 ~x86" +#USE_DOTNET="net45 net40 net20" +USE_DOTNET="net45" + +IUSE="+${USE_DOTNET} developer debug" + +COMMON_DEPEND=">=dev-lang/mono-4.0.2.5 +" +RDEPEND="${COMMON_DEPEND} +" +DEPEND="${COMMON_DEPEND} +" + +DLL_NAME=System.Web.Mvc +DLL_PATH=bin +FILE_TO_BUILD=./src/${DLL_NAME}/${DLL_NAME}.csproj +METAFILETOBUILD="${S}/${FILE_TO_BUILD}" + +NUSPEC_ID=Microsoft.AspNet.Mvc + +COMMIT_DATE_INDEX="$(get_version_component_count ${PV} )" +COMMIT_DATE="$(get_version_component_range $COMMIT_DATE_INDEX ${PV} )" +NUSPEC_VERSION=$(get_version_component_range 1-3)"${COMMIT_DATE//p/.}" + +src_prepare() { + cp "${FILESDIR}/${NUSPEC_ID}.nuspec" "${S}" || die + chmod -R +rw "${S}" || die + patch_nuspec_file "${S}/${NUSPEC_ID}.nuspec" + eapply "${FILESDIR}/disable-warning-as-error.patch" + eapply "${FILESDIR}/disable-warning-as-error-in-mvc.patch" + eapply_user +} + +patch_nuspec_file() +{ + if use nupkg; then + if use debug; then + DIR="Debug" + else + DIR="Release" + fi + FILES_STRING=`sed 's/[\/&]/\\\\&/g' <<-EOF || die "escaping replacement string characters" + <files> <!-- https://docs.nuget.org/create/nuspec-reference --> + <file src="${DLL_PATH}/${DIR}/${DLL_NAME}.*" target="lib/net45/" /> + </files> + EOF + ` + sed -i 's/<\/package>/'"${FILES_STRING//$'\n'/\\$'\n'}"'\n&/g' $1 || die "escaping line endings" + fi +} + +src_compile() { + exbuild "${METAFILETOBUILD}" + + einfo nuspec: "${S}/${NUSPEC_ID}.nuspec" + einfo nupkg: "${WORKDIR}/${NUSPEC_ID}.${NUSPEC_VERSION}.nupkg" + + enuspec -Prop BuildVersion=${NUSPEC_VERSION} "${S}/${NUSPEC_ID}.nuspec" +} + +src_install() { + if use debug; then + DIR="Debug" + else + DIR="Release" + fi + +# egacinstall + + enupkg "${WORKDIR}/${NUSPEC_ID}.${NUSPEC_VERSION}.nupkg" +}
