1 |
commit: 3046e6c5b1514be8cdcb7f72cfaeab369fcad4b8 |
2 |
Author: Christoph Junghans <junghans <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Jul 11 13:34:59 2018 +0000 |
4 |
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Aug 4 23:49:06 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3046e6c5 |
7 |
|
8 |
dev-util/ninja: add fortran support |
9 |
|
10 |
Package-Manager: Portage-2.3.40, Repoman-2.3.9 |
11 |
Closes: https://github.com/gentoo/gentoo/pull/9183 |
12 |
|
13 |
dev-util/ninja/Manifest | 1 + |
14 |
dev-util/ninja/ninja-1.8.2-r1.ebuild | 130 +++++++++++++++++++++++++++++++++++ |
15 |
2 files changed, 131 insertions(+) |
16 |
|
17 |
diff --git a/dev-util/ninja/Manifest b/dev-util/ninja/Manifest |
18 |
index a44236f0440..15be30523ae 100644 |
19 |
--- a/dev-util/ninja/Manifest |
20 |
+++ b/dev-util/ninja/Manifest |
21 |
@@ -1,2 +1,3 @@ |
22 |
DIST ninja-1.7.2.tar.gz 180611 BLAKE2B 9e0b5faaed9dd0c01b3cb22e5927668e985f897c4a448871b3147d4383d562b91f4e4fe304cb61a31d5ee096b58f0c4e4a7c1907ed9637658faa1eafb31cdd72 SHA512 29900d07364d87ad8b9614b82bc1b0afda5ca6522563ab73fb228f206ed6b29b70cf034a3caf5a9b2c0b105d1e076c6b425d93b5d14aa3ca3730d75611212a64 |
23 |
+DIST ninja-1.8.2-fortran.tar.gz 203848 BLAKE2B a6002abcfe4003dd5c9ccb8fd504b98736a6bc249323ca7afabc042a5091b9e7f0c0c19853cd7a270e00b0825ea14a7ba47c1b35d15f725c7b4866de1a79c07a SHA512 74f42181a2a712653450b0ab7ce5ad93b5ec010f4ab8411c732f682be5a6a991a7481ae1649ad70a7b903c45427b1e238b001aef29702f0896a1ae393ee22bec |
24 |
DIST ninja-1.8.2.tar.gz 185226 BLAKE2B c464c50829a0e9f0f6fd4b860946b14bf07f752adb8e7857d4072a1c1f06977eda283f633041929065c9164377ca769b3293b04fc9ceab583371708a9c4e8f2a SHA512 1650bf9e3eddeb0b0fbb415c2b8e0a7c094421e991fa8139fd77fae0f6ee7ee980b7cf5e98d883c3a884f99abcb06fa26e3980af3a3a5bb6dd655124755782c2 |
25 |
|
26 |
diff --git a/dev-util/ninja/ninja-1.8.2-r1.ebuild b/dev-util/ninja/ninja-1.8.2-r1.ebuild |
27 |
new file mode 100644 |
28 |
index 00000000000..caa2bb8e646 |
29 |
--- /dev/null |
30 |
+++ b/dev-util/ninja/ninja-1.8.2-r1.ebuild |
31 |
@@ -0,0 +1,130 @@ |
32 |
+# Copyright 1999-2018 Gentoo Foundation |
33 |
+# Distributed under the terms of the GNU General Public License v2 |
34 |
+ |
35 |
+EAPI=6 |
36 |
+ |
37 |
+PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} ) |
38 |
+ |
39 |
+inherit bash-completion-r1 elisp-common python-any-r1 toolchain-funcs vcs-snapshot |
40 |
+ |
41 |
+if [[ ${PV} == 9999 ]]; then |
42 |
+ inherit git-r3 |
43 |
+ EGIT_REPO_URI="https://github.com/ninja-build/ninja.git" |
44 |
+else |
45 |
+ SRC_URI="https://github.com/Kitware/${PN}/archive/v${PV}.g3bbbe.kitware.dyndep-1.jobserver-1.tar.gz -> ${P}-fortran.tar.gz" |
46 |
+ 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" |
47 |
+fi |
48 |
+ |
49 |
+DESCRIPTION="A small build system similar to make" |
50 |
+HOMEPAGE="https://ninja-build.org/" |
51 |
+ |
52 |
+LICENSE="Apache-2.0" |
53 |
+SLOT="0" |
54 |
+ |
55 |
+IUSE="doc emacs test vim-syntax zsh-completion" |
56 |
+ |
57 |
+DEPEND=" |
58 |
+ ${PYTHON_DEPS} |
59 |
+ dev-util/re2c |
60 |
+ doc? ( |
61 |
+ app-text/asciidoc |
62 |
+ app-doc/doxygen |
63 |
+ dev-libs/libxslt |
64 |
+ ) |
65 |
+ test? ( dev-cpp/gtest ) |
66 |
+" |
67 |
+RDEPEND=" |
68 |
+ emacs? ( virtual/emacs ) |
69 |
+ vim-syntax? ( |
70 |
+ || ( |
71 |
+ app-editors/vim |
72 |
+ app-editors/gvim |
73 |
+ ) |
74 |
+ ) |
75 |
+ zsh-completion? ( app-shells/zsh ) |
76 |
+ !<net-irc/ninja-1.5.9_pre14-r1" #436804 |
77 |
+ |
78 |
+S="${WORKDIR}/${P}-fortran" |
79 |
+ |
80 |
+run_for_build() { |
81 |
+ if tc-is-cross-compiler; then |
82 |
+ local -x AR=$(tc-getBUILD_AR) |
83 |
+ local -x CXX=$(tc-getBUILD_CXX) |
84 |
+ local -x CFLAGS=${BUILD_CXXFLAGS} |
85 |
+ local -x LDFLAGS=${BUILD_LDFLAGS} |
86 |
+ fi |
87 |
+ "$@" |
88 |
+} |
89 |
+ |
90 |
+src_compile() { |
91 |
+ tc-export AR CXX |
92 |
+ |
93 |
+ # configure.py uses CFLAGS instead of CXXFLAGS |
94 |
+ export CFLAGS=${CXXFLAGS} |
95 |
+ |
96 |
+ run_for_build "${PYTHON}" configure.py --bootstrap --verbose || die |
97 |
+ |
98 |
+ if tc-is-cross-compiler; then |
99 |
+ mv ninja ninja-build || die |
100 |
+ "${PYTHON}" configure.py || die |
101 |
+ ./ninja-build -v ninja || die |
102 |
+ else |
103 |
+ ln ninja ninja-build || die |
104 |
+ fi |
105 |
+ |
106 |
+ if use doc; then |
107 |
+ ./ninja-build -v doxygen manual || die |
108 |
+ fi |
109 |
+ |
110 |
+ if use emacs; then |
111 |
+ elisp-compile misc/ninja-mode.el || die |
112 |
+ fi |
113 |
+} |
114 |
+ |
115 |
+src_test() { |
116 |
+ if ! tc-is-cross-compiler; then |
117 |
+ # Bug 485772 |
118 |
+ ulimit -n 2048 |
119 |
+ ./ninja-build -v ninja_test || die |
120 |
+ ./ninja_test || die |
121 |
+ fi |
122 |
+} |
123 |
+ |
124 |
+src_install() { |
125 |
+ dodoc README HACKING.md |
126 |
+ if use doc; then |
127 |
+ docinto html |
128 |
+ dodoc -r doc/doxygen/html/. |
129 |
+ dodoc doc/manual.html |
130 |
+ fi |
131 |
+ dobin ninja |
132 |
+ |
133 |
+ newbashcomp misc/bash-completion "${PN}" |
134 |
+ |
135 |
+ if use vim-syntax; then |
136 |
+ insinto /usr/share/vim/vimfiles/syntax/ |
137 |
+ doins misc/"${PN}".vim |
138 |
+ |
139 |
+ echo 'au BufNewFile,BufRead *.ninja set ft=ninja' > "${T}/${PN}.vim" |
140 |
+ insinto /usr/share/vim/vimfiles/ftdetect |
141 |
+ doins "${T}/${PN}.vim" |
142 |
+ fi |
143 |
+ |
144 |
+ if use zsh-completion; then |
145 |
+ insinto /usr/share/zsh/site-functions |
146 |
+ newins misc/zsh-completion _ninja |
147 |
+ fi |
148 |
+ |
149 |
+ if use emacs; then |
150 |
+ cd misc || die |
151 |
+ elisp-install ${PN} ninja-mode.el* || die |
152 |
+ fi |
153 |
+} |
154 |
+ |
155 |
+pkg_postinst() { |
156 |
+ use emacs && elisp-site-regen |
157 |
+} |
158 |
+ |
159 |
+pkg_postrm() { |
160 |
+ use emacs && elisp-site-regen |
161 |
+} |