mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-16 01:16:59 +02:00
dev-util/ninja: Sync with Gentoo
It's from Gentoo commit 4c6daafd2e5188fd304f45b8f7f37d4a957a191c.
This commit is contained in:
parent
ee0e4644a3
commit
4fb3f3402a
@ -1,2 +1 @@
|
||||
DIST ninja-1.11.0.tar.gz 229475 BLAKE2B 71c8b6cf9524bdc11cf73f7e761f0d7deef2498a970c1439c10cc7d361e31fed1e3b54bcb185f3c7ed041f15704851a96e42560058af61b8a5df6e918d52ebf3 SHA512 9b9c8dae2251f9ddba50680911271b8504c292994fd90a0da94902f64c69a9edc72212217df5c651ddfc2f79c2ae03e84c99b805497dcd7497c53a1617de83e7
|
||||
DIST ninja-1.11.1.tar.gz 229479 BLAKE2B c96cf7c319b7abd65f644465688d256f8b3a576c4616d0c63852e25dd0dc5f63c66708d429d8dddb6228502eb147211a86a5dd369b80ec2228902b370d2343e5 SHA512 1bca38877c70ee6613f347ffccef5adc02ba0a3947c62ae004ea97f918442b5a3de92378e4f820ae2a7676bc7609d25fbc7d41f6cfb3a61e5e4b26ec3639e403
|
||||
|
@ -2,8 +2,8 @@
|
||||
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="project">
|
||||
<email>chromium@gentoo.org</email>
|
||||
<name>Chromium in Gentoo Project</name>
|
||||
<email>base-system@gentoo.org</email>
|
||||
<name>Gentoo Base System</name>
|
||||
</maintainer>
|
||||
<upstream>
|
||||
<remote-id type="github">ninja-build/ninja</remote-id>
|
||||
|
@ -1,133 +0,0 @@
|
||||
# Copyright 2012-2022 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
PYTHON_COMPAT=( python3_{8..11} )
|
||||
|
||||
inherit bash-completion-r1 elisp-common python-any-r1 toolchain-funcs
|
||||
|
||||
if [[ ${PV} == 9999 ]]; then
|
||||
inherit git-r3
|
||||
EGIT_REPO_URI="https://github.com/ninja-build/ninja.git"
|
||||
else
|
||||
SRC_URI="https://github.com/ninja-build/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||
fi
|
||||
|
||||
DESCRIPTION="A small build system similar to make"
|
||||
HOMEPAGE="https://ninja-build.org/"
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="0"
|
||||
|
||||
IUSE="doc emacs test vim-syntax"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
BDEPEND="
|
||||
${PYTHON_DEPS}
|
||||
dev-util/re2c
|
||||
doc? (
|
||||
app-text/asciidoc
|
||||
app-doc/doxygen
|
||||
dev-libs/libxslt
|
||||
media-gfx/graphviz
|
||||
)
|
||||
test? ( dev-cpp/gtest )
|
||||
"
|
||||
RDEPEND="
|
||||
emacs? ( >=app-editors/emacs-23.1:* )
|
||||
vim-syntax? (
|
||||
|| (
|
||||
app-editors/vim
|
||||
app-editors/gvim
|
||||
)
|
||||
)
|
||||
"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/ninja-cflags.patch
|
||||
)
|
||||
|
||||
run_for_build() {
|
||||
if tc-is-cross-compiler; then
|
||||
local -x AR=$(tc-getBUILD_AR)
|
||||
local -x CXX=$(tc-getBUILD_CXX)
|
||||
local -x CFLAGS=
|
||||
local -x CXXFLAGS=${BUILD_CXXFLAGS}
|
||||
local -x LDFLAGS=${BUILD_LDFLAGS}
|
||||
fi
|
||||
echo "$@" >&2
|
||||
"$@"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
tc-export AR CXX
|
||||
|
||||
# configure.py appends CFLAGS to CXXFLAGS
|
||||
unset CFLAGS
|
||||
|
||||
run_for_build ${EPYTHON} configure.py --bootstrap --verbose || die
|
||||
|
||||
if tc-is-cross-compiler; then
|
||||
mv ninja ninja-build || die
|
||||
${EPYTHON} configure.py || die
|
||||
./ninja-build -v ninja || die
|
||||
else
|
||||
ln ninja ninja-build || die
|
||||
fi
|
||||
|
||||
if use doc; then
|
||||
./ninja-build -v doxygen manual || die
|
||||
fi
|
||||
|
||||
if use emacs; then
|
||||
elisp-compile misc/ninja-mode.el || die
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
if ! tc-is-cross-compiler; then
|
||||
# Bug 485772
|
||||
ulimit -n 2048
|
||||
./ninja -v ninja_test || die
|
||||
./ninja_test || die
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
dodoc README.md CONTRIBUTING.md
|
||||
if use doc; then
|
||||
docinto html
|
||||
dodoc -r doc/doxygen/html/.
|
||||
dodoc doc/manual.html
|
||||
fi
|
||||
dobin ninja
|
||||
|
||||
newbashcomp misc/bash-completion "${PN}"
|
||||
|
||||
if use vim-syntax; then
|
||||
insinto /usr/share/vim/vimfiles/syntax/
|
||||
doins misc/ninja.vim
|
||||
|
||||
echo 'au BufNewFile,BufRead *.ninja set ft=ninja' > "${T}/ninja.vim"
|
||||
insinto /usr/share/vim/vimfiles/ftdetect
|
||||
doins "${T}/ninja.vim"
|
||||
fi
|
||||
|
||||
insinto /usr/share/zsh/site-functions
|
||||
newins misc/zsh-completion _ninja
|
||||
|
||||
if use emacs; then
|
||||
cd misc || die
|
||||
elisp-install ninja ninja-mode.el* || die
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
use emacs && elisp-site-regen
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
use emacs && elisp-site-regen
|
||||
}
|
@ -5,14 +5,14 @@ EAPI=8
|
||||
|
||||
PYTHON_COMPAT=( python3_{8..11} )
|
||||
|
||||
inherit edo bash-completion-r1 elisp-common python-any-r1 toolchain-funcs
|
||||
inherit edo bash-completion-r1 elisp-common flag-o-matic python-any-r1 toolchain-funcs
|
||||
|
||||
if [[ ${PV} == 9999 ]]; then
|
||||
EGIT_REPO_URI="https://github.com/ninja-build/ninja.git"
|
||||
inherit git-r3
|
||||
else
|
||||
SRC_URI="https://github.com/ninja-build/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||
fi
|
||||
|
||||
DESCRIPTION="A small build system similar to make"
|
||||
@ -59,6 +59,8 @@ src_compile() {
|
||||
# configure.py appends CFLAGS to CXXFLAGS
|
||||
unset CFLAGS
|
||||
|
||||
append-lfs-flags
|
||||
|
||||
run_for_build ${EPYTHON} configure.py --bootstrap --verbose || die
|
||||
|
||||
if tc-is-cross-compiler; then
|
@ -5,7 +5,7 @@ EAPI=8
|
||||
|
||||
PYTHON_COMPAT=( python3_{8..11} )
|
||||
|
||||
inherit edo bash-completion-r1 elisp-common python-any-r1 toolchain-funcs
|
||||
inherit edo bash-completion-r1 elisp-common flag-o-matic python-any-r1 toolchain-funcs
|
||||
|
||||
if [[ ${PV} == 9999 ]]; then
|
||||
EGIT_REPO_URI="https://github.com/ninja-build/ninja.git"
|
||||
@ -59,6 +59,8 @@ src_compile() {
|
||||
# configure.py appends CFLAGS to CXXFLAGS
|
||||
unset CFLAGS
|
||||
|
||||
append-lfs-flags
|
||||
|
||||
run_for_build ${EPYTHON} configure.py --bootstrap --verbose || die
|
||||
|
||||
if tc-is-cross-compiler; then
|
||||
|
Loading…
Reference in New Issue
Block a user