commit: 0432230adeec60255658216eeec793874efb6a42 Author: ArsenShnurkov <ArsenShnurkov <AT> users <DOT> noreply <DOT> github <DOT> com> AuthorDate: Fri Jun 2 05:58:08 2017 +0000 Commit: Mikhail Pukhlikov <cynede <AT> gentoo <DOT> org> CommitDate: Fri Jun 2 06:16:55 2017 +0000 URL: https://gitweb.gentoo.org/proj/dotnet.git/commit/?id=0432230a
NUnit-3.7.0 dev-dotnet/nunit-framework/metadata.xml | 8 ++ .../nunit-framework/nunit-framework-3.7.0.ebuild | 75 ++++++++++ .../mono-packaging-tools-1.4.3.ebuild | 154 +++++++++++++++++++++ dev-util/nunit-console/metadata.xml | 8 ++ dev-util/nunit-console/nunit-console-3.7.0.ebuild | 94 +++++++++++++ dev-util/nunit-gui/metadata.xml | 8 ++ dev-util/nunit-gui/nunit-gui-3.7.0.ebuild | 99 +++++++++++++ eclass/mpt-r20150903.eclass | 12 +- 8 files changed, 452 insertions(+), 6 deletions(-) diff --git a/dev-dotnet/nunit-framework/metadata.xml b/dev-dotnet/nunit-framework/metadata.xml new file mode 100644 index 0000000..b1262f1 --- /dev/null +++ b/dev-dotnet/nunit-framework/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>dot...@gentoo.org</email> + <description>Gentoo Dotnet Project</description> + </maintainer> +</pkgmetadata> diff --git a/dev-dotnet/nunit-framework/nunit-framework-3.7.0.ebuild b/dev-dotnet/nunit-framework/nunit-framework-3.7.0.ebuild new file mode 100644 index 0000000..f071fa2 --- /dev/null +++ b/dev-dotnet/nunit-framework/nunit-framework-3.7.0.ebuild @@ -0,0 +1,75 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=6 + +KEYWORDS="~amd64 ~x86" +RESTRICT="mirror" + +#USE_DOTNET="net20 net40 net45" +USE_DOTNET="net45" +IUSE="+net45 developer debug nupkg gac doc" + +inherit mono-env gac nupkg + +NAME="nunit" +HOMEPAGE="https://github.com/nunit/${NAME}" + +EGIT_COMMIT="aa669b7e142954541d25fbb1a4ef660ca5f97f1a" +SRC_URI="${HOMEPAGE}/archive/${EGIT_COMMIT}.tar.gz -> ${PN}-${PV}.tar.gz" +S="${WORKDIR}/${NAME}-${EGIT_COMMIT}" + +SLOT="370" + +DESCRIPTION="NUnit test suite for mono applications" +LICENSE="MIT" # https://github.com/nunit/nunit/blob/master/LICENSE.txt + +CDEPEND=">=dev-lang/mono-5.0.1.1 + net45? ( + developer? ( + debug? ( dev-dotnet/cecil[net45,gac,developer,debug] ) + !debug? ( dev-dotnet/cecil[net45,gac,developer] ) + ) + !developer? ( + debug? ( dev-dotnet/cecil[net45,gac,debug] ) + !debug? ( dev-dotnet/cecil[net45,gac] ) + ) + ) +" + +DEPEND="${CDEPEND} + net45? ( + developer? ( + debug? ( dev-util/nant[net45,nupkg,developer,debug] ) + !debug? ( dev-util/nant[net45,nupkg,developer] ) + ) + !developer? ( + debug? ( dev-util/nant[net45,nupkg,debug] ) + !debug? ( dev-util/nant[net45,nupkg] ) + ) + ) +" + +RDEPEND="${CDEPEND} +" + +FILE_TO_BUILD=src/NUnitFramework/framework/nunit.framework-4.5.csproj +METAFILETOBUILD="${S}/${FILE_TO_BUILD}" + +NUGET_PACKAGE_VERSION="$(get_version_component_range 1-3)" + +src_compile() { + exbuild_strong "${METAFILETOBUILD}" +} + +src_install() { + if use debug; then + DIR=Debug + else + DIR=Release + fi + egacinstall "bin/${DIR}/net-4.5/nunit.framework.dll" + einstall_pc_file "${PN}" "${PV}" "nunit.framework" +} + diff --git a/dev-util/mono-packaging-tools/mono-packaging-tools-1.4.3.ebuild b/dev-util/mono-packaging-tools/mono-packaging-tools-1.4.3.ebuild new file mode 100644 index 0000000..9f2b6d3 --- /dev/null +++ b/dev-util/mono-packaging-tools/mono-packaging-tools-1.4.3.ebuild @@ -0,0 +1,154 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=6 # >=portage-2.2.25 +KEYWORDS="~x86 ~amd64" +RESTRICT="mirror" + +USE_DOTNET="net45" +# debug = debug configuration (symbols and defines for debugging) +# test = allow NUnit tests to run +# developer = generate symbols information (to view line numbers in stack traces, either in debug or release configuration) +# aot = compile to machine code and store to disk during install, to save time later during startups +# nupkg = create .nupkg file from .nuspec +# gac = install into gac +# pkg-config = register in pkg-config database +IUSE="+${USE_DOTNET} debug +developer test +aot doc" + +TOOLS_VERSION=14.0 + +inherit gac nupkg + +get_revision() +{ + git rev-list --count $2..$1 +} + +get_dlldir() { + echo /usr/lib64/mono/${PN} +} + +NAME="mono-packaging-tools" +HOMEPAGE="http://arsenshnurkov.github.io/mono-packaging-tools" + +REPOSITORY_URL="https://github.com/ArsenShnurkov/${NAME}" + +EGIT_COMMIT="c5a6f4f38b2ad5d5707c12a527a6639fc0adab59" +SRC_URI="${REPOSITORY_URL}/archive/${EGIT_COMMIT}.tar.gz -> ${PN}-${PV}.tar.gz" +S="${WORKDIR}/${NAME}-${EGIT_COMMIT}" + +SLOT="0" + +DESCRIPTION="Command line utilities for packaging mono assemblies with portage" +LICENSE="GPL-3" +LICENSE_URL="https://raw.githubusercontent.com/ArsenShnurkov/mono-packaging-tools/master/LICENSE" + +COMMON_DEPENDENCIES="|| ( >=dev-lang/mono-4.2 <dev-lang/mono-9999 ) + dev-dotnet/mono-options[gac] + >=dev-dotnet/slntools-1.1.3_p201508170-r1[gac] + >=dev-dotnet/eto-parse-1.4.0[gac] + " +DEPEND="${COMMON_DEPENDENCIES} + dev-dotnet/msbuildtasks + sys-apps/sed" +RDEPEND="${COMMON_DEPENDENCIES} + " + +NUSPEC_VERSION=${PV} +ASSEMBLY_VERSION=${PV} + +SLN_FILE="mono-packaging-tools.sln" +METAFILETOBUILD="${S}/${SLN_FILE}" +NUSPEC_ID="${NAME}" +COMMIT_DATE_INDEX="$(get_version_component_count ${PV} )" +COMMIT_DATE="$(get_version_component_range $COMMIT_DATE_INDEX ${PV} )" +NUSPEC_FILENAME="${PN}.nuspec" +#ICON_FILENAME="${PN}.png" +#ICON_FINALNAME="${NUSPEC_ID}.${NUSPEC_VERSION}.png" +#ICON_PATH="$(get_nuget_trusted_icons_location)/${ICON_FINALNAME}" + +src_prepare() { + eapply "${FILESDIR}/MSBuildExtensionsPath.patch" + + #change version in .nuspec + # PV = Package version (excluding revision, if any), for example 6.3. + # It should reflect the upstream versioning scheme + sed "s/@VERSION@/${NUSPEC_VERSION}/g" "${FILESDIR}/${NUSPEC_ID}.nuspec" >"${S}/${NUSPEC_ID}.nuspec" || die + + # restoring is not necessary after switching to GAC references + # enuget_restore "${METAFILETOBUILD}" + default +} + +src_compile() { + exbuild_strong /p:VersionNumber="${ASSEMBLY_VERSION}" "${METAFILETOBUILD}" + enuspec "${NUSPEC_ID}.nuspec" +} + +src_install() { + # install dlls + insinto "$(get_dlldir)/slot-${SLOT}" + if use debug; then + DIR="Debug" + else + DIR="Release" + fi + doins mpt-core/bin/${DIR}/mpt-core.dll + dosym slot-${SLOT}/mpt-core.dll $(get_dlldir)/mpt-core.dll + einstall_pc_file ${PN} ${ASSEMBLY_VERSION} mpt-core + + insinto "/usr/share/${PN}/slot-${SLOT}" + install_tool mpt-gitmodules + install_tool mpt-sln + install_tool mpt-csproj + install_tool mpt-machine + install_tool mpt-nuget + + enupkg "${WORKDIR}/${NUSPEC_ID}.${NUSPEC_VERSION}.nupkg" + + if use doc; then + dodoc README.md + fi +} + +pkg_prerm() { + if use gac; then + # TODO determine version for uninstall from slot-N dir + einfo "removing from GAC" + gacutil -u mpt-core + # don't die, it there is no such assembly in GAC + fi +} + +pkg_postinst() { + if use gac; then + einfo "adding to GAC" + gacutil -i "$(get_dlldir)/slot-${SLOT}/mpt-core.dll" || die + fi +} + +install_tool() { + if use debug; then + DIR="Debug" + else + DIR="Release" + fi + + # installs .exe, .exe.config (if any), .mdb (if exists) + doins "$1"/bin/${DIR}/*.exe + if [ -f "$1"/bin/${DIR}/*.exe.config ]; then + doins "$1"/bin/${DIR}/*.exe.config + fi + if use developer; then + doins "$1"/bin/${DIR}/*.mdb + fi + + MONO=/usr/bin/mono + + if use debug; then + make_wrapper "$1" "${MONO} --debug /usr/share/${PN}/slot-${SLOT}/$1.exe" + else + make_wrapper "$1" "${MONO} /usr/share/${PN}/slot-${SLOT}/$1.exe" + fi; +} diff --git a/dev-util/nunit-console/metadata.xml b/dev-util/nunit-console/metadata.xml new file mode 100644 index 0000000..b1262f1 --- /dev/null +++ b/dev-util/nunit-console/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>dot...@gentoo.org</email> + <description>Gentoo Dotnet Project</description> + </maintainer> +</pkgmetadata> diff --git a/dev-util/nunit-console/nunit-console-3.7.0.ebuild b/dev-util/nunit-console/nunit-console-3.7.0.ebuild new file mode 100644 index 0000000..0b7134b --- /dev/null +++ b/dev-util/nunit-console/nunit-console-3.7.0.ebuild @@ -0,0 +1,94 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=6 + +KEYWORDS="~amd64 ~x86" +RESTRICT="mirror" + +USE_DOTNET="net45" +IUSE="+net45 developer debug nupkg gac doc" + +SLOT="3" + +inherit mono-env gac nupkg + +NAME="nunit-console" +HOMEPAGE="https://github.com/nunit/${NAME}" + +EGIT_BRANCH="mono4" +EGIT_COMMIT="ce1cd856258dac867da4044eed5864de225c148d" +SRC_URI="https://github.com/ArsenShnurkov/nunit-console/archive/3.7.0.tar.gz -> ${PN}-${PV}.tar.gz" +S="${WORKDIR}/${NAME}-${PV}" + +DESCRIPTION="NUnit Console runner and test engine" +LICENSE="MIT" # https://github.com/nunit/nunit/blob/master/LICENSE.txt +#USE_DOTNET="net20 net40 net45" + +CDEPEND=">=dev-lang/mono-5.0.1.1 + >=dev-dotnet/nunit-framework-3.7.0 + net45? ( + developer? ( + debug? ( dev-dotnet/cecil[net45,gac,developer,debug] ) + !debug? ( dev-dotnet/cecil[net45,gac,developer] ) + ) + !developer? ( + debug? ( dev-dotnet/cecil[net45,gac,debug] ) + !debug? ( dev-dotnet/cecil[net45,gac] ) + ) + ) +" + +DEPEND="${CDEPEND} + net45? ( + developer? ( + debug? ( dev-util/nant[net45,nupkg,developer,debug] ) + !debug? ( dev-util/nant[net45,nupkg,developer] ) + ) + !developer? ( + debug? ( dev-util/nant[net45,nupkg,debug] ) + !debug? ( dev-util/nant[net45,nupkg] ) + ) + ) +" + +RDEPEND="${CDEPEND} + !dev-util/nunit +" + +METAFILETOBUILD="${S}/${FILE_TO_BUILD}" + +NUGET_PACKAGE_VERSION="$(get_version_component_range 1-3)" + +src_compile() { + exbuild_strong "src/NUnitEngine/nunit.engine.api/nunit.engine.api.csproj" + exbuild_strong "src/NUnitEngine/nunit.engine/nunit.engine.csproj" + exbuild "src/NUnitEngine/nunit-agent/nunit-agent.csproj" + exbuild "src/NUnitConsole/nunit3-console/nunit3-console.csproj" +} + +src_install() { + if use debug; then + DIR="Debug" + else + DIR="Release" + fi + + SLOTTEDDIR="/usr/share/nunit-${SLOT}/" + insinto "${SLOTTEDDIR}" + doins bin/${DIR}/*.{config,dll,exe} + # install: cannot stat 'bin/Release/*.mdb': No such file or directory + if use developer; then + doins bin/${DIR}/*.mdb + fi + egacinstall "bin/${DIR}/nunit.engine.dll" + egacinstall "bin/${DIR}/nunit.engine.api.dll" + einstall_pc_file "${PN}" "${PV}" "nunit.engine" "nunit.engine.api" + + make_wrapper nunit "mono ${SLOTTEDDIR}/nunit3-console.exe" + + if use doc; then + doins LICENSE.txt NOTICES.txt CHANGES.txt + fi +} diff --git a/dev-util/nunit-gui/metadata.xml b/dev-util/nunit-gui/metadata.xml new file mode 100644 index 0000000..b1262f1 --- /dev/null +++ b/dev-util/nunit-gui/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>dot...@gentoo.org</email> + <description>Gentoo Dotnet Project</description> + </maintainer> +</pkgmetadata> diff --git a/dev-util/nunit-gui/nunit-gui-3.7.0.ebuild b/dev-util/nunit-gui/nunit-gui-3.7.0.ebuild new file mode 100644 index 0000000..5678fd6 --- /dev/null +++ b/dev-util/nunit-gui/nunit-gui-3.7.0.ebuild @@ -0,0 +1,99 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=6 +KEYWORDS="~amd64 ~x86" +RESTRICT="mirror" + +SLOT="3" + +USE_DOTNET="net45" +IUSE="+net45 developer debug nupkg gac doc" + +inherit mono-env gac nupkg mpt-r20150903 + +NAME="nunit-gui" +HOMEPAGE="https://github.com/nunit/${NAME}" + +EGIT_COMMIT="df9dd76fcaad5679c08cca0775b6f43e96852a21" +SRC_URI="${HOMEPAGE}/archive/${EGIT_COMMIT}.tar.gz -> ${PN}-${PV}.tar.gz" +S="${WORKDIR}/${NAME}-${EGIT_COMMIT}" + +DESCRIPTION="NUnit test suite for mono applications" +LICENSE="MIT" # https://github.com/nunit/nunit/blob/master/LICENSE.txt + +CDEPEND=">=dev-lang/mono-5.0.1.1 + >=dev-dotnet/nunit-framework-3.7.0 + >=dev-util/nunit-console-3.7.0 + dev-dotnet/cecil + net45? ( + developer? ( + debug? ( dev-dotnet/cecil[net45,gac,developer,debug] ) + !debug? ( dev-dotnet/cecil[net45,gac,developer] ) + ) + !developer? ( + debug? ( dev-dotnet/cecil[net45,gac,debug] ) + !debug? ( dev-dotnet/cecil[net45,gac] ) + ) + ) +" + +DEPEND="${CDEPEND} + net45? ( + developer? ( + debug? ( dev-util/nant[net45,nupkg,developer,debug] ) + !debug? ( dev-util/nant[net45,nupkg,developer] ) + ) + !developer? ( + debug? ( dev-util/nant[net45,nupkg,debug] ) + !debug? ( dev-util/nant[net45,nupkg] ) + ) + ) +" + +RDEPEND="${CDEPEND} +" + +FILE_TO_BUILD="${NAME}.sln" +METAFILETOBUILD="${S}/${FILE_TO_BUILD}" + +NUGET_PACKAGE_VERSION="$(get_version_component_range 1-3)" + +src_prepare() { + empt-sln --remove-proj="nunit-gui.tests" --sln-file="${METAFILETOBUILD}" + empt-csproj --replace-reference="nunit.framework" --dir="${S}" + empt-csproj --replace-reference="nunit.engine" --dir="${S}" + empt-csproj --replace-reference="nunit.engine.api" --dir="${S}" + empt-csproj --replace-reference="Mono.Cecil" --dir="${S}" + empt-csproj --remove-reference="NUnit.System.Linq" --dir="${S}" + sed -i '/<CopyToOutputDirectory>PreserveNewest<\/CopyToOutputDirectory>/d' "${S}/src/nunit-gui/nunit-gui.csproj" || die + eapply_user +} + +src_compile() { + exbuild "${METAFILETOBUILD}" +} + +src_install() { + if use debug; then + DIR="Debug" + else + DIR="Release" + fi + + SLOTTEDDIR="/usr/share/nunit-${SLOT}/" + insinto "${SLOTTEDDIR}" + doins bin/${DIR}/*.{config,dll,exe} + rm "${D}/usr/share/nunit-3/nunit.engine.api.dll" || die #it is isntalled by dev-util/nunit-console package + # install: cannot stat 'bin/Release/*.mdb': No such file or directory + if use developer; then + doins bin/${DIR}/*.mdb + fi + + #make_wrapper nunit "mono ${SLOTTEDDIR}/nunit3-console.exe" + + if use doc; then + doins LICENSE.txt NOTICES.txt CHANGES.txt + fi +} diff --git a/eclass/mpt-r20150903.eclass b/eclass/mpt-r20150903.eclass index 345f390..56c1783 100644 --- a/eclass/mpt-r20150903.eclass +++ b/eclass/mpt-r20150903.eclass @@ -12,7 +12,7 @@ TOOLS_PATH=/usr/bin -DEPEND+=" dev-util/mono-packaging-tools" +DEPEND+=" >=dev-util/mono-packaging-tools-1.4.3" # @FUNCTION: empt-gitmodules # @DESCRIPTION: wraps mpt-gitmodules @@ -23,23 +23,23 @@ empt-gitmodules() { # @FUNCTION: empt-sln # @DESCRIPTION: wraps mpt-sln empt-sln() { - "${TOOLS_PATH}/empt-sln" $@ || die + "${TOOLS_PATH}/mpt-sln" $@ || die } # @FUNCTION: empt-csproj # @DESCRIPTION: wraps mpt-csproj empt-csproj() { - "${TOOLS_PATH}/empt-csproj" $@ || die + "${TOOLS_PATH}/mpt-csproj" $@ || die } # @FUNCTION: empt-machine -# @DESCRIPTION: wraps empt-machine +# @DESCRIPTION: wraps mpt-machine empt-machine() { - "${TOOLS_PATH}/empt-machine" $@ || die + "${TOOLS_PATH}/mpt-machine" $@ || die } # @FUNCTION: empt-nuget # @DESCRIPTION: wraps empt-nuget empt-nuget() { - "${TOOLS_PATH}/empt-nuget" $@ || die + "${TOOLS_PATH}/mpt-nuget" $@ || die }