commit: 1a6379c13295f2012cf2f494a12a430dd92a9415
Author: ArsenShnurkov <Arsen.Shnurkov <AT> gmail <DOT> com>
AuthorDate: Sun Nov 13 13:46:44 2016 +0000
Commit: Mikhail Pukhlikov <cynede <AT> gentoo <DOT> org>
CommitDate: Sun Nov 13 13:46:44 2016 +0000
URL: https://gitweb.gentoo.org/proj/dotnet.git/commit/?id=1a6379c1
Pliant - an Earley parser with SPPF
dev-dotnet/pliant/files/csproj.patch | 25 ++++++
dev-dotnet/pliant/metadata.xml | 8 ++
dev-dotnet/pliant/pliant-0.4.1_p2016081902.ebuild | 94 +++++++++++++++++++++++
3 files changed, 127 insertions(+)
diff --git a/dev-dotnet/pliant/files/csproj.patch
b/dev-dotnet/pliant/files/csproj.patch
new file mode 100644
index 0000000..8e2a231
--- /dev/null
+++ b/dev-dotnet/pliant/files/csproj.patch
@@ -0,0 +1,25 @@
+diff -r -u a/libraries/Pliant/Pliant.csproj b/libraries/Pliant/Pliant.csproj
+--- a/libraries/Pliant/Pliant.csproj 2016-08-19 17:03:24.000000000 +0300
++++ b/libraries/Pliant/Pliant.csproj 2016-11-13 16:36:36.405090223 +0300
+@@ -242,11 +242,15 @@
+ </ItemGroup>
+ <ItemGroup />
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+- <!-- To modify your build process, add your task inside one of the targets
below and uncomment it.
+- Other similar extension points exist, see Microsoft.Common.targets.
++ <Import Project="$(MSBuildBinPath)\MSBuild.Community.Tasks.Targets"
Condition="Exists('$(MSBuildBinPath)\MSBuild.Community.Tasks.Targets')" />
+ <Target Name="BeforeBuild">
++ <PropertyGroup Condition=" '$(VersionNumber)' == '' ">
++ <VersionNumber>1.0.0.0</VersionNumber>
++ </PropertyGroup>
++ <AssemblyInfo CodeLanguage="C#"
++ OutputFile="Properties/AssemblyInfo.cs"
++ AssemblyVersion="$(VersionNumber)"
++ AssemblyFileVersion="$(VersionNumber)"
++ />
+ </Target>
+- <Target Name="AfterBuild">
+- </Target>
+- -->
+ </Project>
+\ No newline at end of file
diff --git a/dev-dotnet/pliant/metadata.xml b/dev-dotnet/pliant/metadata.xml
new file mode 100644
index 0000000..60328c2
--- /dev/null
+++ b/dev-dotnet/pliant/metadata.xml
@@ -0,0 +1,8 @@
+<?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>
+</pkgmetadata>
diff --git a/dev-dotnet/pliant/pliant-0.4.1_p2016081902.ebuild
b/dev-dotnet/pliant/pliant-0.4.1_p2016081902.ebuild
new file mode 100644
index 0000000..05375f5
--- /dev/null
+++ b/dev-dotnet/pliant/pliant-0.4.1_p2016081902.ebuild
@@ -0,0 +1,94 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+KEYWORDS="~amd64 ~x86"
+RESTRICT="mirror"
+
+SLOT="0"
+
+USE_DOTNET="net45"
+IUSE="+${USE_DOTNET} +gac +nupkg developer debug doc"
+
+inherit gac dotnet nupkg
+
+NAME="Pliant"
+HOMEPAGE="https://github.com/patrickhuber/${NAME}"
+EGIT_COMMIT="dd03ca2942d999a8eb2e30a51b3ccf8d3c70602d"
+SRC_URI="${HOMEPAGE}/archive/${EGIT_COMMIT}.tar.gz -> ${PN}-${PV}.tar.gz"
+S="${WORKDIR}/${NAME}-${EGIT_COMMIT}"
+
+DESCRIPTION="modified Earley parser in C# inspired by the Marpa Parser project"
+LICENSE="MIT" # https://github.com/patrickhuber/Pliant/blob/master/LICENSE.md
+
+COMMON_DEPEND=">=dev-lang/mono-4.0.2.5
+"
+RDEPEND="${COMMON_DEPEND}
+"
+DEPEND="${COMMON_DEPEND}
+ >=dev-dotnet/msbuildtasks-1.5.0.196
+"
+
+src_prepare() {
+ eapply "${FILESDIR}/csproj.patch"
+ patch_nuspec_file "libraries/Pliant/Pliant.nuspec"
+ eapply_user
+}
+
+COMMIT_DATE_INDEX="$(get_version_component_count ${PV} )"
+COMMIT_DATEANDSEQ="$(get_version_component_range $COMMIT_DATE_INDEX ${PV} )"
+NUSPEC_VERSION=$(get_version_component_range 1-3)"${COMMIT_DATEANDSEQ//p/.}"
+ASSEMBLY_VERSION=$(get_version_component_range
1-3).$((${COMMIT_DATEANDSEQ//p/} % 65535))
+
+get_bin_dir()
+{
+ echo "libraries/Pliant/bin"
+}
+
+get_output_dir()
+{
+ local OUTPUT_DIR="$(get_bin_dir)/"
+ if use debug; then
+ OUTPUT_DIR+="Debug"
+ else
+ OUTPUT_DIR+="Release"
+ fi
+ echo "${OUTPUT_DIR}"
+}
+
+DLL_NAME="${NAME}"
+
+get_output_filepath()
+{
+ echo "$(get_output_dir)/${DLL_NAME}.dll"
+}
+
+patch_nuspec_file()
+{
+ if use nupkg; then
+ FILES_STRING=`sed 's/[\/&]/\\\\&/g' <<-EOF || die "escaping
replacement string characters"
+ <files> <!-- https://docs.nuget.org/create/nuspec-reference
-->
+ <file src="$(get_output_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_strong /p:VersionNumber=${ASSEMBLY_VERSION}
"libraries/Pliant/Pliant.csproj"
+
+ NUSPEC_VERSION="${PV/_p/.}"
+ NUSPEC_PROPERTIES="id=${NAME};version=${NUSPEC_VERSION};author=Patrick
Huber;description=${DESCRIPTION}"
+ enuspec "libraries/Pliant/Pliant.nuspec"
+}
+
+src_install() {
+ egacinstall "$(get_output_filepath)"
+ einfo ${ASSEMBLY_VERSION}
+ einstall_pc_file "${PN}" ${ASSEMBLY_VERSION} "Pliant"
+ enupkg "${WORKDIR}/${NAME}.${NUSPEC_VERSION}.nupkg"
+}