williamh    15/06/23 18:59:43

  Modified:             ChangeLog golang-vcs.eclass
  Log:
  The GOPATH environment variable is now passed directly to the
  commands that need it.
  The correct directory of source files is copied to the correct
  location under ${S}.

Revision  Changes    Path
1.1679               eclass/ChangeLog

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1679&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1679&content-type=text/plain
diff : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.1678&r2=1.1679

Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
retrieving revision 1.1678
retrieving revision 1.1679
diff -u -r1.1678 -r1.1679
--- ChangeLog   22 Jun 2015 14:18:19 -0000      1.1678
+++ ChangeLog   23 Jun 2015 18:59:43 -0000      1.1679
@@ -1,6 +1,12 @@
 # ChangeLog for eclass directory
 # Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1678 2015/06/22 
14:18:19 pesa Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1679 2015/06/23 
18:59:43 williamh Exp $
+
+  23 Jun 2015; William Hubbs <[email protected]> golang-vcs.eclass:
+  The GOPATH environment variable is now passed directly to the
+  commands that need it.
+  The correct directory of source files is copied to the correct
+  location under ${S}.
 
   22 Jun 2015; Davide Pesavento <[email protected]> qmake-utils.eclass:
   Introduce qt{4,5}_get_libdir().



1.3                  eclass/golang-vcs.eclass

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/golang-vcs.eclass?rev=1.3&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/golang-vcs.eclass?rev=1.3&content-type=text/plain
diff : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/golang-vcs.eclass?r1=1.2&r2=1.3

Index: golang-vcs.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/golang-vcs.eclass,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- golang-vcs.eclass   18 Jun 2015 15:19:04 -0000      1.2
+++ golang-vcs.eclass   23 Jun 2015 18:59:43 -0000      1.3
@@ -1,6 +1,6 @@
 # Copyright 1999-2015 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/golang-vcs.eclass,v 1.2 2015/06/18 
15:19:04 williamh Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/golang-vcs.eclass,v 1.3 2015/06/23 
18:59:43 williamh Exp $
 
 # @ECLASS: golang-vcs.eclass
 # @MAINTAINER:
@@ -50,7 +50,7 @@
 #
 # Example:
 # @CODE
-# EGO_PN="github.com/user/repository/package"
+# EGO_PN="github.com/user/repository/..."
 # EGO_SRC="github.com/user/repository"
 # @CODE
 
@@ -79,7 +79,7 @@
 # @FUNCTION: _golang-vcs_env_setup
 # @INTERNAL
 # @DESCRIPTION:
-# Create EGO_STORE_DIR if necessary and set GOPATH.
+# Create EGO_STORE_DIR if necessary.
 _golang-vcs_env_setup() {
        debug-print-function ${FUNCNAME} "$@"
 
@@ -96,7 +96,6 @@
        fi
 
        addwrite "${EGO_STORE_DIR}"
-       export GOPATH="${EGO_STORE_DIR}"
 
        [[ -n ${EVCS_UMASK} ]] && eumask_pop
        mkdir -p "${WORKDIR}/${P}/src" ||
@@ -118,32 +117,26 @@
        [[ -z ${EGO_PN} ]] &&
                die "${ECLASS}: EGO_PN is not set"
 
-       if [[ -n ${EVCS_OFFLINE} ]]; then
-               export GOPATH="${WORKDIR}/${P}:${GOPATH}"
-               return 0
-       fi
-
-       [[ -n ${EVCS_UMASK} ]] && eumask_push ${EVCS_UMASK}
+       if [[ -z ${EVCS_OFFLINE} ]]; then
+               [[ -n ${EVCS_UMASK} ]] && eumask_push ${EVCS_UMASK}
 
-       set -- go get -d -t -u -v -x "${EGO_PN}"
-       echo "$@"
-       "$@" || die
-       # The above dies if you pass repositories in EGO_PN instead of
-       # packages, e.g. golang.org/x/tools instead of 
golang.org/x/tools/cmd/vet.
-       # This is being discussed in the following upstream issue:
-       # https://github.com/golang/go/issues/11090
-       # I am hoping this will be fixed so "go get -d" is successful if
-       # downloading the top level repository is successful.
+               set -- env GOPATH="${EGO_STORE_DIR}" go get -d -t -u -v -x 
"${EGO_PN}"
+               echo "$@"
+               "$@" || die
+               # The above dies if you pass repositories in EGO_PN instead of
+               # packages, e.g. golang.org/x/tools instead of 
golang.org/x/tools/cmd/vet.
+               # This is being discussed in the following upstream issue:
+               # https://github.com/golang/go/issues/11090
 
-       [[ -n ${EVCS_UMASK} ]] && eumask_pop
-       export GOPATH="${WORKDIR}/${P}:${EGO_STORE_DIR}"
-       set -- mkdir -p "${WORKDIR}/${P}/src/${EGO_SRC}"
+               [[ -n ${EVCS_UMASK} ]] && eumask_pop
+       fi
+       set -- mkdir -p "${WORKDIR}/${P}/src/${EGO_SRC%/*}"
        echo "$@"
-       "$@" || die "Unable to create ${WORKDIR}/${P}/src/${EGO_SRC}"
-       set -- cp -r "${EGO_STORE_DIR}/src/${EGO_SRC}/*" \
-               "${WORKDIR}/${P}/src/${EGO_SRC}"
+       "$@" || die "Unable to create ${WORKDIR}/${P}/src"
+       set -- cp -r    "${EGO_STORE_DIR}/src/${EGO_SRC}" \
+               "${WORKDIR}/${P}/src/${EGO_SRC%/*}"
        echo "$@"
-       $@ || die "Unable to copy sources to ${WORKDIR}/${P}"
+       "$@" || die "Unable to copy sources to ${WORKDIR}/${P}"
        return 0
 }
 




Reply via email to