diff --git a/app-misc/wego/Manifest b/app-misc/wego/Manifest
index 99ce419c4d..98f1eb468b 100644
--- a/app-misc/wego/Manifest
+++ b/app-misc/wego/Manifest
@@ -1,11 +1,7 @@
DIST github.com-golang-sys-d5e6a3e2c0ae.tar.gz 1541214 BLAKE2B 947229146a1c9cbe6cb4fa5fdb72861fcad3eaa6de54e02a96ddd6f869a418b172eac0c743b459ea63f56187b9898d45921a86d4710325281b5c85c600f061e3 SHA512 56f5abbbe48b9d114fa46462364b6782cd5e16e40de0684c0e3514af41d1edf59295834f04eed7bc8436b33ad602db3d00c8c87a2da4939e5d759427b1af7669
DIST github.com-mattn-go-colorable-2e1b0c1546e01.tar.gz 9575 BLAKE2B b39d9a49626f1598bf505c233e65365cd643f6648a2e16cdc0580144c7f3f3e286666fa19eb0a93d2d850efb4e14f73bee3438a58f27cc911b029fdf61f8f3a7 SHA512 5353d6f30df92c0690c2d7549ae81a92bc190d0bb8b604c94ef545f17a89fb73b29d0f0af70f318af24eb919c63e3202e4fb9449357f3ddef821c63312c67316
-DIST github.com-mattn-go-colorable-9fdad7c.tar.gz 5586 BLAKE2B 4f41090d5b803e62b3cf5ab2bab05bf726006c2ccf5fe3e1c5c9a5042375ec652d6bddd09465b1748f969b5c78615e030e72a43d299a953d4fecaf2e8eb993cc SHA512 f3f1893c535cd050bdf83e8d13d5fa5f12b58272a1a373dc17c68a0021a0bd9e72817b5784dd1276cd963bbef07424d47c877d809df787058d8c87194f70b582
DIST github.com-mattn-go-isatty-7b513a986450.tar.gz 4544 BLAKE2B 6b8a11ce52397597ab65d8bc5382169c7d64dd716e0d97cbd46620c64f5a24de4b5874c1f71aa79a4046e8bfe2b5899d4685d3b5c7b8a8dbf2baa03bb1a2cdc8 SHA512 74b775ee71bac2d3d4bcdb60664b02e785a58e8d8bd8516b5c90c1e21c36832fdd673a8342b2a9857ab7aac61e66dca8fac373938c6de848e51641d5bfa96bff
DIST github.com-mattn-go-runewidth-43a826dcfbd.tar.gz 17351 BLAKE2B 7dbae627493b6899a794f884351dca5897834cb56986b0f263d6eed35623040d6f43da67e2ae6d7fd400e4ad1e7dcf0c052c67657c8b18dbe720cd7f6d264ad0 SHA512 df2951c4a407a0f164e46073e518765c213770691e57b7b1e3eb9e3b3a02ab0f4e47410038cac86f5ecba464fd157e94dbe7fe5ad96b7c23a50b38c6ee2bced8
-DIST github.com-mattn-go-runewidth-d037b52.tar.gz 5895 BLAKE2B 32e5b025abe0ac98eea8e35278b76f2f447f80f5110fd5f66628510fa0488095f94beab0a010c4f511df04c8a8f503315910acc22f0ba9438a324da3faeeea08 SHA512 0795a78dbf805bcf3fb9887a0bb5875c6b8579302d9207a536d5d00dc8a97a732ae95d274d3b26215d9f900299b01a5b0869561e215def6c8d35d9603b9da551
DIST github.com-rivo-uniseg-f8f8f751c732.tar.gz 43999 BLAKE2B cb8dc8c5744f8d5ac34a4af7be5ae15728d25769bb68e2bb0b3d5c4e6504a4a2eb250f589d7311975735348cd4044dd268d99e8140e448a6340730907655391f SHA512 47cc738c198c7f0ae4bd5e816b1694b8e810951eed2e1ca030d84001ab871477e819758041677428ddeb31d894031eeaf7f8265ae58f3b8e619f3475bb7691f2
DIST github.com-schachmat-ingo-a4bdc0729a3f.tar.gz 5345 BLAKE2B 6c9ce292c32d9445ad1a44f338ff5179938199c9895cff66994c171438cb47bc822684dbc8ceafb90cfca08309a25402e856028c410af42758cba74650a44f9c SHA512 29a917430277811ac612b372756f548aebdd7216fe14c058cabd8edc2594807a8f2b518e28730f9318e01c83efd8d063254433021f60d918b5d0bd818649a724
-DIST github.com-schachmat-ingo-fab41e4.tar.gz 3170 BLAKE2B e37843954694c9cf5ae0a7faf953a5483f06d85bc7521ac199a0db9e6ca052f38ffac74b9f4256a2692f3f3055f49274cb0d7e1ac96c3a892da3553963d6e2da SHA512 8aedc3e85666c228f44f563fbc0264a3cd17fc4dc25f243d92995aeeb493533439600d147eeb9e23d00f108e8002a8b9e0fb4be309353ddd08f1efdd9582b849
-DIST wego-2.0.tar.gz 11185 BLAKE2B 1bf8030a0801a80d5bd367be9a53f01c232ece40fb6f66e4dd06a72ed44e2cc1d6da27888b148c24264ed4eec460b4b9d8e4ff6e91d55e134f275b3978048ace SHA512 92073393f420f72367955b08ef64a90eadc5a72f79f9c42ee1886918923e5953da15dd9ffaefc14aa444cfe5db5f903d88ec080f9ca3490da29efe5734a200f8
DIST wego-2.0_p20190211.tar.gz 15639 BLAKE2B 49b8e074aa23ef21917263a57aee6bd92c8a901a3a8163f7d73512a3682f312ae3b9e645dfb44b856433b2635000c2cdbe0a8d5d0a3c079cba6d20b8789d7b60 SHA512 8ee2747f4a6a0655125fd197b40bea9cf6ae11728a68c35e08863906a54b195e16be932e007dfa9be61452b59503126c92b9785f467a5b38f4f6f6d3e12e71e4
diff --git a/app-misc/wego/wego-2.0.ebuild b/app-misc/wego/wego-2.0.ebuild
deleted file mode 100644
index c7a7021746..0000000000
--- a/app-misc/wego/wego-2.0.ebuild
+++ /dev/null
@@ -1,23 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-GOLANG_PKG_IMPORTPATH="github.com/schachmat"
-GOLANG_PKG_HAVE_TEST=1
-GOLANG_PKG_USE_CGO=1
-
-GOLANG_PKG_DEPENDENCIES=(
- "github.com/mattn/go-colorable:9fdad7c"
- "github.com/mattn/go-runewidth:d037b52"
- "github.com/schachmat/ingo:fab41e4"
-)
-
-inherit golang-single
-
-DESCRIPTION="Wego is a weather client for the terminal"
-
-LICENSE="BSD ISC"
-SLOT="0"
-KEYWORDS="~amd64"
-RESTRICT="!test? ( test )"
diff --git a/app-misc/wego/wego-2.0_p20190211-r1.ebuild b/app-misc/wego/wego-2.0_p20190211-r1.ebuild
new file mode 100644
index 0000000000..b25e52c723
--- /dev/null
+++ b/app-misc/wego/wego-2.0_p20190211-r1.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+EGIT_COMMIT="994e4f141759a1070d7b0c8fbe5fad2cc7ee7d45"
+EGO_PN="github.com/schachmat/wego"
+EGO_VENDOR=(
+ "github.com/mattn/go-runewidth 43a826dcfbd"
+ "github.com/mattn/go-colorable 2e1b0c1546e01"
+ "github.com/schachmat/ingo a4bdc0729a3f"
+ "github.com/mattn/go-isatty 7b513a986450"
+ "github.com/rivo/uniseg f8f8f751c732"
+ "golang.org/x/sys d5e6a3e2c0ae github.com/golang/sys"
+)
+
+inherit golang-vcs-snapshot golang-build
+
+DESCRIPTION="Wego is a weather client for the terminal"
+SRC_URI="
+ https://${EGO_PN}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz
+ ${EGO_VENDOR_URI}
+"
+HOMEPAGE="https://github.com/schachmat/wego"
+LICENSE="BSD ISC"
+SLOT="0"
+KEYWORDS="~amd64"
+
+src_install() {
+ dobin wego
+ dodoc "src/${EGO_PN}/README.md"
+}
diff --git a/app-misc/wego/wego-2.0_p20190211.ebuild b/app-misc/wego/wego-2.0_p20190211.ebuild
deleted file mode 100644
index 752cf2416b..0000000000
--- a/app-misc/wego/wego-2.0_p20190211.ebuild
+++ /dev/null
@@ -1,28 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-COMMIT="994e4f141759a1070d7b0c8fbe5fad2cc7ee7d45"
-
-GOLANG_PKG_IMPORTPATH="github.com/schachmat"
-GOLANG_PKG_HAVE_TEST=1
-GOLANG_PKG_VERSION="${COMMIT}"
-GOLANG_PKG_DEPENDENCIES=(
- "github.com/mattn/go-runewidth:43a826dcfbd"
- "github.com/mattn/go-colorable:2e1b0c1546e01"
- "github.com/schachmat/ingo:a4bdc0729a3f"
- "github.com/mattn/go-isatty:7b513a986450"
- "github.com/rivo/uniseg:f8f8f751c732"
- "github.com/golang/sys:d5e6a3e2c0ae -> golang.org/x"
-)
-
-inherit golang-single
-
-DESCRIPTION="Wego is a weather client for the terminal"
-#SRC_URI="https://github.com/schachmat/wego/archive/${COMMIT}.tar.gz -> ${P}.tar.gz"
-#S="${WORKDIR}/${PN}-${COMMIT}"
-LICENSE="BSD ISC"
-SLOT="0"
-KEYWORDS="~amd64"
-RESTRICT="!test? ( test )"
diff --git a/dev-R/RInside/Manifest b/dev-R/RInside/Manifest
new file mode 100644
index 0000000000..8fbb0a3208
--- /dev/null
+++ b/dev-R/RInside/Manifest
@@ -0,0 +1 @@
+DIST RInside_0.2.16.tar.gz 80576 BLAKE2B ac61f01e0de6c4099db97753a4af93aa84a4ea84728e6e029bb31bb1fe76be1afc12aa0aa781a4049b512e85c7188bfa9d8a6172d869336fbe30a3d75e5d2c0b SHA512 367430d2243864532688aea17cabca45e9dfcaa357b5a19dfd8fa3c8878d0c38e55815feba00c27541e1a908507766bbe5a4b87274734fa1b66581da254fc215
diff --git a/dev-R/RInside/RInside-0.2.16.ebuild b/dev-R/RInside/RInside-0.2.16.ebuild
new file mode 100644
index 0000000000..aff2bb75ff
--- /dev/null
+++ b/dev-R/RInside/RInside-0.2.16.ebuild
@@ -0,0 +1,20 @@
+# Copyright 1999-2020 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit R-packages-guru
+
+DESCRIPTION='C++ Classes to Embed R in C++ (and C) Applications'
+KEYWORDS="~amd64"
+SRC_URI="mirror://cran/src/contrib/${PN}_${PV}.tar.gz"
+LICENSE='GPL-2+'
+HOMEPAGE="
+ https://cran.r-project.org/package=RInside
+ http://dirk.eddelbuettel.com/code/rinside.html
+ https://github.com/eddelbuettel/rinside
+"
+DEPEND="
+ dev-R/Rcpp
+"
+RDEPEND="${DEPEND}"
diff --git a/dev-R/RInside/metadata.xml b/dev-R/RInside/metadata.xml
new file mode 100644
index 0000000000..7436faed7e
--- /dev/null
+++ b/dev-R/RInside/metadata.xml
@@ -0,0 +1,20 @@
+
+
+
+ C++ Classes to Embed R in C++ (and C) Applications // C++ classes to embed R in C++ (and C) applications A C++ class providing the R interpreter is offered by this package making it easier to have "R inside" your C++ application. As R itself is embedded into your application, a shared library build of R is required. This works on Linux, OS X and even on Windows provided you use the same tools used to build R itself. Numerous examples are provided in the nine subdirectories of the examples/ directory of the installed package: standard, 'mpi' (for parallel computing), 'qt' (showing how to embed 'RInside' inside a Qt GUI application), 'wt' (showing how to build a "web-application" using the Wt toolkit), 'armadillo' (for 'RInside' use with 'RcppArmadillo'), 'eigen' (for 'RInside' use with 'RcppEigen'), and 'c_interface' for a basic C interface and 'Ruby' illustration. The examples use 'GNUmakefile(s)' with GNU extensions, so a GNU make is required (and will use the 'GNUmakefile' automatically). 'Doxygen'-generated documentation of the C++ classes is available at the 'RInside' website as well.
+
+ co-maintainers welcome
+ lssndrbarbieri@gmail.com
+ Alessandro Barbieri
+
+
+ https://github.com/eddelbuettel/rinside/issues
+ https://cran.r-project.org/web/packages/RInside/RInside.pdf
+ https://cran.r-project.org/web/packages/RInside/ChangeLog
+
+ Dirk Eddelbuettel
+ edd@debian.org
+
+ eddelbuettel/rinside
+
+
diff --git a/eclass/golang-common.eclass b/eclass/golang-common.eclass
deleted file mode 100644
index 85dac9d257..0000000000
--- a/eclass/golang-common.eclass
+++ /dev/null
@@ -1,1027 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-# @ECLASS: golang-utils.eclass
-# @MAINTAINER:
-#
-# @AUTHOR:
-# Mauro Toffanin
-# @BLURB: Base eclass for GoLang packages
-# @SUPPORTED_EAPIS: 7
-# @DESCRIPTION:
-# This eclass provides functionalities which are used by golang-single.eclass,
-# golang-live.eclass, and as well as from ebuilds.
-#
-# This eclass should not be inherited directly from an ebuild.
-# Instead, you should inherit golang-single or golang-live for GoLang packages.
-
-inherit eutils multiprocessing
-
-if [[ -z ${_GOLANG_BASE_ECLASS} ]]; then
-_GOLANG_BASE_ECLASS=1
-
-# Silences repoman warnings.
-case "${EAPI:-0}" in
- 7)
- case "${GOLANG_PKG_DEPEND_ON_GO_SUBSLOT:-yes}" in
- yes)
- GO_DEPEND="dev-lang/go:0="
- ;;
- *)
- GO_DEPEND="dev-lang/go:*"
- ;;
- esac
- ;;
- *)
- die "${ECLASS}: EAPI=${EAPI:-0} is not supported" ;;
-esac
-
-DEPEND+=" ${GO_DEPEND}"
-
-RESTRICT+=" strip"
-
-QA_FLAGS_IGNORED="
- usr/bin/.*
- usr/sbin/.*
-"
-QA_PRESTRIPPED="
- usr/bin/.*
- usr/sbin/.*
-"
-
-# @ECLASS-VARIABLE: GOLANG_PKG_NAME
-# @DESCRIPTION:
-# Sets the GoLang name for the generated package.
-# GOLANG_PKG_NAME="${PN}"
-GOLANG_PKG_NAME="${GOLANG_PKG_NAME:-${PN}}"
-
-# @ECLASS-VARIABLE: GOLANG_PKG_VERSION
-# @DESCRIPTION:
-# Sets the GoLang version for the generated package.
-# GOLANG_PKG_VERSION="${PV}"
-GOLANG_PKG_VERSION="${GOLANG_PKG_VERSION:-${PV/_pre/.pre}}"
-
-# @ECLASS-VARIABLE: GOLANG_PKG_IMPORTPATH
-# @DESCRIPTION:
-# Sets the remote import path for the generated package.
-# GOLANG_PKG_IMPORTPATH="github.com/captObvious/"
-GOLANG_PKG_IMPORTPATH="${GOLANG_PKG_IMPORTPATH:-}"
-
-# @ECLASS-VARIABLE: GOLANG_PKG_IMPORTPATH_ALIAS
-# @DESCRIPTION:
-# Sets an alias of the remote import path for the generated package.
-# GOLANG_PKG_IMPORTPATH_ALIAS="privaterepo.com/captObvious/"
-GOLANG_PKG_IMPORTPATH_ALIAS="${GOLANG_PKG_IMPORTPATH_ALIAS:=${GOLANG_PKG_IMPORTPATH}}"
-
-# @ECLASS-VARIABLE: GOLANG_PKG_ARCHIVEPREFIX
-# @DESCRIPTION:
-# Sets the archive prefix for the file URI of the package.
-# Most projects hosted on GitHub's mirrors provide archives with prefix as
-# 'v' or 'source-', other hosted services offer different archive formats.
-# This eclass defaults to an empty prefix.
-GOLANG_PKG_ARCHIVEPREFIX="${GOLANG_PKG_ARCHIVEPREFIX:-}"
-
-# @ECLASS-VARIABLE: GOLANG_PKG_ARCHIVESUFFIX
-# @DESCRIPTION:
-# Sets the archive suffix for the file URI of the package.
-# Most projects hosted on GitHub's mirrors provide archives with suffix as
-# '.tar.gz' or '.zip', other hosted services offer different archive formats.
-# This eclass defaults to '.tar.gz'.
-GOLANG_PKG_ARCHIVESUFFIX="${GOLANG_PKG_ARCHIVESUFFIX:=".tar.gz"}"
-
-# @ECLASS-VARIABLE: GOLANG_PKG_OUTPUT_NAME
-# @DESCRIPTION:
-# Specifies the output file name of the package.
-# If not set, it derives from the name of the package, such as $GOLANG_PKG_NAME.
-# This eclass defaults to $PN.
-GOLANG_PKG_OUTPUT_NAME="${GOLANG_PKG_OUTPUT_NAME:=${PN}}"
-
-# @ECLASS-VARIABLE: GOLANG_PKG_BUILDPATH
-# @DESCRIPTION:
-# Specifies a go source file to be compiled as a single main package.
-# This eclass defaults to an empty value.
-# This eclass defaults to "/..." when the user declares GOLANG_PKG_IS_MULTIPLE=1
-GOLANG_PKG_BUILDPATH="${GOLANG_PKG_BUILDPATH:-}"
-
-# @ECLASS-VARIABLE: GOLANG_PKG_INSTALLPATH
-# @DESCRIPTION:
-# Sets the root path into which a binary, or a list of binaries, will be
-# installed (e.x.: ${GOLANG_PKG_INSTALLPATH}/bin).
-# This eclass defaults to "/usr"
-GOLANG_PKG_INSTALLPATH="${GOLANG_PKG_INSTALLPATH:="/usr"}"
-
-# @ECLASS-VARIABLE: GOLANG_PKG_INSTALLSUFFIX
-# @DESCRIPTION:
-# Sets a suffix to use in the name of the package installation directory.
-# This eclass defaults to an empty install suffix.
-GOLANG_PKG_INSTALLSUFFIX="${GOLANG_PKG_INSTALLSUFFIX:-}"
-
-# @ECLASS-VARIABLE: GOLANG_PKG_IS_MULTIPLE
-# @DESCRIPTION:
-# Set to enable the building of multiple packages from a single import path.
-
-# @ECLASS-VARIABLE: GOLANG_PKG_HAVE_TEST
-# @DEFAULT_UNSET
-# @DESCRIPTION:
-# Set to enable the execution of automated testing.
-
-# @ECLASS-VARIABLE: GOLANG_PKG_HAVE_TEST_RACE
-# @DEFAULT_UNSET
-# @DESCRIPTION:
-# Set to enable the execution of automated testing with support for
-# data race detection.
-
-# @ECLASS-VARIABLE: GOLANG_PKG_USE_CGO
-# @DEFAULT_UNSET
-# @DESCRIPTION:
-# Set to enable the compilation of the package with CGO.
-
-# @ECLASS-VARIABLE: GOLANG_PKG_USE_GENERATE
-# @DEFAULT_UNSET
-# @DESCRIPTION:
-# Set to run commands described by directives within existing golang files.
-
-# @ECLASS-VARIABLE: GOLANG_PKG_DEPEND_ON_GO_SUBSLOT
-# @DESCRIPTION:
-# Set to ensure the package does depend on the dev-lang/go subslot value.
-# Possible values: {yes,no}
-# This eclass defaults to "no"
-GOLANG_PKG_DEPEND_ON_GO_SUBSLOT=${GOLANG_PKG_DEPEND_ON_GO_SUBSLOT:="no"}
-
-# @ECLASS-VARIABLE: GOLANG_PKG_LDFLAGS
-# @DESCRIPTION:
-# Sets the linker arguments to pass to 5l, 6l, or 8l.
-# This eclass defaults to an empty list.
-GOLANG_PKG_LDFLAGS="${GOLANG_PKG_LDFLAGS:-}"
-
-# @ECLASS-VARIABLE: GOLANG_PKG_TAGS
-# @DESCRIPTION:
-# Sets the list of build tags during the build.
-# This eclass defaults to an empty list.
-GOLANG_PKG_TAGS="${GOLANG_PKG_TAGS:-}"
-
-# @ECLASS-VARIABLE: GOLANG_PKG_VENDOR
-# @DESCRIPTION:
-# Sets additional standard Go workspaces to be appended to the environment
-# variable GOPATH, as described in http://golang.org/doc/code.html.
-# This eclass defaults to an empty list.
-GOLANG_PKG_VENDOR=()
-
-# @ECLASS-VARIABLE: GOLANG_PKG_STATIK
-# @DESCRIPTION:
-# Sets the arguments to pass to dev-go/statik.
-# This eclass defaults to an empty list.
-GOLANG_PKG_STATIK="${GOLANG_PKG_STATIK:-}"
-
-# @ECLASS-VARIABLE: GOLANG_PKG_USE_MODULES
-# @DESCRIPTION:
-# Set to enable the compilation of the package with Go modules support.
-
-# @ECLASS-VARIABLE: GO
-# @DEFAULT_UNSET
-# @DESCRIPTION:
-# The absolute path to the current GoLang interpreter.
-#
-# This variable is set automatically after calling golang_setup().
-#
-# Default value:
-# @CODE
-# /usr/bin/go
-# @CODE
-
-# @ECLASS-VARIABLE: EGO
-# @DEFAULT_UNSET
-# @DESCRIPTION:
-# The executable name of the current GoLang interpreter.
-#
-# This variable is set automatically after calling golang_setup().
-#
-# Default value:
-# @CODE
-# go
-# @CODE
-
-# @ECLASS-VARIABLE: PATCHES
-# @DEFAULT_UNSET
-# @DESCRIPTION:
-# Array variable containing all the patches to be applied. This variable
-# is expected to be defined in the global scope of ebuilds. Make sure to
-# specify the full path. This variable is used in src_prepare phase.
-#
-# Example:
-# @CODE
-# PATCHES=(
-# "${FILESDIR}/mypatch.patch"
-# "${FILESDIR}/mypatch2.patch"
-# )
-# @CODE
-
-# Adds gccgo as a compile-time dependency when GOLANG_PKG_USE_CGO is set.
-#[[ -n ${GOLANG_PKG_USE_CGO} ]] && DEPEND+=" >=sys-devel/gcc-4.8.4[go]"
-
-# Adds dev-go/statik as a compile-time dependency when GOLANG_PKG_STATIK is set.
-[[ -n ${GOLANG_PKG_STATIK} ]] && DEPEND+=" dev-go/statik"
-
-# Validates GOLANG_PKG_IMPORTPATH.
-if [[ -z ${GOLANG_PKG_IMPORTPATH} ]]; then
- eerror "The remote import path for this package has not been declared"
- die "Mandatory variable GOLANG_PKG_IMPORTPATH is unset"
-fi
-
-# Forces a multiple package build when user specifies GOLANG_PKG_IS_MULTIPLE=1.
-if [[ -n ${GOLANG_PKG_IS_MULTIPLE} && -z ${GOLANG_PKG_BUILDPATH} ]]; then
- GOLANG_PKG_BUILDPATH="/..."
-fi
-
-# Validates use of GOLANG_PKG_BUILDPATH combined with GOLANG_PKG_IS_MULTIPLE
-# FIX: makes sure user isn't overriding GOLANG_PKG_BUILDPATH with inane values.
-if [[ -n ${GOLANG_PKG_IS_MULTIPLE} && ${GOLANG_PKG_BUILDPATH##*/} != "..." ]]; then
- ewarn "Ebuild ${CATEGORY}/${PF} specifies GOLANG_PKG_IS_MULTIPLE=1,"
- ewarn "but then GOLANG_PKG_BUILDPATH is overridden with \"${GOLANG_PKG_BUILDPATH}\"."
- ewarn "Please, fix it by appending \"/...\" to your GOLANG_PKG_BUILDPATH."
- ewarn "If in doubt, remove GOLANG_PKG_BUILDPATH entirely."
-fi
-
-# Even though xz-utils are in @system, they must still be added to DEPEND; see
-# http://archives.gentoo.org/gentoo-dev/msg_a0d4833eb314d1be5d5802a3b710e0a4.xml
-if [[ ${GOLANG_PKG_ARCHIVESUFFIX/.*} == "xz" ]]; then
- DEPEND+=" app-arch/xz-utils"
-fi
-
-# Defines common USE flags
-IUSE="${IUSE} debug pie"
-# Enables USE 'test' when required by GOLANG_PKG_HAVE_TEST.
-if [[ -n ${GOLANG_PKG_HAVE_TEST} ]]; then
- IUSE+=" test"
-fi
-
-# Defines HOMEPAGE.
-[ -z "$HOMEPAGE" ] && HOMEPAGE="https://${GOLANG_PKG_IMPORTPATH}/${PN}"
-
-# Defines SOURCE directory.
-S="${WORKDIR}/gopath/src/${GOLANG_PKG_IMPORTPATH_ALIAS}/${GOLANG_PKG_NAME}"
-
-
-# @FUNCTION: _factorize_dependency_entities
-# @INTERNAL
-# @DESCRIPTION:
-# Factorizes the dependency declaration in specific tokens such as the import
-# path, the import path alias, the host name, the author name, the project name,
-# and the revision tag.
-_factorize_dependency_entities() {
- debug-print-function ${FUNCNAME} "${@}"
-
- local -A dependency=()
- local key_list=(importpathalias importpath host project_name author_name revision)
-
- # Strips all the white spaces from the supplied argument.
- local raw_dependency="${1//\ /}"
-
- # Determines the alias of the import path (if present).
- dependency[importpathalias]="${raw_dependency##*->}"
-
- # Strips the import path alias from the supplied argument.
- raw_dependency="${raw_dependency%%->*}"
-
- # Determines the import path.
- dependency[importpath]="${raw_dependency%:*}"
-
- # When the importpath alias is not specified, then this eclass sets the
- # alias as equal to the import path minus the project name.
- if [[ "${raw_dependency}" == "${dependency[importpathalias]}" ]]; then
- dependency[importpathalias]="${dependency[importpath]%/*}"
- fi
-
- # Determines the host.
- dependency[host]="${dependency[importpath]%%/*}"
-
- # Determines the project name.
- dependency[project_name]="${dependency[importpath]##*/}"
-
- # Determines the author name.
- dependency[author_name]="${dependency[importpath]#*/}"
- dependency[author_name]="${dependency[author_name]%/*}"
-
- # Determines the revision.
- dependency[revision]="${raw_dependency#*:}"
-
- # Exports all the dependency tokens as an associated list.
- for key in ${key_list[@]}; do
- echo "${key} ${dependency[${key}]}"
- done
-}
-
-# @FUNCTION: golang_setup
-# @DESCRIPTION:
-# Determines where is the GoLang implementation and then set-up the
-# GoLang build environment.
-golang_setup() {
- debug-print-function ${FUNCNAME} "${@}"
-
- # NOTE: Keep /usr/bin/go as index [0] and never overwrite it,
- # always append other binary paths after the index [0]
- local GOLANG_BINS=(
- /usr/bin/go
- /usr/bin/gofmt
- )
-
- [[ -n ${GOLANG_PKG_STATIK} ]] && GOLANG_BINS+=(/usr/bin/statik)
-
- # Reset GoLang environment variables
- unset EGO
- unset EGOFMT
- unset ESTATIK
- unset GO
- unset GOPATH
- unset GOBIN
-
- # Determine is the GoLang interpreter is working
- local IS_EXECUTABLE=1
- for binary in "${GOLANG_BINS[@]}"; do
- debug-print "${FUNCNAME}: Checking ... ${binary}"
-
- [[ -x "${EPREFIX}/${binary}" ]] && continue
- IS_EXECUTABLE=0
- ewarn "It seems that the binary '${binary}' is not executable."
- done
-
- # dev-lang/go isn't installed or one of its binaries aren't executable.
- # Either way, the Gentoo box is screwed; no need to set up the GoLang environment
- [[ ${IS_EXECUTABLE} == 0 ]] && exit
-
- # dev-lang/go is available and working.
- # Exports GO/EGO/EGOFMT global variables.
- export GO="${GOLANG_BINS[0]}"
- export EGO="${GOLANG_BINS[0]##*/}"
- export EGOFMT="${GOLANG_BINS[1]}"
-
- # dev-go/statik is available and working.
- # Exports ESTATIK global variable.
- [[ -n ${GOLANG_PKG_STATIK} ]] && export ESTATIK="${GOLANG_BINS[2]##*/}"
-
- debug-print "${FUNCNAME}: GO = ${GO}"
- debug-print "${FUNCNAME}: EGO = ${EGO}"
- debug-print "${FUNCNAME}: EGOFMT = ${EGOFMT}"
- debug-print "${FUNCNAME}: ESTATIK = ${ESTATIK}"
-
- # Determines go interpreter version.
- GOLANG_VERSION="$( ${GO} version )"
- GOLANG_VERSION="${GOLANG_VERSION/go\ version\ go}"
- export GOLANG_VERSION="${GOLANG_VERSION%\ *}"
- einfo "Found GoLang version: ${GOLANG_VERSION}"
-
- # Determines statik interpreter version.
- # TODO: add version detection when statik will provide a -version option.
- if [[ -n ${GOLANG_PKG_STATIK} ]]; then
- local STATIK_VERSION=""
- einfo "Found statik version: ${STATIK_VERSION}"
- fi
-
- # Enable/Disable frame pointers
- local GOEXPERIMENT="noframepointer"
- use debug && GOEXPERIMENT="framepointer"
-
- # Sets the build environment inside Portage's WORKDIR.
- ebegin "Setting up GoLang build environment"
-
- # Prepares CGO_ENABLED.
- CGO_ENABLED=0
- [[ -z ${GOLANG_PKG_USE_CGO} ]] || CGO_ENABLED=1
- use pie && CGO_ENABLED=1 # PIE requires CGO
-
- # Prepares gopath / gobin directories inside WORKDIR.
- local _GOPATH="${WORKDIR}/gopath"
- local _GOBIN="${WORKDIR}/gobin"
- mkdir -p "${_GOBIN}" || die
- mkdir -p "${_GOPATH}"/src || die
-
- # Exports special env variable EGO_SRC.
- export EGO_SRC="${_GOPATH}/src"
-
- # Exports GoLang env variables.
- export GOPATH="$_GOPATH"
- export GOBIN="$_GOBIN"
- export CGO_ENABLED
- #export GOEXPERIMENT
- #export GO15VENDOREXPERIMENT=0
-
- GO111MODULE="off"
- [[ -z ${GOLANG_PKG_USE_MODULES} ]] || GO111MODULE="on"
- export GO111MODULE
-
- debug-print "${FUNCNAME}: GOPATH = ${GOPATH}"
- debug-print "${FUNCNAME}: GOBIN = ${GOBIN}"
- debug-print "${FUNCNAME}: EGO_SRC = ${EGO_SRC}"
- debug-print "${FUNCNAME}: CGO_ENABLED = ${CGO_ENABLED}"
- eend
-}
-
-# @FUNCTION: golang-common_src_prepare
-# @DESCRIPTION:
-# Prepare source code.
-golang-common_src_prepare() {
- debug-print-function ${FUNCNAME} "${@}"
-
- pushd "${WORKDIR}" > /dev/null || die
- einfo "Preparing GoLang build environment in ${GOPATH}/src"
-
- # If the ebuild declares an importpath alias, then its path was
- # already created during the src_unpack phase. That means the eclass
- # needs to create the missing original import path (GOLANG_PKG_IMPORTPATH)
- # as a simbolic link pointing to the alias.
- if [[ "${GOLANG_PKG_IMPORTPATH}" != "${GOLANG_PKG_IMPORTPATH_ALIAS}" ]]; then
-
- # If the ebuild declares a GOLANG_PKG_NAME different from PN, then
- # the latter will be used as the simbolic link target.
- local TARGET="${GOLANG_PKG_NAME}"
- [[ "${PN}" != "${GOLANG_PKG_NAME}" ]] && TARGET="${PN}"
-
- golang_fix_importpath_alias \
- "${GOLANG_PKG_IMPORTPATH_ALIAS}/${TARGET}" \
- "${GOLANG_PKG_IMPORTPATH}/${GOLANG_PKG_NAME}"
- fi
-
- # If the ebuild declares some GoLang dependencies, then they need to be
- # correctly installed into the sand-boxed GoLang build environment which
- # was set up automatically during src_unpack) phase.
- if [[ ${#GOLANG_PKG_DEPENDENCIES[@]} -gt 0 ]]; then
-
- for i in ${!GOLANG_PKG_DEPENDENCIES[@]} ; do
-
- # Collects all the tokens of the dependency.
- local -A DEPENDENCY=()
- while read -r -d $'\n' key value; do
- [[ -z ${key} ]] && continue
- DEPENDENCY[$key]="${value}"
- done <<-EOF
- $( _factorize_dependency_entities "${GOLANG_PKG_DEPENDENCIES[$i]}" )
- EOF
-
- # Debug
- debug-print "${FUNCNAME}: DEPENDENCY = ${GOLANG_PKG_DEPENDENCIES[$i]}"
- debug-print "${FUNCNAME}: importpath = ${DEPENDENCY[importpath]}"
- debug-print "${FUNCNAME}: importpathalias = ${DEPENDENCY[importpathalias]}"
- debug-print "${FUNCNAME}: host = ${DEPENDENCY[host]}"
- debug-print "${FUNCNAME}: author = ${DEPENDENCY[author_name]}"
- debug-print "${FUNCNAME}: project = ${DEPENDENCY[project_name]}"
- debug-print "${FUNCNAME}: revision = ${DEPENDENCY[revision]}"
-
- local message="Importing ${DEPENDENCY[importpath]}"
- local destdir
-
- # Prepares GOPATH structure.
- case ${DEPENDENCY[importpathalias]} in
- gopkg.in*)
- message+=" as ${DEPENDENCY[importpathalias]}"
- destdir="${DEPENDENCY[importpathalias]}"
-
- # Creates the import path in GOPATH.
- mkdir -p "${GOPATH}/src/${DEPENDENCY[importpathalias]%/*}" || die
- #einfo "\n${GOPATH}/src/${DEPENDENCY[importpathalias]%/*}"
- ;;
- *)
- [[ "${DEPENDENCY[importpath]}" != "${DEPENDENCY[importpathalias]}/${DEPENDENCY[project_name]}" ]] && message+=" as ${DEPENDENCY[importpathalias]}/${DEPENDENCY[project_name]}"
- destdir="${DEPENDENCY[importpathalias]}/${DEPENDENCY[project_name]}"
-
- # Creates the import path in GOPATH.
- mkdir -p "${GOPATH}/src/${DEPENDENCY[importpathalias]}" || die
- #einfo "\n${GOPATH}/src/${DEPENDENCY[importpathalias]}"
- ;;
- esac
-
- # Moves sources from WORKDIR into GOPATH.
- case ${DEPENDENCY[host]} in
- github*)
- ebegin "${message}"
- mv ${DEPENDENCY[project_name]}-${DEPENDENCY[revision]}* "${GOPATH}"/src/${destdir} || die
- eend
-
- # FIX: sometimes the source code inside an importpath alias
- # (such as gopkg.in/mylib.v1) invokes imports from
- # the original import path instead of using the alias,
- # thus we need a symbolic link between the alias and
- # the original import path to avoid compilation issues.
- # Example: gopkg.in/Shopify/sarama.v1 erroneously
- # invokes imports from github.com/shopify/sarama
- if [[ ${destdir} != ${DEPENDENCY[importpath]} ]]; then
- golang_fix_importpath_alias ${destdir} ${DEPENDENCY[importpath]}
- fi
- ;;
- bitbucket*)
- #einfo "path: ${DEPENDENCY[author_name]}-${DEPENDENCY[project_name]}-${DEPENDENCY[revision]}"
- ebegin "${message}"
- mv ${DEPENDENCY[author_name]}-${DEPENDENCY[project_name]}-${DEPENDENCY[revision]}* "${GOPATH}"/src/${destdir} || die
- eend
- ;;
- code.google*)
- ebegin "${message}"
- mv ${DEPENDENCY[project_name]}-${DEPENDENCY[revision]}* "${GOPATH}"/src/${destdir} || die
- eend
- ;;
- *) die "Function 'golang-common_src_prepare' doesn't support '${DEPENDENCY[importpath]}'" ;;
- esac
- done
-
- fi
-
- popd > /dev/null || die
-
- # Auto-detects the presence of Go's vendored
- # dependencies inside $S/vendor.
- local VENDOR="${S}/vendor"
- if [[ -d "${VENDOR}" ]]; then
- golang_add_vendor "${VENDOR}"
- export GO15VENDOREXPERIMENT=1
- fi
-
- # Auto-detects the presence of Go's vendored
- # dependencies inside $S/*/vendor
- if [[ -n ${GOLANG_PKG_BUILDPATH} && ${GOLANG_PKG_BUILDPATH##*/} != "..." ]]; then
- while read -r -d $' ' path; do
- # Trims leading slash (if any).
- path="${path/\//}"
-
- # Extracts the root path.
- path="${path%%/*}"
-
- # Ignores $path when it's empty or a string of white spaces.
- [[ -n $path ]] || continue
-
- local vendor="${S}/${path}/vendor"
- if [[ -d "${vendor}" ]]; then
- golang_add_vendor "${vendor}"
- fi
- done <<< "$( echo ${GOLANG_PKG_BUILDPATH}) "
- fi
-
-
- # Auto-detects the presence of Godep's workspace
- # (see github.com/tools/godep for more infos).
- VENDOR="${S}/Godeps/_workspace"
- if [[ -d "${VENDOR}" ]]; then
- golang_add_vendor "${VENDOR}"
- fi
-
- # Evaluates PATCHES array.
- default_src_prepare
-}
-
-# @FUNCTION: golang-common_src_configure
-# @DESCRIPTION:
-# Configure the package.
-golang-common_src_configure() {
- debug-print-function ${FUNCNAME} "${@}"
-
- [[ ${EGO} ]] || die "No GoLang implementation set (golang_setup not called?)."
-
- # Defines the level of verbosity.
- local EGO_VERBOSE="-v"
- [[ -z ${PORTAGE_VERBOSE} ]] || EGO_VERBOSE+=" -x"
-
- # GoLang doesn't have a configure phase,
- # so instead this eclass prints the output of 'go env'.
- local -a GOLANG_ENV=()
- while read -r line; do
- GOLANG_ENV+=("${line}")
- done <<-EOF
- $( ${GO} env )
- EOF
-
- # Prints an error when 'go env' output is missing.
- if [[ ${#GOLANG_ENV[@]} -eq 1 ]]; then
- eerror "Your GoLang environment should be more verbose"
- fi
-
- # Prints GoLang environment summary.
- einfo " ${EGO} env"
- for env in "${GOLANG_ENV[@]}"; do
- einfo " - ${env}"
- done
-
-
- # Removes GoLang object files from package source directories (pkg/)
- # and temporary directories (_obj/ _test*/).
- local EGO_SUBPACKAGES="${GOLANG_PKG_IMPORTPATH_ALIAS}/${GOLANG_PKG_NAME}"
- case $( ver_cut 1-2 ${GOLANG_VERSION} ) in
- 1.4*) ;;
- *)
- EGO_SUBPACKAGES+="/..."
- ;;
- esac
-# einfo "${EGO} clean -i ${EGO_VERBOSE} ${EGO_SUBPACKAGES}"
-# ${EGO} clean -i \
-# ${EGO_VERBOSE} \
-# "${EGO_SUBPACKAGES}" \
-# || die
-
- # Removes GoLang objects files from all the dependencies too.
-# if [[ ${#GOLANG_PKG_DEPENDENCIES[@]} -gt 0 ]]; then
-#
-# for i in ${!GOLANG_PKG_DEPENDENCIES[@]} ; do
-#
-# # Collects all the tokens of the dependency.
-# local -A DEPENDENCY=()
-# while read -r -d $'\n' key value; do
-# [[ -z ${key} ]] && continue
-# DEPENDENCY[$key]="${value}"
-# done <<-EOF
-# $( _factorize_dependency_entities "${GOLANG_PKG_DEPENDENCIES[$i]}" )
-# EOF
-#
-# [[ ! -d ${DEPENDENCY[importpath]} ]] && continue
-#
-# # Debug
-# debug-print "${FUNCNAME}: DEPENDENCY = ${GOLANG_PKG_DEPENDENCIES[$i]}"
-# debug-print "${FUNCNAME}: importpath = ${DEPENDENCY[importpath]}"
-#
-# # Cleans object files of the dependency.
-# einfo "${EGO} clean -i ${EGO_VERBOSE} ${DEPENDENCY[importpath]}"
-# ${EGO} clean \
-# -i ${EGO_VERBOSE} \
-# "${DEPENDENCY[importpath]}" \
-# || die
-# done
-# fi
-
- # Before to compile Godep's dependencies it's wise to wipe out
- # all pre-built object files from Godep's package source directories.
- if [[ -d "${S}"/Godeps/_workspace/pkg ]]; then
- ebegin "Cleaning up pre-built object files in Godep workspace"
- rm -r "${S}"/Godeps/_workspace/pkg || die
- eend
- fi
- if [[ -d "${S}"/Godeps/_workspace/bin ]]; then
- ebegin "Cleaning up executables in Godep workspace"
- rm -r "${S}"/Godeps/_workspace/bin || die
- eend
- fi
-
-
- # Executes 'go generate'.
- # NOTE: generate should never run automatically. It must be run explicitly.
- if [[ -n ${GOLANG_PKG_USE_GENERATE} ]]; then
- pushd "${GOPATH}/src/${GOLANG_PKG_IMPORTPATH_ALIAS}/${GOLANG_PKG_NAME}" > /dev/null || die
- einfo "${EGO} generate ${EGO_VERBOSE} ${GOLANG_PKG_IMPORTPATH_ALIAS}/${GOLANG_PKG_NAME}/..."
- ${EGO} generate \
- ${EGO_VERBOSE} \
- ./... \
- || die
- popd > /dev/null || die
- fi
-
-
- # Executes 'statik' when explicitly asked.
- if [[ -n ${GOLANG_PKG_STATIK} ]]; then
- ebegin "${ESTATIK} $GOLANG_PKG_STATIK"
- ${ESTATIK} $GOLANG_PKG_STATIK || die
- eend
- fi
-}
-
-# @FUNCTION: golang-common_src_compile
-# @DESCRIPTION:
-# Compiles the package.
-golang-common_src_compile() {
- debug-print-function ${FUNCNAME} "${@}"
-
- [[ ${EGO} ]] || die "No GoLang implementation set (golang_setup not called?)."
-
- # Populates env variable GOPATH with vendored workspaces (if present).
- if [[ -n ${GOLANG_PKG_VENDOR} ]]; then
- einfo "Using vendored dependencies from:"
-
- for path in "${GOLANG_PKG_VENDOR[@]}"; do
- [ -d ${path} ] || continue
-
- if [[ ${path//${S}\//} == "vendor" ]]; then
- einfo "- vendor/ (native vendoring support)"
- continue
- fi
-
- debug-print "$FUNCNAME: GOPATH: Adding vendor path ${path}"
- ebegin "- ${path//${S}\//}"
- GOPATH="${GOPATH}:$( echo ${path} )"
- eend
- done
-
- export GOPATH
- fi
-
- # Enables position-independent executables (PIE)
- local EGO_PIE
- use pie && EGO_PIE="-buildmode=pie"
-
- # Defines the install suffix.
- local EGO_INSTALLSUFFIX
- [[ -z ${GOLANG_PKG_INSTALLSUFFIX} ]] || EGO_INSTALLSUFFIX="-installsuffix=${GOLANG_PKG_INSTALLSUFFIX}"
-
- # Defines the level of verbosity.
- local EGO_VERBOSE="-v"
- [[ -z ${PORTAGE_VERBOSE} ]] || EGO_VERBOSE+=" -x"
-
- # Defines the number of builds that can be run in parallel.
- local EGO_PARALLEL="-p $(makeopts_jobs)"
-
- # Defines extra options.
- local EGO_EXTRA_OPTIONS="-a"
-
- # Prepares build flags for the go toolchain.
- local EGO_BUILD_FLAGS="$( echo ${EGO_VERBOSE} ) $( echo ${EGO_PARALLEL} ) $( echo ${EGO_EXTRA_OPTIONS} ) $( echo ${EGO_PIE} )"
- [[ -n ${EGO_INSTALLSUFFIX} ]] && EGO_BUILD_FLAGS+=" $( echo ${EGO_INSTALLSUFFIX} )"
-
- # Detects the total number of packages.
- local pkgs=0 ifs_save=${IFS} IFS=$' '
- for path in ${GOLANG_PKG_BUILDPATH[@]} ; do
- pkgs=$(( $pkgs + 1 ))
- done
- [[ ${pkgs} -eq 0 ]] && pkgs=1 # there is always at least 1 package
- IFS=${ifs_save}
-
- # Builds the package
- einfo "Compiling ${pkgs} package(s):"
- if [[ -n ${GOLANG_PKG_BUILDPATH} && ${GOLANG_PKG_BUILDPATH##*/} != "..." && ${pkgs} -gt 1 ]]; then
-
- # NOTE: This eclass trims all leading and trailing white spaces from the
- # input of the following 'while read' loop, then appends an extra
- # trailing space; this is necessary to avoid undefined behaviours
- # within the loop when GOLANG_PKG_BUILDPATH is populated with only
- # a single element.
- while read -r -d $' ' cmd; do
- # Ignores $cmd when it's empty or a string of white spaces
- #einfo "cmd: |$cmd| cmd: |${cmd##*/}|"
- [[ -n $cmd ]] || continue
-
- golang_do_build \
- ${EGO_BUILD_FLAGS} \
- -o "${GOBIN}/${cmd##*/}" \
- "${GOLANG_PKG_IMPORTPATH_ALIAS}/${GOLANG_PKG_NAME}${cmd}"
- done <<< "$( echo ${GOLANG_PKG_BUILDPATH}) "
- else
- # If the package is a multiple package (/...)
- # then this eclass doesn't specify the output name.
- [[ ${GOLANG_PKG_BUILDPATH##*/} != "..." ]] && EGO_BUILD_FLAGS+=" -o ${GOBIN}/${GOLANG_PKG_OUTPUT_NAME}"
-
- golang_do_build \
- ${EGO_BUILD_FLAGS} \
- "${GOLANG_PKG_IMPORTPATH_ALIAS}/${GOLANG_PKG_NAME}${GOLANG_PKG_BUILDPATH}"
- fi
-}
-
-# @FUNCTION: golang-common_src_install
-# @DESCRIPTION:
-# Installs binaries and documents from DOCS or HTML_DOCS arrays.
-golang-common_src_install() {
- debug-print-function ${FUNCNAME} "${@}"
-
- [[ ${EGO} ]] || die "No GoLang implementation set (golang_setup not called?)."
-
- # Enables position-independent executables (PIE)
- local EGO_PIE
- use pie && EGO_PIE="-buildmode=pie"
-
- # Defines the install suffix.
- local EGO_INSTALLSUFFIX
- [[ -z ${GOLANG_PKG_INSTALLSUFFIX} ]] || EGO_INSTALLSUFFIX="-installsuffix=${GOLANG_PKG_INSTALLSUFFIX}"
-
- # Defines the level of verbosity.
- local EGO_VERBOSE="-v"
- [[ -z ${PORTAGE_VERBOSE} ]] || EGO_VERBOSE+=" -x"
-
- # Defines the number of builds that can be run in parallel.
- local EGO_PARALLEL="-p $(makeopts_jobs)"
-
- # Defines extra options.
- local EGO_EXTRA_OPTIONS
-
- # Prepares build flags for the go toolchain.
- local EGO_BUILD_FLAGS="$( echo ${EGO_VERBOSE} ) $( echo ${EGO_PARALLEL} ) $( echo ${EGO_EXTRA_OPTIONS} ) $( echo ${EGO_PIE} )"
- [[ -n ${EGO_INSTALLSUFFIX} ]] && EGO_BUILD_FLAGS+=" $( echo ${EGO_INSTALLSUFFIX} )"
-
- # Defines sub-packages.
- local EGO_SUBPACKAGES="${GOLANG_PKG_IMPORTPATH_ALIAS}/${GOLANG_PKG_NAME}${GOLANG_PKG_BUILDPATH}"
-
- # Executes the pre-install phase (go install).
- if [[ -n ${GOLANG_PKG_IS_MULTIPLE} ]]; then
- einfo "${EGO} install -ldflags '$GOLANG_PKG_LDFLAGS' -tags '$GOLANG_PKG_TAGS' ${EGO_BUILD_FLAGS} ${EGO_SUBPACKAGES}"
- ${EGO} install \
- -ldflags "${GOLANG_PKG_LDFLAGS}" \
- -tags "${GOLANG_PKG_TAGS}" \
- ${EGO_BUILD_FLAGS} \
- "${EGO_SUBPACKAGES}" \
- || die
- fi
-
- # Installs binaries.
- into ${GOLANG_PKG_INSTALLPATH}
- for bin in "${GOBIN}"/* ; do
- dobin ${bin}
- done
-
- # Installs documentation.
- einstalldocs
-}
-
-# @FUNCTION: golang-common_src_test
-# @DESCRIPTION:
-# Runs the unit tests for the main package.
-golang-common_src_test() {
- debug-print-function ${FUNCNAME} "${@}"
-
- [[ ${EGO} ]] || die "No GoLang implementation set (golang_setup not called?)."
-
- # Appends S and GOBIN to exported main paths.
- # FIX: this is necessary for unit tests that need to invoke bins from
- # $GOBIN or from within $S/bin.
- export PATH="${S}/bin:${GOBIN}:${PATH}"
-
- # Defines the level of verbosity.
- local EGO_VERBOSE="-v"
- [[ -z ${PORTAGE_VERBOSE} ]] || EGO_VERBOSE+=" -x"
-
- # Defines the number of builds that can be run in parallel.
- local EGO_PARALLEL="-p $(makeopts_jobs)"
-
- # Defines extra options.
- #local EGO_EXTRA_OPTIONS="-a"
-
- # Enables data race detection.
- local EGO_RACE
- [[ -n ${GOLANG_PKG_HAVE_TEST_RACE} ]] && EGO_RACE=" -race"
-
- # Prepares build flags for the go toolchain.
- local EGO_BUILD_FLAGS="$( echo ${EGO_VERBOSE} ) $( echo ${EGO_PARALLEL} ) $( echo ${EGO_EXTRA_OPTIONS} )"
- [[ -n ${EGO_RACE} ]] && EGO_BUILD_FLAGS+=" $( echo ${EGO_RACE} )"
-
- # Sanitizes vars from entra white spaces.
- GOLANG_PKG_LDFLAGS="$( echo ${GOLANG_PKG_LDFLAGS} )"
- GOLANG_PKG_TAGS="$( echo ${GOLANG_PKG_TAGS} )"
-
- # Defines sub-packages.
- local EGO_SUBPACKAGES="${GOLANG_PKG_IMPORTPATH_ALIAS}/${GOLANG_PKG_NAME}${GOLANG_PKG_BUILDPATH}"
- [[ -z ${GOLANG_PKG_IS_MULTIPLE} ]] || EGO_SUBPACKAGES="./..."
-
- # Detects the total number of packages.
- local pkgs=0 ifs_save=${IFS} IFS=$' '
- for path in ${GOLANG_PKG_BUILDPATH[@]} ; do
- pkgs=$(( $pkgs + 1 ))
- done
- [[ ${pkgs} -eq 0 ]] && pkgs=1 # there is always at least 1 package
- IFS=${ifs_save}
-
- # Runs the Unit Tests
- einfo "Testing ${pkgs} package(s):"
- if [[ -n ${GOLANG_PKG_BUILDPATH} && ${GOLANG_PKG_BUILDPATH##*/} != "..." && ${pkgs} -gt 1 ]]; then
-
- # NOTE: This eclass trims all leading and trailing white spaces from the
- # input of the following 'while read' loop, then appends an extra
- # trailing space; this is necessary to avoid undefined behaviours
- # within the loop when GOLANG_PKG_BUILDPATH is populated with only
- # a single element.
- while read -r -d $' ' cmd; do
- # Ignores $cmd when it's empty or a string of white spaces
- #einfo "cmd: |$cmd| cmd: |${cmd##*/}|"
- [[ -n $cmd ]] || continue
-
- einfo "${EGO} test -ldflags '$GOLANG_PKG_LDFLAGS' -tags '$GOLANG_PKG_TAGS' ${EGO_BUILD_FLAGS} ${GOLANG_PKG_IMPORTPATH_ALIAS}/${GOLANG_PKG_NAME}${cmd}/..."
- ${EGO} test \
- -ldflags "${GOLANG_PKG_LDFLAGS}" \
- -tags "${GOLANG_PKG_TAGS}" \
- ${EGO_BUILD_FLAGS} \
- "${GOLANG_PKG_IMPORTPATH_ALIAS}/${GOLANG_PKG_NAME}${cmd}/..." \
- || die
- done <<< "$( echo ${GOLANG_PKG_BUILDPATH}) "
- else
- # It's a single package
- einfo "${EGO} test -ldflags '$GOLANG_PKG_LDFLAGS' -tags '$GOLANG_PKG_TAGS' ${EGO_BUILD_FLAGS} ${EGO_SUBPACKAGES}"
- ${EGO} test \
- -ldflags "${GOLANG_PKG_LDFLAGS}" \
- -tags "${GOLANG_PKG_TAGS}" \
- ${EGO_BUILD_FLAGS} \
- "${EGO_SUBPACKAGES}" \
- || die
- fi
-}
-
-# @FUNCTION: golang_do_build
-# @INTERNAL
-# @USAGE:
-# @DESCRIPTION:
-#
-# @CODE
-# Example:
-# GOLANG_PKG_LDFLAGS="-extldflags=-static"
-# GOLANG_PKG_TAGS="netgo"
-#
-# golang_do_build ${EGO_BUILD_FLAGS} ${GOLANG_PKG_IMPORTPATH}/${GOLANG_PKG_NAME}${GOLANG_PKG_BUILDPATH}
-# @CODE
-golang_do_build() {
- debug-print-function ${FUNCNAME} $*
-
- [[ ${GOLANG_VERSION} ]] || die "No GoLang implementation set (golang_setup not called?)."
-
- # Filters "=" chars from ldflags declaration.
- # NOTE: from go1.5+ linker syntax is no more compatible with
-# @DESCRIPTION:
-#
-# @CODE
-# Example
-#
-# golang_add_vendor "${S}"/vendor
-# golang_add_vendor "${S}"/${PN}/vendor
-# @CODE
-golang_add_vendor() {
- debug-print-function ${FUNCNAME} $*
-
- [[ ${1} ]] || die "${FUNCNAME}: no paths given"
-
- [[ ${GOLANG_VERSION} ]] || die "No Golang implementation set (golang_setup not called?)."
-
- [[ ! -d "${1}" ]] && return
-
- # NOTE: this hack is required by Go v1.4 and older versions.
- #if [[ ! -d "${1}"/src ]]; then
- # ebegin "Fixing $1"
- # ln -s "${1}" "${1}"/src || die
- # eend
- #fi
-
- GOLANG_PKG_VENDOR+=(${1})
-}
-
-
-# @FUNCTION: golang_fix_importpath_alias
-# @USAGE:
-# @DESCRIPTION:
-# Helper functions for generating a symbolic link for import path as
-# .
-#
-# WARNING: Use this function only if GOLANG_PKG_DEPENDENCIES declaration of
-# import path aliases doesn't work (e.g.: the package name differs from both the
-# import path and the alias, or if the package name is case sensitive but the
-# import path is not).
-#
-# @CODE
-# Example:
-#
-# src_prepare() {
-# golang-single_src_prepare
-#
-# golang_fix_importpath_alias \
-# "github.com/GoogleCloudPlatform/gcloud-golang" \
-# "google.golang.org/cloud"
-# }
-# @CODE
-golang_fix_importpath_alias() {
- debug-print-function ${FUNCNAME} "${@}"
-
- [[ ${1} ]] || die "${FUNCNAME}: no target specified"
- [[ ${2} ]] || die "${FUNCNAME}: no alias specified"
-
- [[ ${EGO} ]] || die "No GoLang implementation set (golang_setup not called?)."
-
-
- local TARGET="${1}"
- local ALIAS="${2}"
-
- if [[ ${ALIAS%/*} != ${ALIAS} ]]; then
- mkdir -p "${GOPATH}/src/${ALIAS%/*}" || die
- fi
- ebegin "Linking ${TARGET} as ${ALIAS}"
- ln -s "${GOPATH}/src/${TARGET}" \
- "${GOPATH}/src/${ALIAS}" \
- || die
- eend
-}
-
-fi
diff --git a/eclass/golang-single.eclass b/eclass/golang-single.eclass
deleted file mode 100644
index 692918bd9e..0000000000
--- a/eclass/golang-single.eclass
+++ /dev/null
@@ -1,180 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-# @ECLASS: golang-single.eclass
-# @MAINTAINER:
-#
-# @AUTHOR:
-# Mauro Toffanin
-# @BLURB: An eclass for GoLang packages not installed inside GOPATH/GOBIN.
-# @DESCRIPTION:
-# This eclass allows to install arbitrary packages written in GoLang which
-# don't support being installed inside the Go environment.
-# This mostly includes traditional packages (C/C++/GUI) embedding tools written
-# in GoLang, and GoLang packages that need to be compiled with GCC instead of
-# the standard Go interpreter.
-#
-# @EXAMPLE:
-# Typical ebuild using golang-single.eclass:
-#
-# @CODE
-# EAPI=5
-#
-# GOLANG_PKG_IMPORTPATH="github.com/captObvious"
-# GOLANG_PKG_ARCHIVESUFFIX=".zip"
-# GOLANG_PKG_HAVE_TEST
-# inherit golang-single qt4-r2
-#
-# DESCRIPTION="Foo bar application"
-# HOMEPAGE="http://example.org/foo/"
-#
-# LICENSE="MIT"
-# KEYWORDS="~amd64 ~x86"
-# SLOT="0"
-# IUSE="doc qt4"
-#
-# CDEPEND="
-# qt4? (
-# dev-qt/qtcore:4
-# dev-qt/qtgui:4
-# )"
-# RDEPEND="${CDEPEND}
-# !media-gfx/bar"
-# DEPEND="${CDEPEND}
-# doc? ( app-doc/doxygen )"
-#
-# DOCS=(AUTHORS ChangeLog README "Read me.txt" TODO)
-#
-# PATCHES=(
-# "${FILESDIR}/${P}-qt4.patch" # bug 123458
-# "${FILESDIR}/${P}-as-needed.patch"
-# )
-#
-# src_install() {
-# use doc && HTML_DOCS=("${BUILD_DIR}/apidocs/html/")
-# autotools-utils_src_install
-# if use examples; then
-# dobin "${BUILD_DIR}"/foo_example{1,2,3} \\
-# || die 'dobin examples failed'
-# fi
-# }
-#
-# @CODE
-
-inherit golang-common
-
-EXPORT_FUNCTIONS src_prepare src_unpack src_configure src_compile src_install src_test
-
-if [[ -z ${_GOLANG_SINGLE_ECLASS} ]]; then
-_GOLANG_SINGLE_ECLASS=1
-
-# This eclass uses GOLANG_PKG_IMPORTPATH to populate SRC_URI.
-SRC_URI="${SRC_URI:="https://${GOLANG_PKG_IMPORTPATH}/${GOLANG_PKG_NAME}/archive/${GOLANG_PKG_ARCHIVEPREFIX}${GOLANG_PKG_VERSION}${GOLANG_PKG_ARCHIVESUFFIX} -> ${P}${GOLANG_PKG_ARCHIVESUFFIX}"}"
-
-# This eclass uses GOLANG_PKG_DEPENDENCIES associative array to populate SRC_URI
-# with the required snapshots of the supplied GoLang dependencies.
-if [[ ${#GOLANG_PKG_DEPENDENCIES[@]} -gt 0 ]]; then
-
- for i in ${!GOLANG_PKG_DEPENDENCIES[@]} ; do
-
- # Collects all the tokens of the dependency.
- local -A DEPENDENCY=()
- while read -d $'\n' key value; do
- [[ -z ${key} ]] && continue
- DEPENDENCY[$key]="${value}"
- done <<-EOF
- $( _factorize_dependency_entities "${GOLANG_PKG_DEPENDENCIES[$i]}" )
- EOF
-
- # Debug
- debug-print "${FUNCNAME}: DEPENDENCY = ${GOLANG_PKG_DEPENDENCIES[$i]}"
- debug-print "${FUNCNAME}: importpath = ${DEPENDENCY[importpath]}"
- debug-print "${FUNCNAME}: revision = ${DEPENDENCY[revision]}"
-
- # Downloads the archive.
- case ${DEPENDENCY[importpath]} in
- github*)
- SRC_URI+=" https://${DEPENDENCY[importpath]}/archive/${DEPENDENCY[revision]}${GOLANG_PKG_ARCHIVESUFFIX} -> ${DEPENDENCY[importpath]//\//-}-${DEPENDENCY[revision]}${GOLANG_PKG_ARCHIVESUFFIX}"
- ;;
- bitbucket*)
- SRC_URI+=" https://${DEPENDENCY[importpath]}/get/${DEPENDENCY[revision]}.zip -> ${DEPENDENCY[importpath]//\//-}-${DEPENDENCY[revision]}.zip"
- ;;
- code.google*)
- SRC_URI+=" https://${DEPENDENCY[project_name]}.googlecode.com/archive/${DEPENDENCY[revision]}.tar.gz -> ${DEPENDENCY[importpath]//\//-}-${DEPENDENCY[revision]}.tar.gz"
- ;;
- *) die "This eclass doesn't support '${DEPENDENCY[importpath]}'" ;;
- esac
-
- done
-fi
-
-# @FUNCTION: golang-single_src_unpack
-# @DESCRIPTION:
-# Unpack the source archive.
-golang-single_src_unpack() {
- debug-print-function ${FUNCNAME} "${@}"
-
- default
-
- # Creates S.
- mkdir -p "${S%/*}" || die
-
- # Moves main GoLang package from WORKDIR into GOPATH.
- if [[ "${GOLANG_PKG_IMPORTPATH}" != "${GOLANG_PKG_IMPORTPATH_ALIAS}" ]]; then
- local alias_abspath="${WORKDIR}/gopath/src/${GOLANG_PKG_IMPORTPATH_ALIAS}/${GOLANG_PKG_NAME}"
- mkdir -p "${alias_abspath%/*}" || die
- mv "${GOLANG_PKG_NAME}-${GOLANG_PKG_VERSION}" "${alias_abspath}"/ || die
- else
- mv "${GOLANG_PKG_NAME}-${GOLANG_PKG_VERSION}" "${S}"/ || die
- fi
-}
-
-# @FUNCTION: golang-single_src_prepare
-# @DESCRIPTION:
-# Prepare source code.
-golang-single_src_prepare() {
- debug-print-function ${FUNCNAME} "$@"
-
- # Sets up GoLang build environment.
- golang_setup
-
- golang-common_src_prepare
-}
-
-# @FUNCTION: golang-single_src_configure
-# @DESCRIPTION:
-# Configure the package.
-golang-single_src_configure() {
- debug-print-function ${FUNCNAME} "$@"
-
- golang-common_src_configure
-}
-
-# @FUNCTION: golang-single_src_compile
-# @DESCRIPTION:
-# Compiles the package.
-golang-single_src_compile() {
- debug-print-function ${FUNCNAME} "$@"
-
- golang-common_src_compile
-}
-
-# @FUNCTION: golang-single_src_install
-# @DESCRIPTION:
-# Installs binaries and documents from DOCS or HTML_DOCS arrays.
-golang-single_src_install() {
- debug-print-function ${FUNCNAME} "$@"
-
- golang-common_src_install
-}
-
-# @FUNCTION: golang-single_src_test
-# @DESCRIPTION:
-# Runs the unit tests for the main package.
-golang-single_src_test() {
- debug-print-function ${FUNCNAME} "$@"
-
- golang-common_src_test
-}
-
-fi
diff --git a/games-emulation/duckstation/duckstation-9999.ebuild b/games-emulation/duckstation/duckstation-9999.ebuild
index a528dff2fd..502d782dd9 100644
--- a/games-emulation/duckstation/duckstation-9999.ebuild
+++ b/games-emulation/duckstation/duckstation-9999.ebuild
@@ -13,7 +13,7 @@ EGIT_SUBMODULES=()
LICENSE="GPL-3"
SLOT="0"
-IUSE="discord egl evdev fbdev +gamepad gbm +nogui qt5 retroachievements wayland X"
+IUSE="discord +egl +evdev fbdev +gamepad gbm +nogui qt5 retroachievements wayland X"
# Either or both frontends must be built
REQUIRED_USE="
@@ -43,7 +43,6 @@ DEPEND="
"
RDEPEND="${DEPEND}"
-# Set working directory to checkout directory
S="${WORKDIR}/${PN}"
src_configure() {
@@ -59,10 +58,8 @@ src_configure() {
-DUSE_SDL2=$(usex gamepad)
-DUSE_WAYLAND=$(usex wayland)
-DUSE_X11=$(usex X)
-
-DBUILD_SHARED_LIBS=OFF
)
-
cmake_src_configure
}
@@ -80,8 +77,8 @@ src_install() {
newicon -s 64 dist/icon-64px.png duckstation-nogui
newicon -s 128 dist/icon-128px.png duckstation-nogui
newicon -s 256 dist/icon-256px.png duckstation-nogui
- domenu "${FILESDIR}"/duckstation-nogui.desktop
doins "${BUILD_DIR}"/bin/duckstation-nogui
+ dosym ../../opt/${PN}/duckstation-qt usr/bin/duckstation-qt
fperms +x /opt/${PN}/duckstation-nogui
fi
@@ -92,8 +89,8 @@ src_install() {
newicon -s 64 dist/icon-64px.png duckstation-qt
newicon -s 128 dist/icon-128px.png duckstation-qt
newicon -s 256 dist/icon-256px.png duckstation-qt
- domenu "${FILESDIR}"/duckstation-qt.desktop
doins "${BUILD_DIR}"/bin/duckstation-qt
+ dosym ../../opt/${PN}/duckstation-qt usr/bin/duckstation-qt
fperms +x /opt/${PN}/duckstation-qt
fi
}
diff --git a/games-emulation/duckstation/files/duckstation-nogui.desktop b/games-emulation/duckstation/files/duckstation-nogui.desktop
deleted file mode 100644
index cade45f8d1..0000000000
--- a/games-emulation/duckstation/files/duckstation-nogui.desktop
+++ /dev/null
@@ -1,9 +0,0 @@
-[Desktop Entry]
-Type=Application
-Name=DuckStation NoGUI
-GenericName=PlayStation 1 Emulator
-Comment=Fast-ish PlayStation 1 emulator
-Icon=duckstation-nogui
-TryExec=/opt/duckstation/duckstation-nogui
-Exec=/opt/duckstation/duckstation-nogui %f
-Categories=Game;Emulator;
diff --git a/games-emulation/duckstation/files/duckstation-qt.desktop b/games-emulation/duckstation/files/duckstation-qt.desktop
deleted file mode 100644
index 42aee875cd..0000000000
--- a/games-emulation/duckstation/files/duckstation-qt.desktop
+++ /dev/null
@@ -1,9 +0,0 @@
-[Desktop Entry]
-Type=Application
-Name=DuckStation Qt
-GenericName=PlayStation 1 Emulator
-Comment=Fast-ish PlayStation 1 emulator
-Icon=duckstation-qt
-TryExec=/opt/duckstation/duckstation-qt
-Exec=/opt/duckstation/duckstation-qt %f
-Categories=Game;Emulator;Qt;
diff --git a/net-misc/megasync/Manifest b/net-misc/megasync/Manifest
index 099a944ed4..84ee837620 100644
--- a/net-misc/megasync/Manifest
+++ b/net-misc/megasync/Manifest
@@ -1,4 +1,4 @@
DIST megasync-4.3.8.0.tar.gz 16019709 BLAKE2B 493ac0df0e8ca5c6617e493b5b3d81e45cedf2212a83ec9f5f6c07eee6fdf1d749b3735e10082b89f376f261ebfb825a3a7c457b8aa3be64702cddca34558558 SHA512 597b1d4a5a806514449b55e8bf81688b3c6d275372ebb56a45841b2f4c7caf8d9db363cf627fa0b6b84f4c662dc8cf87179b4478cd50b7b7efa1e23a9dca3389
DIST megasync-4.5.0.0.tar.gz 16162074 BLAKE2B 9ad09b61614992fc48572c168bb3b9692145289b945c01e371babe78a3b75bcc20a842f524279f6db35f8d93c914e9ba68ee5d187614b5041638813cb304531e SHA512 f0c78d741be4a9ee9411be63667ea76cca3ff50ab70a81c904011e1ce1c6f0287ab5c90fc2b1a7a7c040b2d568819f91ecd10f8d570b22231df7b99166eacb11
DIST megasync-sdk-4.3.8.0.tar.gz 3363057 BLAKE2B fbc7006a5559a5e2220cd9f9f398c835a1de919624e4d00d052580cf7e3ac4bae2ec1acbd6650b1eaef1218363203837cad562875067e524e067a53d5553567b SHA512 e6ec612fb11be4566d091d4159429ee50574081753caae3b1dd4e22221f2b213cfc0787b52051cbcdf9b0069869df6c95aa80951bdc3fa5098dd26fa0a2e7f7e
-DIST megasync-sdk-4.5.0.0.tar.gz 3363057 BLAKE2B fbc7006a5559a5e2220cd9f9f398c835a1de919624e4d00d052580cf7e3ac4bae2ec1acbd6650b1eaef1218363203837cad562875067e524e067a53d5553567b SHA512 e6ec612fb11be4566d091d4159429ee50574081753caae3b1dd4e22221f2b213cfc0787b52051cbcdf9b0069869df6c95aa80951bdc3fa5098dd26fa0a2e7f7e
+DIST megasync-sdk-4.5.0.0.tar.gz 3497367 BLAKE2B 1594d792f38df4df29acd25ea5c920acf27410513544abc618a692e3ed2e6e1a459123b043a9aa3bfdc4647d753d6c14cc5ee1bde02abd6c0f6d7ce66b118821 SHA512 177b9e31f2aacfa370132657bb70ec315edcfbcfe043f067f4c67b69a47ade7235699183541de2462d2ab2a18b4688006cd938ae80da603df9bd79d908b58140