summaryrefslogtreecommitdiff
path: root/dev-util/ninja
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2019-04-05 21:17:31 +0100
committerV3n3RiX <venerix@redcorelinux.org>2019-04-05 21:17:31 +0100
commitdc7cbdfa65fd814b3b9aa3c56257da201109e807 (patch)
treec85d72f6f31f21f178069c9d41d41a7c1ff4b362 /dev-util/ninja
parent0706fc6986773f4e4d391deff4ad5143c464ea4e (diff)
gentoo resync : 05.04.2019
Diffstat (limited to 'dev-util/ninja')
-rw-r--r--dev-util/ninja/Manifest5
-rw-r--r--dev-util/ninja/files/ninja-1.9.0-musl.patch39
-rw-r--r--dev-util/ninja/ninja-1.9.0.ebuild134
-rw-r--r--dev-util/ninja/ninja-9999.ebuild19
4 files changed, 189 insertions, 8 deletions
diff --git a/dev-util/ninja/Manifest b/dev-util/ninja/Manifest
index b416f5805f1d..fca00b955d16 100644
--- a/dev-util/ninja/Manifest
+++ b/dev-util/ninja/Manifest
@@ -1,8 +1,11 @@
+AUX ninja-1.9.0-musl.patch 1997 BLAKE2B 5fa4e9b171a87ebb8fb618a2b4b0c47668d0aaf0a2b3a5b08a3be5649235228d2cd38c3891d52b1d1e0217f16b1e13175a1a077567c07e83ba8cd36aae96c7aa SHA512 78b29a57ec3c4feedf2bcfe9370b30cecd5302f29e8e14c6a3bc01becb555be6330aafba12f9225625af0644ea1f534feba8396d32bb944253a9daa5dd0e98d8
DIST ninja-1.8.2.g3bbbe.kitware.dyndep-1.jobserver-1.tar.gz 203848 BLAKE2B a6002abcfe4003dd5c9ccb8fd504b98736a6bc249323ca7afabc042a5091b9e7f0c0c19853cd7a270e00b0825ea14a7ba47c1b35d15f725c7b4866de1a79c07a SHA512 74f42181a2a712653450b0ab7ce5ad93b5ec010f4ab8411c732f682be5a6a991a7481ae1649ad70a7b903c45427b1e238b001aef29702f0896a1ae393ee22bec
DIST ninja-1.8.2.g81279.kitware.dyndep-1.jobserver-1.tar.gz 204539 BLAKE2B cee66a5d6ad7fd1254e68cf7be1e97eb796ec3103bdb9e869dc66757a96ce1d6e946018aa048855e70d6a3698ae609f75740809a8e9183057da16769f07e1fa6 SHA512 ae5f9c4c76114cabc4ec06056edccfa4027d514c4ae0f3ab08bbcd3ce2322e9ff08b8f90fe69fab989707adb6ecc78f226b65e223b41535aa5c0db5b6c61117a
DIST ninja-1.8.2.tar.gz 185226 BLAKE2B c464c50829a0e9f0f6fd4b860946b14bf07f752adb8e7857d4072a1c1f06977eda283f633041929065c9164377ca769b3293b04fc9ceab583371708a9c4e8f2a SHA512 1650bf9e3eddeb0b0fbb415c2b8e0a7c094421e991fa8139fd77fae0f6ee7ee980b7cf5e98d883c3a884f99abcb06fa26e3980af3a3a5bb6dd655124755782c2
+DIST ninja-1.9.0.g99df1.kitware.dyndep-1.jobserver-1.tar.gz 213767 BLAKE2B bb6abbed155d39fe65a3a4bbbba3e577e4a13dfd1ccb9e018084153b0dd6928753be9d8c10a2c4c2ab6a2000c5292f912353f2234b01613f46bfa49d13aabd7a SHA512 6c3aaf8decfd792ce6b035dacb87f978f1052d13e5ceac9ce63bc7051fad0eed83cc530d2cf22649ff4186416b0478bb3eb0507c56fec2848061cdad7a0aa812
EBUILD ninja-1.8.2-r1.ebuild 2690 BLAKE2B e38c119b8a865e6e367999600ab69f996e782f0b3e7d21f286944c1c7ab235a9e843b046cfe1696131516e22442e61f35ea37299d5bcb6e750b0b316f5c9c643 SHA512 48177691154c54526ef986a43a2527c2c008f272dca54dbd39bc5b8c8a9b45f3c1b26a96240b0008a5f7336c9db6b3d0f7bbc972d1b1ddd7cd304197bc090f27
EBUILD ninja-1.8.2-r2.ebuild 2690 BLAKE2B 2eb84e017da16e36b88908d6d8e418d8c624e5a70d92ca1bb39e3615098f1872b63f91d4bef9afac6f8e6b398e699897790d5b36bf1b7b0298f53740cbe0d698 SHA512 734a76d4b7e03d1a23af8785442f0fddfb04fb7073782b73ee5631ddbe931df0bb611fa0c2805db9ebc1d8db90f4ef997977e734825b8d00c5c3ffdcb499f78e
EBUILD ninja-1.8.2.ebuild 2547 BLAKE2B 8234fa945a4908448d202f7fbea1415771fc810f93afc9a02c2696141e15f47c3f2035a434432d0c50494e6e852741b64dcce80ed56c463dd50e411ce4b50399 SHA512 42811e0c8e250c6eabe2bad9ad98c0d94ad81e42100763348f70da8b2e521ad7b3355d613bccfbb51512ba15fc1c204f86ddaac417dfa8e320fb3e5bd398ed65
-EBUILD ninja-9999.ebuild 2558 BLAKE2B 54b95fb5f5e12d9ed496f04eb9b83cd503554deb2917db3f0b1d1015fc8579f448f7a0512b1827d02bd48f669fbb81f44abb1ebc9433b32e6318ca7c34d7684e SHA512 3161b622c1a7147333954295fa99891245434aac5c0a4079cb0c329efa5c689a383739e0b78ae2142dcba7838e30f554850cb4808432995bdeddfbc4a78e2b17
+EBUILD ninja-1.9.0.ebuild 2733 BLAKE2B 2beb9b4c90a7f7364e485750e562aec9a629d59600d14bd54ea9f7f35035f51fc120795884843ae5bbab3e4a8df704c9ce5ae587702d5f0164e20cee2b5ea3d0 SHA512 bdcc584200015901c35cf7f51960f867e01ee2de42891aa928debb8d2374874e794dd9e18c45d945915ab79858cac96e2cc05ded38158d0b34c55d054ce539b1
+EBUILD ninja-9999.ebuild 2682 BLAKE2B dacad50bfaa4f69a0bd86d5b802e6a096eca82a86944a8438c428fc6862d96e9b824d1bfc876ab3c9b24d87dd61846d9228992fa4cb4453633e4fe39f9e3b4cf SHA512 d61dc38e706761c735bb3fb753a6d664f015ce668677f5b348d369cd3c38a6def4a0f129a70093575efc994ea0b5cd4b570b54ef404676bc119fd89baad69af2
MISC metadata.xml 340 BLAKE2B 7cf71b1a09f74328ea74362db4250bf038c0455dcd5f65676ceb5d80a61b5c2923696ecfeccf9d6cd264633e7dc00daa80bf960cc67e5b889d18d487d8e89b97 SHA512 4b78365b98eb9b8a1ef27115261dbf426942cccb7be03c8264e2728e60dedfec8fa51ee3f43488043be5af21b28a74c1c81f4767bcc58574873c2223172447b2
diff --git a/dev-util/ninja/files/ninja-1.9.0-musl.patch b/dev-util/ninja/files/ninja-1.9.0-musl.patch
new file mode 100644
index 000000000000..f6aeb428974d
--- /dev/null
+++ b/dev-util/ninja/files/ninja-1.9.0-musl.patch
@@ -0,0 +1,39 @@
+From 567815df38a2ff54ad7478a90bd75c91e434236a Mon Sep 17 00:00:00 2001
+From: makepost <makepost@firemail.cc>
+Date: Mon, 24 Dec 2018 03:13:16 +0200
+Subject: [PATCH] Use st_mtim if st_mtime is macro, fix #1510
+
+In POSIX.1-2008, sys_stat has a st_mtim member and a st_mtime backward
+compatibility macro. Should help avoid hardcoding platform detection.
+---
+ src/disk_interface.cc | 14 ++++----------
+ 1 file changed, 4 insertions(+), 10 deletions(-)
+
+diff --git a/src/disk_interface.cc b/src/disk_interface.cc
+index d4c2fb087..dc297c449 100644
+--- a/src/disk_interface.cc
++++ b/src/disk_interface.cc
+@@ -202,19 +202,13 @@ TimeStamp RealDiskInterface::Stat(const string& path, string* err) const {
+ // that it doesn't exist.
+ if (st.st_mtime == 0)
+ return 1;
+-#if defined(__APPLE__) && !defined(_POSIX_C_SOURCE)
++#if defined(_AIX)
++ return (int64_t)st.st_mtime * 1000000000LL + st.st_mtime_n;
++#elif defined(__APPLE__)
+ return ((int64_t)st.st_mtimespec.tv_sec * 1000000000LL +
+ st.st_mtimespec.tv_nsec);
+-#elif (_POSIX_C_SOURCE >= 200809L || _XOPEN_SOURCE >= 700 || defined(_BSD_SOURCE) || defined(_SVID_SOURCE) || \
+- defined(__BIONIC__) || (defined (__SVR4) && defined (__sun)) || defined(__FreeBSD__))
+- // For glibc, see "Timestamp files" in the Notes of http://www.kernel.org/doc/man-pages/online/pages/man2/stat.2.html
+- // newlib, uClibc and musl follow the kernel (or Cygwin) headers and define the right macro values above.
+- // For bsd, see https://github.com/freebsd/freebsd/blob/master/sys/sys/stat.h and similar
+- // For bionic, C and POSIX API is always enabled.
+- // For solaris, see https://docs.oracle.com/cd/E88353_01/html/E37841/stat-2.html.
++#elif defined(st_mtime) // A macro, so we're likely on modern POSIX.
+ return (int64_t)st.st_mtim.tv_sec * 1000000000LL + st.st_mtim.tv_nsec;
+-#elif defined(_AIX)
+- return (int64_t)st.st_mtime * 1000000000LL + st.st_mtime_n;
+ #else
+ return (int64_t)st.st_mtime * 1000000000LL + st.st_mtimensec;
+ #endif
diff --git a/dev-util/ninja/ninja-1.9.0.ebuild b/dev-util/ninja/ninja-1.9.0.ebuild
new file mode 100644
index 000000000000..4bc01a90da3c
--- /dev/null
+++ b/dev-util/ninja/ninja-1.9.0.ebuild
@@ -0,0 +1,134 @@
+# Copyright 2012-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6,3_7} )
+
+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
+ KITWARE_VERSION="1.9.0.g99df1.kitware.dyndep-1.jobserver-1"
+ MY_P="ninja-${KITWARE_VERSION}"
+ S="${WORKDIR}/${MY_P}"
+ SRC_URI="https://github.com/Kitware/ninja/archive/v${KITWARE_VERSION}.tar.gz -> ${MY_P}.tar.gz"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-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 vim-syntax"
+
+BDEPEND="
+ ${PYTHON_DEPS}
+ dev-util/re2c
+ doc? (
+ app-text/asciidoc
+ app-doc/doxygen
+ dev-libs/libxslt
+ )
+ test? ( dev-cpp/gtest )
+"
+RDEPEND="
+ emacs? ( virtual/emacs )
+ vim-syntax? (
+ || (
+ app-editors/vim
+ app-editors/gvim
+ )
+ )
+"
+
+PATCHES=(
+ "${FILESDIR}/ninja-1.9.0-musl.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 uses CFLAGS instead of CXXFLAGS
+ export CFLAGS=${CXXFLAGS}
+
+ 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 HACKING.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
+}
diff --git a/dev-util/ninja/ninja-9999.ebuild b/dev-util/ninja/ninja-9999.ebuild
index 0f378c4dd3aa..bd7bd0ad6edf 100644
--- a/dev-util/ninja/ninja-9999.ebuild
+++ b/dev-util/ninja/ninja-9999.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2018 Gentoo Authors
+# Copyright 2012-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
-PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} )
+PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6,3_7} )
inherit bash-completion-r1 elisp-common python-any-r1 toolchain-funcs
@@ -11,7 +11,10 @@ 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"
+ KITWARE_VERSION="1.9.0.g99df1.kitware.dyndep-1.jobserver-1"
+ MY_P="ninja-${KITWARE_VERSION}"
+ S="${WORKDIR}/${MY_P}"
+ SRC_URI="https://github.com/Kitware/ninja/archive/v${KITWARE_VERSION}.tar.gz -> ${MY_P}.tar.gz"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris"
fi
@@ -41,15 +44,17 @@ RDEPEND="
app-editors/gvim
)
)
- !<net-irc/ninja-1.5.9_pre14-r1" #436804
+"
run_for_build() {
if tc-is-cross-compiler; then
local -x AR=$(tc-getBUILD_AR)
local -x CXX=$(tc-getBUILD_CXX)
- local -x CFLAGS=${BUILD_CXXFLAGS}
+ local -x CFLAGS=
+ local -x CXXFLAGS=${BUILD_CXXFLAGS}
local -x LDFLAGS=${BUILD_LDFLAGS}
fi
+ echo "$@" >&2
"$@"
}
@@ -59,7 +64,7 @@ src_compile() {
# configure.py uses CFLAGS instead of CXXFLAGS
export CFLAGS=${CXXFLAGS}
- run_for_build "${PYTHON}" configure.py --bootstrap --verbose || die
+ run_for_build ${EPYTHON} configure.py --bootstrap --verbose || die
if tc-is-cross-compiler; then
mv ninja ninja-build || die
@@ -82,7 +87,7 @@ src_test() {
if ! tc-is-cross-compiler; then
# Bug 485772
ulimit -n 2048
- ./ninja-build -v ninja_test || die
+ ./ninja -v ninja_test || die
./ninja_test || die
fi
}