summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2023-03-21 21:24:07 +0000
committerSam James <sam@gentoo.org>2023-03-21 21:28:08 +0000
commitd52cacc4eefc5109d24a36d7e1dd4677c0fb5159 (patch)
treebb758cf52f62bef8b96500aa2eb1429926b7897b /sys-devel/nvptx-tools/nvptx-tools-9999.ebuild
parentsys-apps/portage: RDEPEND on >=sys-apps/baselayout-2.9 (diff)
downloadgentoo-d52cacc4eefc5109d24a36d7e1dd4677c0fb5159.tar.gz
gentoo-d52cacc4eefc5109d24a36d7e1dd4677c0fb5159.tar.bz2
gentoo-d52cacc4eefc5109d24a36d7e1dd4677c0fb5159.zip
sys-devel/nvptx-tools: new package, add 9999, add 0_pre20230122
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'sys-devel/nvptx-tools/nvptx-tools-9999.ebuild')
-rw-r--r--sys-devel/nvptx-tools/nvptx-tools-9999.ebuild50
1 files changed, 50 insertions, 0 deletions
diff --git a/sys-devel/nvptx-tools/nvptx-tools-9999.ebuild b/sys-devel/nvptx-tools/nvptx-tools-9999.ebuild
new file mode 100644
index 000000000000..2a22f615690d
--- /dev/null
+++ b/sys-devel/nvptx-tools/nvptx-tools-9999.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DESCRIPTION="Collection of tools for use with nvptx-none GCC toolchains"
+HOMEPAGE="https://github.com/MentorEmbedded/nvptx-tools https://gcc.gnu.org/wiki/nvptx"
+
+if [[ ${PV} == 9999 ]] ; then
+ EGIT_REPO_URI="https://github.com/MentorEmbedded/nvptx-tools"
+ inherit git-r3
+else
+ MY_COMMIT="93e00909ceb9cbbc104f0fcba56c0361ffb3ca4b"
+ SRC_URI="https://github.com/MentorEmbedded/nvptx-tools/archive/${MY_COMMIT}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64"
+fi
+
+LICENSE="GPL-3"
+SLOT="0"
+IUSE="test"
+RESTRICT="!test? ( test )"
+
+export CBUILD=${CBUILD:-${CHOST}}
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+ if [[ ${CATEGORY} == cross-* ]] ; then
+ export CTARGET=${CATEGORY#cross-}
+ fi
+fi
+
+BDEPEND="
+ test? (
+ dev-python/lit
+ dev-util/dejagnu
+ )
+"
+
+is_crosscompile() {
+ [[ ${CHOST} != ${CTARGET} ]]
+}
+
+pkg_setup() {
+ # Reject newlib-on-glibc type installs
+ if [[ ${CTARGET} == ${CHOST} ]] ; then
+ case ${CHOST} in
+ *-newlib|nvptx-*) ;;
+ *) die "Use sys-devel/crossdev to build a nvptx(-none) toolchain" ;;
+ esac
+ fi
+}