dev-build/gn - 0.2603 (pf4public)

Search

Install

Install this version:

emerge -a =dev-build/gn-0.2603

If this version is masked, you can unmask it using the autounmask tool or standard emerge options:

autounmask =dev-build/gn-0.2603

Or alternatively:

emerge --autounmask-write -a =dev-build/gn-0.2603

Package Information

Description:
GN is a meta-build system that generates build files for Ninja
Homepage:
https://gn.googlesource.com/
License:
BSD

Ebuild Details

Version EAPI Keywords Slot
0.2603 8 ~amd64 ~arm64 ~ppc64 ~x86 0
View Raw Ebuild
# Copyright 2018-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8
PYTHON_COMPAT=( python3_{11..15} )

inherit edo 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://github.com/PF4Public/gentoo-overlay/releases/download/gn/${PV}/${P}.tar.xz"

LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86"

BDEPEND="
	${PYTHON_DEPS}
	app-alternatives/ninja
"

PATCHES=(
	"${FILESDIR}"/gn-gen-r8.patch
)

pkg_setup() {
	:
}

src_unpack() {
	# the source (built from the upstream gn git repo) is published
	# as the gentoo-overlay release distfile
	tar -xJf "${DISTDIR}/${P}.tar.xz" -C "${WORKDIR}"
}

src_configure() {
	python_setup
	tc-export AR CC CXX
	unset CFLAGS
	set -- ${EPYTHON} build/gen.py --no-last-commit-position --no-strip --no-static-libstdc++ --allow-warnings
	edo "$@"
	cat >out/last_commit_position.h <<-EOF || die
	#ifndef OUT_LAST_COMMIT_POSITION_H_
	#define OUT_LAST_COMMIT_POSITION_H_
	#define LAST_COMMIT_POSITION_NUM ${PV##0.}
	#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

	insinto /usr/share/vim/vimfiles
	doins -r misc/vim/{autoload,ftdetect,ftplugin,syntax}
}

Inherited Eclasses

edo

Dependencies

BDEPEND

	
	app-alternatives/ninja

Manifest for 0.2603

Type File Size Source URLs
DIST gn-0.2603.tar.xz 948824 bytes https://github.com/PF4Public/gentoo-overlay/releases/download/gn/0.2603/gn-0.2603.tar.xz