public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/dotnet:master commit in: eclass/, dev-dotnet/slntools/files/, dev-dotnet/slntools/
@ 2015-08-17  9:11 Heather Cynede
  0 siblings, 0 replies; only message in thread
From: Heather Cynede @ 2015-08-17  9:11 UTC (permalink / raw
  To: gentoo-commits

commit:     d5b2f385177c70e5efd0b8a4f030c33319f1dbef
Author:     ArsenShnurkov <Arsen.Shnurkov <AT> gmail <DOT> com>
AuthorDate: Mon Aug 17 01:29:53 2015 +0000
Commit:     Heather Cynede <cynede <AT> gentoo <DOT> org>
CommitDate: Mon Aug 17 01:29:53 2015 +0000
URL:        https://gitweb.gentoo.org/proj/dotnet.git/commit/?id=d5b2f385

tools for parsing .sln

 dev-dotnet/slntools/files/SLNTools.sln.nuspec      |  23 ++++
 .../slntools/files/console-window-width.patch      |  21 ++++
 .../files/remove-wix-project-from-sln-file.patch   |  32 ++++++
 dev-dotnet/slntools/metadata.xml                   |  13 +++
 .../slntools/slntools-1.1.3-r201508170.ebuild      | 121 +++++++++++++++++++++
 eclass/dotnet.eclass                               |   4 +-
 6 files changed, 212 insertions(+), 2 deletions(-)

diff --git a/dev-dotnet/slntools/files/SLNTools.sln.nuspec b/dev-dotnet/slntools/files/SLNTools.sln.nuspec
new file mode 100644
index 0000000..f3e79bf
--- /dev/null
+++ b/dev-dotnet/slntools/files/SLNTools.sln.nuspec
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<package >
+  <metadata>
+    <id>SLNTools</id>
+    <version>1.1.3</version>
+    <authors>christianwarren</authors>
+    <owners>dotnet</owners>
+    <licenseUrl>https://slntools.codeplex.com/license</licenseUrl>
+    <projectUrl>https://github.com/ArsenShnurkov/slntools</projectUrl>
+    <iconUrl>https://www.iconfinder.com/icons/100044/studio_visual_icon</iconUrl>
+    <requireLicenseAcceptance>false</requireLicenseAcceptance>
+    <description>Tools for SLN File' make it easier for developers to compare, merge or filter the ".sln" files generated by Visual Studio</description>
+    <releaseNotes>https://slntools.codeplex.com/releases/view/616549</releaseNotes>
+    <copyright>Copyright 2015</copyright>
+    <tags>sln</tags>
+    <dependencies>
+    </dependencies>
+  </metadata>
+  <files>
+    <!-- * is for .dll and .mdb -->
+    <file src="Main/SLNTools.exe/bin/$Configuration$/*" target="lib/net40/" />
+  </files>
+</package>

diff --git a/dev-dotnet/slntools/files/console-window-width.patch b/dev-dotnet/slntools/files/console-window-width.patch
new file mode 100644
index 0000000..ba95e00
--- /dev/null
+++ b/dev-dotnet/slntools/files/console-window-width.patch
@@ -0,0 +1,21 @@
+diff --git a/Main/SLNTools.exe/CommandLine/CommandLineParser.cs b/Main/SLNTools.exe/CommandLine/CommandLineParser.cs
+index 5b79a8e..b97b6c0 100644
+--- a/Main/SLNTools.exe/CommandLine/CommandLineParser.cs
++++ b/Main/SLNTools.exe/CommandLine/CommandLineParser.cs
+@@ -544,6 +544,8 @@ namespace CWDev.SLNTools.CommandLine
+         /// <returns>Returns the number of columns in the current console window</returns>
+         public static int GetConsoleWindowWidth()
+         {
++            return Console.WindowWidth;
++/*
+             int screenWidth;
+             CONSOLE_SCREEN_BUFFER_INFO csbi = new CONSOLE_SCREEN_BUFFER_INFO();
+ 
+@@ -551,6 +553,7 @@ namespace CWDev.SLNTools.CommandLine
+             rc = GetConsoleScreenBufferInfo(GetStdHandle(STD_OUTPUT_HANDLE), ref csbi);
+             screenWidth = csbi.dwSize.x;
+             return screenWidth;
++*/
+         }
+ 
+         /// <summary>

diff --git a/dev-dotnet/slntools/files/remove-wix-project-from-sln-file.patch b/dev-dotnet/slntools/files/remove-wix-project-from-sln-file.patch
new file mode 100644
index 0000000..8c84a65
--- /dev/null
+++ b/dev-dotnet/slntools/files/remove-wix-project-from-sln-file.patch
@@ -0,0 +1,32 @@
+diff --git a/Main/SLNTools.sln b/Main/SLNTools.sln
+index 6a31cc2..ed3cfef 100644
+--- a/Main/SLNTools.sln
++++ b/Main/SLNTools.sln
+@@ -14,8 +14,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CWDev.SLNTools.UIKit.dll",
+ EndProject
+ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SLNTools.exe", "SLNTools.exe\SLNTools.exe.csproj", "{00082D4F-899D-4A3B-B8C6-E9A25244E2B3}"
+ EndProject
+-Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "SLNTools.msi", "SLNTools.msi\SLNTools.msi.wixproj", "{90671C26-71A1-4596-9103-904D420E755C}"
+-EndProject
+ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BuildTools", "BuildTools\BuildTools.csproj", "{F1F9F4B2-1AEB-4B1F-BBD2-17471CEC6809}"
+ EndProject
+ Global
+@@ -58,18 +56,6 @@ Global
+ 		{71CBD77B-D29A-42F6-B0F1-D0EFFE095CCC}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+ 		{71CBD77B-D29A-42F6-B0F1-D0EFFE095CCC}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+ 		{71CBD77B-D29A-42F6-B0F1-D0EFFE095CCC}.Release|x86.ActiveCfg = Release|Any CPU
+-		{90671C26-71A1-4596-9103-904D420E755C}.Debug|Any CPU.ActiveCfg = Debug|x86
+-		{90671C26-71A1-4596-9103-904D420E755C}.Debug|Any CPU.Build.0 = Debug|x86
+-		{90671C26-71A1-4596-9103-904D420E755C}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
+-		{90671C26-71A1-4596-9103-904D420E755C}.Debug|Mixed Platforms.Build.0 = Debug|x86
+-		{90671C26-71A1-4596-9103-904D420E755C}.Debug|x86.ActiveCfg = Debug|x86
+-		{90671C26-71A1-4596-9103-904D420E755C}.Debug|x86.Build.0 = Debug|x86
+-		{90671C26-71A1-4596-9103-904D420E755C}.Release|Any CPU.ActiveCfg = Release|x86
+-		{90671C26-71A1-4596-9103-904D420E755C}.Release|Any CPU.Build.0 = Release|x86
+-		{90671C26-71A1-4596-9103-904D420E755C}.Release|Mixed Platforms.ActiveCfg = Release|x86
+-		{90671C26-71A1-4596-9103-904D420E755C}.Release|Mixed Platforms.Build.0 = Release|x86
+-		{90671C26-71A1-4596-9103-904D420E755C}.Release|x86.ActiveCfg = Release|x86
+-		{90671C26-71A1-4596-9103-904D420E755C}.Release|x86.Build.0 = Release|x86
+ 		{F1F9F4B2-1AEB-4B1F-BBD2-17471CEC6809}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ 		{F1F9F4B2-1AEB-4B1F-BBD2-17471CEC6809}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ 		{F1F9F4B2-1AEB-4B1F-BBD2-17471CEC6809}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU

diff --git a/dev-dotnet/slntools/metadata.xml b/dev-dotnet/slntools/metadata.xml
new file mode 100644
index 0000000..5c0862c
--- /dev/null
+++ b/dev-dotnet/slntools/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+  <herd>dotnet</herd>
+  <maintainer>
+    <email>dotnet@gentoo.org</email>
+    <name>dotnet</name>
+  </maintainer>
+  <use>
+    <flag name='developer'>enables debug information for any of debug and release builds</flag>
+    <flag name='nupkg'>creates local nuget package</flag>
+  </use>
+</pkgmetadata>

diff --git a/dev-dotnet/slntools/slntools-1.1.3-r201508170.ebuild b/dev-dotnet/slntools/slntools-1.1.3-r201508170.ebuild
new file mode 100644
index 0000000..c9c1725
--- /dev/null
+++ b/dev-dotnet/slntools/slntools-1.1.3-r201508170.ebuild
@@ -0,0 +1,121 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit dotnet
+
+NAME="slntools"
+HOMEPAGE="https://github.com/ArsenShnurkov/${NAME}"
+
+EGIT_COMMIT="705869e96a2f0e401be03f8e8478df3e1f2b9373"
+SRC_URI="${HOMEPAGE}/archive/${EGIT_COMMIT}.zip -> ${PF}.zip"
+S="${WORKDIR}/${NAME}-${EGIT_COMMIT}"
+
+SLOT=0
+
+DESCRIPTION="Validator.nu HTML Parser, a HTML5 parser, port from Java Version 1.4 to C#"
+LICENSE="MIT" # https://github.com/jamietre/HtmlParserSharp/blob/master/LICENSE.txt
+KEYWORDS="~amd64 ~x86"
+IUSE="developer nupkg debug"
+
+RDEPEND=">=dev-lang/mono-4.0.2.5"
+DEPEND="${RDEPEND}
+	sys-apps/sed"
+
+S="${WORKDIR}/${NAME}-${EGIT_COMMIT}"
+SLN_FILE=SLNTools.sln
+METAFILETOBUILD="${S}/Main/${SLN_FILE}"
+
+src_unpack()
+{
+	# /usr/portage/distfiles/csquery-1.3.5.200.zip
+	# /var/tmp/portage/dev-dotnet/csquery-1.3.5.200-r20150522/work/CsQuery-696ac0533a3e665a34cdc4050d1f46e91f5a3356
+	default
+}
+
+src_prepare() {
+
+	default
+
+	epatch "${FILESDIR}/remove-wix-project-from-sln-file.patch"
+
+	# System.EntryPointNotFoundException: GetStdHandle
+	#   at (wrapper managed-to-native) CWDev.SLNTools.CommandLine.Parser:GetStdHandle (int)
+	#   at CWDev.SLNTools.CommandLine.Parser.GetConsoleWindowWidth () [0x00000] in <filename unknown>:0 
+	#   at CWDev.SLNTools.CommandLine.Parser.ArgumentsUsage (System.Type argumentType) [0x00000] in <filename unknown>:0 
+	#   at CWDev.SLNTools.Program.Main (System.String[] args) [0x00000] in <filename unknown>:0 
+	# http://stackoverflow.com/questions/23824961/c-sharp-to-mono-getconsolewindow-exception
+	epatch "${FILESDIR}/console-window-width.patch"
+
+	nuget restore "${METAFILETOBUILD}" || die
+}
+
+src_compile() {
+	ARGS=""
+	ARGSN=""
+
+	if use debug; then
+		ARGS="${ARGS} /p:Configuration=Debug"
+		ARGSN="${ARGSN} Configuration=Debug"
+	else
+		ARGS="${ARGS} /p:Configuration=Release"
+		ARGSN="${ARGSN} Configuration=Release"
+	fi
+
+	if use developer; then
+		ARGS="${ARGS} /p:DebugSymbols=True"
+	else
+		ARGS="${ARGS} /p:DebugSymbols=False"
+	fi
+
+	exbuild ${ARGS} ${METAFILETOBUILD}
+
+	if use nupkg; then
+		nuget pack "${FILESDIR}/${SLN_FILE}.nuspec" -Properties ${ARGSN} -BasePath "${S}" -OutputDirectory "${WORKDIR}" -NonInteractive -Verbosity detailed
+	fi
+}
+
+src_install() {
+	default
+
+	DIR=""
+	if use debug; then
+		DIR="Debug"
+	else
+		DIR="Release"
+	fi
+
+	# insinto "/usr/$(get_libdir)"	
+	insinto "/usr/share/slntools/"
+
+	# || die is not necessary after doins,
+	# see examples at https://devmanual.gentoo.org/ebuild-writing/functions/src_install/index.html
+	doins Main/SLNTools.exe/bin/${DIR}/CWDev.SLNTools.Core.dll
+	doins Main/SLNTools.exe/bin/${DIR}/CWDev.SLNTools.Core.dll.mdb
+	doins Main/SLNTools.exe/bin/${DIR}/CWDev.SLNTools.UIKit.dll
+	doins Main/SLNTools.exe/bin/${DIR}/CWDev.SLNTools.UIKit.dll.mdb
+	doins Main/SLNTools.exe/bin/${DIR}/SLNTools.exe
+	doins Main/SLNTools.exe/bin/${DIR}/SLNTools.exe.mdb
+
+	make_wrapper slntools "mono /usr/share/slntools/SLNTools.exe"
+
+	if use nupkg; then
+		if [ -d "/var/calculate/remote/distfiles" ]; then
+			# Control will enter here if the directory exist.
+			# this is necessary to handle calculate linux profiles feature (for corporate users)
+			elog "Installing .nupkg into /var/calculate/remote/packages/NuGet"
+			insinto /var/calculate/remote/packages/NuGet
+		else
+			# this is for all normal gentoo-based distributions
+			elog "Installing .nupkg into /usr/local/nuget/nupkg"
+			insinto /usr/local/nuget/nupkg
+		fi
+		doins "${WORKDIR}/SLNTools.1.1.3.nupkg"
+	fi
+}
+
+# Usage:
+# SLNTools.exe 
+# @<file>    Read response file for more options
+# <Command>  Command Name (CompareSolutions|MergeSolutions|CreateFilterFileFromSolution|EditFilterFile|OpenFilterFile|SortProjects)

diff --git a/eclass/dotnet.eclass b/eclass/dotnet.eclass
index 989b0b0..301a072 100644
--- a/eclass/dotnet.eclass
+++ b/eclass/dotnet.eclass
@@ -81,8 +81,8 @@ unset MONO_AOT_CACHE
 # @FUNCTION: exbuild
 # @DESCRIPTION: run xbuild with Release configuration and configurated FRAMEWORK
 exbuild() {
-	elog "xbuild ""$@"" /p:Configuration=Release /tv:4.0 /p:TargetFrameworkVersion=v""${FRAMEWORK}"" || die"
-	xbuild "$@" /p:Configuration=Release /tv:4.0 /p:TargetFrameworkVersion=v"${FRAMEWORK}" || die
+	elog "xbuild ""$@"" /p:Configuration=Release /tv:4.0 /p:TargetFrameworkVersion=v""${FRAMEWORK}" ""$@""" || die"
+	xbuild /p:Configuration=Release /tv:4.0 /p:TargetFrameworkVersion=v"${FRAMEWORK}" "$@" || die
 }
 
 # @FUNCTION: egacinstall


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2015-08-17  9:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-17  9:11 [gentoo-commits] proj/dotnet:master commit in: eclass/, dev-dotnet/slntools/files/, dev-dotnet/slntools/ Heather Cynede

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox