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/x-pagedlist/, dev-util/mono-packaging-tools/
Date: Wed, 08 Feb 2017 11:42:00
Message-Id: 1485298161.1c45c0c812a23e939439e81e9e543688f6f9cea0.cynede@gentoo
1 commit: 1c45c0c812a23e939439e81e9e543688f6f9cea0
2 Author: ArsenShnurkov <ArsenShnurkov <AT> users <DOT> noreply <DOT> github <DOT> com>
3 AuthorDate: Tue Jan 24 22:49:21 2017 +0000
4 Commit: Mikhail Pukhlikov <cynede <AT> gentoo <DOT> org>
5 CommitDate: Tue Jan 24 22:49:21 2017 +0000
6 URL: https://gitweb.gentoo.org/proj/dotnet.git/commit/?id=1c45c0c8
7
8 repoman fixes 1
9
10 dev-dotnet/x-pagedlist/x-pagedlist-5.3.0.8.ebuild | 6 +-
11 .../mono-packaging-tools-0.1.3_p2016090904.ebuild | 104 ---------------------
12 ....ebuild => mono-packaging-tools-1.4.2.2.ebuild} | 94 ++++++++++++++-----
13 3 files changed, 74 insertions(+), 130 deletions(-)
14
15 diff --git a/dev-dotnet/x-pagedlist/x-pagedlist-5.3.0.8.ebuild b/dev-dotnet/x-pagedlist/x-pagedlist-5.3.0.8.ebuild
16 index 4cac7b1..e90f1bb 100644
17 --- a/dev-dotnet/x-pagedlist/x-pagedlist-5.3.0.8.ebuild
18 +++ b/dev-dotnet/x-pagedlist/x-pagedlist-5.3.0.8.ebuild
19 @@ -53,9 +53,9 @@ NUSPEC_VERSION="${PV}"
20 src_prepare() {
21 einfo "patching project files"
22
23 - find ${S} -iname "AssemblyInfo.cs" -exec sed -i '/Assembly.*Version/d' {} \; || die
24 - mpt-csproj --inject-import='$(MSBuildToolsPath)\MSBuild.Community.Tasks.Targets' ${S} || die
25 - mpt-csproj --inject-versioning=BuildVersion ${S} || die
26 + find "${S}" -iname "AssemblyInfo.cs" -exec sed -i '/Assembly.*Version/d' {} \; || die
27 + mpt-csproj --inject-import='$(MSBuildToolsPath)\MSBuild.Community.Tasks.Targets' "${S}" || die
28 + mpt-csproj --inject-versioning=BuildVersion "${S}" || die
29
30 einfo "preparing nuspec"
31 cp "${FILESDIR}/${NUSPEC_FILE_NAME}" "${S}/${NUSPEC_FILE_NAME}" || die
32
33 diff --git a/dev-util/mono-packaging-tools/mono-packaging-tools-0.1.3_p2016090904.ebuild b/dev-util/mono-packaging-tools/mono-packaging-tools-0.1.3_p2016090904.ebuild
34 deleted file mode 100644
35 index 38b1161..0000000
36 --- a/dev-util/mono-packaging-tools/mono-packaging-tools-0.1.3_p2016090904.ebuild
37 +++ /dev/null
38 @@ -1,104 +0,0 @@
39 -# Copyright 1999-2017 Gentoo Foundation
40 -# Distributed under the terms of the GNU General Public License v2
41 -# $Id$
42 -
43 -EAPI=6 # >=portage-2.2.25
44 -KEYWORDS="~x86 ~amd64"
45 -
46 -USE_DOTNET="net45"
47 -# debug = debug configuration (symbols and defines for debugging)
48 -# test = allow NUnit tests to run
49 -# developer = generate symbols information (to view line numbers in stack traces, either in debug or release configuration)
50 -# aot = compile to machine code and store to disk during install, to save time later during startups
51 -# nupkg = create .nupkg file from .nuspec
52 -# gac = install into gac
53 -# pkg-config = register in pkg-config database
54 -IUSE="${USE_DOTNET} debug test +developer +aot +nupkg +gac +pkg-config doc"
55 -
56 -inherit nupkg
57 -
58 -NAME="mono-packaging-tools"
59 -HOMEPAGE="http://arsenshnurkov.github.io/mono-packaging-tools"
60 -
61 -REPOSITORY_URL="https://github.com/ArsenShnurkov/${NAME}"
62 -
63 -EGIT_COMMIT="cd5d9c335989ec9c50a5d20790281385d7b14cae"
64 -SRC_URI="${REPOSITORY_URL}/archive/${EGIT_COMMIT}.tar.gz -> ${PF}.tar.gz"
65 -RESTRICT="mirror"
66 -S="${WORKDIR}/${NAME}-${EGIT_COMMIT}"
67 -
68 -SLOT="0"
69 -
70 -DESCRIPTION="mono packaging helpers"
71 -LICENSE="GPL-3"
72 -LICENSE_URL="https://raw.githubusercontent.com/ArsenShnurkov/mono-packaging-tools/master/LICENSE"
73 -
74 -COMMON_DEPENDENCIES="|| ( >=dev-lang/mono-4.2 <dev-lang/mono-9999 )
75 - dev-dotnet/mono-options[gac]
76 - >=dev-dotnet/slntools-1.1.3_p201508170-r1[gac]
77 - >=dev-dotnet/eto-parse-1.4.0[gac]
78 - "
79 -DEPEND="${COMMON_DEPENDENCIES}
80 - sys-apps/sed"
81 -RDEPEND="${COMMON_DEPENDENCIES}
82 - "
83 -
84 -SLN_FILE="mono-packaging-tools.sln"
85 -METAFILETOBUILD="${S}/${SLN_FILE}"
86 -NUSPEC_ID="${NAME}"
87 -COMMIT_DATE_INDEX="$(get_version_component_count ${PV} )"
88 -COMMIT_DATE="$(get_version_component_range $COMMIT_DATE_INDEX ${PV} )"
89 -NUSPEC_VERSION="$(get_version_component_range 1-3)${COMMIT_DATE//p/.}"
90 -NUSPEC_FILENAME="${PN}.nuspec"
91 -#ICON_FILENAME="${PN}.png"
92 -#ICON_FINALNAME="${NUSPEC_ID}.${NUSPEC_VERSION}.png"
93 -#ICON_PATH="$(get_nuget_trusted_icons_location)/${ICON_FINALNAME}"
94 -
95 -src_prepare() {
96 - #change version in .nuspec
97 - # PV = Package version (excluding revision, if any), for example 6.3.
98 - # It should reflect the upstream versioning scheme
99 - sed "s/@VERSION@/${NUSPEC_VERSION}/g" "${FILESDIR}/${NUSPEC_ID}.nuspec" >"${S}/${NUSPEC_ID}.nuspec" || die
100 -
101 - # restoring is not necessary after switching to GAC references
102 - # enuget_restore "${METAFILETOBUILD}"
103 - default
104 -}
105 -
106 -src_compile() {
107 - exbuild "${METAFILETOBUILD}"
108 - enuspec "${NUSPEC_ID}.nuspec"
109 -}
110 -
111 -install_tool() {
112 - if use debug; then
113 - DIR="Debug"
114 - else
115 - DIR="Release"
116 - fi
117 -
118 - MONO=/usr/bin/mono
119 -
120 - # installs .exe, .dll, .mdb (if exists), .exe.config (if any)
121 - doins "$1"/bin/${DIR}/*
122 - if use developer; then
123 - make_wrapper "$1" "${MONO} --debug /usr/share/${PN}-${SLOT}/$1.exe"
124 - else
125 - make_wrapper "$1" "${MONO} /usr/share/${PN}-${SLOT}/$1.exe"
126 - fi;
127 -}
128 -
129 -src_install() {
130 - insinto "/usr/share/${PN}-${SLOT}/"
131 - install_tool mpt-gitmodules
132 - install_tool mpt-sln
133 - install_tool mpt-csproj
134 - install_tool mpt-machine
135 - install_tool mpt-nuget
136 -
137 - enupkg "${WORKDIR}/${NUSPEC_ID}.${NUSPEC_VERSION}.nupkg"
138 -
139 - if use doc; then
140 - dodoc README.md
141 - fi
142 -}
143
144 diff --git a/dev-util/mono-packaging-tools/mono-packaging-tools-0.1.3_p2016082302.ebuild b/dev-util/mono-packaging-tools/mono-packaging-tools-1.4.2.2.ebuild
145 similarity index 60%
146 rename from dev-util/mono-packaging-tools/mono-packaging-tools-0.1.3_p2016082302.ebuild
147 rename to dev-util/mono-packaging-tools/mono-packaging-tools-1.4.2.2.ebuild
148 index ef7564d..26b584c 100644
149 --- a/dev-util/mono-packaging-tools/mono-packaging-tools-0.1.3_p2016082302.ebuild
150 +++ b/dev-util/mono-packaging-tools/mono-packaging-tools-1.4.2.2.ebuild
151 @@ -1,9 +1,10 @@
152 -# Copyright 1999-2017 Gentoo Foundation
153 +# Copyright 1999-2016 Gentoo Foundation
154 # Distributed under the terms of the GNU General Public License v2
155 # $Id$
156
157 EAPI=6 # >=portage-2.2.25
158 KEYWORDS="~x86 ~amd64"
159 +RESTRICT="mirror"
160
161 USE_DOTNET="net45"
162 # debug = debug configuration (symbols and defines for debugging)
163 @@ -13,23 +14,33 @@ USE_DOTNET="net45"
164 # nupkg = create .nupkg file from .nuspec
165 # gac = install into gac
166 # pkg-config = register in pkg-config database
167 -IUSE="${USE_DOTNET} debug test +developer +aot +nupkg +gac +pkg-config doc"
168 +IUSE="+${USE_DOTNET} debug +developer test +aot doc"
169 +
170 +TOOLS_VERSION=14.0
171 +
172 +inherit gac nupkg
173
174 -inherit nupkg
175 +get_revision()
176 +{
177 + git rev-list --count $2..$1
178 +}
179 +
180 +get_dlldir() {
181 + echo /usr/lib64/mono/${PN}
182 +}
183
184 NAME="mono-packaging-tools"
185 HOMEPAGE="http://arsenshnurkov.github.io/mono-packaging-tools"
186
187 REPOSITORY_URL="https://github.com/ArsenShnurkov/${NAME}"
188
189 -EGIT_COMMIT="2420590310aa420e9b5d6edc170660ae496cd004"
190 -SRC_URI="${REPOSITORY_URL}/archive/${EGIT_COMMIT}.tar.gz -> ${PF}.tar.gz"
191 -RESTRICT="mirror"
192 +EGIT_COMMIT="92b9ac4cb83e52a5b679f139ff536da29c321456"
193 +SRC_URI="${REPOSITORY_URL}/archive/${EGIT_COMMIT}.tar.gz -> ${PN}-${PV}.tar.gz"
194 S="${WORKDIR}/${NAME}-${EGIT_COMMIT}"
195
196 SLOT="0"
197
198 -DESCRIPTION="mono packaging helpers"
199 +DESCRIPTION="Command line utilities for packaging mono assemblies with portage"
200 LICENSE="GPL-3"
201 LICENSE_URL="https://raw.githubusercontent.com/ArsenShnurkov/mono-packaging-tools/master/LICENSE"
202
203 @@ -39,16 +50,19 @@ COMMON_DEPENDENCIES="|| ( >=dev-lang/mono-4.2 <dev-lang/mono-9999 )
204 >=dev-dotnet/eto-parse-1.4.0[gac]
205 "
206 DEPEND="${COMMON_DEPENDENCIES}
207 + dev-dotnet/msbuildtasks
208 sys-apps/sed"
209 RDEPEND="${COMMON_DEPENDENCIES}
210 "
211
212 +NUSPEC_VERSION=${PV}
213 +ASSEMBLY_VERSION=${PV}
214 +
215 SLN_FILE="mono-packaging-tools.sln"
216 METAFILETOBUILD="${S}/${SLN_FILE}"
217 NUSPEC_ID="${NAME}"
218 COMMIT_DATE_INDEX="$(get_version_component_count ${PV} )"
219 COMMIT_DATE="$(get_version_component_range $COMMIT_DATE_INDEX ${PV} )"
220 -NUSPEC_VERSION="$(get_version_component_range 1-3)${COMMIT_DATE//p/.}"
221 NUSPEC_FILENAME="${PN}.nuspec"
222 #ICON_FILENAME="${PN}.png"
223 #ICON_FINALNAME="${NUSPEC_ID}.${NUSPEC_VERSION}.png"
224 @@ -66,30 +80,23 @@ src_prepare() {
225 }
226
227 src_compile() {
228 - exbuild "${METAFILETOBUILD}"
229 + exbuild_strong /p:VersionNumber="${ASSEMBLY_VERSION}" "${METAFILETOBUILD}"
230 enuspec "${NUSPEC_ID}.nuspec"
231 }
232
233 -install_tool() {
234 +src_install() {
235 + # install dlls
236 + insinto "$(get_dlldir)/slot-${SLOT}"
237 if use debug; then
238 DIR="Debug"
239 else
240 DIR="Release"
241 fi
242 + doins mpt-core/bin/${DIR}/mpt-core.dll
243 + dosym slot-${SLOT}/mpt-core.dll $(get_dlldir)/mpt-core.dll
244 + einstall_pc_file ${PN} ${ASSEMBLY_VERSION} mpt-core
245
246 - MONO=/usr/bin/mono
247 -
248 - # installs .exe, .dll, .mdb (if exists), .exe.config (if any)
249 - doins "$1"/bin/${DIR}/*
250 - if use developer; then
251 - make_wrapper "$1" "${MONO} --debug /usr/share/${PN}-${SLOT}/$1.exe"
252 - else
253 - make_wrapper "$1" "${MONO} /usr/share/${PN}-${SLOT}/$1.exe"
254 - fi;
255 -}
256 -
257 -src_install() {
258 - insinto "/usr/share/${PN}-${SLOT}/"
259 + insinto "/usr/share/${PN}/slot-${SLOT}"
260 install_tool mpt-gitmodules
261 install_tool mpt-sln
262 install_tool mpt-csproj
263 @@ -102,3 +109,44 @@ src_install() {
264 dodoc README.md
265 fi
266 }
267 +
268 +pkg_prerm() {
269 + if use gac; then
270 + # TODO determine version for uninstall from slot-N dir
271 + einfo "removing from GAC"
272 + gacutil -u mpt-core
273 + # don't die, it there is no such assembly in GAC
274 + fi
275 +}
276 +
277 +pkg_postinst() {
278 + if use gac; then
279 + einfo "adding to GAC"
280 + gacutil -i "$(get_dlldir)/slot-${SLOT}/mpt-core.dll" || die
281 + fi
282 +}
283 +
284 +install_tool() {
285 + if use debug; then
286 + DIR="Debug"
287 + else
288 + DIR="Release"
289 + fi
290 +
291 + # installs .exe, .exe.config (if any), .mdb (if exists)
292 + doins "$1"/bin/${DIR}/*.exe
293 + if [ -f "$1"/bin/${DIR}/*.exe.config ]; then
294 + doins "$1"/bin/${DIR}/*.exe.config
295 + fi
296 + if use developer; then
297 + doins "$1"/bin/${DIR}/*.mdb
298 + fi
299 +
300 + MONO=/usr/bin/mono
301 +
302 + if use debug; then
303 + make_wrapper "$1" "${MONO} --debug /usr/share/${PN}/slot-${SLOT}/$1.exe"
304 + else
305 + make_wrapper "$1" "${MONO} /usr/share/${PN}/slot-${SLOT}/$1.exe"
306 + fi;
307 +}