* [gentoo-commits] proj/dotnet:master commit in: dev-dotnet/monotorrent/, eclass/, dev-dotnet/monotorrent/files/
@ 2015-10-29 7:21 Heather Cynede
0 siblings, 0 replies; only message in thread
From: Heather Cynede @ 2015-10-29 7:21 UTC (permalink / raw
To: gentoo-commits
commit: 9ad6c388b5f59e93eeb84fd31c99a622b4281f24
Author: ArsenShnurkov <Arsen.Shnurkov <AT> gmail <DOT> com>
AuthorDate: Thu Oct 29 03:03:21 2015 +0000
Commit: Heather Cynede <cynede <AT> gentoo <DOT> org>
CommitDate: Thu Oct 29 03:03:21 2015 +0000
URL: https://gitweb.gentoo.org/proj/dotnet.git/commit/?id=9ad6c388
ebuild features added
.../monotorrent/files/NoStdLib-NoConfig.patch | 0
.../files/downgrade-from-4.6-to-4.5.patch | 42 ++++++++++
.../monotorrent-1.0.0-r201510130.ebuild | 97 ++++++++++++----------
eclass/nuget.eclass | 25 +-----
eclass/nupkg.eclass | 16 ++++
5 files changed, 111 insertions(+), 69 deletions(-)
diff --git a/dev-dotnet/monotorrent/files/NoStdLib-NoConfig.patch b/dev-dotnet/monotorrent/files/NoStdLib-NoConfig.patch
new file mode 100644
index 0000000..e69de29
diff --git a/dev-dotnet/monotorrent/files/downgrade-from-4.6-to-4.5.patch b/dev-dotnet/monotorrent/files/downgrade-from-4.6-to-4.5.patch
new file mode 100644
index 0000000..24e6922
--- /dev/null
+++ b/dev-dotnet/monotorrent/files/downgrade-from-4.6-to-4.5.patch
@@ -0,0 +1,42 @@
+diff --git a/src/MonoTorrent/MonoTorrent.csproj b/src/MonoTorrent/MonoTorrent.csproj
+index f5e5bdf..50fe05a 100644
+--- a/src/MonoTorrent/MonoTorrent.csproj
++++ b/src/MonoTorrent/MonoTorrent.csproj
+@@ -1,9 +1,7 @@
+ <?xml version="1.0" encoding="utf-8"?>
+-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="12.0">
++<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
+ <PropertyGroup>
+ <ProjectType>Local</ProjectType>
+- <ProductVersion>9.0.21022</ProductVersion>
+- <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{411A9E0E-FDC6-4E25-828A-0C2CD1CD96F8}</ProjectGuid>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+@@ -23,7 +21,7 @@
+ <OldToolsVersion>3.5</OldToolsVersion>
+ <UpgradeBackupLocation>
+ </UpgradeBackupLocation>
+- <TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
++ <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
+ <PublishUrl>publish\</PublishUrl>
+ <Install>true</Install>
+ <InstallFrom>Disk</InstallFrom>
+@@ -47,8 +45,6 @@
+ <ConfigurationOverrideFile>
+ </ConfigurationOverrideFile>
+ <DefineConstants>TRACE;DEBUG</DefineConstants>
+- <DocumentationFile>
+- </DocumentationFile>
+ <DebugSymbols>true</DebugSymbols>
+ <FileAlignment>4096</FileAlignment>
+ <Optimize>false</Optimize>
+@@ -65,8 +61,6 @@
+ <ConfigurationOverrideFile>
+ </ConfigurationOverrideFile>
+ <DefineConstants>TRACE</DefineConstants>
+- <DocumentationFile>
+- </DocumentationFile>
+ <FileAlignment>4096</FileAlignment>
+ <Optimize>true</Optimize>
+ <OutputPath>..\..\build\MonoTorrent\Release\</OutputPath>
diff --git a/dev-dotnet/monotorrent/monotorrent-1.0.0-r201510130.ebuild b/dev-dotnet/monotorrent/monotorrent-1.0.0-r201510130.ebuild
index b2c59fe..61cf473 100644
--- a/dev-dotnet/monotorrent/monotorrent-1.0.0-r201510130.ebuild
+++ b/dev-dotnet/monotorrent/monotorrent-1.0.0-r201510130.ebuild
@@ -4,7 +4,8 @@
EAPI=5
-inherit mono-env dotnet nupkg
+# mono-env
+inherit dotnet nupkg
HOMEPAGE="http://projects.qnetp.net/projects/show/monotorrent"
DESCRIPTION="Monotorrent is an open source C# bittorrent library"
@@ -12,6 +13,7 @@ LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="net45 +gac +nupkg pkg-config debug developer"
+USE_DOTNET="net45"
COMMON_DEPEND=">=dev-lang/mono-4.0.2.5
"
@@ -30,8 +32,8 @@ ICONMETA="https://openclipart.org/detail/198771/mono-torrent"
ICON_URL="https://openclipart.org/download/198771/mono-torrent.svg"
# monotorrent-1.0.0-r201510130
-EGIT_BRANCH="longpath"
-EGIT_COMMIT="e78d386d0785a9a42eeb5865bd58a8887e14b8f2"
+EGIT_BRANCH="master"
+EGIT_COMMIT="a76e4cd552d0fff51e47a25fe050efff672f34b2"
SRC_URI="${REPOSITORY}/archive/${EGIT_BRANCH}/${EGIT_COMMIT}.zip -> ${PF}.zip
mirror://gentoo/mono.snk.bz2"
#S="${WORKDIR}/${NAME}-${EGIT_COMMIT}"
@@ -42,75 +44,80 @@ S="${WORKDIR}/${NAME}-${EGIT_BRANCH}"
RESTRICT="test"
FILE_TO_BUILD=./src/MonoTorrent.sln
-METAFILETOBUILD="${S}/${FILE_TO_BUILD}"
-src_prepare() {
- #enuget_restore "${METAFILETOBUILD}"
+#METAFILETOBUILD="${S}/${FILE_TO_BUILD}"
+#gives Reference 'AlphaFS, Version=2.0.0.0, Culture=neutral, PublicKeyToken=4d31a58f7d7ad5c9, processorArchitecture=MSIL' not resolved
+
+METAFILETOBUILD="src/MonoTorrent/MonoTorrent.csproj"
+
+# leafpad /var/lib/layman/dotnet/eclass/nupkg.eclass &
+NUGET_VERSION="${PVR//-r/.}"
+src_prepare() {
sed -i \
-e "/InternalsVisibleTo/d" \
- MonoTorrent/AssemblyInfo.cs* || die
+ ./src/MonoTorrent/AssemblyInfo.cs* || die
+
+ epatch "${FILESDIR}/NoStdLib-NoConfig.patch"
+ epatch "${FILESDIR}/downgrade-from-4.6-to-4.5.patch"
+
+ enuget_restore "${METAFILETOBUILD}"
+
+ # leafpad /var/tmp/portage/dev-dotnet/monotorrent-1.0.0-r201510130/work/monotorrent-master/monotorrent.nuspec &
+ create_nuspec_file "${S}/${PN}.nuspec"
+}
+
+src_configure() {
+ :;
}
src_compile() {
# emake -j1 ASSEMBLY_COMPILER_COMMAND="/usr/bin/gmcs" -keyfile:${WORKDIR}/mono.snk
- exbuild "${METAFILETOBUILD}"
+ exbuild /p:SignAssembly=true "/p:AssemblyOriginatorKeyFile=${WORKDIR}/mono.snk" "${METAFILETOBUILD}"
- create_nuspec_file
+ # run nuget_pack
+ enuspec -Prop version=${NUGET_VERSION} ./${PN}.nuspec
}
src_install() {
egacinstall $(find . -name "MonoTorrent.dll")
+
+ enupkg "${WORKDIR}/monotorrent.${NUGET_VERSION}.nupkg"
+
if use pkg-config; then
install_pc_file
fi
}
-# replace underscore to dash
-NUGET_VERSION="${PV//_/-}"
-
create_nuspec_file()
{
- REPLACEMENT_TOKENS+="s~$id$~${PN}~g;"
- REPLACEMENT_TOKENS+="s~$version$~${NUGET_VERSION}~g;"
- REPLACEMENT_TOKENS+="s~$author$~leaves project~g;"
- REPLACEMENT_TOKENS+="s~$package_owners$~lasy monkeys~g;"
- REPLACEMENT_TOKENS+="s~$package_licenseUrl$~${LICENSE_URL}~g;"
- REPLACEMENT_TOKENS+="s~$package_ProjectUrl$~${HOMEPAGE}~g;"
- REPLACEMENT_TOKENS+="s~$package_iconUrl$~${ICON_URL}~g;"
- REPLACEMENT_TOKENS+="s~$description$~${DESCRIPTION}~g;"
- sed "${REPLACEMENT_TOKENS}" <<EOF >"${S}/${PN}.nuspec" || die
+ if use nupkg; then
+ if use debug; then
+ DIR="Debug"
+ else
+ DIR="Release"
+ fi
+ cat <<EOF >$1 || die
<?xml version="1.0"?>
-<package >
+<package>
<metadata>
- <id>$id$</id>
- <version>$version$</version>
- <authors>$author$</authors>
- <owners>$package_owners$</owners>
- <licenseUrl>$package_licenseUrl$</licenseUrl>
- <projectUrl>$package_ProjectUrl$</projectUrl>
- <iconUrl>$package_iconUrl$</iconUrl>
- <requireLicenseAcceptance>false</requireLicenseAcceptance>
- <description>$description$</description>
- <!--
- <releaseNotes>$package_releaseNotes$</releaseNotes>
- <copyright>$package_copyright$</copyright>
- <tags>$package_tags$</tags>
- -->
- <!--
- <dependencies>
- <dependency id="SampleDependency" version="1.0" />
- </dependencies>
- -->
+ <id>${PN}</id>
+ <version>${NUGET_VERSION}</version>
+ <authors>unknown</authors>
+ <owners>unknown</owners>
+ <licenseUrl>${LICENSE_URL}</licenseUrl>
+ <projectUrl>${HOMEPAGE}</projectUrl>
+ <iconUrl>${ICON_URL}</iconUrl>
+ <requireLicenseAcceptance>false</requireLicenseAcceptance>
+ <description>${DESCRIPTION}</description>
</metadata>
<files> <!-- https://docs.nuget.org/create/nuspec-reference -->
- <file src="bin/$configuration$/*.dll" target="lib\net40\" />
+ <file src="build/MonoTorrent/${DIR}/*.dll" target="lib\net45\" />
+ <file src="build/MonoTorrent/${DIR}/*.mdb" target="lib\net45\" />
</files>
-
</package>
EOF
- # run nuget_pack
- enuspec -Prop version=${NUGET_VERSION} ./${PN}.nuspec
+ fi
}
install_pc_file()
diff --git a/eclass/nuget.eclass b/eclass/nuget.eclass
index d742265..02e13b8 100644
--- a/eclass/nuget.eclass
+++ b/eclass/nuget.eclass
@@ -9,30 +9,7 @@
# introduce nuget IUSE flag for packages that are on nuget to download them from nuget. (if sources fails with some reason or dependies is complicated or if user just want binaries).
# or maybe even introduce few packages that just downloads and instulls from nuget, reason is obviously - easy maintaince
-inherit dotnet
-
-# @FUNCTION: enuget_restore
-# @DESCRIPTION: run nuget restore
-# accepts path to .sln or .proj or .csproj file to restore as parameter
-enuget_restore() {
- nuget restore "$@" || die
-}
-
-# @ECLASS_VARIABLE: NUGET_DEPEND
-# @DESCRIPTION Set false to net depend on nuget
-: ${NUGET_NO_DEPEND:=}
-
-if [[ -n $NUGET_NO_DEPEND ]]; then
- DEPEND+=" dev-dotnet/nuget"
-fi
-
-NPN=${PN/_/.}
-if [[ $PV == *_alpha* ]] || [[ $PV == *_beta* ]] || [[ $PV == *_pre* ]]
-then
- NPV=${PVR/_/-}
-else
- NPV=${PVR}
-fi
+inherit nupkg
# @FUNCTION: nuget_src_unpack
# @DESCRIPTION: Runs nuget
diff --git a/eclass/nupkg.eclass b/eclass/nupkg.eclass
index 398c4ab..4142588 100644
--- a/eclass/nupkg.eclass
+++ b/eclass/nupkg.eclass
@@ -9,6 +9,13 @@
inherit dotnet
+# @FUNCTION: enuget_restore
+# @DESCRIPTION: run nuget restore
+# accepts path to .sln or .proj or .csproj file to restore as parameter
+enuget_restore() {
+ nuget restore "$@" || die
+}
+
# @FUNCTION: enuspec
# @DESCRIPTION: run nuget pack
# accepts path to .nuspec file as parameter
@@ -51,3 +58,12 @@ enupkg() {
if [[ -n $NUGET_NO_DEPEND ]]; then
DEPEND+=" dev-dotnet/nuget"
fi
+
+NPN=${PN/_/.}
+if [[ $PV == *_alpha* ]] || [[ $PV == *_beta* ]] || [[ $PV == *_pre* ]]
+then
+ NPV=${PVR/_/-}
+else
+ NPV=${PVR}
+fi
+
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2015-10-29 7:21 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-29 7:21 [gentoo-commits] proj/dotnet:master commit in: dev-dotnet/monotorrent/, eclass/, dev-dotnet/monotorrent/files/ Heather Cynede
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox