summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2024-01-13 11:31:34 +0100
committerMichał Górny <mgorny@gentoo.org>2024-01-13 14:16:49 +0100
commit251e009ac0acde51363b8667e2ea1bf1a25ef823 (patch)
tree205883dcc12f1e2d3849366b6508c4d507149114 /dev-build
parentapp-emulation/wine-proton: make libdrm[video_cards_amdgpu] optional in live (diff)
downloadgentoo-251e009ac0acde51363b8667e2ea1bf1a25ef823.tar.gz
gentoo-251e009ac0acde51363b8667e2ea1bf1a25ef823.tar.bz2
gentoo-251e009ac0acde51363b8667e2ea1bf1a25ef823.zip
Move {dev-util → dev-build}/ninja
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-build')
-rw-r--r--dev-build/ninja/Manifest1
-rw-r--r--dev-build/ninja/files/ninja-cflags.patch25
-rw-r--r--dev-build/ninja/metadata.xml15
-rw-r--r--dev-build/ninja/ninja-1.11.1-r2.ebuild127
-rw-r--r--dev-build/ninja/ninja-1.11.1-r3.ebuild131
-rw-r--r--dev-build/ninja/ninja-1.11.1-r4.ebuild117
-rw-r--r--dev-build/ninja/ninja-9999.ebuild117
7 files changed, 533 insertions, 0 deletions
diff --git a/dev-build/ninja/Manifest b/dev-build/ninja/Manifest
new file mode 100644
index 000000000000..4ccdb98ca1a4
--- /dev/null
+++ b/dev-build/ninja/Manifest
@@ -0,0 +1 @@
+DIST ninja-1.11.1.tar.gz 229479 BLAKE2B c96cf7c319b7abd65f644465688d256f8b3a576c4616d0c63852e25dd0dc5f63c66708d429d8dddb6228502eb147211a86a5dd369b80ec2228902b370d2343e5 SHA512 1bca38877c70ee6613f347ffccef5adc02ba0a3947c62ae004ea97f918442b5a3de92378e4f820ae2a7676bc7609d25fbc7d41f6cfb3a61e5e4b26ec3639e403
diff --git a/dev-build/ninja/files/ninja-cflags.patch b/dev-build/ninja/files/ninja-cflags.patch
new file mode 100644
index 000000000000..0c4ef2813bb7
--- /dev/null
+++ b/dev-build/ninja/files/ninja-cflags.patch
@@ -0,0 +1,25 @@
+From e4530769ef6a497f8f5f06159f6be049dc20e2ea Mon Sep 17 00:00:00 2001
+From: Mike Gilbert <floppym@gentoo.org>
+Date: Thu, 19 Mar 2020 11:21:29 -0400
+Subject: [PATCH] Avoid adding -O2 -DNDEBUG to cflags
+
+---
+ configure.py | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/configure.py b/configure.py
+index 7d8ce90..7566147 100755
+--- a/configure.py
++++ b/configure.py
+@@ -344,8 +344,6 @@ else:
+ if options.debug:
+ cflags += ['-D_GLIBCXX_DEBUG', '-D_GLIBCXX_DEBUG_PEDANTIC']
+ cflags.remove('-fno-rtti') # Needed for above pedanticness.
+- else:
+- cflags += ['-O2', '-DNDEBUG']
+ try:
+ proc = subprocess.Popen(
+ [CXX, '-fdiagnostics-color', '-c', '-x', 'c++', '/dev/null',
+--
+2.25.1
+
diff --git a/dev-build/ninja/metadata.xml b/dev-build/ninja/metadata.xml
new file mode 100644
index 000000000000..674485d1018e
--- /dev/null
+++ b/dev-build/ninja/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>chromium@gentoo.org</email>
+ <name>Chromium in Gentoo Project</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">ninja-build/ninja</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-build/ninja/ninja-1.11.1-r2.ebuild b/dev-build/ninja/ninja-1.11.1-r2.ebuild
new file mode 100644
index 000000000000..0cb89335a647
--- /dev/null
+++ b/dev-build/ninja/ninja-1.11.1-r2.ebuild
@@ -0,0 +1,127 @@
+# Copyright 2012-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+
+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 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-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-text/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
+
+ append-lfs-flags
+
+ 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-build/ninja/ninja-1.11.1-r3.ebuild b/dev-build/ninja/ninja-1.11.1-r3.ebuild
new file mode 100644
index 000000000000..2ca427037c35
--- /dev/null
+++ b/dev-build/ninja/ninja-1.11.1-r3.ebuild
@@ -0,0 +1,131 @@
+# Copyright 2012-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+
+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 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-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-text/doxygen
+ dev-libs/libxslt
+ media-gfx/graphviz
+ )
+ test? ( dev-cpp/gtest )
+"
+RDEPEND="emacs? ( >=app-editors/emacs-23.1:* )"
+PDEPEND="app-alternatives/ninja"
+
+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
+
+ append-lfs-flags
+
+ 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
+
+ newbin ninja ninja-reference
+
+ 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
+ if ! [[ -e "${EROOT}/usr/bin/ninja" ]]; then
+ ln -s ninja-reference "${EROOT}/usr/bin/ninja" || die
+ fi
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}
diff --git a/dev-build/ninja/ninja-1.11.1-r4.ebuild b/dev-build/ninja/ninja-1.11.1-r4.ebuild
new file mode 100644
index 000000000000..4a9cf1f32132
--- /dev/null
+++ b/dev-build/ninja/ninja-1.11.1-r4.ebuild
@@ -0,0 +1,117 @@
+# Copyright 2012-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+
+inherit edo bash-completion-r1 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 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
+fi
+
+DESCRIPTION="A small build system similar to make"
+HOMEPAGE="https://ninja-build.org/"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+IUSE="doc test"
+RESTRICT="!test? ( test )"
+
+BDEPEND="
+ ${PYTHON_DEPS}
+ dev-util/re2c
+ doc? (
+ app-text/asciidoc
+ app-text/doxygen
+ dev-libs/libxslt
+ media-gfx/graphviz
+ )
+ test? ( dev-cpp/gtest )
+"
+PDEPEND="
+ app-alternatives/ninja
+"
+
+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
+
+ append-lfs-flags
+
+ 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
+}
+
+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
+
+ newbin ninja ninja-reference
+
+ 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
+}
+
+pkg_postinst() {
+ if ! [[ -e "${EROOT}/usr/bin/ninja" ]]; then
+ ln -s ninja-reference "${EROOT}/usr/bin/ninja" || die
+ fi
+}
diff --git a/dev-build/ninja/ninja-9999.ebuild b/dev-build/ninja/ninja-9999.ebuild
new file mode 100644
index 000000000000..4a9cf1f32132
--- /dev/null
+++ b/dev-build/ninja/ninja-9999.ebuild
@@ -0,0 +1,117 @@
+# Copyright 2012-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+
+inherit edo bash-completion-r1 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 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
+fi
+
+DESCRIPTION="A small build system similar to make"
+HOMEPAGE="https://ninja-build.org/"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+IUSE="doc test"
+RESTRICT="!test? ( test )"
+
+BDEPEND="
+ ${PYTHON_DEPS}
+ dev-util/re2c
+ doc? (
+ app-text/asciidoc
+ app-text/doxygen
+ dev-libs/libxslt
+ media-gfx/graphviz
+ )
+ test? ( dev-cpp/gtest )
+"
+PDEPEND="
+ app-alternatives/ninja
+"
+
+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
+
+ append-lfs-flags
+
+ 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
+}
+
+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
+
+ newbin ninja ninja-reference
+
+ 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
+}
+
+pkg_postinst() {
+ if ! [[ -e "${EROOT}/usr/bin/ninja" ]]; then
+ ln -s ninja-reference "${EROOT}/usr/bin/ninja" || die
+ fi
+}