summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2022-08-30 22:48:56 +0100
committerSam James <sam@gentoo.org>2022-08-30 23:21:18 +0100
commitaffef91256afa552b56874c4c373023c0889e60e (patch)
tree2f952413ef5626e141cb9889903e15de42b82612 /dev-util/ninja
parentsci-mathematics/jags: drop 4.2.0, EAPI-6-- (diff)
downloadgentoo-affef91256afa552b56874c4c373023c0889e60e.tar.gz
gentoo-affef91256afa552b56874c4c373023c0889e60e.tar.bz2
gentoo-affef91256afa552b56874c4c373023c0889e60e.zip
dev-util/ninja: add 1.11.1
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-util/ninja')
-rw-r--r--dev-util/ninja/Manifest1
-rw-r--r--dev-util/ninja/ninja-1.11.1.ebuild125
-rw-r--r--dev-util/ninja/ninja-9999.ebuild38
3 files changed, 141 insertions, 23 deletions
diff --git a/dev-util/ninja/Manifest b/dev-util/ninja/Manifest
index 2ab6fa9d9107..b62f6953ec4d 100644
--- a/dev-util/ninja/Manifest
+++ b/dev-util/ninja/Manifest
@@ -1 +1,2 @@
DIST ninja-1.11.0.tar.gz 229475 BLAKE2B 71c8b6cf9524bdc11cf73f7e761f0d7deef2498a970c1439c10cc7d361e31fed1e3b54bcb185f3c7ed041f15704851a96e42560058af61b8a5df6e918d52ebf3 SHA512 9b9c8dae2251f9ddba50680911271b8504c292994fd90a0da94902f64c69a9edc72212217df5c651ddfc2f79c2ae03e84c99b805497dcd7497c53a1617de83e7
+DIST ninja-1.11.1.tar.gz 229479 BLAKE2B c96cf7c319b7abd65f644465688d256f8b3a576c4616d0c63852e25dd0dc5f63c66708d429d8dddb6228502eb147211a86a5dd369b80ec2228902b370d2343e5 SHA512 1bca38877c70ee6613f347ffccef5adc02ba0a3947c62ae004ea97f918442b5a3de92378e4f820ae2a7676bc7609d25fbc7d41f6cfb3a61e5e4b26ec3639e403
diff --git a/dev-util/ninja/ninja-1.11.1.ebuild b/dev-util/ninja/ninja-1.11.1.ebuild
new file mode 100644
index 000000000000..bedb66f577c5
--- /dev/null
+++ b/dev-util/ninja/ninja-1.11.1.ebuild
@@ -0,0 +1,125 @@
+# Copyright 2012-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..11} )
+
+inherit edo bash-completion-r1 elisp-common 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"
+fi
+
+DESCRIPTION="A small build system similar to make"
+HOMEPAGE="https://ninja-build.org/"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+
+IUSE="doc emacs test"
+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:* )"
+
+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
+ edo ./ninja -v ninja_test
+ edo ./ninja_test
+ 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}
+
+ insinto /usr/share/vim/vimfiles/syntax/
+ doins misc/ninja.vim
+
+ echo 'au BufNewFile,BufRead *.ninja set ft=ninja' > "${T}"/ninja.vim || die
+ insinto /usr/share/vim/vimfiles/ftdetect
+ doins "${T}"/ninja.vim
+
+ 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
+}
diff --git a/dev-util/ninja/ninja-9999.ebuild b/dev-util/ninja/ninja-9999.ebuild
index 81d813fea607..bedb66f577c5 100644
--- a/dev-util/ninja/ninja-9999.ebuild
+++ b/dev-util/ninja/ninja-9999.ebuild
@@ -1,15 +1,15 @@
# Copyright 2012-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
PYTHON_COMPAT=( python3_{8..11} )
-inherit bash-completion-r1 elisp-common python-any-r1 toolchain-funcs
+inherit edo 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"
+ 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"
@@ -21,7 +21,7 @@ HOMEPAGE="https://ninja-build.org/"
LICENSE="Apache-2.0"
SLOT="0"
-IUSE="doc emacs test vim-syntax"
+IUSE="doc emacs test"
RESTRICT="!test? ( test )"
BDEPEND="
@@ -35,15 +35,7 @@ BDEPEND="
)
test? ( dev-cpp/gtest )
"
-RDEPEND="
- emacs? ( >=app-editors/emacs-23.1:* )
- vim-syntax? (
- || (
- app-editors/vim
- app-editors/gvim
- )
- )
-"
+RDEPEND="emacs? ( >=app-editors/emacs-23.1:* )"
PATCHES=(
"${FILESDIR}"/ninja-cflags.patch
@@ -90,30 +82,30 @@ src_test() {
if ! tc-is-cross-compiler; then
# Bug 485772
ulimit -n 2048
- ./ninja -v ninja_test || die
- ./ninja_test || die
+ edo ./ninja -v ninja_test
+ edo ./ninja_test
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}"
+ newbashcomp misc/bash-completion ${PN}
- if use vim-syntax; then
- insinto /usr/share/vim/vimfiles/syntax/
- doins misc/ninja.vim
+ 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
+ echo 'au BufNewFile,BufRead *.ninja set ft=ninja' > "${T}"/ninja.vim || die
+ insinto /usr/share/vim/vimfiles/ftdetect
+ doins "${T}"/ninja.vim
insinto /usr/share/zsh/site-functions
newins misc/zsh-completion _ninja