mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-25 08:21:17 +02:00
coreos-go-depend: use flags to indicate what version of Go is used
This commit is contained in:
parent
b19a21acf1
commit
7b7f712298
30
sdk_container/src/third_party/coreos-overlay/eclass/coreos-go-depend.eclass
vendored
Normal file
30
sdk_container/src/third_party/coreos-overlay/eclass/coreos-go-depend.eclass
vendored
Normal file
@ -0,0 +1,30 @@
|
||||
# Copyright 2016 CoreOS, Inc.
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: $
|
||||
|
||||
# @ECLASS: coreos-go-depend.eclass
|
||||
# @BLURB: Minimal Go eclass for simply depending on Go.
|
||||
|
||||
# @ECLASS-VARIABLE: COREOS_GO_VERSION
|
||||
# @DESCRIPTION:
|
||||
# This variable specifies the version of Go to use. If ommitted the
|
||||
# default value below will be used.
|
||||
#
|
||||
# Example:
|
||||
# @CODE
|
||||
# COREOS_GO_VERSION=go1.5
|
||||
# @CODE
|
||||
export COREOS_GO_VERSION="${COREOS_GO_VERSION:-go1.6}"
|
||||
|
||||
case "${EAPI:-0}" in
|
||||
5|6) ;;
|
||||
*) die "Unsupported EAPI=${EAPI} for ${ECLASS}"
|
||||
esac
|
||||
|
||||
inherit coreos-go-utils
|
||||
|
||||
# Set a use flag to indicate what version of Go is being used ensure
|
||||
# the package gets rebuilt when the version changes.
|
||||
IUSE="+go_version_${COREOS_GO_VERSION//./_}"
|
||||
REQUIRED_USE="go_version_${COREOS_GO_VERSION//./_}"
|
||||
DEPEND="dev-lang/go-${COREOS_GO_VERSION#go}*:="
|
@ -6,17 +6,31 @@
|
||||
# @BLURB: utility functions for building Go binaries
|
||||
|
||||
# @ECLASS-VARIABLE: COREOS_GO_PACKAGE
|
||||
# @REQUIRED
|
||||
# @DESCRIPTION:
|
||||
# Name of the Go package unpacked to ${S}, this is required.
|
||||
# Name of the Go package unpacked to ${S}.
|
||||
#
|
||||
# Example:
|
||||
# @CODE
|
||||
# COREOS_GO_PACKAGE="github.com/coreos/mantle"
|
||||
# @CODE
|
||||
|
||||
# @ECLASS-VARIABLE: COREOS_GO_VERSION
|
||||
# @DESCRIPTION:
|
||||
# This variable specifies the version of Go to use. If ommitted the
|
||||
# default value from coreos-go-depend.eclass will be used.
|
||||
#
|
||||
# Example:
|
||||
# @CODE
|
||||
# COREOS_GO_VERSION=go1.5
|
||||
# @CODE
|
||||
|
||||
case "${EAPI:-0}" in
|
||||
5|6) ;;
|
||||
*) die "Unsupported EAPI=${EAPI} for ${ECLASS}"
|
||||
esac
|
||||
|
||||
inherit coreos-go-utils multiprocessing
|
||||
|
||||
DEPEND="dev-lang/go:="
|
||||
inherit coreos-go-depend multiprocessing
|
||||
|
||||
# @FUNCTION: go_build
|
||||
# @USAGE: <package-name> [<binary-name>]
|
||||
|
@ -15,6 +15,10 @@ USE_EXPAND_HIDDEN="${USE_EXPAND_HIDDEN} CROS_WORKON_TREE"
|
||||
USE_EXPAND="${USE_EXPAND} ETCD_PROTOCOLS"
|
||||
ETCD_PROTOCOLS="1 2"
|
||||
|
||||
# Use go_version_* flags to indicate which major version was used.
|
||||
# For now this is only informational and set by coreos-go.eclass
|
||||
USE_EXPAND="${USE_EXPAND} GO_VERSION"
|
||||
|
||||
# Extra use flags for CoreOS SDK
|
||||
USE="${USE} cros_host expat -introspection -cups -tcpd -berkdb"
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user