commit:     a54e1710c21e4d6f1126b96a5ce99cbe304c7f2b
Author:     ArsenShnurkov <Arsen.Shnurkov <AT> gmail <DOT> com>
AuthorDate: Thu Jan  7 09:24:51 2016 +0000
Commit:     Heather Cynede <cynede <AT> gentoo <DOT> org>
CommitDate: Thu Jan  7 09:24:51 2016 +0000
URL:        https://gitweb.gentoo.org/proj/dotnet.git/commit/?id=a54e1710

some fixes for icon displaying and repoman

 .../deveel-math-1.5.66-r201512290.ebuild           |   2 +-
 .../deveeldb-2.0_pre_alpha_p20160101.ebuild        |   2 -
 dev-dotnet/dryioc/dryioc-2.1.0-r201512110.ebuild   |   2 +-
 .../newtonsoft-json/files/Newtonsoft.Json.nuspec   |  45 ++++++
 dev-dotnet/newtonsoft-json/files/nugeticon.png     | Bin 0 -> 913 bytes
 .../newtonsoft-json/files/removing-tests.patch     |  33 +++++
 dev-dotnet/newtonsoft-json/metadata.xml            |  22 +++
 .../newtonsoft-json-7.0.1_p20150831.ebuild         | 158 +++++++++++++++++++++
 .../newtonsoft-json-8.0.1_p20151229.ebuild         | 158 +++++++++++++++++++++
 .../newtonsoftjson-7.0.1-r20150831.ebuild          |  90 ------------
 dev-util/monodevelop/files/local-nuget-icons.patch |  15 --
 dev-util/monodevelop/monodevelop-5.9.5.9-r1.ebuild |   7 +-
 eclass/nupkg.eclass                                |  69 +++++----
 13 files changed, 465 insertions(+), 138 deletions(-)

