commit: 3056d6a03ad66ac28d3d941722bf453e446403ab Author: ArsenShnurkov <Arsen.Shnurkov <AT> gmail <DOT> com> AuthorDate: Wed Oct 28 08:23:58 2015 +0000 Commit: Heather Cynede <cynede <AT> gentoo <DOT> org> CommitDate: Wed Oct 28 14:14:10 2015 +0000 URL: https://gitweb.gentoo.org/proj/dotnet.git/commit/?id=3056d6a0
rename ebuild file dev-dotnet/NLog/NLog-4.1.3_pre-r201510280.ebuild | 82 ++++++++++++++++++++++++ dev-dotnet/NLog/files/NLog.mono4.sln.patch | 43 +++++++++++++ dev-dotnet/NLog/files/NLog.nuspec.patch | 14 ++++ dev-dotnet/NLog/files/NoStdLib-NoConfig.patch | 81 +++++++++++++++++++++++ dev-dotnet/NLog/metadata.xml | 13 ++++ eclass/nuget.eclass | 35 +--------- eclass/nupkg.eclass | 53 +++++++++++++++ 7 files changed, 287 insertions(+), 34 deletions(-) diff --git a/dev-dotnet/NLog/NLog-4.1.3_pre-r201510280.ebuild b/dev-dotnet/NLog/NLog-4.1.3_pre-r201510280.ebuild new file mode 100644 index 0000000..64908ad --- /dev/null +++ b/dev-dotnet/NLog/NLog-4.1.3_pre-r201510280.ebuild @@ -0,0 +1,82 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +inherit mono-env dotnet nupkg + +NAME="NLog" +HOMEPAGE="https://github.com/ArsenShnurkov/${NAME}" + +EGIT_BRANCH="MONO_4_0" +EGIT_COMMIT="c3eb07ff89523154dc2385c7db0ba9437bff3362" +SRC_URI="${HOMEPAGE}/archive/${EGIT_BRANCH}/${EGIT_COMMIT}.zip -> ${PF}.zip" +S="${WORKDIR}/${NAME}-${EGIT_COMMIT}" + +SLOT="0" + +DESCRIPTION=" NLog - Advanced .NET and Silverlight Logging http://nlog-project.org" +LICENSE="BSD" # https://github.com/ArsenShnurkov/NLog/blob/master/LICENSE.txt +KEYWORDS="~amd64 ~ppc ~x86" +#USE_DOTNET="net20 net40 net45" +USE_DOTNET="net45" + +# USE Flag 'net45' not in IUSE for dev-dotnet/NLog-4.1.3_pre-r201510280 +IUSE="net45 +gac +nupkg developer debug doc" + +COMMON_DEPEND=">=dev-lang/mono-4.0.2.5 +" +RDEPEND="${COMMON_DEPEND} +" +DEPEND="${COMMON_DEPEND} +" + +S="${WORKDIR}/${NAME}-${EGIT_BRANCH}" +FILE_TO_BUILD=./src/NLog.mono4.sln +METAFILETOBUILD="${S}/${FILE_TO_BUILD}" + +NUGET_VERSION=${PV//_pre/.0} + +src_prepare() { + chmod -R +rw "${S}" || die + + # enuget_restore is commented out, because it give errors: + # Unable to find version '1.6.4375' of package 'StatLight'. + # Unable to find version '1.9.2' of package 'xunit.runners'. + #enuget_restore "${METAFILETOBUILD}" + + epatch "${FILESDIR}/NLog.mono4.sln.patch" + epatch "${FILESDIR}/NoStdLib-NoConfig.patch" + epatch "${FILESDIR}/NLog.nuspec.patch" +} + +# cd /var/lib/layman/dotnet +# ebuild ./dev-dotnet/NLog/NLog-4.1.3_pre-r201510280.ebuild compile +src_compile() { + exbuild "${METAFILETOBUILD}" + + einfo Package name ${PN} + + enuspec -Prop BuildVersion=${NUGET_VERSION} ./src/NuGet/NLog/NLog.nuspec + # Successfully created package '/var/tmp/portage/dev-dotnet/NLog-4.1.3_pre-r201510280/work/NLog.4.1.3.0.nupkg'. +} + +src_install() { + if use debug; then + DIR="Debug" + else + DIR="Release" + fi + + if use gac; then + egacinstall "${S}/build/bin/${DIR}/Mono 4.x/NLog.dll" + egacinstall "${S}/build/bin/${DIR}/Mono 4.x/NLog.Extended.dll" + fi + + if use doc; then +# doins xml comments file + doins LICENSE.txt + fi + + enupkg "${WORKDIR}/NLog.${NUGET_VERSION}.nupkg" +} diff --git a/dev-dotnet/NLog/files/NLog.mono4.sln.patch b/dev-dotnet/NLog/files/NLog.mono4.sln.patch new file mode 100644 index 0000000..035c6c9 --- /dev/null +++ b/dev-dotnet/NLog/files/NLog.mono4.sln.patch @@ -0,0 +1,43 @@ +diff --git a/src/NLog.mono4.sln b/src/NLog.mono4.sln +index 1a9e752..75786e4 100644 +--- a/src/NLog.mono4.sln ++++ b/src/NLog.mono4.sln +@@ -16,38 +16,27 @@ EndProject + Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU +- Default|Any CPU = Default|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {2D85AAFA-76B0-4271-8AA8-42BBD796FD39}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2D85AAFA-76B0-4271-8AA8-42BBD796FD39}.Debug|Any CPU.Build.0 = Debug|Any CPU +- {2D85AAFA-76B0-4271-8AA8-42BBD796FD39}.Default|Any CPU.ActiveCfg = Debug|Any CPU +- {2D85AAFA-76B0-4271-8AA8-42BBD796FD39}.Default|Any CPU.Build.0 = Debug|Any CPU + {2D85AAFA-76B0-4271-8AA8-42BBD796FD39}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2D85AAFA-76B0-4271-8AA8-42BBD796FD39}.Release|Any CPU.Build.0 = Release|Any CPU + {5CCB56C3-4A6E-4C11-960B-2877099F52CE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5CCB56C3-4A6E-4C11-960B-2877099F52CE}.Debug|Any CPU.Build.0 = Debug|Any CPU +- {5CCB56C3-4A6E-4C11-960B-2877099F52CE}.Default|Any CPU.ActiveCfg = Debug|Any CPU +- {5CCB56C3-4A6E-4C11-960B-2877099F52CE}.Default|Any CPU.Build.0 = Debug|Any CPU + {5CCB56C3-4A6E-4C11-960B-2877099F52CE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5CCB56C3-4A6E-4C11-960B-2877099F52CE}.Release|Any CPU.Build.0 = Release|Any CPU + {E7AB20BF-6920-442A-B876-CC05BC5CEC79}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E7AB20BF-6920-442A-B876-CC05BC5CEC79}.Debug|Any CPU.Build.0 = Debug|Any CPU +- {E7AB20BF-6920-442A-B876-CC05BC5CEC79}.Default|Any CPU.ActiveCfg = Debug|Any CPU + {E7AB20BF-6920-442A-B876-CC05BC5CEC79}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E7AB20BF-6920-442A-B876-CC05BC5CEC79}.Release|Any CPU.Build.0 = Release|Any CPU + {F801A1F9-1024-4446-BF9E-A923137340B8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F801A1F9-1024-4446-BF9E-A923137340B8}.Debug|Any CPU.Build.0 = Debug|Any CPU +- {F801A1F9-1024-4446-BF9E-A923137340B8}.Default|Any CPU.ActiveCfg = Debug|Any CPU + {F801A1F9-1024-4446-BF9E-A923137340B8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F801A1F9-1024-4446-BF9E-A923137340B8}.Release|Any CPU.Build.0 = Release|Any CPU + {FE0A3713-E9A8-41F0-89FA-C1126F8FB6A8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU +- {FE0A3713-E9A8-41F0-89FA-C1126F8FB6A8}.Debug|Any CPU.Build.0 = Debug|Any CPU +- {FE0A3713-E9A8-41F0-89FA-C1126F8FB6A8}.Default|Any CPU.ActiveCfg = Debug|Any CPU +- {FE0A3713-E9A8-41F0-89FA-C1126F8FB6A8}.Default|Any CPU.Build.0 = Debug|Any CPU + {FE0A3713-E9A8-41F0-89FA-C1126F8FB6A8}.Release|Any CPU.ActiveCfg = Release|Any CPU +- {FE0A3713-E9A8-41F0-89FA-C1126F8FB6A8}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE diff --git a/dev-dotnet/NLog/files/NLog.nuspec.patch b/dev-dotnet/NLog/files/NLog.nuspec.patch new file mode 100644 index 0000000..1c00afb --- /dev/null +++ b/dev-dotnet/NLog/files/NLog.nuspec.patch @@ -0,0 +1,14 @@ +diff --git a/src/NuGet/NLog/NLog.nuspec b/src/NuGet/NLog/NLog.nuspec +index 273ed21..305451b 100644 +--- a/src/NuGet/NLog/NLog.nuspec ++++ b/src/NuGet/NLog/NLog.nuspec +@@ -17,4 +17,8 @@ For your main project also need to install "NLog Configuration" package.</descri + <licenseUrl>http://raw.github.com/NLog/NLog/master/LICENSE.txt</licenseUrl> + <tags>logging, log, tracing, logfiles, NLog</tags> + </metadata> ++ <files> ++ <file src="build/bin/$configuration$/Mono 4.x/NLog.dll" target="lib\net45\" /> ++ <file src="build/bin/$configuration$/Mono 4.x/NLog.Extended.dll" target="lib\net45\" /> ++ </files> + </package> +\ No newline at end of file diff --git a/dev-dotnet/NLog/files/NoStdLib-NoConfig.patch b/dev-dotnet/NLog/files/NoStdLib-NoConfig.patch new file mode 100644 index 0000000..f9f55b6 --- /dev/null +++ b/dev-dotnet/NLog/files/NoStdLib-NoConfig.patch @@ -0,0 +1,81 @@ +diff --git a/src/NLog.Extended/NLog.Extended.mono4.csproj b/src/NLog.Extended/NLog.Extended.mono4.csproj +index 80eac6b..4c8bf1b 100644 +--- a/src/NLog.Extended/NLog.Extended.mono4.csproj ++++ b/src/NLog.Extended/NLog.Extended.mono4.csproj +@@ -8,8 +8,6 @@ + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <ErrorReport>prompt</ErrorReport> + <FileAlignment>512</FileAlignment> +- <NoStdLib>true</NoStdLib> +- <NoConfig>true</NoConfig> + <OutputType>Library</OutputType> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ProjectGuid>{F801A1F9-1024-4446-BF9E-A923137340B8}</ProjectGuid> +diff --git a/src/NLog/NLog.mono4.csproj b/src/NLog/NLog.mono4.csproj +index cf48986..d0a07f1 100644 +--- a/src/NLog/NLog.mono4.csproj ++++ b/src/NLog/NLog.mono4.csproj +@@ -8,8 +8,6 @@ + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <ErrorReport>prompt</ErrorReport> + <FileAlignment>512</FileAlignment> +- <NoConfig>true</NoConfig> +- <NoStdLib>true</NoStdLib> + <NoWarn>0419</NoWarn> + <OutputType>Library</OutputType> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> +diff --git a/src/NLogAutoLoadExtension/NLogAutoLoadExtension.mono4.csproj b/src/NLogAutoLoadExtension/NLogAutoLoadExtension.mono4.csproj +index 02fa2ca..7798377 100644 +--- a/src/NLogAutoLoadExtension/NLogAutoLoadExtension.mono4.csproj ++++ b/src/NLogAutoLoadExtension/NLogAutoLoadExtension.mono4.csproj +@@ -21,7 +21,6 @@ + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + <OutputPath>bin\Debug</OutputPath> +- <NoStdLib>true</NoStdLib> + <IntermediateOutputPath>$(BaseOutputDirectory)obj\$(Configuration)\Mono 4.x</IntermediateOutputPath> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> +@@ -32,12 +31,9 @@ + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + <OutputPath>bin\Release</OutputPath> +- <NoStdLib>true</NoStdLib> + <IntermediateOutputPath>$(BaseOutputDirectory)obj\$(Configuration)\Mono 4.x</IntermediateOutputPath> + </PropertyGroup> + <PropertyGroup> +- <NoStdLib>true</NoStdLib> +- <NoConfig>true</NoConfig> + <OutputPath>$(BaseOutputDirectory)bin\$(Configuration)\Mono 4.x</OutputPath> + <IntermediateOutputPath>$(BaseOutputDirectory)obj\$(Configuration)\Mono 4.x</IntermediateOutputPath> + </PropertyGroup> +diff --git a/tests/SampleExtensions/SampleExtensions.mono4.csproj b/tests/SampleExtensions/SampleExtensions.mono4.csproj +index e3d0803..d84de8d 100644 +--- a/tests/SampleExtensions/SampleExtensions.mono4.csproj ++++ b/tests/SampleExtensions/SampleExtensions.mono4.csproj +@@ -17,8 +17,6 @@ + <DebugType>full</DebugType> + <Optimize>false</Optimize> + <DefineConstants>DEBUG;TRACE</DefineConstants> +- <NoStdLib>true</NoStdLib> +- <NoConfig>true</NoConfig> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + <IntermediateOutputPath>$(BaseOutputDirectory)obj\$(Configuration)\Mono 4.x</IntermediateOutputPath> +@@ -28,16 +26,12 @@ + <DebugType>pdbonly</DebugType> + <Optimize>true</Optimize> + <DefineConstants>TRACE</DefineConstants> +- <NoStdLib>true</NoStdLib> +- <NoConfig>true</NoConfig> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + <IntermediateOutputPath>$(BaseOutputDirectory)obj\$(Configuration)\Mono 4.x</IntermediateOutputPath> + <OutputPath>$(BaseOutputDirectory)bin\$(Configuration)\Mono 4.x</OutputPath> + </PropertyGroup> + <PropertyGroup> +- <NoStdLib>true</NoStdLib> +- <NoConfig>true</NoConfig> + <DefineConstants>MONO;MONO4_0;$(DefineConstants)</DefineConstants> + <OutputPath>$(BaseOutputDirectory)bin\$(Configuration)\Mono 4.x</OutputPath> + <IntermediateOutputPath>$(BaseOutputDirectory)obj\$(Configuration)\Mono 4.x</IntermediateOutputPath> diff --git a/dev-dotnet/NLog/metadata.xml b/dev-dotnet/NLog/metadata.xml new file mode 100644 index 0000000..5c0862c --- /dev/null +++ b/dev-dotnet/NLog/metadata.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>dotnet</herd> + <maintainer> + <email>[email protected]</email> + <name>dotnet</name> + </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/eclass/nuget.eclass b/eclass/nuget.eclass index 1561fd6..d742265 100644 --- a/eclass/nuget.eclass +++ b/eclass/nuget.eclass @@ -18,39 +18,6 @@ enuget_restore() { nuget restore "$@" || die } -# @FUNCTION: enuspec -# @DESCRIPTION: run nuget pack -# accepts path to .nuspec file as parameter -enuspec() { - if use nupkg; then - if use debug; then - PROPS=Configuration=Debug - else - PROPS=Configuration=Release - fi - nuget pack -Properties "${PROPS}" -BasePath "${S}" -OutputDirectory "${WORKDIR}" -NonInteractive -Verbosity detailed "$@" || die - fi -} - -# @FUNCTION: enupkg -# @DESCRIPTION: installs .nupkg into local repository -# accepts path to .nupkg file as parameter -enupkg() { - if use nupkg; then - if [ -d "/var/calculate/remote/distfiles" ]; then - # Control will enter here if the directory exist. - # this is necessary to handle calculate linux profiles feature (for corporate users) - elog "Installing .nupkg into /var/calculate/remote/packages/NuGet" - insinto /var/calculate/remote/packages/NuGet - else - # this is for all normal gentoo-based distributions - elog "Installing .nupkg into /usr/local/nuget/nupkg" - insinto /usr/local/nuget/nupkg - fi - doins "$@" - fi -} - # @ECLASS_VARIABLE: NUGET_DEPEND # @DESCRIPTION Set false to net depend on nuget : ${NUGET_NO_DEPEND:=} @@ -60,7 +27,7 @@ if [[ -n $NUGET_NO_DEPEND ]]; then fi NPN=${PN/_/.} -if [[ $PV == *_alpha* ]] +if [[ $PV == *_alpha* ]] || [[ $PV == *_beta* ]] || [[ $PV == *_pre* ]] then NPV=${PVR/_/-} else diff --git a/eclass/nupkg.eclass b/eclass/nupkg.eclass new file mode 100644 index 0000000..398c4ab --- /dev/null +++ b/eclass/nupkg.eclass @@ -0,0 +1,53 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +# @ECLASS: nupkg.eclass +# @MAINTAINER: [email protected] +# @BLURB: Functions for building and maintaining local nuget packages repository +# @DESCRIPTION: Common functionality needed by fake build system. + +inherit dotnet + +# @FUNCTION: enuspec +# @DESCRIPTION: run nuget pack +# accepts path to .nuspec file as parameter +enuspec() { + if use nupkg; then + # see http://docs.nuget.org/create/nuspec-reference#specifying-files-to-include-in-the-package + # for the explaination why $configuration$ property is passed + if use debug; then + PROPS=configuration=Debug + else + PROPS=configuration=Release + fi + nuget pack -Properties "${PROPS}" -BasePath "${S}" -OutputDirectory "${WORKDIR}" -NonInteractive -Verbosity detailed "$@" || die + fi +} + +# @FUNCTION: enupkg +# @DESCRIPTION: installs .nupkg into local repository +# accepts path to .nupkg file as parameter +enupkg() { + if use nupkg; then + if [ -d "/var/calculate/remote/distfiles" ]; then + # Control will enter here if the directory exist. + # this is necessary to handle calculate linux profiles feature (for corporate users) + elog "Installing .nupkg into /var/calculate/remote/packages/NuGet" + insinto /var/calculate/remote/packages/NuGet + else + # this is for all normal gentoo-based distributions + elog "Installing .nupkg into /usr/local/nuget/nupkg" + insinto /usr/local/nuget/nupkg + fi + doins "$@" + fi +} + +# @ECLASS_VARIABLE: NUGET_DEPEND +# @DESCRIPTION Set false to net depend on nuget +: ${NUGET_NO_DEPEND:=} + +if [[ -n $NUGET_NO_DEPEND ]]; then + DEPEND+=" dev-dotnet/nuget" +fi
