/[gentoo-x86]/dev-util/ninja/ninja-1.5.1.ebuild
Gentoo

Contents of /dev-util/ninja/ninja-1.5.1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.11 - (show annotations) (download)
Wed Apr 8 17:54:03 2015 UTC (3 years, 4 months ago) by mgorny
Branch: MAIN
CVS Tags: HEAD
Changes since 1.10: +3 -3 lines
Drop old Python implementations

(Portage version: 2.2.18/cvs/Linux x86_64, signed Manifest commit with key EFB4464E!)

1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/dev-util/ninja/ninja-1.5.1.ebuild,v 1.10 2015/04/02 18:45:26 mr_bones_ Exp $
4
5 EAPI=5
6
7 PYTHON_COMPAT=( python2_7 )
8
9 inherit bash-completion-r1 elisp-common python-any-r1 toolchain-funcs
10
11 if [ "${PV}" = "999999" ]; then
12 EGIT_REPO_URI="git://github.com/martine/ninja.git http://github.com/martine/ninja.git"
13 inherit git-2
14 KEYWORDS=""
15 else
16 SRC_URI="https://github.com/martine/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
17 KEYWORDS="alpha amd64 arm ~arm64 ~m68k ppc64 ~s390 ~sh sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
18 fi
19
20 DESCRIPTION="A small build system similar to make"
21 HOMEPAGE="http://github.com/martine/ninja"
22
23 LICENSE="Apache-2.0"
24 SLOT="0"
25
26 IUSE="doc emacs test vim-syntax zsh-completion"
27
28 DEPEND="
29 ${PYTHON_DEPS}
30 dev-util/re2c
31 doc? (
32 app-text/asciidoc
33 app-doc/doxygen
34 dev-libs/libxslt
35 )
36 test? ( dev-cpp/gtest )
37 "
38 RDEPEND="
39 emacs? ( virtual/emacs )
40 vim-syntax? (
41 || (
42 app-editors/vim
43 app-editors/gvim
44 )
45 )
46 zsh-completion? ( app-shells/zsh )
47 !<net-irc/ninja-1.5.9_pre14-r1" #436804
48
49 run_for_build() {
50 if tc-is-cross-compiler; then
51 local -x AR=$(tc-getBUILD_AR)
52 local -x CXX=$(tc-getBUILD_CXX)
53 local -x CFLAGS=${BUILD_CXXFLAGS}
54 local -x LDFLAGS=${BUILD_LDFLAGS}
55 fi
56 "$@"
57 }
58
59 src_compile() {
60 tc-export AR CXX
61
62 # configure.py uses CFLAGS instead of CXXFLAGS
63 export CFLAGS=${CXXFLAGS}
64
65 run_for_build "${PYTHON}" bootstrap.py --verbose || die
66
67 if tc-is-cross-compiler; then
68 mv ninja ninja-build || die
69 "${PYTHON}" configure.py || die
70 ./ninja-build -v ninja || die
71 else
72 ln ninja ninja-build || die
73 fi
74
75 if use doc; then
76 ./ninja-build -v doxygen manual || die
77 fi
78
79 if use emacs; then
80 elisp-compile misc/ninja-mode.el || die
81 fi
82 }
83
84 src_test() {
85 if ! tc-is-cross-compiler; then
86 # Bug 485772
87 ulimit -n 2048
88 ./ninja-build -v ninja_test || die
89 ./ninja_test || die
90 fi
91 }
92
93 src_install() {
94 dodoc README HACKING.md
95 if use doc; then
96 dohtml -r doc/doxygen/html/*
97 dohtml doc/manual.html
98 fi
99 dobin ninja
100
101 newbashcomp misc/bash-completion "${PN}"
102
103 if use vim-syntax; then
104 insinto /usr/share/vim/vimfiles/syntax/
105 doins misc/"${PN}".vim
106
107 echo 'au BufNewFile,BufRead *.ninja set ft=ninja' > "${T}/${PN}.vim"
108 insinto /usr/share/vim/vimfiles/ftdetect
109 doins "${T}/${PN}.vim"
110 fi
111
112 if use zsh-completion; then
113 insinto /usr/share/zsh/site-functions
114 newins misc/zsh-completion _ninja
115 fi
116
117 if use emacs; then
118 cd misc || die
119 elisp-install ${PN} ninja-mode.el* || die
120 fi
121 }
122
123 pkg_postinst() {
124 use emacs && elisp-site-regen
125 }
126
127 pkg_postrm() {
128 use emacs && elisp-site-regen
129 }

  ViewVC Help
Powered by ViewVC 1.1.20