blob: 0f84f02e12259d5d61852636d87a9de96b47a3f3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
|
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
KEYWORDS="~amd64"
RESTRICT="mirror"
USE_DOTNET="net45"
IUSE="+${USE_DOTNET} +gac +nupkg developer debug doc"
SLOT="0"
inherit mono-env gac nupkg versionator
NAME="NLog"
HOMEPAGE="https://github.com/NLog/${NAME}"
EGIT_COMMIT="71c8b60b25cab4cdb56c58ab042c68502e9dbbb0"
SRC_URI="${HOMEPAGE}/archive/${EGIT_COMMIT}.tar.gz -> ${PN}-${PV}.tar.gz"
S="${WORKDIR}/${NAME}-${EGIT_COMMIT}"
DESCRIPTION=" NLog - Advanced .NET and Silverlight Logging"
LICENSE="BSD" # https://github.com/NLog/NLog/blob/master/LICENSE.txt
COMMON_DEPEND=">=dev-lang/mono-4.0.2.5
>=dev-dotnet/msbuildtasks-1.5.0.196
"
RDEPEND="${COMMON_DEPEND}
"
DEPEND="${COMMON_DEPEND}
"
FILE_TO_BUILD=./src/NLog.mono.sln
METAFILETOBUILD="${S}/${FILE_TO_BUILD}"
COMMIT_DATE_INDEX="$(get_version_component_count ${PV} )"
COMMIT_DATEANDSEQ="$(get_version_component_range $COMMIT_DATE_INDEX ${PV} )"
NUSPEC_VERSION=$(get_version_component_range 1-3)"${COMMIT_DATEANDSEQ//p/.}"
ASSEMBLY_VERSION=$(get_version_component_range 1-3).$((${COMMIT_DATEANDSEQ//p/} % 65535))
src_prepare() {
chmod -R +rw "${S}" || die
eapply "${FILESDIR}/NLog.nuspec.patch"
eapply "${FILESDIR}/csproj.patch"
cd "${S}"
mpt-sln --sln-file "${METAFILETOBUILD}" --remove-proj "NLog.UnitTests.mono" || die
eapply_user
}
src_compile() {
exbuild_strong /p:VersionNumber=${ASSEMBLY_VERSION} "${METAFILETOBUILD}"
NUSPEC_PROPERTIES="BuildVersion=${NUSPEC_VERSION};platform=Mono*"
enuspec -Prop ${NUSPEC_PROPERTIES} ./src/NuGet/NLog/NLog.nuspec
}
src_install() {
if use debug; then
DIR="Debug"
else
DIR="Release"
fi
egacinstall "${S}/build/bin/${DIR}/Mono 2.x/NLog.dll"
egacinstall "${S}/build/bin/${DIR}/Mono 2.x/NLog.Extended.dll"
einstall_pc_file ${PN} ${ASSEMBLY_VERSION} NLog NLog.Extended
if use doc; then
# doins xml comments file
doins LICENSE.txt
fi
enupkg "${WORKDIR}/NLog.${NUSPEC_VERSION}.nupkg"
}
|