commit: 7b316f212e670192162257791d231c7a050ed489 Author: ArsenShnurkov <Arsen.Shnurkov <AT> gmail <DOT> com> AuthorDate: Wed Sep 2 09:21:49 2015 +0000 Commit: Heather Cynede <cynede <AT> gentoo <DOT> org> CommitDate: Wed Sep 2 09:21:49 2015 +0000 URL: https://gitweb.gentoo.org/proj/dotnet.git/commit/?id=7b316f21
SharpZipLib v0.86 .../files/ICSharpCode.SharpZLib.csproj.patch | 57 +++++++++++++++++++ dev-dotnet/sharpziplib/files/SharpZipLib.nuspec | 25 ++++++++ .../files/SharpZipLibTests.csproj.patch | 52 +++++++++++++++++ dev-dotnet/sharpziplib/metadata.xml | 9 +++ .../sharpziplib-0.86.0-r20150714.ebuild | 66 ++++++++++++++++++++++ eclass/dotnet.eclass | 23 +++++++- 6 files changed, 229 insertions(+), 3 deletions(-) diff --git a/dev-dotnet/sharpziplib/files/ICSharpCode.SharpZLib.csproj.patch b/dev-dotnet/sharpziplib/files/ICSharpCode.SharpZLib.csproj.patch new file mode 100644 index 0000000..7b77497 --- /dev/null +++ b/dev-dotnet/sharpziplib/files/ICSharpCode.SharpZLib.csproj.patch @@ -0,0 +1,57 @@ +--- a/src/ICSharpCode.SharpZLib.csproj 2015-09-02 11:36:03.716771861 +0300 ++++ b/src/ICSharpCode.SharpZLib.csproj 2015-09-02 11:36:33.217770819 +0300 +@@ -1,39 +1,42 @@ +-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" xmlns:Conversion="urn:Conversion" ToolsVersion="2.0"> ++<?xml version="1.0" encoding="utf-8"?> ++<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" xmlns:Conversion="urn:Conversion" ToolsVersion="4.0"> + <PropertyGroup> +- <Configuration Condition=" '$(Configuration)' == '' ">Release</Configuration> ++ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> +- <SchemaVersion>2.0</SchemaVersion> + <ProjectGuid>{0E7413FF-EB9E-4714-ACF2-BE3A6A7B2FFD}</ProjectGuid> + <RootNamespace>ICSharpCode.SharpZipLib</RootNamespace> + <AssemblyName>ICSharpCode.SharpZipLib</AssemblyName> + <OutputType>Library</OutputType> +- <ApplicationIcon /> + <WarningLevel>4</WarningLevel> +- <StartupObject /> + <NoStdLib>False</NoStdLib> + <NoConfig>False</NoConfig> + <RunPostBuildEvent>OnOutputUpdated</RunPostBuildEvent> + <PreBuildEvent /> + <PostBuildEvent /> + <DocumentationFile>..\bin\ICSharpCode.SharpZipLib.xml</DocumentationFile> ++ <TargetFrameworkVersion>v4.5</TargetFrameworkVersion> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> +- <DebugSymbols>false</DebugSymbols> + <Optimize>True</Optimize> +- <AllowUnsafeBlocks>False</AllowUnsafeBlocks> +- <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow> + <OutputPath>..\bin\</OutputPath> +- <TreatWarningsAsErrors>false</TreatWarningsAsErrors> + <DebugType>None</DebugType> ++ <RegisterForComInterop>False</RegisterForComInterop> ++ <GenerateSerializationAssemblies>Auto</GenerateSerializationAssemblies> ++ <BaseAddress>4194304</BaseAddress> ++ <FileAlignment>4096</FileAlignment> ++ <PlatformTarget>AnyCPU</PlatformTarget> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <DebugSymbols>true</DebugSymbols> + <Optimize>False</Optimize> +- <AllowUnsafeBlocks>False</AllowUnsafeBlocks> +- <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow> + <OutputPath>..\bin\</OutputPath> +- <TreatWarningsAsErrors>false</TreatWarningsAsErrors> + <DebugType>Full</DebugType> ++ <RegisterForComInterop>False</RegisterForComInterop> ++ <GenerateSerializationAssemblies>Auto</GenerateSerializationAssemblies> ++ <BaseAddress>4194304</BaseAddress> ++ <FileAlignment>4096</FileAlignment> ++ <DefineConstants>NET_2_0</DefineConstants> ++ <PlatformTarget>AnyCPU</PlatformTarget> + </PropertyGroup> + <PropertyGroup Condition=" '$(Platform)' == 'AnyCPU' "> + <RegisterForComInterop>False</RegisterForComInterop> diff --git a/dev-dotnet/sharpziplib/files/SharpZipLib.nuspec b/dev-dotnet/sharpziplib/files/SharpZipLib.nuspec new file mode 100644 index 0000000..d2c6026 --- /dev/null +++ b/dev-dotnet/sharpziplib/files/SharpZipLib.nuspec @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="utf-8"?> +<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd"> + <metadata> + <id>SharpZipLib</id> + <version>@Version@</version> + <title>SharpZipLib</title> + <authors>http://www.icsharpcode.net/</authors> + <owners>http://www.icsharpcode.net/</owners> + <projectUrl>http://icsharpcode.github.io/SharpZipLib/</projectUrl> + <requireLicenseAcceptance>false</requireLicenseAcceptance> + <description>#ziplib (SharpZipLib, formerly NZipLib) is a Zip, GZip, Tar and BZip2 library written entirely in C# for the .NET platform. It is implemented as an assembly (installable in the GAC), and thus can easily be incorporated into other projects (in any .NET language).</description> + <summary>#ziplib (SharpZipLib, formerly NZipLib) is a Zip, GZip, Tar and BZip2 library written entirely in C# for the .NET platform. It is implemented as an assembly (installable in the GAC), and thus can easily be incorporated into other projects (in any .NET language).</summary> + <language>en-US</language> + <iconUrl>http://image.chromefans.org/fileicons/format/zip.png</iconUrl> + <licenseUrl>http://icsharpcode.github.io/SharpZipLib/#license</licenseUrl> + <tags>zip</tags> + <dependencies> + <group targetFramework="net45" /> + </dependencies> + </metadata> + <files> + <!-- * is for .dll and .mdb --> + <file src="bin/*" target="lib/net45/" /> + </files> +</package> diff --git a/dev-dotnet/sharpziplib/files/SharpZipLibTests.csproj.patch b/dev-dotnet/sharpziplib/files/SharpZipLibTests.csproj.patch new file mode 100644 index 0000000..a7167c0 --- /dev/null +++ b/dev-dotnet/sharpziplib/files/SharpZipLibTests.csproj.patch @@ -0,0 +1,52 @@ +--- a/tests/SharpZipLibTests.csproj 2015-07-14 06:39:42.000000000 +0300 ++++ b/tests/SharpZipLibTests.csproj 2015-09-02 11:46:29.000000000 +0300 +@@ -1,8 +1,8 @@ +-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> ++<?xml version="1.0" encoding="utf-8"?> ++<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0"> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> +- <SchemaVersion>2.0</SchemaVersion> + <ProjectGuid>{4F9BF21E-A7FC-4005-A1C7-A17108F7010D}</ProjectGuid> + <RootNamespace>SharpZipLibTests</RootNamespace> + <AssemblyName>SharpZipLibTests</AssemblyName> +@@ -15,23 +15,23 @@ + <BaseAddress>4194304</BaseAddress> + <PlatformTarget>AnyCPU</PlatformTarget> + <FileAlignment>4096</FileAlignment> ++ <TargetFrameworkVersion>v4.5</TargetFrameworkVersion> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <DebugSymbols>true</DebugSymbols> + <Optimize>False</Optimize> +- <AllowUnsafeBlocks>False</AllowUnsafeBlocks> + <CheckForOverflowUnderflow>True</CheckForOverflowUnderflow> + <OutputPath>bin\Debug\</OutputPath> +- <TreatWarningsAsErrors>false</TreatWarningsAsErrors> + <DebugType>Full</DebugType> ++ <StartAction>Program</StartAction> ++ <StartProgram>..\..\..\..\..\..\..\..\..\Bin\Nunit\bin\nunit.exe</StartProgram> ++ <StartArguments>SharpZipLibTests.dll</StartArguments> ++ <StartWorkingDirectory>.</StartWorkingDirectory> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> +- <DebugSymbols>False</DebugSymbols> + <Optimize>True</Optimize> +- <AllowUnsafeBlocks>False</AllowUnsafeBlocks> +- <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow> + <OutputPath>bin\Release\</OutputPath> +- <TreatWarningsAsErrors>False</TreatWarningsAsErrors> ++ <StartArguments>SharpZipLibTests.dll</StartArguments> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)' == 'Debug' "> + <StartAction>Program</StartAction> +@@ -57,7 +57,7 @@ + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\src\ICSharpCode.SharpZLib.csproj"> +- <Project>{18D20629-913A-4474-B2D1-643290E14ED7}</Project> ++ <Project>{0E7413FF-EB9E-4714-ACF2-BE3A6A7B2FFD}</Project> + <Name>ICSharpCode.SharpZLib</Name> + </ProjectReference> + </ItemGroup> diff --git a/dev-dotnet/sharpziplib/metadata.xml b/dev-dotnet/sharpziplib/metadata.xml new file mode 100644 index 0000000..22785a3 --- /dev/null +++ b/dev-dotnet/sharpziplib/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>dotnet</herd> + <maintainer> + <email>dot...@gentoo.org</email> + <name>dotnet</name> + </maintainer> +</pkgmetadata> diff --git a/dev-dotnet/sharpziplib/sharpziplib-0.86.0-r20150714.ebuild b/dev-dotnet/sharpziplib/sharpziplib-0.86.0-r20150714.ebuild new file mode 100644 index 0000000..3c57679 --- /dev/null +++ b/dev-dotnet/sharpziplib/sharpziplib-0.86.0-r20150714.ebuild @@ -0,0 +1,66 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +inherit mono-env nuget dotnet + +NAME="SharpZipLib" +HOMEPAGE="https://github.com/icsharpcode/${NAME}" + +EGIT_COMMIT="e01215507cf25a5978a0bd850c9e67dbabf515b7" +SRC_URI="${HOMEPAGE}/archive/${EGIT_COMMIT}.zip -> ${PF}.zip" +S="${WORKDIR}/${NAME}-${EGIT_COMMIT}" + +SLOT="0" + +DESCRIPTION="Zip, GZip, Tar and BZip2 library written entirely in C# for the .NET platform" +LICENSE="MIT" # Actually not, it is GPL with exception - http://icsharpcode.github.io/SharpZipLib/ + +KEYWORDS="~amd64 ~ppc ~x86" +COMMON_DEPENDENCIES="|| ( >=dev-lang/mono-4.2 <dev-lang/mono-9999 )" +RDEPEND="${COMMON_DEPENDENCIES} +" +DEPEND="${COMMON_DEPENDENCIES} +" + +USE_DOTNET="net45" +IUSE="${USE_DOTNET} gac nupkg" + +#METAFILETOBUILD=SharpZipAll.sln +METAFILETOBUILD=ICSharpCode.SharpZLib.sln + +NUGET_PACKAGE_ID="SharpZipLib" + +src_prepare() { + elog "${S}/${NUGET_PACKAGE_ID}" + sed "s/@Version@/${PV}/g" "${FILESDIR}/${NUGET_PACKAGE_ID}.nuspec" >"${S}/${NUGET_PACKAGE_ID}.nuspec" || die + + epatch "${FILESDIR}/ICSharpCode.SharpZLib.csproj.patch" + epatch "${FILESDIR}/SharpZipLibTests.csproj.patch" + + enuget_restore "${METAFILETOBUILD}" +} + +# SNK_FILENAME=ICSharpCode.SharpZipLib.key +#TOOLS_VERSION=12.0 +TOOLS_VERSION=4.0 + +src_compile() { + exbuild_strong "${METAFILETOBUILD}" + enuspec "${NUGET_PACKAGE_ID}.nuspec" +} + +# /usr/lib/mono/xbuild/12.0/bin/Microsoft.CSharp.targets +# /usr/lib/mono/xbuild/14.0/bin/Microsoft.CSharp.targets +# /usr/lib/mono/4.5/Microsoft.CSharp.targets + +src_install() { + FINAL_DLL=bin/ICSharpCode.SharpZipLib.dll + + if use gac; then + egacinstall "${FINAL_DLL}" + fi + + enupkg "${WORKDIR}/${NUGET_PACKAGE_ID}.${PV}.nupkg" +} diff --git a/eclass/dotnet.eclass b/eclass/dotnet.eclass index c6d7af4..02b6c81 100644 --- a/eclass/dotnet.eclass +++ b/eclass/dotnet.eclass @@ -96,6 +96,13 @@ export XDG_CONFIG_HOME="${T}" unset MONO_AOT_CACHE +# @FUNCTION: exbuild_raw +# @DESCRIPTION: run xbuild with given parameters +exbuild_raw() { + elog """$@""" + xbuild "$@" || die +} + # @FUNCTION: exbuild # @DESCRIPTION: run xbuild with Release configuration and configurated FRAMEWORK exbuild() { @@ -111,6 +118,17 @@ exbuild() { SARGS=/p:DebugSymbols=False fi + if [[ -z ${TOOLS_VERSION} ]]; then + TOOLS_VERSION=4.0 + fi + + PARAMETERS="/v:detailed /tv:${TOOLS_VERSION} ""/p:TargetFrameworkVersion=v${FRAMEWORK}"" ""${CARGS}"" ""${SARGS}"" ""$@""" + exbuild_raw ${PARAMETERS} +} + +# @FUNCTION: exbuild_strong +# @DESCRIPTION: run xbuild with default key signing +exbuild_strong() { # http://stackoverflow.com/questions/7903321/only-sign-assemblies-with-strong-name-during-release-build if use gac; then if [[ -z ${SNK_FILENAME} ]]; then @@ -125,9 +143,8 @@ exbuild() { KARGS1= KARGS2= fi - - elog "xbuild /tv:4.0 ""/p:TargetFrameworkVersion=v${FRAMEWORK}"" ""${CARGS}"" ""${SARGS}"" ""${KARGS1}"" ""${KARGS2}"" ""$@""" || die - xbuild /tv:4.0 "/p:TargetFrameworkVersion=v${FRAMEWORK}" "${CARGS}" "${SARGS}" "${KARGS1}" "${KARGS2}" "$@" || die + PARAMETERS=" ""${KARGS1}"" ""${KARGS2}"" ""$@""" + exbuild "${PARAMETERS}" } # @FUNCTION: egacinstall