commit:     653ce691522f360751a36eec010812a64a3a2f58
Author:     ArsenShnurkov <Arsen.Shnurkov <AT> gmail <DOT> com>
AuthorDate: Thu Sep 17 21:38:05 2015 +0000
Commit:     Heather Cynede <cynede <AT> gentoo <DOT> org>
CommitDate: Thu Sep 17 21:38:05 2015 +0000
URL:        https://gitweb.gentoo.org/proj/dotnet.git/commit/?id=653ce691

eto-parse.ebuild was added, WIP

 .../eto-parse/eto-parse-1.3.1-r20150907.ebuild     | 107 +++++++++++++++++++++
 dev-dotnet/eto-parse/files/nuspec.patch            |  13 +++
 dev-dotnet/eto-parse/metadata.xml                  |   7 ++
 ...=> mono-packaging-tools-0.0.0-r20150912.ebuild} |   0
 4 files changed, 127 insertions(+)

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>

diff --git 
a/dev-util/mono-packaging-tools/mono-packaging-tools-0.0.0-r20150903.ebuild 
b/dev-util/mono-packaging-tools/mono-packaging-tools-0.0.0-r20150912.ebuild
similarity index 100%
rename from 
dev-util/mono-packaging-tools/mono-packaging-tools-0.0.0-r20150903.ebuild
rename to 
dev-util/mono-packaging-tools/mono-packaging-tools-0.0.0-r20150912.ebuild

Reply via email to