diff options
author | Mike Gilbert <floppym@gentoo.org> | 2018-07-21 17:09:44 -0400 |
---|---|---|
committer | Mike Gilbert <floppym@gentoo.org> | 2018-07-21 17:11:01 -0400 |
commit | 246535438e909fe39ffc724c3e3aca26e5cd7841 (patch) | |
tree | c2b7c460e7f40cd0f94a75771365499c4e8228a9 /dev-util/gn/gn-0.1445.ebuild | |
parent | dev-python/pytest-mock: Add python@ as co-maint (diff) | |
download | gentoo-246535438e909fe39ffc724c3e3aca26e5cd7841.tar.gz gentoo-246535438e909fe39ffc724c3e3aca26e5cd7841.tar.bz2 gentoo-246535438e909fe39ffc724c3e3aca26e5cd7841.zip |
dev-util/gn: new package
Package-Manager: Portage-2.3.40_p15, Repoman-2.3.9_p247
Diffstat (limited to 'dev-util/gn/gn-0.1445.ebuild')
-rw-r--r-- | dev-util/gn/gn-0.1445.ebuild | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/dev-util/gn/gn-0.1445.ebuild b/dev-util/gn/gn-0.1445.ebuild new file mode 100644 index 000000000000..206f8a04e4e7 --- /dev/null +++ b/dev-util/gn/gn-0.1445.ebuild @@ -0,0 +1,56 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +PYTHON_COMPAT=( python2_7 ) + +inherit ninja-utils python-any-r1 toolchain-funcs + +DESCRIPTION="GN is a meta-build system that generates build files for Ninja" +HOMEPAGE="https://gn.googlesource.com/" +SRC_URI="https://dev.gentoo.org/~floppym/dist/${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64" + +BDEPEND=" + ${PYTHON_DEPS} + dev-util/ninja +" + +PATCHES=( + "${FILESDIR}"/gn-gen-r0.patch +) + +pkg_setup() { + : +} + +src_configure() { + python_setup + tc-export AR CC CXX + set -- ${EPYTHON} build/gen.py --no-sysroot --no-last-commit-position + echo "$@" + "$@" || die + cat >out/last_commit_position.h <<-EOF || die + #ifndef OUT_LAST_COMMIT_POSITION_H_ + #define OUT_LAST_COMMIT_POSITION_H_ + #define LAST_COMMIT_POSITION "${PV}" + #endif // OUT_LAST_COMMIT_POSITION_H_ + EOF +} + +src_compile() { + eninja -C out gn +} + +src_test() { + eninja -C out gn_unittests + out/gn_unittests || die +} + +src_install() { + dobin out/gn + einstalldocs +} |