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: cmake-2.8.0_rc1.ebuild ChangeLog
Date: Thu, 01 Oct 2009 13:35:04
Message-Id: E1MtLoE-0004tg-Iw@stork.gentoo.org
1 cryos 09/10/01 13:35:02
2
3 Modified: ChangeLog
4 Added: cmake-2.8.0_rc1.ebuild
5 Log:
6 Version bump, in package.mask initially for further testing.
7 (Portage version: 2.2_rc42/cvs/Linux x86_64)
8
9 Revision Changes Path
10 1.107 dev-util/cmake/ChangeLog
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-util/cmake/ChangeLog?rev=1.107&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-util/cmake/ChangeLog?rev=1.107&content-type=text/plain
14 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-util/cmake/ChangeLog?r1=1.106&r2=1.107
15
16 Index: ChangeLog
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/dev-util/cmake/ChangeLog,v
19 retrieving revision 1.106
20 retrieving revision 1.107
21 diff -u -r1.106 -r1.107
22 --- ChangeLog 28 Jul 2009 16:30:34 -0000 1.106
23 +++ ChangeLog 1 Oct 2009 13:35:02 -0000 1.107
24 @@ -1,6 +1,11 @@
25 # ChangeLog for dev-util/cmake
26 # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
27 -# $Header: /var/cvsroot/gentoo-x86/dev-util/cmake/ChangeLog,v 1.106 2009/07/28 16:30:34 arfrever Exp $
28 +# $Header: /var/cvsroot/gentoo-x86/dev-util/cmake/ChangeLog,v 1.107 2009/10/01 13:35:02 cryos Exp $
29 +
30 +*cmake-2.8.0_rc1 (01 Oct 2009)
31 +
32 + 01 Oct 2009; Marcus D. Hanwell <cryos@g.o> +cmake-2.8.0_rc1.ebuild:
33 + Version bump, in package.mask initially for further testing.
34
35 *cmake-2.6.4-r2 (28 Jul 2009)
36
37
38
39
40 1.1 dev-util/cmake/cmake-2.8.0_rc1.ebuild
41
42 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-util/cmake/cmake-2.8.0_rc1.ebuild?rev=1.1&view=markup
43 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-util/cmake/cmake-2.8.0_rc1.ebuild?rev=1.1&content-type=text/plain
44
45 Index: cmake-2.8.0_rc1.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.8.0_rc1.ebuild,v 1.1 2009/10/01 13:35:02 cryos Exp $
50
51 EAPI="2"
52
53 inherit elisp-common toolchain-funcs eutils versionator flag-o-matic cmake-utils
54
55 MY_P="${PN}-$(replace_version_separator 3 - ${MY_PV})"
56
57 DESCRIPTION="Cross platform Make"
58 HOMEPAGE="http://www.cmake.org/"
59 SRC_URI="http://www.cmake.org/files/v$(get_version_component_range 1-2)/${MY_P}.tar.gz"
60
61 LICENSE="CMake"
62 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd"
63 SLOT="0"
64 IUSE="emacs python3 qt4 vim-syntax"
65
66 DEPEND="
67 >=net-misc/curl-7.16.4
68 >=dev-libs/expat-2.0.1
69 >=dev-libs/libxml2-2.6.28
70 >=dev-libs/xmlrpc-c-1.06.27[curl]
71 emacs? ( virtual/emacs )
72 qt4? ( x11-libs/qt-gui:4 )
73 vim-syntax? (
74 || (
75 app-editors/vim
76 app-editors/gvim
77 )
78 )
79 "
80 RDEPEND="${DEPEND}"
81
82 SITEFILE="50${PN}-gentoo.el"
83 VIMFILE="${PN}.vim"
84
85 S="${WORKDIR}/${MY_P}"
86
87 CMAKE_IN_SOURCE_BUILD=1
88
89 PATCHES=(
90 "${FILESDIR}/${PN}-FindJNI.patch"
91 "${FILESDIR}/${PN}-FindPythonLibs.patch"
92 "${FILESDIR}/${PN}-FindPythonInterp.patch"
93 )
94
95 pkg_setup() {
96 if use python3; then
97 ewarn "Support for Python 3 is experimental."
98 ewarn "Please include patches in bug reports!"
99 ebeep 6
100 fi
101 }
102
103 src_prepare() {
104 base_src_prepare
105
106 use python3 && epatch "${FILESDIR}/${PN}-python-3.patch"
107 }
108
109 src_configure() {
110 local qt_arg par_arg
111
112 if [[ "$(gcc-major-version)" -eq "3" ]] ; then
113 append-flags "-fno-stack-protector"
114 fi
115
116 bootstrap=0
117 has_version ">=dev-util/cmake-2.6.1" || bootstrap=1
118 if [[ ${bootstrap} = 0 ]]; then
119 # Required version of CMake found, now test if it works
120 cmake --version &> /dev/null
121 if ! [[ $? = 0 ]]; then
122 bootstrap=1
123 fi
124 fi
125
126 if [[ ${bootstrap} = 1 ]]; then
127 tc-export CC CXX LD
128
129 if use qt4; then
130 qt_arg="--qt-gui"
131 else
132 qt_arg="--no-qt-gui"
133 fi
134
135 echo $MAKEOPTS | egrep -o '(\-j|\-\-jobs)(=?|[[:space:]]*)[[:digit:]]+' > /dev/null
136 if [ $? -eq 0 ]; then
137 par_arg=$(echo $MAKEOPTS | egrep -o '(\-j|\-\-jobs)(=?|[[:space:]]*)[[:digit:]]+' | egrep -o '[[:digit:]]+')
138 par_arg="--parallel=${par_arg}"
139 else
140 par_arg="--parallel=1"
141 fi
142
143 ./bootstrap \
144 --system-libs \
145 --prefix=/usr \
146 --docdir=/share/doc/${PF} \
147 --datadir=/share/${PN} \
148 --mandir=/share/man \
149 "$qt_arg" \
150 "$par_arg" || die "./bootstrap failed"
151 else
152 # this is way much faster so we should preffer it if some cmake is
153 # around.
154 use qt4 && qt_arg="ON" || qt_arg="OFF"
155 mycmakeargs="-DCMAKE_USE_SYSTEM_LIBRARIES=ON
156 -DCMAKE_DOC_DIR=/share/doc/${PF}
157 -DCMAKE_MAN_DIR=/share/man
158 -DCMAKE_DATA_DIR=/share/${PN}
159 -DBUILD_CursesDialog=ON
160 -DBUILD_QtDialog=${qt_arg}"
161 cmake-utils_src_configure
162 fi
163 }
164
165 src_compile() {
166 cmake-utils_src_compile
167 if use emacs; then
168 elisp-compile Docs/cmake-mode.el || die "elisp compile failed"
169 fi
170 }
171
172 src_test() {
173 einfo "Please note that test \"58 - SimpleInstall-Stage2\" might fail."
174 einfo "If any package installs with cmake, it means test failed but cmake work."
175 emake test
176 }
177
178 src_install() {
179 cmake-utils_src_install
180 if use emacs; then
181 elisp-install ${PN} Docs/cmake-mode.el Docs/cmake-mode.elc || die "elisp-install failed"
182 elisp-site-file-install "${FILESDIR}/${SITEFILE}"
183 fi
184 if use vim-syntax; then
185 insinto /usr/share/vim/vimfiles/syntax
186 doins "${S}"/Docs/cmake-syntax.vim
187
188 insinto /usr/share/vim/vimfiles/indent
189 doins "${S}"/Docs/cmake-indent.vim
190
191 insinto /usr/share/vim/vimfiles/ftdetect
192 doins "${FILESDIR}/${VIMFILE}"
193 fi
194 }
195
196 pkg_postinst() {
197 use emacs && elisp-site-regen
198 }
199
200 pkg_postrm() {
201 use emacs && elisp-site-regen
202 }