[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gentoo-dev
Subject:    Re: [gentoo-dev] new eclass: golang-build.eclass for building Go software
From:       William Hubbs <williamh () gentoo ! org>
Date:       2015-06-24 1:01:38
Message-ID: 20150624010138.GA27713 () linux1 ! gaikai ! biz
[Download RAW message or body]

[Attachment #2 (multipart/mixed)]


All,

I am commiting golang-build.eclass and applying the attached patch at
the same time.

In my testing of the golang-vcs and golang-build eclasses, I never saw a
need to have separate EGO_PN and EGO_PN_BUILD variables, so we now use
EGO_PN in both eclasses.

William


["golang-build.eclass.patch" (text/x-diff)]

--- golang-build.eclass	2015-06-22 17:04:24.491898253 -0500
+++ golang-build.eclass	2015-06-23 10:48:49.950785096 -0500
@@ -27,30 +27,24 @@
 DEPEND=">=dev-lang/go-1.4.2:="
 STRIP_MASK="*.a"
 
-# @ECLASS-VARIABLE: EGO_PN_BUILD
+# @ECLASS-VARIABLE: EGO_PN
 # @REQUIRED
 # @DESCRIPTION:
 # This is the import path for the go package(s) to build. Please emerge
 # dev-lang/go and read "go help importpath" for syntax.
 #
-# If it is not set, we try to set it to EGO_PN assuming that you used
-# the golang-vcs eclass.
-#
 # Example:
 # @CODE
-# EGO_PN_BUILD=github.com/user/package
+# EGO_PN=github.com/user/package
 # @CODE
 
 # @FUNCTION: _golang-build_setup
 # @INTERNAL
 # @DESCRIPTION:
-# Make sure EGO_PN_BUILD has a value.
+# Make sure EGO_PN has a value.
 _golang-build_setup() {
-	[ -z "${EGO_PN_BUILD}" ] &&
-		[ -n "${EGO_PN}" ] &&
-		EGO_PN_BUILD="${EGO_PN}"
-	[ -z "${EGO_PN_BUILD}" ] &&
-		die "${ECLASS}.eclass: EGO_PN_BUILD is not set"
+	[ -z "${EGO_PN}" ] &&
+		die "${ECLASS}.eclass: EGO_PN is not set"
 	return 0
 }
 
@@ -59,7 +53,7 @@
 
 	_golang-build_setup
 	set -- env GOPATH="${WORKDIR}/${P}:${EPREFIX}/usr/lib/go-gentoo" \
-		go build -v -work -x "${EGO_PN_BUILD}"
+		go build -v -work -x "${EGO_PN}"
 	echo "$@"
 	"$@" || die
 }
@@ -69,7 +63,7 @@
 
 	_golang-build_setup
 	set -- env GOPATH="${WORKDIR}/${P}:${EPREFIX}/usr/lib/go-gentoo" \
-		go install -v -work -x "${EGO_PN_BUILD}"
+		go install -v -work -x "${EGO_PN}"
 	echo "$@"
 	"$@" || die
 	insinto /usr/lib/go-gentoo
@@ -82,7 +76,7 @@
 
 	_golang-build_setup
 	set -- env GOPATH="${WORKDIR}/${P}:${EPREFIX}/usr/lib/go-gentoo" \
-		go test -v -work -x "${EGO_PN_BUILD}"
+		go test -v -work -x "${EGO_PN}"
 	echo "$@"
 	"$@" || die
 }

["signature.asc" (application/pgp-signature)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic