Gentoo Archives: gentoo-commits

From: "Marcus Hanwell (cryos)" <cryos@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-util/cmake: ChangeLog cmake-2.6.4.ebuild
Date: Sat, 02 May 2009 23:34:03
Message-Id: E1M0OiX-0008EO-F7@stork.gentoo.org
1 cryos 09/05/02 23:34:01
2
3 Modified: ChangeLog
4 Added: cmake-2.6.4.ebuild
5 Log:
6 Version bump, applied patch from bug 266383.
7 (Portage version: 2.2_rc32/cvs/Linux x86_64)
8
9 Revision Changes Path
10 1.92 dev-util/cmake/ChangeLog
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-util/cmake/ChangeLog?rev=1.92&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-util/cmake/ChangeLog?rev=1.92&content-type=text/plain
14 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-util/cmake/ChangeLog?r1=1.91&r2=1.92
15
16 Index: ChangeLog
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/dev-util/cmake/ChangeLog,v
19 retrieving revision 1.91
20 retrieving revision 1.92
21 diff -u -r1.91 -r1.92
22 --- ChangeLog 13 Apr 2009 00:43:01 -0000 1.91
23 +++ ChangeLog 2 May 2009 23:34:01 -0000 1.92
24 @@ -1,6 +1,11 @@
25 # ChangeLog for dev-util/cmake
26 # Copyright 2000-2009 Gentoo Foundation; Distributed under the GPL v2
27 -# $Header: /var/cvsroot/gentoo-x86/dev-util/cmake/ChangeLog,v 1.91 2009/04/13 00:43:01 scarabeus Exp $
28 +# $Header: /var/cvsroot/gentoo-x86/dev-util/cmake/ChangeLog,v 1.92 2009/05/02 23:34:01 cryos Exp $
29 +
30 +*cmake-2.6.4 (02 May 2009)
31 +
32 + 02 May 2009; Marcus D. Hanwell <cryos@g.o> +cmake-2.6.4.ebuild:
33 + Version bump, applied patch from bug 266383.
34
35 13 Apr 2009; Tomas Chvatal <scarabeus@g.o> cmake-2.6.3-r1.ebuild:
36 Fix the has_version check. Current eclass does not support cmake 2.4...
37
38
39
40 1.1 dev-util/cmake/cmake-2.6.4.ebuild
41
42 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-util/cmake/cmake-2.6.4.ebuild?rev=1.1&view=markup
43 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-util/cmake/cmake-2.6.4.ebuild?rev=1.1&content-type=text/plain
44
45 Index: cmake-2.6.4.ebuild
46 ===================================================================
47 # Copyright 1999-2009 Gentoo Foundation
48 # Distributed under the terms of the GNU General Public License v2
49 # $Header: /var/cvsroot/gentoo-x86/dev-util/cmake/cmake-2.6.4.ebuild,v 1.1 2009/05/02 23:34:01 cryos Exp $
50
51 EAPI="2"
52
53 inherit elisp-common toolchain-funcs eutils versionator flag-o-matic cmake-utils
54
55 MY_PV="${PV/rc/RC-}"
56 MY_P="${PN}-$(replace_version_separator 3 - ${MY_PV})"
57
58 DESCRIPTION="Cross platform Make"
59 HOMEPAGE="http://www.cmake.org/"
60 SRC_URI="http://www.cmake.org/files/v$(get_version_component_range 1-2)/${MY_P}.tar.gz"
61
62 LICENSE="CMake"
63 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd"
64 SLOT="0"
65 IUSE="emacs qt4 vim-syntax"
66
67 DEPEND="
68 >=net-misc/curl-7.16.4
69 >=dev-libs/expat-2.0.1
70 >=dev-libs/libxml2-2.6.28
71 >=dev-libs/xmlrpc-c-1.06.09[curl]
72 emacs? ( virtual/emacs )
73 qt4? ( x11-libs/qt-gui:4 )
74 vim-syntax? (
75 || (
76 app-editors/vim
77 app-editors/gvim
78 )
79 )
80 "
81 RDEPEND="${DEPEND}"
82
83 SITEFILE="50${PN}-gentoo.el"
84 VIMFILE="${PN}.vim"
85
86 S="${WORKDIR}/${MY_P}"
87
88 CMAKE_IN_SOURCE_BUILD=1
89
90 PATCHES=(
91 "${FILESDIR}/${PN}-FindJNI.patch"
92 "${FILESDIR}/${PN}-FindPythonLibs.patch"
93 "${FILESDIR}/${PN}-FindPythonInterp.patch"
94 )
95
96 src_configure() {
97 local qt_arg par_arg
98
99 if [[ "$(gcc-major-version)" -eq "3" ]] ; then
100 append-flags "-fno-stack-protector"
101 fi
102
103 bootstrp=0
104 has_version ">=dev-util/cmake-2.6.1" || bootstrp=1
105 if [[ ${bootstrp} = 0 ]]; then
106 # Required version of CMake found, now test if it works
107 cmake --version &> /dev/null
108 if ! [[ $? = 0 ]]; then
109 bootstrp=1
110 fi
111 fi
112
113 if [[${bootstrp}]]; then
114 tc-export CC CXX LD
115
116 if use qt4; then
117 qt_arg="--qt-gui"
118 else
119 qt_arg="--no-qt-gui"
120 fi
121
122 echo $MAKEOPTS | egrep -o '(\-j|\-\-jobs)(=?|[[:space:]]*)[[:digit:]]+' > /dev/null
123 if [ $? -eq 0 ]; then
124 par_arg=$(echo $MAKEOPTS | egrep -o '(\-j|\-\-jobs)(=?|[[:space:]]*)[[:digit:]]+' | egrep -o '[[:digit:]]+')
125 par_arg="--parallel=${par_arg}"
126 else
127 par_arg="--parallel=1"
128 fi
129
130 ./bootstrap \
131 --system-libs \
132 --prefix=/usr \
133 --docdir=/share/doc/${PF} \
134 --datadir=/share/${PN} \
135 --mandir=/share/man \
136 "$qt_arg" \
137 "$par_arg" || die "./bootstrap failed"
138 else
139 # this is way much faster so we should preffer it if some cmake is
140 # around.
141 use qt4 && qt_arg="ON" || qt_arg="OFF"
142 mycmakeargs="-DCMAKE_USE_SYSTEM_LIBRARIES=ON
143 -DCMAKE_DOC_DIR=/share/doc/${PF}
144 -DCMAKE_MAN_DIR=/share/man
145 -DCMAKE_DATA_DIR=/share/${PN}
146 -DBUILD_CursesDialog=ON
147 -DBUILD_QtDialog=${qt_arg}"
148 cmake-utils_src_configure
149 fi
150 }
151
152 src_compile() {
153 cmake-utils_src_compile
154 if use emacs; then
155 elisp-compile Docs/cmake-mode.el || die "elisp compile failed"
156 fi
157 }
158
159 src_test() {
160 emake test
161 }
162
163 src_install() {
164 cmake-utils_src_install
165 if use emacs; then
166 elisp-install ${PN} Docs/cmake-mode.el Docs/cmake-mode.elc || die "elisp-install failed"
167 elisp-site-file-install "${FILESDIR}/${SITEFILE}"
168 fi
169 if use vim-syntax; then
170 insinto /usr/share/vim/vimfiles/syntax
171 doins "${S}"/Docs/cmake-syntax.vim
172
173 insinto /usr/share/vim/vimfiles/indent
174 doins "${S}"/Docs/cmake-indent.vim
175
176 insinto /usr/share/vim/vimfiles/ftdetect
177 doins "${FILESDIR}/${VIMFILE}"
178 fi
179 }
180
181 pkg_postinst() {
182 use emacs && elisp-site-regen
183 }
184
185 pkg_postrm() {
186 use emacs && elisp-site-regen
187 }