diff options
author | ArsenShnurkov <Arsen.Shnurkov@gmail.com> | 2016-11-13 16:46:44 +0300 |
---|---|---|
committer | ArsenShnurkov <Arsen.Shnurkov@gmail.com> | 2016-11-13 16:46:44 +0300 |
commit | 1a6379c13295f2012cf2f494a12a430dd92a9415 (patch) | |
tree | c350c15937974b0046319959f40ed1f470e66a36 /dev-dotnet/pliant | |
parent | Merge pull request #265 from ArsenShnurkov/nlog (diff) | |
download | dotnet-1a6379c13295f2012cf2f494a12a430dd92a9415.tar.gz dotnet-1a6379c13295f2012cf2f494a12a430dd92a9415.tar.bz2 dotnet-1a6379c13295f2012cf2f494a12a430dd92a9415.zip |
Pliant - an Earley parser with SPPF
Diffstat (limited to 'dev-dotnet/pliant')
-rw-r--r-- | dev-dotnet/pliant/Manifest | 1 | ||||
-rw-r--r-- | dev-dotnet/pliant/files/csproj.patch | 25 | ||||
-rw-r--r-- | dev-dotnet/pliant/metadata.xml | 8 | ||||
-rw-r--r-- | dev-dotnet/pliant/pliant-0.4.1_p2016081902.ebuild | 94 |
4 files changed, 128 insertions, 0 deletions
diff --git a/dev-dotnet/pliant/Manifest b/dev-dotnet/pliant/Manifest new file mode 100644 index 0000000..7799a51 --- /dev/null +++ b/dev-dotnet/pliant/Manifest @@ -0,0 +1 @@ +DIST pliant-0.4.1_p2016081902.tar.gz 267510 SHA256 737f798270bcc25b08084a009f440ffb89e4a7d0b7aea0f6b3a8d404da9d5823 SHA512 32ef396fe9e1152929152d152758c20fb69c097babd535c8f839a21e34ba2369c50814249a548a526cf9a66e4c9c4c1e8cabbbdf3b195927ac4ca124d3cd6222 WHIRLPOOL 9177c035a88b28eaedf704e20e5bb67f128c3afc7540f973c322ff087f73f429d1a059bba2fb4a739ed5d81f659b067eaf60766a03c7d2f215231aab4a1ccf72 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>dotnet@gentoo.org</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" +} |