From 5f9422d7249696d2f1875421ee01591f1436e93b Mon Sep 17 00:00:00 2001 From: Bernd Waibel Date: Wed, 10 Feb 2021 23:35:38 +0100 Subject: dev-go/act: new package Closes: https://bugs.gentoo.org/770043 Package-Manager: Portage-3.0.14, Repoman-3.0.2 Signed-off-by: Bernd Waibel Closes: https://github.com/gentoo/gentoo/pull/19411 Signed-off-by: Sam James --- dev-go/act/act-1.6.0.ebuild | 57 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 dev-go/act/act-1.6.0.ebuild (limited to 'dev-go/act/act-1.6.0.ebuild') diff --git a/dev-go/act/act-1.6.0.ebuild b/dev-go/act/act-1.6.0.ebuild new file mode 100644 index 000000000000..4518cc6df79e --- /dev/null +++ b/dev-go/act/act-1.6.0.ebuild @@ -0,0 +1,57 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit golang-base toolchain-funcs + +DESCRIPTION="Automated Component Toolkit code generator" +HOMEPAGE="https://github.com/Autodesk/AutomaticComponentToolkit" +SRC_URI="https://github.com/Autodesk/AutomaticComponentToolkit/archive/v${PV}.tar.gz -> ${P}.tar.gz" +S="${WORKDIR}/AutomaticComponentToolkit-${PV}" + +LICENSE="BSD-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +RESTRICT="strip test" + +# Package does not follow the usual go directory structure +# Functions borrowed from dev-lang/go ebuild. +go_arch() { + # By chance most portage arch names match Go + local portage_arch=$(tc-arch $@) + case "${portage_arch}" in + x86) echo 386;; + x64-*) echo amd64;; + *) echo "${portage_arch}";; + esac +} + +go_arm() { + case "${1:-${CHOST}}" in + armv5*) echo 5;; + armv6*) echo 6;; + armv7*) echo 7;; + *) + die "unknown GOARM for ${1:-${CHOST}}" + ;; + esac +} + +src_compile() { + export GOARCH=$(go_arch) + export GOOS=linux + if [[ ${ARCH} == arm ]]; then + export GOARM=$(go_arm) + fi + + cd "${S}"/Source || die + go build -o ../${PN} *.go || die +} + +src_install() { + newbin "${S}"/${PN} ${PN} + einstalldocs + dodoc -r Documentation/. +} -- cgit v1.2.3-65-gdbad