1 |
commit: 3056d6a03ad66ac28d3d941722bf453e446403ab |
2 |
Author: ArsenShnurkov <Arsen.Shnurkov <AT> gmail <DOT> com> |
3 |
AuthorDate: Wed Oct 28 08:23:58 2015 +0000 |
4 |
Commit: Heather Cynede <cynede <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Oct 28 14:14:10 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/dotnet.git/commit/?id=3056d6a0 |
7 |
|
8 |
rename ebuild file |
9 |
|
10 |
dev-dotnet/NLog/NLog-4.1.3_pre-r201510280.ebuild | 82 ++++++++++++++++++++++++ |
11 |
dev-dotnet/NLog/files/NLog.mono4.sln.patch | 43 +++++++++++++ |
12 |
dev-dotnet/NLog/files/NLog.nuspec.patch | 14 ++++ |
13 |
dev-dotnet/NLog/files/NoStdLib-NoConfig.patch | 81 +++++++++++++++++++++++ |
14 |
dev-dotnet/NLog/metadata.xml | 13 ++++ |
15 |
eclass/nuget.eclass | 35 +--------- |
16 |
eclass/nupkg.eclass | 53 +++++++++++++++ |
17 |
7 files changed, 287 insertions(+), 34 deletions(-) |
18 |
|
19 |
diff --git a/dev-dotnet/NLog/NLog-4.1.3_pre-r201510280.ebuild b/dev-dotnet/NLog/NLog-4.1.3_pre-r201510280.ebuild |
20 |
new file mode 100644 |
21 |
index 0000000..64908ad |
22 |
--- /dev/null |
23 |
+++ b/dev-dotnet/NLog/NLog-4.1.3_pre-r201510280.ebuild |
24 |
@@ -0,0 +1,82 @@ |
25 |
+# Copyright 1999-2015 Gentoo Foundation |
26 |
+# Distributed under the terms of the GNU General Public License v2 |
27 |
+# $Id$ |
28 |
+ |
29 |
+EAPI=5 |
30 |
+inherit mono-env dotnet nupkg |
31 |
+ |
32 |
+NAME="NLog" |
33 |
+HOMEPAGE="https://github.com/ArsenShnurkov/${NAME}" |
34 |
+ |
35 |
+EGIT_BRANCH="MONO_4_0" |
36 |
+EGIT_COMMIT="c3eb07ff89523154dc2385c7db0ba9437bff3362" |
37 |
+SRC_URI="${HOMEPAGE}/archive/${EGIT_BRANCH}/${EGIT_COMMIT}.zip -> ${PF}.zip" |
38 |
+S="${WORKDIR}/${NAME}-${EGIT_COMMIT}" |
39 |
+ |
40 |
+SLOT="0" |
41 |
+ |
42 |
+DESCRIPTION=" NLog - Advanced .NET and Silverlight Logging http://nlog-project.org" |
43 |
+LICENSE="BSD" # https://github.com/ArsenShnurkov/NLog/blob/master/LICENSE.txt |
44 |
+KEYWORDS="~amd64 ~ppc ~x86" |
45 |
+#USE_DOTNET="net20 net40 net45" |
46 |
+USE_DOTNET="net45" |
47 |
+ |
48 |
+# USE Flag 'net45' not in IUSE for dev-dotnet/NLog-4.1.3_pre-r201510280 |
49 |
+IUSE="net45 +gac +nupkg developer debug doc" |
50 |
+ |
51 |
+COMMON_DEPEND=">=dev-lang/mono-4.0.2.5 |
52 |
+" |
53 |
+RDEPEND="${COMMON_DEPEND} |
54 |
+" |
55 |
+DEPEND="${COMMON_DEPEND} |
56 |
+" |
57 |
+ |
58 |
+S="${WORKDIR}/${NAME}-${EGIT_BRANCH}" |
59 |
+FILE_TO_BUILD=./src/NLog.mono4.sln |
60 |
+METAFILETOBUILD="${S}/${FILE_TO_BUILD}" |
61 |
+ |
62 |
+NUGET_VERSION=${PV//_pre/.0} |
63 |
+ |
64 |
+src_prepare() { |
65 |
+ chmod -R +rw "${S}" || die |
66 |
+ |
67 |
+ # enuget_restore is commented out, because it give errors: |
68 |
+ # Unable to find version '1.6.4375' of package 'StatLight'. |
69 |
+ # Unable to find version '1.9.2' of package 'xunit.runners'. |
70 |
+ #enuget_restore "${METAFILETOBUILD}" |
71 |
+ |
72 |
+ epatch "${FILESDIR}/NLog.mono4.sln.patch" |
73 |
+ epatch "${FILESDIR}/NoStdLib-NoConfig.patch" |
74 |
+ epatch "${FILESDIR}/NLog.nuspec.patch" |
75 |
+} |
76 |
+ |
77 |
+# cd /var/lib/layman/dotnet |
78 |
+# ebuild ./dev-dotnet/NLog/NLog-4.1.3_pre-r201510280.ebuild compile |
79 |
+src_compile() { |
80 |
+ exbuild "${METAFILETOBUILD}" |
81 |
+ |
82 |
+ einfo Package name ${PN} |
83 |
+ |
84 |
+ enuspec -Prop BuildVersion=${NUGET_VERSION} ./src/NuGet/NLog/NLog.nuspec |
85 |
+ # Successfully created package '/var/tmp/portage/dev-dotnet/NLog-4.1.3_pre-r201510280/work/NLog.4.1.3.0.nupkg'. |
86 |
+} |
87 |
+ |
88 |
+src_install() { |
89 |
+ if use debug; then |
90 |
+ DIR="Debug" |
91 |
+ else |
92 |
+ DIR="Release" |
93 |
+ fi |
94 |
+ |
95 |
+ if use gac; then |
96 |
+ egacinstall "${S}/build/bin/${DIR}/Mono 4.x/NLog.dll" |
97 |
+ egacinstall "${S}/build/bin/${DIR}/Mono 4.x/NLog.Extended.dll" |
98 |
+ fi |
99 |
+ |
100 |
+ if use doc; then |
101 |
+# doins xml comments file |
102 |
+ doins LICENSE.txt |
103 |
+ fi |
104 |
+ |
105 |
+ enupkg "${WORKDIR}/NLog.${NUGET_VERSION}.nupkg" |
106 |
+} |
107 |
|
108 |
diff --git a/dev-dotnet/NLog/files/NLog.mono4.sln.patch b/dev-dotnet/NLog/files/NLog.mono4.sln.patch |
109 |
new file mode 100644 |
110 |
index 0000000..035c6c9 |
111 |
--- /dev/null |
112 |
+++ b/dev-dotnet/NLog/files/NLog.mono4.sln.patch |
113 |
@@ -0,0 +1,43 @@ |
114 |
+diff --git a/src/NLog.mono4.sln b/src/NLog.mono4.sln |
115 |
+index 1a9e752..75786e4 100644 |
116 |
+--- a/src/NLog.mono4.sln |
117 |
++++ b/src/NLog.mono4.sln |
118 |
+@@ -16,38 +16,27 @@ EndProject |
119 |
+ Global |
120 |
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution |
121 |
+ Debug|Any CPU = Debug|Any CPU |
122 |
+- Default|Any CPU = Default|Any CPU |
123 |
+ Release|Any CPU = Release|Any CPU |
124 |
+ EndGlobalSection |
125 |
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution |
126 |
+ {2D85AAFA-76B0-4271-8AA8-42BBD796FD39}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
127 |
+ {2D85AAFA-76B0-4271-8AA8-42BBD796FD39}.Debug|Any CPU.Build.0 = Debug|Any CPU |
128 |
+- {2D85AAFA-76B0-4271-8AA8-42BBD796FD39}.Default|Any CPU.ActiveCfg = Debug|Any CPU |
129 |
+- {2D85AAFA-76B0-4271-8AA8-42BBD796FD39}.Default|Any CPU.Build.0 = Debug|Any CPU |
130 |
+ {2D85AAFA-76B0-4271-8AA8-42BBD796FD39}.Release|Any CPU.ActiveCfg = Release|Any CPU |
131 |
+ {2D85AAFA-76B0-4271-8AA8-42BBD796FD39}.Release|Any CPU.Build.0 = Release|Any CPU |
132 |
+ {5CCB56C3-4A6E-4C11-960B-2877099F52CE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
133 |
+ {5CCB56C3-4A6E-4C11-960B-2877099F52CE}.Debug|Any CPU.Build.0 = Debug|Any CPU |
134 |
+- {5CCB56C3-4A6E-4C11-960B-2877099F52CE}.Default|Any CPU.ActiveCfg = Debug|Any CPU |
135 |
+- {5CCB56C3-4A6E-4C11-960B-2877099F52CE}.Default|Any CPU.Build.0 = Debug|Any CPU |
136 |
+ {5CCB56C3-4A6E-4C11-960B-2877099F52CE}.Release|Any CPU.ActiveCfg = Release|Any CPU |
137 |
+ {5CCB56C3-4A6E-4C11-960B-2877099F52CE}.Release|Any CPU.Build.0 = Release|Any CPU |
138 |
+ {E7AB20BF-6920-442A-B876-CC05BC5CEC79}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
139 |
+ {E7AB20BF-6920-442A-B876-CC05BC5CEC79}.Debug|Any CPU.Build.0 = Debug|Any CPU |
140 |
+- {E7AB20BF-6920-442A-B876-CC05BC5CEC79}.Default|Any CPU.ActiveCfg = Debug|Any CPU |
141 |
+ {E7AB20BF-6920-442A-B876-CC05BC5CEC79}.Release|Any CPU.ActiveCfg = Release|Any CPU |
142 |
+ {E7AB20BF-6920-442A-B876-CC05BC5CEC79}.Release|Any CPU.Build.0 = Release|Any CPU |
143 |
+ {F801A1F9-1024-4446-BF9E-A923137340B8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
144 |
+ {F801A1F9-1024-4446-BF9E-A923137340B8}.Debug|Any CPU.Build.0 = Debug|Any CPU |
145 |
+- {F801A1F9-1024-4446-BF9E-A923137340B8}.Default|Any CPU.ActiveCfg = Debug|Any CPU |
146 |
+ {F801A1F9-1024-4446-BF9E-A923137340B8}.Release|Any CPU.ActiveCfg = Release|Any CPU |
147 |
+ {F801A1F9-1024-4446-BF9E-A923137340B8}.Release|Any CPU.Build.0 = Release|Any CPU |
148 |
+ {FE0A3713-E9A8-41F0-89FA-C1126F8FB6A8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
149 |
+- {FE0A3713-E9A8-41F0-89FA-C1126F8FB6A8}.Debug|Any CPU.Build.0 = Debug|Any CPU |
150 |
+- {FE0A3713-E9A8-41F0-89FA-C1126F8FB6A8}.Default|Any CPU.ActiveCfg = Debug|Any CPU |
151 |
+- {FE0A3713-E9A8-41F0-89FA-C1126F8FB6A8}.Default|Any CPU.Build.0 = Debug|Any CPU |
152 |
+ {FE0A3713-E9A8-41F0-89FA-C1126F8FB6A8}.Release|Any CPU.ActiveCfg = Release|Any CPU |
153 |
+- {FE0A3713-E9A8-41F0-89FA-C1126F8FB6A8}.Release|Any CPU.Build.0 = Release|Any CPU |
154 |
+ EndGlobalSection |
155 |
+ GlobalSection(SolutionProperties) = preSolution |
156 |
+ HideSolutionNode = FALSE |
157 |
|
158 |
diff --git a/dev-dotnet/NLog/files/NLog.nuspec.patch b/dev-dotnet/NLog/files/NLog.nuspec.patch |
159 |
new file mode 100644 |
160 |
index 0000000..1c00afb |
161 |
--- /dev/null |
162 |
+++ b/dev-dotnet/NLog/files/NLog.nuspec.patch |
163 |
@@ -0,0 +1,14 @@ |
164 |
+diff --git a/src/NuGet/NLog/NLog.nuspec b/src/NuGet/NLog/NLog.nuspec |
165 |
+index 273ed21..305451b 100644 |
166 |
+--- a/src/NuGet/NLog/NLog.nuspec |
167 |
++++ b/src/NuGet/NLog/NLog.nuspec |
168 |
+@@ -17,4 +17,8 @@ For your main project also need to install "NLog Configuration" package.</descri |
169 |
+ <licenseUrl>http://raw.github.com/NLog/NLog/master/LICENSE.txt</licenseUrl> |
170 |
+ <tags>logging, log, tracing, logfiles, NLog</tags> |
171 |
+ </metadata> |
172 |
++ <files> |
173 |
++ <file src="build/bin/$configuration$/Mono 4.x/NLog.dll" target="lib\net45\" /> |
174 |
++ <file src="build/bin/$configuration$/Mono 4.x/NLog.Extended.dll" target="lib\net45\" /> |
175 |
++ </files> |
176 |
+ </package> |
177 |
+\ No newline at end of file |
178 |
|
179 |
diff --git a/dev-dotnet/NLog/files/NoStdLib-NoConfig.patch b/dev-dotnet/NLog/files/NoStdLib-NoConfig.patch |
180 |
new file mode 100644 |
181 |
index 0000000..f9f55b6 |
182 |
--- /dev/null |
183 |
+++ b/dev-dotnet/NLog/files/NoStdLib-NoConfig.patch |
184 |
@@ -0,0 +1,81 @@ |
185 |
+diff --git a/src/NLog.Extended/NLog.Extended.mono4.csproj b/src/NLog.Extended/NLog.Extended.mono4.csproj |
186 |
+index 80eac6b..4c8bf1b 100644 |
187 |
+--- a/src/NLog.Extended/NLog.Extended.mono4.csproj |
188 |
++++ b/src/NLog.Extended/NLog.Extended.mono4.csproj |
189 |
+@@ -8,8 +8,6 @@ |
190 |
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> |
191 |
+ <ErrorReport>prompt</ErrorReport> |
192 |
+ <FileAlignment>512</FileAlignment> |
193 |
+- <NoStdLib>true</NoStdLib> |
194 |
+- <NoConfig>true</NoConfig> |
195 |
+ <OutputType>Library</OutputType> |
196 |
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> |
197 |
+ <ProjectGuid>{F801A1F9-1024-4446-BF9E-A923137340B8}</ProjectGuid> |
198 |
+diff --git a/src/NLog/NLog.mono4.csproj b/src/NLog/NLog.mono4.csproj |
199 |
+index cf48986..d0a07f1 100644 |
200 |
+--- a/src/NLog/NLog.mono4.csproj |
201 |
++++ b/src/NLog/NLog.mono4.csproj |
202 |
+@@ -8,8 +8,6 @@ |
203 |
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> |
204 |
+ <ErrorReport>prompt</ErrorReport> |
205 |
+ <FileAlignment>512</FileAlignment> |
206 |
+- <NoConfig>true</NoConfig> |
207 |
+- <NoStdLib>true</NoStdLib> |
208 |
+ <NoWarn>0419</NoWarn> |
209 |
+ <OutputType>Library</OutputType> |
210 |
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> |
211 |
+diff --git a/src/NLogAutoLoadExtension/NLogAutoLoadExtension.mono4.csproj b/src/NLogAutoLoadExtension/NLogAutoLoadExtension.mono4.csproj |
212 |
+index 02fa2ca..7798377 100644 |
213 |
+--- a/src/NLogAutoLoadExtension/NLogAutoLoadExtension.mono4.csproj |
214 |
++++ b/src/NLogAutoLoadExtension/NLogAutoLoadExtension.mono4.csproj |
215 |
+@@ -21,7 +21,6 @@ |
216 |
+ <ErrorReport>prompt</ErrorReport> |
217 |
+ <WarningLevel>4</WarningLevel> |
218 |
+ <OutputPath>bin\Debug</OutputPath> |
219 |
+- <NoStdLib>true</NoStdLib> |
220 |
+ <IntermediateOutputPath>$(BaseOutputDirectory)obj\$(Configuration)\Mono 4.x</IntermediateOutputPath> |
221 |
+ </PropertyGroup> |
222 |
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> |
223 |
+@@ -32,12 +31,9 @@ |
224 |
+ <ErrorReport>prompt</ErrorReport> |
225 |
+ <WarningLevel>4</WarningLevel> |
226 |
+ <OutputPath>bin\Release</OutputPath> |
227 |
+- <NoStdLib>true</NoStdLib> |
228 |
+ <IntermediateOutputPath>$(BaseOutputDirectory)obj\$(Configuration)\Mono 4.x</IntermediateOutputPath> |
229 |
+ </PropertyGroup> |
230 |
+ <PropertyGroup> |
231 |
+- <NoStdLib>true</NoStdLib> |
232 |
+- <NoConfig>true</NoConfig> |
233 |
+ <OutputPath>$(BaseOutputDirectory)bin\$(Configuration)\Mono 4.x</OutputPath> |
234 |
+ <IntermediateOutputPath>$(BaseOutputDirectory)obj\$(Configuration)\Mono 4.x</IntermediateOutputPath> |
235 |
+ </PropertyGroup> |
236 |
+diff --git a/tests/SampleExtensions/SampleExtensions.mono4.csproj b/tests/SampleExtensions/SampleExtensions.mono4.csproj |
237 |
+index e3d0803..d84de8d 100644 |
238 |
+--- a/tests/SampleExtensions/SampleExtensions.mono4.csproj |
239 |
++++ b/tests/SampleExtensions/SampleExtensions.mono4.csproj |
240 |
+@@ -17,8 +17,6 @@ |
241 |
+ <DebugType>full</DebugType> |
242 |
+ <Optimize>false</Optimize> |
243 |
+ <DefineConstants>DEBUG;TRACE</DefineConstants> |
244 |
+- <NoStdLib>true</NoStdLib> |
245 |
+- <NoConfig>true</NoConfig> |
246 |
+ <ErrorReport>prompt</ErrorReport> |
247 |
+ <WarningLevel>4</WarningLevel> |
248 |
+ <IntermediateOutputPath>$(BaseOutputDirectory)obj\$(Configuration)\Mono 4.x</IntermediateOutputPath> |
249 |
+@@ -28,16 +26,12 @@ |
250 |
+ <DebugType>pdbonly</DebugType> |
251 |
+ <Optimize>true</Optimize> |
252 |
+ <DefineConstants>TRACE</DefineConstants> |
253 |
+- <NoStdLib>true</NoStdLib> |
254 |
+- <NoConfig>true</NoConfig> |
255 |
+ <ErrorReport>prompt</ErrorReport> |
256 |
+ <WarningLevel>4</WarningLevel> |
257 |
+ <IntermediateOutputPath>$(BaseOutputDirectory)obj\$(Configuration)\Mono 4.x</IntermediateOutputPath> |
258 |
+ <OutputPath>$(BaseOutputDirectory)bin\$(Configuration)\Mono 4.x</OutputPath> |
259 |
+ </PropertyGroup> |
260 |
+ <PropertyGroup> |
261 |
+- <NoStdLib>true</NoStdLib> |
262 |
+- <NoConfig>true</NoConfig> |
263 |
+ <DefineConstants>MONO;MONO4_0;$(DefineConstants)</DefineConstants> |
264 |
+ <OutputPath>$(BaseOutputDirectory)bin\$(Configuration)\Mono 4.x</OutputPath> |
265 |
+ <IntermediateOutputPath>$(BaseOutputDirectory)obj\$(Configuration)\Mono 4.x</IntermediateOutputPath> |
266 |
|
267 |
diff --git a/dev-dotnet/NLog/metadata.xml b/dev-dotnet/NLog/metadata.xml |
268 |
new file mode 100644 |
269 |
index 0000000..5c0862c |
270 |
--- /dev/null |
271 |
+++ b/dev-dotnet/NLog/metadata.xml |
272 |
@@ -0,0 +1,13 @@ |
273 |
+<?xml version="1.0" encoding="UTF-8"?> |
274 |
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
275 |
+<pkgmetadata> |
276 |
+ <herd>dotnet</herd> |
277 |
+ <maintainer> |
278 |
+ <email>dotnet@g.o</email> |
279 |
+ <name>dotnet</name> |
280 |
+ </maintainer> |
281 |
+ <use> |
282 |
+ <flag name='developer'>enables debug information for any of debug and release builds</flag> |
283 |
+ <flag name='nupkg'>creates local nuget package</flag> |
284 |
+ </use> |
285 |
+</pkgmetadata> |
286 |
|
287 |
diff --git a/eclass/nuget.eclass b/eclass/nuget.eclass |
288 |
index 1561fd6..d742265 100644 |
289 |
--- a/eclass/nuget.eclass |
290 |
+++ b/eclass/nuget.eclass |
291 |
@@ -18,39 +18,6 @@ enuget_restore() { |
292 |
nuget restore "$@" || die |
293 |
} |
294 |
|
295 |
-# @FUNCTION: enuspec |
296 |
-# @DESCRIPTION: run nuget pack |
297 |
-# accepts path to .nuspec file as parameter |
298 |
-enuspec() { |
299 |
- if use nupkg; then |
300 |
- if use debug; then |
301 |
- PROPS=Configuration=Debug |
302 |
- else |
303 |
- PROPS=Configuration=Release |
304 |
- fi |
305 |
- nuget pack -Properties "${PROPS}" -BasePath "${S}" -OutputDirectory "${WORKDIR}" -NonInteractive -Verbosity detailed "$@" || die |
306 |
- fi |
307 |
-} |
308 |
- |
309 |
-# @FUNCTION: enupkg |
310 |
-# @DESCRIPTION: installs .nupkg into local repository |
311 |
-# accepts path to .nupkg file as parameter |
312 |
-enupkg() { |
313 |
- if use nupkg; then |
314 |
- if [ -d "/var/calculate/remote/distfiles" ]; then |
315 |
- # Control will enter here if the directory exist. |
316 |
- # this is necessary to handle calculate linux profiles feature (for corporate users) |
317 |
- elog "Installing .nupkg into /var/calculate/remote/packages/NuGet" |
318 |
- insinto /var/calculate/remote/packages/NuGet |
319 |
- else |
320 |
- # this is for all normal gentoo-based distributions |
321 |
- elog "Installing .nupkg into /usr/local/nuget/nupkg" |
322 |
- insinto /usr/local/nuget/nupkg |
323 |
- fi |
324 |
- doins "$@" |
325 |
- fi |
326 |
-} |
327 |
- |
328 |
# @ECLASS_VARIABLE: NUGET_DEPEND |
329 |
# @DESCRIPTION Set false to net depend on nuget |
330 |
: ${NUGET_NO_DEPEND:=} |
331 |
@@ -60,7 +27,7 @@ if [[ -n $NUGET_NO_DEPEND ]]; then |
332 |
fi |
333 |
|
334 |
NPN=${PN/_/.} |
335 |
-if [[ $PV == *_alpha* ]] |
336 |
+if [[ $PV == *_alpha* ]] || [[ $PV == *_beta* ]] || [[ $PV == *_pre* ]] |
337 |
then |
338 |
NPV=${PVR/_/-} |
339 |
else |
340 |
|
341 |
diff --git a/eclass/nupkg.eclass b/eclass/nupkg.eclass |
342 |
new file mode 100644 |
343 |
index 0000000..398c4ab |
344 |
--- /dev/null |
345 |
+++ b/eclass/nupkg.eclass |
346 |
@@ -0,0 +1,53 @@ |
347 |
+# Copyright 1999-2015 Gentoo Foundation |
348 |
+# Distributed under the terms of the GNU General Public License v2 |
349 |
+# $Id$ |
350 |
+ |
351 |
+# @ECLASS: nupkg.eclass |
352 |
+# @MAINTAINER: cynede@g.o |
353 |
+# @BLURB: Functions for building and maintaining local nuget packages repository |
354 |
+# @DESCRIPTION: Common functionality needed by fake build system. |
355 |
+ |
356 |
+inherit dotnet |
357 |
+ |
358 |
+# @FUNCTION: enuspec |
359 |
+# @DESCRIPTION: run nuget pack |
360 |
+# accepts path to .nuspec file as parameter |
361 |
+enuspec() { |
362 |
+ if use nupkg; then |
363 |
+ # see http://docs.nuget.org/create/nuspec-reference#specifying-files-to-include-in-the-package |
364 |
+ # for the explaination why $configuration$ property is passed |
365 |
+ if use debug; then |
366 |
+ PROPS=configuration=Debug |
367 |
+ else |
368 |
+ PROPS=configuration=Release |
369 |
+ fi |
370 |
+ nuget pack -Properties "${PROPS}" -BasePath "${S}" -OutputDirectory "${WORKDIR}" -NonInteractive -Verbosity detailed "$@" || die |
371 |
+ fi |
372 |
+} |
373 |
+ |
374 |
+# @FUNCTION: enupkg |
375 |
+# @DESCRIPTION: installs .nupkg into local repository |
376 |
+# accepts path to .nupkg file as parameter |
377 |
+enupkg() { |
378 |
+ if use nupkg; then |
379 |
+ if [ -d "/var/calculate/remote/distfiles" ]; then |
380 |
+ # Control will enter here if the directory exist. |
381 |
+ # this is necessary to handle calculate linux profiles feature (for corporate users) |
382 |
+ elog "Installing .nupkg into /var/calculate/remote/packages/NuGet" |
383 |
+ insinto /var/calculate/remote/packages/NuGet |
384 |
+ else |
385 |
+ # this is for all normal gentoo-based distributions |
386 |
+ elog "Installing .nupkg into /usr/local/nuget/nupkg" |
387 |
+ insinto /usr/local/nuget/nupkg |
388 |
+ fi |
389 |
+ doins "$@" |
390 |
+ fi |
391 |
+} |
392 |
+ |
393 |
+# @ECLASS_VARIABLE: NUGET_DEPEND |
394 |
+# @DESCRIPTION Set false to net depend on nuget |
395 |
+: ${NUGET_NO_DEPEND:=} |
396 |
+ |
397 |
+if [[ -n $NUGET_NO_DEPEND ]]; then |
398 |
+ DEPEND+=" dev-dotnet/nuget" |
399 |
+fi |