aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArsenShnurkov <Arsen.Shnurkov@gmail.com>2015-09-18 00:38:05 +0300
committerArsenShnurkov <Arsen.Shnurkov@gmail.com>2015-09-18 00:38:05 +0300
commit653ce691522f360751a36eec010812a64a3a2f58 (patch)
tree43389d629b1e30480ccc78a5c234964770173e32 /dev-dotnet/eto-parse
parentnewer version of commit (diff)
downloaddotnet-653ce691522f360751a36eec010812a64a3a2f58.tar.gz
dotnet-653ce691522f360751a36eec010812a64a3a2f58.tar.bz2
dotnet-653ce691522f360751a36eec010812a64a3a2f58.zip
eto-parse.ebuild was added, WIP
Diffstat (limited to 'dev-dotnet/eto-parse')
-rw-r--r--dev-dotnet/eto-parse/Manifest1
-rw-r--r--dev-dotnet/eto-parse/eto-parse-1.3.1-r20150907.ebuild107
-rw-r--r--dev-dotnet/eto-parse/files/nuspec.patch13
-rw-r--r--dev-dotnet/eto-parse/metadata.xml7
4 files changed, 128 insertions, 0 deletions
diff --git a/dev-dotnet/eto-parse/Manifest b/dev-dotnet/eto-parse/Manifest
new file mode 100644
index 0000000..f199b10
--- /dev/null
+++ b/dev-dotnet/eto-parse/Manifest
@@ -0,0 +1 @@
+DIST eto-parse-1.3.1-r20150907.zip 977059 SHA256 f4c7c30763c3ee89979486dbdf54c6a367670e0589986947df5232b754490075 SHA512 4d2d1fe6dbdf94e4e186a27725c9b8ac5928498844f2f2bcd5f0daa01e5db069e801a3b0d812be92e063cd05db7b1f11f46d4754ad45e724bf7b9e7d31f1fb5c WHIRLPOOL efd2be32f0ef34dc64e96923f514895ac4c078e81bfcd1431cdd26b3ac31fbbfd6bb6e445726dcede62f10ad7bfd15a8e61e59ec4d6adfc7d46646330da9fabb
diff --git a/dev-dotnet/eto-parse/eto-parse-1.3.1-r20150907.ebuild b/dev-dotnet/eto-parse/eto-parse-1.3.1-r20150907.ebuild
new file mode 100644
index 0000000..0ea9e72
--- /dev/null
+++ b/dev-dotnet/eto-parse/eto-parse-1.3.1-r20150907.ebuild
@@ -0,0 +1,107 @@
+# 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="Eto.Parse"
+HOMEPAGE="https://github.com/picoe/${NAME}"
+
+EGIT_COMMIT="7d7884fb4f481e28dd24bc273fbd6615d0ba539a" # 2015-09-07
+SRC_URI="${HOMEPAGE}/archive/${EGIT_COMMIT}.zip -> ${PF}.zip"
+S="${WORKDIR}/${NAME}-${EGIT_COMMIT}"
+
+SLOT="0"
+
+DESCRIPTION="Recursive descent LL(k) parser for .NET with Fluent API, BNF, EBNF and Gold Grammars"
+LICENSE="MIT" # https://raw.githubusercontent.com/picoe/Eto.Parse/master/LICENSE
+KEYWORDS="~amd64 ~ppc ~x86"
+
+# notes on testing, from https://devmanual.gentoo.org/ebuild-writing/functions/src_test/index.html
+# FEATURES+="test"
+
+IUSE="developer nupkg debug"
+
+# there is no "test" in IUSE, because test project and solution are not build
+# there is no "gac" in IUSE, because utilities for patching are not ready
+# "Failure adding assembly Eto.Parse/bin/Release/net40/Eto.Parse.dll to the cache: Attempt to install an assembly without a strong name"
+
+# notes from https://devmanual.gentoo.org/general-concepts/dependencies/
+# DEPEND - dependencies which are required to unpack, patch, compile or install the package
+# RDEPEND - dependencies which are required at runtime
+
+COMMON_DEPENDENCIES=">=dev-lang/mono-4.2"
+DEPEND="${COMMON_DEPENDENCIES}
+ "
+# test? ( >=dev-dotnet/nunit-2.6.4-r201501110:2[nupkg] )
+RDEPEND="${COMMON_DEPENDENCIES}
+ "
+
+# Notes on Gentoo variables, from https://devmanual.gentoo.org/ebuild-writing/variables/
+# PN = Package name, for example vim.
+# PV = Package version (excluding revision, if any), for example 6.3.
+# P = Package name and version (excluding revision, if any), for example vim-6.3.
+# PVR = Package version and revision (if any), for example 6.3, 6.3-r1.
+# PF = Full package name, ${PN}-${PVR}, for example vim-6.3-r1
+
+S="${WORKDIR}/${NAME}-${EGIT_COMMIT}"
+METAFILETOBUILD="${S}/Eto.Parse/Eto.Parse.csproj" # building .csproj instead of .sln to avoid building test projects
+# NUSPEC_FILE=${FILESDIR}/nuget-2.8.3.nuspec
+NUSPEC_FILE=Eto.Parse/Eto.Parse.nuspec
+
+src_prepare() {
+ rm -rf "${S}/.nuget"
+ # notes on escaping, from
+ # http://unix.stackexchange.com/questions/32907/what-characters-do-i-need-to-escape-when-using-sed-in-a-sh-script
+ # \$ is for regexps in sed - internal layer of escaping
+ # \\\$ is for bash - external layer of escaping
+
+ #change version in .nuspec
+
+ sed -e "s/\\\$id\\\$/${NAME}/g" \
+ -e "s/\\\$version\\\$/${PV}/g" \
+ -e "s/\\\$title\\\$/${P}/g" \
+ -e "s/\\\$author\\\$/Curtis Wensley/g" \
+ -e "s/\\\$description\\\$/${DESCRIPTION}/g" \
+ -i "${NUSPEC_FILE}" || die
+
+ epatch "${FILESDIR}/nuspec.patch"
+
+# if use test; then
+#
+# # ${S}/Eto.Parse.TestSpeed/packages.config
+# # Installing 'NUnit 2.6.2'.
+# # Installing 'Newtonsoft.Json 5.0.6'.
+# # Installing 'MarkdownSharp 1.13.0.0'.
+# # Installing 'ServiceStack.Text 3.9.64'.
+# # Installing 'MarkdownDeep.NET 1.5'.
+# # Successfully installed 'MarkdownSharp 1.13.0.0'.
+#
+# enuget_restore "${METAFILETOBUILD}"
+# fi ;
+}
+
+src_compile() {
+ exbuild "${METAFILETOBUILD}"
+ enuspec "${NUSPEC_FILE}"
+}
+
+src_test() {
+ # ebuild is not ready for testing
+ # nunit-console Eto.Parse.Tests/bin/Debug/Eto.Parse.Tests.dll
+ true
+}
+
+src_install() {
+ # ebuild is not ready for gac install
+ #DIR=""
+ #if use debug; then
+ # DIR="Debug"
+ #else
+ # DIR="Release"
+ #fi
+ # egacinstall "Eto.Parse/bin/${DIR}/net40/Eto.Parse.dll"
+
+ enupkg "${WORKDIR}/${NAME}.${PV}.nupkg"
+}
diff --git a/dev-dotnet/eto-parse/files/nuspec.patch b/dev-dotnet/eto-parse/files/nuspec.patch
new file mode 100644
index 0000000..455901b
--- /dev/null
+++ b/dev-dotnet/eto-parse/files/nuspec.patch
@@ -0,0 +1,13 @@
+diff -r -u orig/Eto.Parse/Eto.Parse.nuspec patched/Eto.Parse/Eto.Parse.nuspec
+--- orig/Eto.Parse/Eto.Parse.nuspec 2015-09-17 23:55:59.000000000 +0300
++++ patched/Eto.Parse/Eto.Parse.nuspec 2015-09-18 00:02:02.436429389 +0300
+@@ -49,4 +49,7 @@
+ <copyright>Copyright 2013 by Curtis Wensley</copyright>
+ <tags>parser generator regex irony grammar fluent yacc lex ebnf bnf gold</tags>
+ </metadata>
+-</package>
+\ No newline at end of file
++ <files>
++ <file src="Eto.Parse/bin/$Configuration$/net40/Eto.Parse.*" target="lib/net45" />
++ </files>
++</package>
diff --git a/dev-dotnet/eto-parse/metadata.xml b/dev-dotnet/eto-parse/metadata.xml
new file mode 100644
index 0000000..6417277
--- /dev/null
+++ b/dev-dotnet/eto-parse/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>dotnet</herd>
+ <use>
+ </use>
+</pkgmetadata>