Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 877781
Collapse All | Expand All

(-)a/dev-go/act/act-1.6.0.ebuild (-34 / +5 lines)
Lines 3-10 Link Here
3
3
4
EAPI=8
4
EAPI=8
5
5
6
inherit go-module toolchain-funcs
7
8
DESCRIPTION="Automated Component Toolkit code generator"
6
DESCRIPTION="Automated Component Toolkit code generator"
9
HOMEPAGE="https://github.com/Autodesk/AutomaticComponentToolkit"
7
HOMEPAGE="https://github.com/Autodesk/AutomaticComponentToolkit"
10
SRC_URI="https://github.com/Autodesk/AutomaticComponentToolkit/archive/v${PV}.tar.gz -> ${P}.tar.gz"
8
SRC_URI="https://github.com/Autodesk/AutomaticComponentToolkit/archive/v${PV}.tar.gz -> ${P}.tar.gz"
Lines 12-57 S="${WORKDIR}/AutomaticComponentToolkit-${PV}" Link Here
12
10
13
LICENSE="BSD-2"
11
LICENSE="BSD-2"
14
SLOT="0"
12
SLOT="0"
15
KEYWORDS="amd64 ~arm64 x86"
13
KEYWORDS="amd64"
16
17
RESTRICT="test"
18
14
19
# Package does not follow the usual go directory structure
15
BDEPEND="dev-lang/go"
20
# Functions borrowed from dev-lang/go ebuild.
21
go_arch() {
22
	# By chance most portage arch names match Go
23
	local portage_arch=$(tc-arch $@)
24
	case "${portage_arch}" in
25
		x86)	echo 386;;
26
		x64-*)	echo amd64;;
27
		*)		echo "${portage_arch}";;
28
	esac
29
}
30
16
31
go_arm() {
17
RESTRICT="test"
32
	case "${1:-${CHOST}}" in
33
		armv5*) echo 5;;
34
		armv6*) echo 6;;
35
		armv7*) echo 7;;
36
		*)
37
			die "unknown GOARM for ${1:-${CHOST}}"
38
			;;
39
	esac
40
}
41
18
42
src_compile() {
19
src_compile() {
43
	export GOARCH=$(go_arch)
20
	cd Source || die
44
	export GOOS=linux
45
	if [[ ${ARCH} == arm ]]; then
46
		export GOARM=$(go_arm)
47
	fi
48
49
	cd "${S}"/Source || die
50
	go build -x -o ../${PN} *.go || die
21
	go build -x -o ../${PN} *.go || die
51
}
22
}
52
23
53
src_install() {
24
src_install() {
54
	newbin "${S}"/${PN} ${PN}
25
	dobin ${PN}
55
	einstalldocs
26
	einstalldocs
56
	dodoc -r Documentation/.
27
	dodoc -r Documentation/.
57
}
28
}

Return to bug 877781