* [gentoo-commits] proj/dotnet:master commit in: dev-dotnet/nant/files/, dev-dotnet/nant/, eclass/
@ 2015-08-17 13:55 Heather Cynede
0 siblings, 0 replies; only message in thread
From: Heather Cynede @ 2015-08-17 13:55 UTC (permalink / raw
To: gentoo-commits
commit: d2f4ad54aa6d2c7444a98b8bfb2caccd491c4f09
Author: ArsenShnurkov <Arsen.Shnurkov <AT> gmail <DOT> com>
AuthorDate: Mon Aug 17 13:29:19 2015 +0000
Commit: Heather Cynede <cynede <AT> gentoo <DOT> org>
CommitDate: Mon Aug 17 13:29:19 2015 +0000
URL: https://gitweb.gentoo.org/proj/dotnet.git/commit/?id=d2f4ad54
using xbuild instead of make
dev-dotnet/nant/files/NAnt.sln.nuspec | 23 +++++++++
dev-dotnet/nant/metadata.xml | 13 ++++++
dev-dotnet/nant/nant-0.93.5019-r201504210.ebuild | 59 ++++++++++++++++++++++++
eclass/dotnet.eclass | 47 ++++++++++++++++++-
4 files changed, 140 insertions(+), 2 deletions(-)
diff --git a/dev-dotnet/nant/files/NAnt.sln.nuspec b/dev-dotnet/nant/files/NAnt.sln.nuspec
new file mode 100644
index 0000000..0a1b954
--- /dev/null
+++ b/dev-dotnet/nant/files/NAnt.sln.nuspec
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<package >
+ <metadata>
+ <id>NAnt</id>
+ <version>0.93.5019</version>
+ <authors>dotnet@gentoo.org</authors>
+ <owners>dotnet</owners>
+ <licenseUrl>http://nant.sourceforge.net/license.html</licenseUrl> <!-- GPLv2 -->
+ <projectUrl>http://nant.sourceforge.net/</projectUrl>
+ <iconUrl>https://raw.githubusercontent.com/nant/nant/master/examples/Solution/cpp/WinForms/app.ico</iconUrl>
+ <requireLicenseAcceptance>false</requireLicenseAcceptance>
+ <description>Package description</description>
+ <releaseNotes>https://github.com/nant/nant/blob/master/doc/releasenotes.html</releaseNotes>
+ <copyright></copyright>
+ <tags>nant</tags>
+ <dependencies>
+ </dependencies>
+ </metadata>
+ <files>
+ <!-- * will cover .dll .mdb .config and .xml-->
+ <file src="build/$Configuration$/*" target="lib/net40/" />
+ </files>
+</package>
\ No newline at end of file
diff --git a/dev-dotnet/nant/metadata.xml b/dev-dotnet/nant/metadata.xml
new file mode 100644
index 0000000..5c0862c
--- /dev/null
+++ b/dev-dotnet/nant/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/nant/nant-0.93.5019-r201504210.ebuild b/dev-dotnet/nant/nant-0.93.5019-r201504210.ebuild
new file mode 100644
index 0000000..c4b280a
--- /dev/null
+++ b/dev-dotnet/nant/nant-0.93.5019-r201504210.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit mono-env dotnet
+
+NAME="nant"
+HOMEPAGE="https://github.com/nant/${NAME}"
+
+EGIT_COMMIT="45ec8aa9ad3247f340731f4e8b953c498ad3019e"
+SRC_URI="${HOMEPAGE}/archive/${EGIT_COMMIT}.zip -> ${PF}.zip"
+S="${WORKDIR}/${NAME}-${EGIT_COMMIT}"
+
+SLOT="0"
+
+DESCRIPTION=".NET build tool"
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="developer nupkg debug"
+
+RDEPEND=">=dev-lang/mono-4.0.2.5"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+"
+
+S="${WORKDIR}/${NAME}-${EGIT_COMMIT}"
+SLN_FILE=NAnt.sln
+METAFILETOBUILD="${S}/${SLN_FILE}"
+
+# This build is not parallel build friendly
+MAKEOPTS="${MAKEOPTS} -j1"
+
+#src_prepare() {
+# nuget restore "${METAFILETOBUILD}" || die
+#}
+
+src_compile() {
+ exbuild "${METAFILETOBUILD}"
+ enuspec "${FILESDIR}/${SLN_FILE}.nuspec"
+}
+
+src_install() {
+ DIR=""
+ if use debug; then
+ DIR="Debug"
+ else
+ DIR="Release"
+ fi
+
+ insinto "/usr/share/nant/"
+ doins build/${DIR}/*
+
+ make_wrapper nant "mono /usr/share/nant/NAnt.exe"
+
+ enupkg "${WORKDIR}/NAnt.0.93.5019.nupkg"
+
+ dodoc README.txt
+}
diff --git a/eclass/dotnet.eclass b/eclass/dotnet.eclass
index 301a072..6222540 100644
--- a/eclass/dotnet.eclass
+++ b/eclass/dotnet.eclass
@@ -81,8 +81,51 @@ 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
+ if use debug; then
+ CARGS=/p:Configuration=Debug
+ else
+ CARGS=/p:Configuration=Release
+ fi
+
+ if use developer; then
+ SARGS=/p:DebugSymbols=True
+ else
+ SARGS=/p:DebugSymbols=False
+ fi
+
+ elog "xbuild /tv:4.0 ""/p:TargetFrameworkVersion=v${FRAMEWORK}"" ""${CARGS}"" ""${SARGS}"" ""$@""" || die
+ xbuild /tv:4.0 "/p:TargetFrameworkVersion=v${FRAMEWORK}" "${CARGS}" "${SARGS}" "$@" || die
+}
+
+# @FUNCTION: enuspec
+# @DESCRIPTION: run nuget pack
+enuspec() {
+ if use nupkg; then
+ if use debug; then
+ PROPS=Configuration=Debug
+ else
+ PROPS=Configuration=Release
+ fi
+ nuget pack -Properties "${PROPS}" -BasePath "${S}" -OutputDirectory "${WORKDIR}" -NonInteractive -Verbosity detailed "$@" || die
+ fi
+}
+
+# @FUNCTION: enupkg
+# @DESCRIPTION: installs .nupkg into local repository
+enupkg() {
+ 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 "$@"
+ fi
}
# @FUNCTION: egacinstall
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2015-08-17 13:55 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-17 13:55 [gentoo-commits] proj/dotnet:master commit in: dev-dotnet/nant/files/, dev-dotnet/nant/, eclass/ Heather Cynede
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox