commit:     1c0049ccaac716f6f988ce0cb65012ac6f119011
Author:     ArsenShnurkov <Arsen.Shnurkov <AT> gmail <DOT> com>
AuthorDate: Thu Aug 18 19:25:03 2016 +0000
Commit:     Mikhail Pukhlikov <cynede <AT> gentoo <DOT> org>
CommitDate: Thu Aug 18 19:25:03 2016 +0000
URL:        https://gitweb.gentoo.org/proj/dotnet.git/commit/?id=1c0049cc

add _p into NPV variable

 eclass/nuget.eclass | 22 +++++++++++++++++++---
 eclass/nupkg.eclass | 16 ----------------
 2 files changed, 19 insertions(+), 19 deletions(-)

diff --git a/eclass/nuget.eclass b/eclass/nuget.eclass
index 3fbb21c..5c59f05 100644
--- a/eclass/nuget.eclass
+++ b/eclass/nuget.eclass
@@ -11,10 +11,16 @@
 
 inherit nupkg
 
-IUSE+=" +nuget"
+# @ECLASS_VARIABLE: NUGET_DEPEND
+# @DESCRIPTION Set false to net depend on nuget
+: ${NUGET_NO_DEPEND:=}
 
-DEPEND+=" nuget? ( dev-dotnet/nuget )"
-RDEPEND+=" nuget? ( dev-dotnet/nuget )"
+if [[ -n ${NUGET_NO_DEPEND} ]]; then
+       IUSE+=" +nuget"
+       
+       DEPEND+=" nuget? ( dev-dotnet/nuget )"
+       RDEPEND+=" nuget? ( dev-dotnet/nuget )"
+fi
 
 # @FUNCTION: enuget_download_rogue_binary
 # @DESCRIPTION: downloads a binary package from 3rd untrusted party repository
@@ -50,6 +56,16 @@ enuget_download_rogue_binary() {
 # Src_compile does nothing and src_install just installs sources from 
nuget_src_unpack
 nuget_src_unpack() {
        default
+
+       NPN=${PN/_/.}
+
+       if [[ $PV == *_alpha* ]] || [[ $PV == *_beta* ]] || [[ $PV == *_pre* ]] 
|| [[ $PV == *_p* ]]
+       then
+               NPV=${PVR/_/-}
+       else
+               NPV=${PVR}
+       fi
+
        nuget install "${NPN}" -Version "${NPV}" -OutputDirectory "${P}"
 }
 

diff --git a/eclass/nupkg.eclass b/eclass/nupkg.eclass
index d50d65e..ccf3983 100644
--- a/eclass/nupkg.eclass
+++ b/eclass/nupkg.eclass
@@ -100,19 +100,3 @@ enupkg() {
                doins "$@"
        fi
 }
-
-# @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

Reply via email to