Gentoo Archives: gentoo-commits

From: "Justin Lecher (jlec)" <jlec@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-util/cmake: ChangeLog cmake-2.8.7-r3.ebuild
Date: Mon, 06 Feb 2012 13:52:59
Message-Id: 20120206135250.9266E2004B@flycatcher.gentoo.org
1 jlec 12/02/06 13:52:50
2
3 Modified: ChangeLog
4 Added: cmake-2.8.7-r3.ebuild
5 Log:
6 Adding patch for language selective openmp support testing, http://public.kitware.com/Bug/view.php?id=11910 ; approved by tampakrap
7
8 (Portage version: 2.2.0_alpha85/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.186 dev-util/cmake/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-util/cmake/ChangeLog?rev=1.186&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-util/cmake/ChangeLog?rev=1.186&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-util/cmake/ChangeLog?r1=1.185&r2=1.186
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/dev-util/cmake/ChangeLog,v
20 retrieving revision 1.185
21 retrieving revision 1.186
22 diff -u -r1.185 -r1.186
23 --- ChangeLog 30 Jan 2012 22:28:45 -0000 1.185
24 +++ ChangeLog 6 Feb 2012 13:52:50 -0000 1.186
25 @@ -1,6 +1,13 @@
26 # ChangeLog for dev-util/cmake
27 # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/dev-util/cmake/ChangeLog,v 1.185 2012/01/30 22:28:45 tampakrap Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/dev-util/cmake/ChangeLog,v 1.186 2012/02/06 13:52:50 jlec Exp $
30 +
31 +*cmake-2.8.7-r3 (06 Feb 2012)
32 +
33 + 06 Feb 2012; Justin Lecher <jlec@g.o> +cmake-2.8.7-r3.ebuild,
34 + +files/cmake-2.8.7-FindOpenMP.patch:
35 + Adding patch for language selective openmp support testing,
36 + http://public.kitware.com/Bug/view.php?id=11910 ; approved by tampakrap
37
38 *cmake-2.8.7-r2 (30 Jan 2012)
39
40
41
42
43 1.1 dev-util/cmake/cmake-2.8.7-r3.ebuild
44
45 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-util/cmake/cmake-2.8.7-r3.ebuild?rev=1.1&view=markup
46 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-util/cmake/cmake-2.8.7-r3.ebuild?rev=1.1&content-type=text/plain
47
48 Index: cmake-2.8.7-r3.ebuild
49 ===================================================================
50 # Copyright 1999-2012 Gentoo Foundation
51 # Distributed under the terms of the GNU General Public License v2
52 # $Header: /var/cvsroot/gentoo-x86/dev-util/cmake/cmake-2.8.7-r3.ebuild,v 1.1 2012/02/06 13:52:50 jlec Exp $
53
54 EAPI=4
55
56 CMAKE_REMOVE_MODULES="no"
57 inherit elisp-common toolchain-funcs eutils versionator flag-o-matic base cmake-utils virtualx
58
59 MY_P="${PN}-$(replace_version_separator 3 - ${MY_PV})"
60
61 DESCRIPTION="Cross platform Make"
62 HOMEPAGE="http://www.cmake.org/"
63 SRC_URI="http://www.cmake.org/files/v$(get_version_component_range 1-2)/${MY_P}.tar.gz"
64
65 LICENSE="CMake"
66 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~sparc-fbsd ~x86-fbsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
67 SLOT="0"
68 IUSE="emacs ncurses qt4 vim-syntax"
69
70 DEPEND="
71 >=app-arch/libarchive-2.8.0
72 >=net-misc/curl-7.20.0-r1[ssl]
73 >=dev-libs/expat-2.0.1
74 dev-util/pkgconfig
75 sys-libs/zlib
76 ncurses? ( sys-libs/ncurses )
77 qt4? ( x11-libs/qt-gui:4 )
78 "
79 RDEPEND="${DEPEND}
80 emacs? ( virtual/emacs )
81 vim-syntax? (
82 || (
83 app-editors/vim
84 app-editors/gvim
85 )
86 )
87 "
88
89 SITEFILE="50${PN}-gentoo.el"
90 VIMFILE="${PN}.vim"
91
92 S="${WORKDIR}/${MY_P}"
93
94 CMAKE_BINARY="${S}/Bootstrap.cmk/cmake"
95
96 # Fixme:
97 # Boost patchset is foobared and should respect eselect / slotting
98 PATCHES=(
99 "${FILESDIR}"/${PN}-2.6.3-darwin-bundle.patch
100 "${FILESDIR}"/${PN}-2.6.3-no-duplicates-in-rpath.patch
101 "${FILESDIR}"/${PN}-2.6.3-fix_broken_lfs_on_aix.patch
102 "${FILESDIR}"/${PN}-2.8.0-darwin-default-install_name.patch
103 "${FILESDIR}"/${PN}-2.8.1-libform.patch
104 "${FILESDIR}"/${PN}-2.8.4-FindPythonLibs.patch
105 "${FILESDIR}"/${PN}-2.8.3-more-no_host_paths.patch
106 "${FILESDIR}"/${PN}-2.8.4-FindBoost.patch
107 "${FILESDIR}"/${PN}-2.8.6-FindBLAS-2.patch
108 "${FILESDIR}"/${PN}-2.8.6-FindLAPACK-2.patch
109 "${FILESDIR}"/${PN}-2.8.7-FindBoost-python.patch
110 "${FILESDIR}"/${PN}-2.8.7-FindOpenMP.patch
111 )
112 cmake_src_bootstrap() {
113 # Cleanup args to extract only JOBS.
114 # Because bootstrap does not know anything else.
115 echo ${MAKEOPTS} | egrep -o '(\-j|\-\-jobs)(=?|[[:space:]]*)[[:digit:]]+' > /dev/null
116 if [ $? -eq 0 ]; then
117 par_arg=$(echo ${MAKEOPTS} | egrep -o '(\-j|\-\-jobs)(=?|[[:space:]]*)[[:digit:]]+' | egrep -o '[[:digit:]]+')
118 par_arg="--parallel=${par_arg}"
119 else
120 par_arg="--parallel=1"
121 fi
122
123 tc-export CC CXX LD
124
125 ./bootstrap \
126 --prefix="${T}/cmakestrap/" \
127 ${par_arg} \
128 || die "Bootstrap failed"
129 }
130
131 cmake_src_test() {
132 # fix OutDir test
133 # this is altered thanks to our eclass
134 sed -i -e 's:#IGNORE ::g' "${S}"/Tests/OutDir/CMakeLists.txt || die
135
136 pushd "${CMAKE_BUILD_DIR}" > /dev/null
137
138 local ctestargs
139 [[ -n ${TEST_VERBOSE} ]] && ctestargs="--extra-verbose --output-on-failure"
140
141 # Excluded tests:
142 # BootstrapTest: we actualy bootstrap it every time so why test it.
143 # SimpleCOnly_sdcc: sdcc choke on global cflags so just skip the test
144 # as it was never intended to be used this way.
145 "${CMAKE_BUILD_DIR}"/bin/ctest ${ctestargs} \
146 -E BootstrapTest SimpleCOnly_sdcc \
147 || die "Tests failed"
148
149 popd > /dev/null
150 }
151
152 pkg_setup() {
153 einfo "Fixing java access violations ..."
154 # bug 387227
155 addpredict /proc/self/coredump_filter
156 }
157
158 src_prepare() {
159 base_src_prepare
160
161 # disable running of cmake in boostrap command
162 sed -i \
163 -e '/"${cmake_bootstrap_dir}\/cmake"/s/^/#DONOTRUN /' \
164 bootstrap || die "sed failed"
165
166 # Add gcc libs to the default link paths
167 sed -i \
168 -e "s|@GENTOO_PORTAGE_GCCLIBDIR@|${EPREFIX}/usr/${CHOST}/lib/|g" \
169 -e "s|@GENTOO_PORTAGE_EPREFIX@|${EPREFIX}/|g" \
170 Modules/Platform/{UnixPaths,Darwin}.cmake || die "sed failed"
171
172 cmake_src_bootstrap
173 }
174
175 src_configure() {
176 # make things work with gentoo java setup
177 # in case java-config cannot be run, the variable just becomes unset
178 # per bug #315229
179 export JAVA_HOME=$(java-config -g JAVA_HOME 2> /dev/null)
180
181 local mycmakeargs=(
182 -DCMAKE_USE_SYSTEM_LIBRARIES=ON
183 -DCMAKE_INSTALL_PREFIX="${EPREFIX}"/usr
184 -DCMAKE_DOC_DIR=/share/doc/${PF}
185 -DCMAKE_MAN_DIR=/share/man
186 -DCMAKE_DATA_DIR=/share/${PN}
187 $(cmake-utils_use_build ncurses CursesDialog)
188 $(cmake-utils_use_build qt4 QtDialog)
189 )
190 cmake-utils_src_configure
191 }
192
193 src_compile() {
194 cmake-utils_src_compile
195 use emacs && elisp-compile Docs/cmake-mode.el
196 }
197
198 src_test() {
199 VIRTUALX_COMMAND="cmake_src_test" virtualmake
200 }
201
202 src_install() {
203 cmake-utils_src_install
204 if use emacs; then
205 elisp-install ${PN} Docs/cmake-mode.el Docs/cmake-mode.elc
206 elisp-site-file-install "${FILESDIR}/${SITEFILE}"
207 fi
208 if use vim-syntax; then
209 insinto /usr/share/vim/vimfiles/syntax
210 doins Docs/cmake-syntax.vim
211
212 insinto /usr/share/vim/vimfiles/indent
213 doins Docs/cmake-indent.vim
214
215 insinto /usr/share/vim/vimfiles/ftdetect
216 doins "${FILESDIR}/${VIMFILE}"
217 fi
218 }
219
220 pkg_postinst() {
221 use emacs && elisp-site-regen
222 }
223
224 pkg_postrm() {
225 use emacs && elisp-site-regen
226 }