diff --git a/dev-dotnet/deveel-math/deveel-math-1.5.66-r201512290.ebuild 
b/dev-dotnet/deveel-math/deveel-math-1.5.66-r201512290.ebuild
index a98f5c9..a8d2cb6 100644
--- a/dev-dotnet/deveel-math/deveel-math-1.5.66-r201512290.ebuild
+++ b/dev-dotnet/deveel-math/deveel-math-1.5.66-r201512290.ebuild
@@ -71,7 +71,7 @@ 
ICON_URL="https://raw.githubusercontent.com/ArsenShnurkov/dotnet/deveel-math/dev
 src_unpack()
 {
        default
-       rm ${S}/src/.nuget/NuGet.exe || die
+       rm "${S}/src/.nuget/NuGet.exe" || die
 }
 
 src_prepare() {

diff --git a/dev-dotnet/deveeldb/deveeldb-2.0_pre_alpha_p20160101.ebuild 
b/dev-dotnet/deveeldb/deveeldb-2.0_pre_alpha_p20160101.ebuild
index 1889100..c7c3fcb 100644
--- a/dev-dotnet/deveeldb/deveeldb-2.0_pre_alpha_p20160101.ebuild
+++ b/dev-dotnet/deveeldb/deveeldb-2.0_pre_alpha_p20160101.ebuild
@@ -64,13 +64,11 @@ SRC_URI="${REPOSITORY_URL}/archive/${EGIT_COMMIT}.zip -> 
${PN}-${PV}.zip
 NAME=${PN}
 S="${WORKDIR}/${NAME}-${EGIT_COMMIT}"
 
-
 #EGIT_BRANCH="mono-attempt-3"
 
 METAFILETOBUILD="src/deveeldb/deveeldb.csproj"
 NUSPEC_FILE_NAME=deveeldb.nuspec
 
-
 
#https://raw.githubusercontent.com/ArsenShnurkov/dotnet/deveeldb/dev-dotnet/deveeldb/files/color.png
 EBUILD_REPOSITORY_NAME="ArsenShnurkov/dotnet"
 EBUILD_BRANCH="deveeldb"

diff --git a/dev-dotnet/dryioc/dryioc-2.1.0-r201512110.ebuild 
b/dev-dotnet/dryioc/dryioc-2.1.0-r201512110.ebuild
index 890e430..000c688 100644
--- a/dev-dotnet/dryioc/dryioc-2.1.0-r201512110.ebuild
+++ b/dev-dotnet/dryioc/dryioc-2.1.0-r201512110.ebuild
@@ -68,7 +68,7 @@ S=${WORKDIR}/dadhi-dryioc-${EHG_REVISION:0:12}
 src_unpack()
 {
        default
-       rm ${S}/.nuget/NuGet.exe || die
+       rm "${S}/.nuget/NuGet.exe" || die
 }
 
 src_prepare() {

diff --git a/dev-dotnet/newtonsoft-json/files/Newtonsoft.Json.nuspec 
b/dev-dotnet/newtonsoft-json/files/Newtonsoft.Json.nuspec
new file mode 100644
index 0000000..a12cae3
--- /dev/null
+++ b/dev-dotnet/newtonsoft-json/files/Newtonsoft.Json.nuspec
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd";>
+  <metadata>
+    <id>$nuget_id$</id>
+    <version>$nuget_version$</version>
+    <title>Json.NET</title>
+    <description>$nuget_description$</description>
+    <authors>James Newton-King</authors>
+    <language>en-US</language>
+    <projectUrl>$nuget_projectUrl$</projectUrl>
+    <iconUrl>$nuget_iconUrl$</iconUrl>
+    <licenseUrl>$nuget_licenseUrl$</licenseUrl>
+    <tags>json</tags>
+    <dependencies>
+      <group targetFramework="net45" />
+      <group targetFramework=".NETPlatform5.0">
+        <dependency id="Microsoft.CSharp" version="4.0.0" />
+        <dependency id="System.Collections" version="4.0.10" />
+        <dependency id="System.Collections.Concurrent" version="4.0.10" />
+        <dependency id="System.ComponentModel.TypeConverter" version="4.0.0" />
+        <dependency id="System.Diagnostics.Debug" version="4.0.10" />
+        <dependency id="System.Diagnostics.Tools" version="4.0.0" />
+        <dependency id="System.Dynamic.Runtime" version="4.0.10" />
+        <dependency id="System.Globalization" version="4.0.10" />
+        <dependency id="System.IO" version="4.0.10" />
+        <dependency id="System.Linq" version="4.0.0" />
+        <dependency id="System.Linq.Expressions" version="4.0.10" />
+        <dependency id="System.ObjectModel" version="4.0.10" />
+        <dependency id="System.Reflection" version="4.0.10" />
+        <dependency id="System.Reflection.Extensions" version="4.0.0" />
+        <dependency id="System.Runtime" version="4.0.20" />
+        <dependency id="System.Runtime.Extensions" version="4.0.10" />
+        <dependency id="System.Runtime.Numerics" version="4.0.0" />
+        <dependency id="System.Runtime.Serialization.Primitives" 
version="4.0.10" />
+        <dependency id="System.Text.Encoding" version="4.0.10" />
+        <dependency id="System.Text.Encoding.Extensions" version="4.0.10" />
+        <dependency id="System.Text.RegularExpressions" version="4.0.10" />
+        <dependency id="System.Threading" version="4.0.10" />
+        <dependency id="System.Threading.Tasks" version="4.0.10" />
+        <dependency id="System.Xml.ReaderWriter" version="4.0.10" />
+        <dependency id="System.Xml.XDocument" version="4.0.10" />
+      </group>
+    </dependencies>
+  </metadata>
+</package>

diff --git a/dev-dotnet/newtonsoft-json/files/nugeticon.png 
b/dev-dotnet/newtonsoft-json/files/nugeticon.png
new file mode 100644
index 0000000..1400f38
Binary files /dev/null and b/dev-dotnet/newtonsoft-json/files/nugeticon.png 
differ

diff --git a/dev-dotnet/newtonsoft-json/files/removing-tests.patch 
b/dev-dotnet/newtonsoft-json/files/removing-tests.patch
new file mode 100644
index 0000000..fcae171
--- /dev/null
+++ b/dev-dotnet/newtonsoft-json/files/removing-tests.patch
@@ -0,0 +1,33 @@
+--- a/Src/Newtonsoft.Json.sln  2015-08-31 08:43:56.000000000 +0300
++++ b/Src/Newtonsoft.Json.sln  2015-09-01 18:48:51.000000000 +0300
+@@ -1,14 +1,10 @@
+ 
+ Microsoft Visual Studio Solution File, Format Version 12.00
+-# Visual Studio 14
++# Visual Studio 2012
+ VisualStudioVersion = 14.0.23107.0
+ MinimumVisualStudioVersion = 10.0.40219.1
+ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Newtonsoft.Json", 
"Newtonsoft.Json\Newtonsoft.Json.csproj", 
"{EEEA67F9-9089-481D-A4DC-0966DEC9FD7D}"
+ EndProject
+-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Newtonsoft.Json.Tests", 
"Newtonsoft.Json.Tests\Newtonsoft.Json.Tests.csproj", 
"{CCD1B8C4-7349-409C-A090-A9B9A1ABD981}"
+-EndProject
+-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = 
"Newtonsoft.Json.TestConsole", 
"Newtonsoft.Json.TestConsole\Newtonsoft.Json.TestConsole.csproj", 
"{3CC9C2DF-CD0A-4096-BF46-B4AFDF0147D2}"
+-EndProject
+ Global
+       GlobalSection(SolutionConfigurationPlatforms) = preSolution
+               Debug|Any CPU = Debug|Any CPU
+@@ -19,14 +15,6 @@
+               {EEEA67F9-9089-481D-A4DC-0966DEC9FD7D}.Debug|Any CPU.Build.0 = 
Debug|Any CPU
+               {EEEA67F9-9089-481D-A4DC-0966DEC9FD7D}.Release|Any 
CPU.ActiveCfg = Release|Any CPU
+               {EEEA67F9-9089-481D-A4DC-0966DEC9FD7D}.Release|Any CPU.Build.0 
= Release|Any CPU
+-              {CCD1B8C4-7349-409C-A090-A9B9A1ABD981}.Debug|Any CPU.ActiveCfg 
= Debug|Any CPU
+-              {CCD1B8C4-7349-409C-A090-A9B9A1ABD981}.Debug|Any CPU.Build.0 = 
Debug|Any CPU
+-              {CCD1B8C4-7349-409C-A090-A9B9A1ABD981}.Release|Any 
CPU.ActiveCfg = Release|Any CPU
+-              {CCD1B8C4-7349-409C-A090-A9B9A1ABD981}.Release|Any CPU.Build.0 
= Release|Any CPU
+-              {3CC9C2DF-CD0A-4096-BF46-B4AFDF0147D2}.Debug|Any CPU.ActiveCfg 
= Debug|Any CPU
+-              {3CC9C2DF-CD0A-4096-BF46-B4AFDF0147D2}.Debug|Any CPU.Build.0 = 
Debug|Any CPU
+-              {3CC9C2DF-CD0A-4096-BF46-B4AFDF0147D2}.Release|Any 
CPU.ActiveCfg = Release|Any CPU
+-              {3CC9C2DF-CD0A-4096-BF46-B4AFDF0147D2}.Release|Any CPU.Build.0 
= Release|Any CPU
+       EndGlobalSection
+       GlobalSection(SolutionProperties) = preSolution
+               HideSolutionNode = FALSE

diff --git a/dev-dotnet/newtonsoft-json/metadata.xml 
b/dev-dotnet/newtonsoft-json/metadata.xml
new file mode 100644
index 0000000..7e75aca
--- /dev/null
+++ b/dev-dotnet/newtonsoft-json/metadata.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd";>
+<pkgmetadata>
+       <herd>dotnet</herd>
+       <maintainer> <!-- https://wiki.gentoo.org/wiki/User:Cynede -->
+               <email>[email protected]</email>
+               <name>Heather Cynede</name>
+       </maintainer>
+       <upstream>
+               
<bugs-to>https://github.com/JamesNK/Newtonsoft.Json/issues</bugs-to>
+               <remote-id type="github">JamesNK/Newtonsoft.Json</remote-id>
+       </upstream>
+       <use>
+               <flag name='pkg-config'>create .pc file(s) for .dll(s) 
installed to gac</flag>
+       </use>
+       <longdescription lang="en">
+               Json.NET is a popular high-performance JSON framework for .NET
+       </longdescription>
+       <longdescription lang="ru">
+                C# библиотека для парсинга Json-формата
+        </longdescription>
+</pkgmetadata>

diff --git a/dev-dotnet/newtonsoft-json/newtonsoft-json-7.0.1_p20150831.ebuild 
b/dev-dotnet/newtonsoft-json/newtonsoft-json-7.0.1_p20150831.ebuild
new file mode 100644
index 0000000..f0b7fc2
--- /dev/null
+++ b/dev-dotnet/newtonsoft-json/newtonsoft-json-7.0.1_p20150831.ebuild
@@ -0,0 +1,158 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+# debug = debug configuration (symbols and defines for debugging)
+# developer = generate symbols information (to view line numbers in stack 
traces, either in debug or release configuration)
+# test = allow NUnit tests to run
+# nupkg = create .nupkg file from .nuspec
+# gac = install into gac
+# pkg-config = register in pkg-config database
+USE_DOTNET="net45"
+IUSE="${USE_DOTNET} debug developer test +nupkg +gac +pkg-config"
+
+inherit nupkg
+
+NAME="Newtonsoft.Json"
+NUSPEC_ID="${NAME}"
+HOMEPAGE="https://github.com/JamesNK/${NAME}";
+
+EGIT_COMMIT="05710874cd61adabfb635085b1b45cf31882df3d"
+SRC_URI="${HOMEPAGE}/archive/${EGIT_COMMIT}.zip -> ${P}.zip
+       mirror://gentoo/mono.snk.bz2"
+S="${WORKDIR}/${NAME}-${EGIT_COMMIT}"
+
+SLOT="0"
+
+DESCRIPTION="Json.NET is a popular high-performance JSON framework for .NET"
+LICENSE="MIT"
+LICENSE_URL="https://raw.github.com/JamesNK/Newtonsoft.Json/master/LICENSE.md";
+
+KEYWORDS="~amd64 ~ppc ~x86"
+COMMON_DEPENDENCIES="|| ( >=dev-lang/mono-4.2 <dev-lang/mono-9999 )"
+RDEPEND="${COMMON_DEPENDENCIES}
+"
+DEPEND="${COMMON_DEPENDENCIES}
+       >=dev-dotnet/nunit-2.6.4-r201501110:2[nupkg]
+"
+
+METAFILETOBUILD=Src/Newtonsoft.Json.sln
+
+NUSPEC_FILENAME="Newtonsoft.Json.nuspec"
+COMMIT_DATE_INDEX=$(get_version_component_count ${PV} )
+COMMIT_DATE=$(get_version_component_range $COMMIT_DATE_INDEX ${PV} )
+NUSPEC_VERSION=$(get_version_component_range 1-3)"${COMMIT_DATE//p/.}${PR//r/}"
+
+ICON_FILENAME=nugeticon.png
+ICON_URL=$(get_nuget_trusted_icons_location)/${NUSPEC_ID}.${NUSPEC_VERSION}.png
+
+src_prepare() {
+       elog "${S}/${NUSPEC_FILENAME}"
+
+       # replace 2.6.2 -> 2.6.4 (for NUnit)
+       egrep -lRZ '2\.6\.2' "${S}" | xargs -0 sed -i 's/2\.6\.2/2\.6\.4/g'  || 
die
+
+       enuget_restore "${METAFILETOBUILD}"
+       # Installing 'Autofac 3.5.0'.
+       # Installing 'NUnit 2.6.2'.
+       # Installing 'System.Collections.Immutable 1.1.36'.
+       # Installing 'FSharp.Core 4.0.0'.
+       eapply "${FILESDIR}/removing-tests.patch"
+
+       if use gac; then
+               find . -iname "*.csproj" -print0 | xargs -0 \
+               sed -i 's/<DefineConstants>/<DefineConstants>SIGNED;/g' || die
+               #PUBLIC_KEY=`sn -q -p ${SNK_FILENAME} /dev/stdout | hexdump -e 
'"%02x"'`
+               #find . -iname "AssemblyInfo.cs" -print0 | xargs -0 sed -i 
"s/PublicKey=[0-9a-fA-F]*/PublicKey=${PUBLIC_KEY}/g" || die
+               find . -iname "AssemblyInfo.cs" -print0 | xargs -0 sed -i 
"/InternalsVisibleTo/d" || die
+       fi
+
+       cp "${FILESDIR}/${NUSPEC_FILENAME}" "${S}/${NUSPEC_FILENAME}" || die
+       patch_nuspec_file "${S}/${NUSPEC_FILENAME}"
+
+       default
+}
+
+src_compile() {
+       exbuild /p:SignAssembly=true 
"/p:AssemblyOriginatorKeyFile=${WORKDIR}/mono.snk" "${METAFILETOBUILD}"
+
+       NUSPEC_PROPS+="nuget_version=${NUSPEC_VERSION};"
+       NUSPEC_PROPS+="nuget_id=${NUSPEC_ID};"
+       NUSPEC_PROPS+="nuget_projectUrl=${HOMEPAGE};"
+       NUSPEC_PROPS+="nuget_licenseUrl=${LICENSE_URL};"
+       NUSPEC_PROPS+="nuget_description=${DESCRIPTION};"
+       NUSPEC_PROPS+="nuget_iconUrl=file://${ICON_URL}"
+       elog "NUSPEC_PROPS=${NUSPEC_PROPS}"
+       enuspec -Prop "${NUSPEC_PROPS}" "${S}/${NUSPEC_FILENAME}"
+}
+
+src_install() {
+       if use debug; then
+               DIR="Debug"
+       else
+               DIR="Release"
+       fi
+
+       FINAL_DLL=Src/Newtonsoft.Json/bin/${DIR}/Net45/Newtonsoft.Json.dll
+
+       if use gac; then
+               egacinstall "${FINAL_DLL}"
+       fi
+
+       insinto "$(get_nuget_trusted_icons_location)"
+       newins "${FILESDIR}/${ICON_FILENAME}" 
"${NUSPEC_ID}.${NUSPEC_VERSION}.png"
+
+       enupkg "${WORKDIR}/${NUSPEC_ID}.${NUSPEC_VERSION}.nupkg"
+
+       install_pc_file
+}
+
+patch_nuspec_file()
+{
+       if use nupkg; then
+               if use debug; then
+                       DIR="Debug"
+               else
+                       DIR="Release"
+               fi
+FILES_STRING=`cat <<-EOF || die "${DIR} files at patch_nuspec_file()"
+       <files> <!-- https://docs.nuget.org/create/nuspec-reference -->
+               <file 
src="Src/Newtonsoft.Json/bin/${DIR}/Net45/Newtonsoft.Json.*" 
target="lib\net45\" />
+       </files>
+EOF
+`
+               einfo ${FILES_STRING}
+               replace "</package>" "${FILES_STRING}</package>" -- $1 || die 
"replace at patch_nuspec_file()"
+       fi
+}
+
+PC_FILE_NAME=${PN}
+
+install_pc_file()
+{
+       if use pkg-config; then
+               dodir /usr/$(get_libdir)/pkgconfig
+               ebegin "Installing ${PC_FILE_NAME}.pc file"
+               sed \
+                       -e "s:@LIBDIR@:$(get_libdir):" \
+                       -e "s:@PACKAGENAME@:${PC_FILE_NAME}:" \
+                       -e "s:@DESCRIPTION@:${DESCRIPTION}:" \
+                       -e "s:@VERSION@:${PV}:" \
+                       -e 
's*@LIBS@*-r:${libdir}'"/mono/${PC_FILE_NAME}/Newtonsoft.Json.dll"'*' \
+                       <<\EOF 
>"${D}/usr/$(get_libdir)/pkgconfig/${PC_FILE_NAME}.pc" || die
+prefix=${pcfiledir}/../..
+exec_prefix=${prefix}
+libdir=${exec_prefix}/@LIBDIR@
+Name: @PACKAGENAME@
+Description: @DESCRIPTION@
+Version: @VERSION@
+Libs: @LIBS@
+EOF
+
+               einfo PKG_CONFIG_PATH="${D}/usr/$(get_libdir)/pkgconfig/" 
pkg-config --exists "${PC_FILE_NAME}"
+               PKG_CONFIG_PATH="${D}/usr/$(get_libdir)/pkgconfig/" pkg-config 
--exists "${PC_FILE_NAME}" || die ".pc file failed to validate."
+               eend $?
+       fi
+}
\ No newline at end of file

diff --git a/dev-dotnet/newtonsoft-json/newtonsoft-json-8.0.1_p20151229.ebuild 
b/dev-dotnet/newtonsoft-json/newtonsoft-json-8.0.1_p20151229.ebuild
new file mode 100644
index 0000000..ff73ba5
--- /dev/null
+++ b/dev-dotnet/newtonsoft-json/newtonsoft-json-8.0.1_p20151229.ebuild
@@ -0,0 +1,158 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+# debug = debug configuration (symbols and defines for debugging)
+# developer = generate symbols information (to view line numbers in stack 
traces, either in debug or release configuration)
+# test = allow NUnit tests to run
+# nupkg = create .nupkg file from .nuspec
+# gac = install into gac
+# pkg-config = register in pkg-config database
+USE_DOTNET="net45"
+IUSE="${USE_DOTNET} debug developer test +nupkg +gac +pkg-config"
+
+inherit nupkg
+
+NAME="Newtonsoft.Json"
+NUSPEC_ID="${NAME}"
+HOMEPAGE="https://github.com/JamesNK/${NAME}";
+
+EGIT_COMMIT="865c08d95d89565b4f6b463b57da8f5324f6ce7c"
+SRC_URI="${HOMEPAGE}/archive/${EGIT_COMMIT}.zip -> ${P}.zip
+       mirror://gentoo/mono.snk.bz2"
+S="${WORKDIR}/${NAME}-${EGIT_COMMIT}"
+
+SLOT="0"
+
+DESCRIPTION="Json.NET is a popular high-performance JSON framework for .NET"
+LICENSE="MIT"
+LICENSE_URL="https://raw.github.com/JamesNK/Newtonsoft.Json/master/LICENSE.md";
+
+KEYWORDS="~amd64 ~ppc ~x86"
+COMMON_DEPENDENCIES="|| ( >=dev-lang/mono-4.2 <dev-lang/mono-9999 )"
+RDEPEND="${COMMON_DEPENDENCIES}
+"
+DEPEND="${COMMON_DEPENDENCIES}
+       >=dev-dotnet/nunit-2.6.4-r201501110:2[nupkg]
+"
+
+METAFILETOBUILD=Src/Newtonsoft.Json.sln
+
+NUSPEC_FILENAME="Newtonsoft.Json.nuspec"
+COMMIT_DATE_INDEX=$(get_version_component_count ${PV} )
+COMMIT_DATE=$(get_version_component_range $COMMIT_DATE_INDEX ${PV} )
+NUSPEC_VERSION=$(get_version_component_range 1-3)"${COMMIT_DATE//p/.}${PR//r/}"
+
+ICON_FILENAME=nugeticon.png
+ICON_URL=$(get_nuget_trusted_icons_location)/${NUSPEC_ID}.${NUSPEC_VERSION}.png
+
+src_prepare() {
+       elog "${S}/${NUSPEC_FILENAME}"
+
+       # replace 2.6.2 -> 2.6.4 (for NUnit)
+       egrep -lRZ '2\.6\.2' "${S}" | xargs -0 sed -i 's/2\.6\.2/2\.6\.4/g'  || 
die
+
+       enuget_restore "${METAFILETOBUILD}"
+       # Installing 'Autofac 3.5.0'.
+       # Installing 'NUnit 2.6.2'.
+       # Installing 'System.Collections.Immutable 1.1.36'.
+       # Installing 'FSharp.Core 4.0.0'.
+       eapply "${FILESDIR}/removing-tests.patch"
+
+       if use gac; then
+               find . -iname "*.csproj" -print0 | xargs -0 \
+               sed -i 's/<DefineConstants>/<DefineConstants>SIGNED;/g' || die
+               #PUBLIC_KEY=`sn -q -p ${SNK_FILENAME} /dev/stdout | hexdump -e 
'"%02x"'`
+               #find . -iname "AssemblyInfo.cs" -print0 | xargs -0 sed -i 
"s/PublicKey=[0-9a-fA-F]*/PublicKey=${PUBLIC_KEY}/g" || die
+               find . -iname "AssemblyInfo.cs" -print0 | xargs -0 sed -i 
"/InternalsVisibleTo/d" || die
+       fi
+
+       cp "${FILESDIR}/${NUSPEC_FILENAME}" "${S}/${NUSPEC_FILENAME}" || die
+       patch_nuspec_file "${S}/${NUSPEC_FILENAME}"
+
+       default
+}
+
+src_compile() {
+       exbuild /p:SignAssembly=true 
"/p:AssemblyOriginatorKeyFile=${WORKDIR}/mono.snk" "${METAFILETOBUILD}"
+
+       NUSPEC_PROPS+="nuget_version=${NUSPEC_VERSION};"
+       NUSPEC_PROPS+="nuget_id=${NUSPEC_ID};"
+       NUSPEC_PROPS+="nuget_projectUrl=${HOMEPAGE};"
+       NUSPEC_PROPS+="nuget_licenseUrl=${LICENSE_URL};"
+       NUSPEC_PROPS+="nuget_description=${DESCRIPTION};"
+       NUSPEC_PROPS+="nuget_iconUrl=file://${ICON_URL}"
+       elog "NUSPEC_PROPS=${NUSPEC_PROPS}"
+       enuspec -Prop "${NUSPEC_PROPS}" "${S}/${NUSPEC_FILENAME}"
+}
+
+src_install() {
+       if use debug; then
+               DIR="Debug"
+       else
+               DIR="Release"
+       fi
+
+       FINAL_DLL=Src/Newtonsoft.Json/bin/${DIR}/Net45/Newtonsoft.Json.dll
+
+       if use gac; then
+               egacinstall "${FINAL_DLL}"
+       fi
+
+       insinto "$(get_nuget_trusted_icons_location)"
+       newins "${FILESDIR}/${ICON_FILENAME}" 
"${NUSPEC_ID}.${NUSPEC_VERSION}.png"
+
+       enupkg "${WORKDIR}/${NUSPEC_ID}.${NUSPEC_VERSION}.nupkg"
+
+       install_pc_file
+}
+
+patch_nuspec_file()
+{
+       if use nupkg; then
+               if use debug; then
+                       DIR="Debug"
+               else
+                       DIR="Release"
+               fi
+FILES_STRING=`cat <<-EOF || die "${DIR} files at patch_nuspec_file()"
+       <files> <!-- https://docs.nuget.org/create/nuspec-reference -->
+               <file 
src="Src/Newtonsoft.Json/bin/${DIR}/Net45/Newtonsoft.Json.*" 
target="lib\net45\" />
+       </files>
+EOF
+`
+               einfo ${FILES_STRING}
+               replace "</package>" "${FILES_STRING}</package>" -- $1 || die 
"replace at patch_nuspec_file()"
+       fi
+}
+
+PC_FILE_NAME=${PN}
+
+install_pc_file()
+{
+       if use pkg-config; then
+               dodir /usr/$(get_libdir)/pkgconfig
+               ebegin "Installing ${PC_FILE_NAME}.pc file"
+               sed \
+                       -e "s:@LIBDIR@:$(get_libdir):" \
+                       -e "s:@PACKAGENAME@:${PC_FILE_NAME}:" \
+                       -e "s:@DESCRIPTION@:${DESCRIPTION}:" \
+                       -e "s:@VERSION@:${PV}:" \
+                       -e 
's*@LIBS@*-r:${libdir}'"/mono/${PC_FILE_NAME}/Newtonsoft.Json.dll"'*' \
+                       <<\EOF 
>"${D}/usr/$(get_libdir)/pkgconfig/${PC_FILE_NAME}.pc" || die
+prefix=${pcfiledir}/../..
+exec_prefix=${prefix}
+libdir=${exec_prefix}/@LIBDIR@
+Name: @PACKAGENAME@
+Description: @DESCRIPTION@
+Version: @VERSION@
+Libs: @LIBS@
+EOF
+
+               einfo PKG_CONFIG_PATH="${D}/usr/$(get_libdir)/pkgconfig/" 
pkg-config --exists "${PC_FILE_NAME}"
+               PKG_CONFIG_PATH="${D}/usr/$(get_libdir)/pkgconfig/" pkg-config 
--exists "${PC_FILE_NAME}" || die ".pc file failed to validate."
+               eend $?
+       fi
+}
\ No newline at end of file

diff --git a/dev-dotnet/newtonsoftjson/newtonsoftjson-7.0.1-r20150831.ebuild 
b/dev-dotnet/newtonsoftjson/newtonsoftjson-7.0.1-r20150831.ebuild
deleted file mode 100644
index 456fd2e..0000000
--- a/dev-dotnet/newtonsoftjson/newtonsoftjson-7.0.1-r20150831.ebuild
+++ /dev/null
@@ -1,90 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-inherit mono-env nuget dotnet
-
-NAME="Newtonsoft.Json"
-HOMEPAGE="https://github.com/JamesNK/${NAME}";
-
-EGIT_COMMIT="05710874cd61adabfb635085b1b45cf31882df3d"
-SRC_URI="${HOMEPAGE}/archive/${EGIT_COMMIT}.zip -> ${PF}.zip"
-S="${WORKDIR}/${NAME}-${EGIT_COMMIT}"
-
-SLOT="0"
-
-DESCRIPTION="NewtonSoft.JSon library"
-LICENSE="MIT"
-
-KEYWORDS="~amd64 ~ppc ~x86"
-COMMON_DEPENDENCIES="|| ( >=dev-lang/mono-4.2 <dev-lang/mono-9999 )"
-RDEPEND="${COMMON_DEPENDENCIES}
-"
-DEPEND="${COMMON_DEPENDENCIES}
-       >=dev-dotnet/nunit-2.6.4-r201501110:2[nupkg]
-"
-
-USE_DOTNET="net45"
-IUSE="${USE_DOTNET} gac nupkg"
-# if you remove these flags where will be the error:
-# USE Flag 'gac' not in IUSE for dev-dotnet/newtonsoftjson-0.0.0-r20150831
-
-METAFILETOBUILD=Src/Newtonsoft.Json.sln
-
-# https://devmanual.gentoo.org/ebuild-writing/variables/
-#
-# PN = Package name, for example vim.
-# P = Package name and version (excluding revision, if any), for example 
vim-6.3.
-# FILESDIR = Path to the ebuild's files/ directory, commonly used for small 
patches and files. Value: "${PORTDIR}/${CATEGORY}/${PN}/files"
-# WORKDIR = Path to the ebuild's root build directory. Value: 
"${PORTAGE_BUILDDIR}/work"
-# S = Path to the temporary build directory, used by src_compile and 
src_install. Default: "${WORKDIR}/${P}".
-
-NUSPEC_FILENAME="Newtonsoft.Json.nuspec"
-
-# ${SNK_FILENAME} is used inside exbuild() to sign assemblies
-#SNK_FILENAME="${S}/Src/Newtonsoft.Json/Dynamic.snk"
-
-src_prepare() {
-       elog "${S}/Build/${NUSPEC_FILENAME}"
-       sed "s/@Version@/${PV}/g" "${FILESDIR}/${NUSPEC_FILENAME}" 
>"${S}/Build/${NUSPEC_FILENAME}" || die
-
-       egrep -lRZ '2\.6\.2' "${S}" | xargs -0 sed -i 's/2\.6\.2/2\.6\.4/g'  || 
die
-
-       enuget_restore "${METAFILETOBUILD}"
-       # Installing 'Autofac 3.5.0'.
-       # Installing 'NUnit 2.6.2'.
-       # Installing 'System.Collections.Immutable 1.1.36'.
-       # Installing 'FSharp.Core 4.0.0'.
-       epatch "${FILESDIR}/removing-tests.patch"
-
-       if use gac; then
-               find . -iname "*.csproj" -print0 | xargs -0 \
-               sed -i 's/<DefineConstants>/<DefineConstants>SIGNED;/g' || die
-               #PUBLIC_KEY=`sn -q -p ${SNK_FILENAME} /dev/stdout | hexdump -e 
'"%02x"'`
-               #find . -iname "AssemblyInfo.cs" -print0 | xargs -0 sed -i 
"s/PublicKey=[0-9a-fA-F]*/PublicKey=${PUBLIC_KEY}/g" || die
-               find . -iname "AssemblyInfo.cs" -print0 | xargs -0 sed -i 
"/InternalsVisibleTo/d" || die
-       fi
-}
-
-src_compile() {
-       exbuild "${METAFILETOBUILD}"
-       enuspec "Build/${NUSPEC_FILENAME}"
-}
-
-src_install() {
-       DIR=""
-       if use debug; then
-               DIR="Debug"
-       else
-               DIR="Release"
-       fi
-
-       FINAL_DLL=Src/Newtonsoft.Json/bin/${DIR}/Net45/Newtonsoft.Json.dll
-
-       if use gac; then
-               egacinstall "${FINAL_DLL}"
-       fi
-
-       enupkg "${WORKDIR}/Newtonsoft.Json.${PV}.nupkg"
-}

diff --git a/dev-util/monodevelop/files/local-nuget-icons.patch 
b/dev-util/monodevelop/files/local-nuget-icons.patch
index 329c57f..793bf8b 100644
--- a/dev-util/monodevelop/files/local-nuget-icons.patch
+++ b/dev-util/monodevelop/files/local-nuget-icons.patch
@@ -1,18 +1,3 @@
-From c5f730b3ffcecfd15dc291353332a6a3f0bb515a Mon Sep 17 00:00:00 2001
-From: Matt Ward <[email protected]>
-Date: Sat, 2 Jan 2016 15:29:00 +0000
-Subject: [PATCH] [NuGet] Support NuGet packages that use icons from local
- files.
-
-Allows a NuGet package to use an icon, shown in the Add Packages
-dialog, taken from the local file system using a file url.
-Previously this would fail with an invalid cast exception.
----
- .../MonoDevelop.PackageManagement/ImageLoader.cs           | 14 ++++++++++++--
- 1 file changed, 12 insertions(+), 2 deletions(-)
-
-diff --git 
a/main/src/addins/MonoDevelop.PackageManagement/MonoDevelop.PackageManagement/ImageLoader.cs
 
b/main/src/addins/MonoDevelop.PackageManagement/MonoDevelop.PackageManagement/ImageLoader.cs
-index 07b7b99..98eff92 100644
 --- 
a/main/src/addins/MonoDevelop.PackageManagement/MonoDevelop.PackageManagement/ImageLoader.cs
 +++ 
b/main/src/addins/MonoDevelop.PackageManagement/MonoDevelop.PackageManagement/ImageLoader.cs
 @@ -91,8 +91,7 @@ namespace MonoDevelop.PackageManagement

diff --git a/dev-util/monodevelop/monodevelop-5.9.5.9-r1.ebuild 
b/dev-util/monodevelop/monodevelop-5.9.5.9-r1.ebuild
index ee1cc62..118e693 100644
--- a/dev-util/monodevelop/monodevelop-5.9.5.9-r1.ebuild
+++ b/dev-util/monodevelop/monodevelop-5.9.5.9-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
@@ -86,6 +86,7 @@ src_prepare() {
        #fix ASP.Net
        cd "${T}/${P}/main"
        epatch "${FILESDIR}/5.7-downgrade_to_mvc3.patch"
+       epatch "${FILESDIR}/local-nuget-icons.patch"
 
        # fix for https://github.com/gentoo/dotnet/issues/42
        epatch "${FILESDIR}/aspnet-template-references-fix.patch"
@@ -104,9 +105,9 @@ src_prepare() {
        #copy missing binaries
        mkdir -p "${S}"/external/cecil/Test/libs/nunit-2.5.10/ || die
        cp -fR "${T}"/NUnit-2.5.10.11092/bin/net-2.0/framework/* 
"${S}"/external/cecil/Test/libs/nunit-2.5.10/ || die
-       mv -f "${T}/packages" "${S}"
+       mv -f "${T}/packages" "${S}" || die
 
-       epatch "${FILESDIR}/local-nuget-icons.patch"
+       default
 }
 
 src_configure() {

diff --git a/eclass/nupkg.eclass b/eclass/nupkg.eclass
index 0ff0df9..3234c99 100644
--- a/eclass/nupkg.eclass
+++ b/eclass/nupkg.eclass
@@ -9,6 +9,44 @@
 
 inherit dotnet
 
+# @FUNCTION: get_nuget_trusted_archives_location
+# @USAGE: [directory]
+# @DESCRIPTION:
+# returns base directory for various nuget folders.
+get_nuget_trusted_archives_location() {
+       if [ -d "/var/calculate/remote/distfiles" ]; then
+               # Control will enter here if the directory exist.
+               # this is necessary to handle calculate linux profiles feature 
(for corporate users)
+               echo /var/calculate/remote/packages/NuGet
+       else
+               # this is for all normal gentoo-based distributions
+               echo /usr/local/nuget/nupkg
+       fi
+}
+
+# @FUNCTION: get_nuget_trusted_icons_location
+# @USAGE: [directory]
+# @DESCRIPTION:
+# returns base directory for monodevelop addin icons
+get_nuget_trusted_icons_location() {
+       echo $(get_nuget_trusted_archives_location)/icons
+}
+
+# @FUNCTION: get_nuget_trusted_unpacked_location
+# @USAGE: [directory]
+# @DESCRIPTION:
+# returns base directory for package content (system wide installation 
location)
+get_nuget_trusted_unpacked_location() {
+       if [ -d "/var/calculate/remote/distfiles" ]; then
+               # Control will enter here if the directory exist.
+               # this is necessary to handle calculate linux profiles feature 
(for corporate users)
+               echo /var/calculate/remote/distfiles/NuGet
+       else
+               # this is for all normal gentoo-based distributions
+               echo /usr/local/nuget/packages
+       fi
+}
+
 # @FUNCTION: enuget_restore
 # @DESCRIPTION: run nuget restore
 # accepts path to .sln or .proj or .csproj file to restore as parameter
@@ -20,18 +58,6 @@ enuget_restore() {
 # @DESCRIPTION: downloads a binary package from 3rd untrusted party repository
 # accepts Id of package as parameter
 enuget_download_rogue_binary() {
-       if [ -d "/var/calculate/remote/distfiles" ]; then
-               NUGET_LOCAL_REPOSITORY_PATH=/var/calculate/remote/packages/NuGet
-       else
-               # this is for all normal gentoo-based distributions
-               NUGET_LOCAL_REPOSITORY_PATH=/usr/local/nuget/nupkg
-       fi
-       #einfo "Downloading rogue binary '$1' into 
'${NUGET_LOCAL_REPOSITORY_PATH}'"
-       # https://www.nuget.org/api/v2/package/{packageID}/{packageVersion}
-       
-       # this will give "* ACCESS DENIED:  open_wr:      
/var/calculate/remote/packages/NuGet" message
-       # wget -c https://www.nuget.org/api/v2/package/$1/$2 -o 
"${LOCAL_NUGET_REPOSITORY_PATH}"
-
        einfo "Downloading rogue binary '$1' into '${T}/$1.$2.nupkg'"
        wget -c https://www.nuget.org/api/v2/package/$1/$2 
--directory-prefix="${T}/" --output-document="$1.$2.nupkg" || die
         # -p ignores directory if it is already exists
@@ -42,8 +68,8 @@ enuget_download_rogue_binary() {
 <add key="repositoryPath" value="${T}" />
 </config></configuration>
 EOF
-       einfo "Installing rogue binary '$1' into '${S}'"
-       nuget install "$1" -Version "$2" -OutputDirectory ${S}
+       einfo "Installing rogue binary '$1' into '${S}/packages'"
+       nuget install "$1" -Version "$2" -OutputDirectory "${S}/packages"
 }
 
 # @FUNCTION: enuspec
@@ -67,16 +93,8 @@ enuspec() {
 # accepts path to .nupkg file as parameter
 enupkg() {
        if use nupkg; then
-               if [ -d "/var/calculate/remote/distfiles" ]; then
-                       # Control will enter here if the directory exist.
-                       # this is necessary to handle calculate linux profiles 
feature (for corporate users)
-                       elog "Installing .nupkg into 
/var/calculate/remote/packages/NuGet"
-                       insinto /var/calculate/remote/packages/NuGet
-               else
-                       # this is for all normal gentoo-based distributions
-                       elog "Installing .nupkg into /usr/local/nuget/nupkg"
-                       insinto /usr/local/nuget/nupkg
-               fi
+               elog "enupkg $@ -> $(get_nuget_trusted_archives_location)"
+               insinto $(get_nuget_trusted_archives_location)
                doins "$@"
        fi
 }
@@ -85,7 +103,7 @@ enupkg() {
 # @DESCRIPTION Set false to net depend on nuget
 : ${NUGET_NO_DEPEND:=}
 
-if [[ -n $NUGET_NO_DEPEND ]]; then
+if [[ -n ${NUGET_NO_DEPEND} ]]; then
        DEPEND+=" dev-dotnet/nuget"
 fi
 
@@ -96,4 +114,3 @@ then
 else
        NPV=${PVR}
 fi
-

Reply via email to