Gentoo Archives: gentoo-commits

From: Mikhail Pukhlikov <cynede@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/dotnet:master commit in: dev-dotnet/msbuildtasks/
Date: Tue, 31 Oct 2017 08:03:04
Message-Id: 1509436547.89d64519a1e9e0debfc6362440043550915b60a5.cynede@gentoo
1 commit: 89d64519a1e9e0debfc6362440043550915b60a5
2 Author: ArsenShnurkov <ArsenShnurkov <AT> users <DOT> noreply <DOT> github <DOT> com>
3 AuthorDate: Tue Oct 31 07:55:47 2017 +0000
4 Commit: Mikhail Pukhlikov <cynede <AT> gentoo <DOT> org>
5 CommitDate: Tue Oct 31 07:55:47 2017 +0000
6 URL: https://gitweb.gentoo.org/proj/dotnet.git/commit/?id=89d64519
7
8 symlink added
9
10 .../msbuildtasks/msbuildtasks-1.5.0.240-r3.ebuild | 90 ++++++++++++++++++++++
11 1 file changed, 90 insertions(+)
12
13 diff --git a/dev-dotnet/msbuildtasks/msbuildtasks-1.5.0.240-r3.ebuild b/dev-dotnet/msbuildtasks/msbuildtasks-1.5.0.240-r3.ebuild
14 new file mode 100644
15 index 0000000..9465be2
16 --- /dev/null
17 +++ b/dev-dotnet/msbuildtasks/msbuildtasks-1.5.0.240-r3.ebuild
18 @@ -0,0 +1,90 @@
19 +# Copyright 1999-2017 Gentoo Foundation
20 +# Distributed under the terms of the GNU General Public License v2
21 +# $Id$
22 +
23 +EAPI=6
24 +SLOT="0"
25 +
26 +KEYWORDS="~amd64 ~ppc ~x86"
27 +USE_DOTNET="net45"
28 +
29 +inherit dotnet gac mono-pkg-config
30 +
31 +IUSE="+${USE_DOTNET} +debug developer doc xbuild"
32 +
33 +HOMEPAGE="https://github.com/loresoft/msbuildtasks"
34 +EGIT_COMMIT="014ed0f7a69f4936d7b3b438a5ceca78f902e0ef"
35 +SRC_URI="${HOMEPAGE}/archive/${EGIT_COMMIT}.tar.gz -> ${PN}-${PV}.tar.gz
36 + https://github.com/mono/mono/raw/master/mcs/class/mono.snk"
37 +RESTRICT="mirror"
38 +NAME="msbuildtasks"
39 +S="${WORKDIR}/${NAME}-${EGIT_COMMIT}"
40 +
41 +DESCRIPTION="The MSBuild Community Tasks Project is an open source project for MSBuild tasks."
42 +LICENSE="BSD" # https://github.com/loresoft/msbuildtasks/blob/master/LICENSE
43 +
44 +COMMON_DEPEND=">=dev-lang/mono-4.0.2.5
45 + >=dev-dotnet/dotnetzip-semverd-1.9.3-r2
46 +"
47 +RDEPEND="${COMMON_DEPEND}
48 +"
49 +DEPEND="${COMMON_DEPEND}
50 +"
51 +
52 +KEY2="${DISTDIR}/mono.snk"
53 +
54 +function metafile_to_build ( ) {
55 + echo "Source/MSBuild.Community.Tasks/MSBuild.Community.Tasks.csproj"
56 +}
57 +
58 +function output_filename ( ) {
59 + local DIR=""
60 + if use debug; then
61 + DIR="Debug"
62 + else
63 + DIR="Release"
64 + fi
65 + echo "Source/MSBuild.Community.Tasks/bin/${DIR}/MSBuild.Community.Tasks.dll"
66 +}
67 +
68 +function deploy_dir ( ) {
69 + echo "/usr/lib/mono/${EBUILD_FRAMEWORK}"
70 +}
71 +
72 +src_prepare() {
73 + eapply "${FILESDIR}/remove-sandcastle-task.patch"
74 + eapply "${FILESDIR}/csproj.patch"
75 + eapply "${FILESDIR}/location.patch"
76 + sed -i 's/Microsoft.Build.Framework/Microsoft.Build.Framework, Version=15.3.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756/g' "$(metafile_to_build)" || die
77 + sed -i 's/Microsoft.Build.Utilities.v4.0/Microsoft.Build.Utilities.Core, Version=15.3.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756/g' "$(metafile_to_build)" || die
78 + eapply_user
79 +}
80 +
81 +src_compile() {
82 + exbuild_strong "$(metafile_to_build)"
83 + sn -R "$(output_filename)" "${KEY2}" || die
84 +}
85 +
86 +src_install() {
87 + insinto "$(deploy_dir)"
88 + doins "$(output_filename)"
89 + einstall_pc_file "${PN}" "${PV}" "MSBuild.Community.Tasks"
90 +
91 + insinto "/usr/share/msbuild"
92 + doins "Source/MSBuild.Community.Tasks/MSBuild.Community.Tasks.Targets"
93 +
94 + if use xbuild; then
95 + insinto "/usr/lib/mono/xbuild"
96 + dosym "${EPREFIX}/usr/share/msbuild/MSBuild.Community.Tasks.Targets" "/usr/lib/mono/xbuild/MSBuild.Community.Tasks.Targets"
97 + fi
98 +}
99 +
100 +pkg_postinst()
101 +{
102 + egacadd "$(deploy_dir)/MSBuild.Community.Tasks.dll"
103 +}
104 +
105 +pkg_prerm()
106 +{
107 + egacdel "MSBuild.Community.Tasks"
108 +}