# ChangeLog for dev-util/cmake
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-util/cmake/ChangeLog,v 1.170 2011/07/18 09:03:45 dilfridge Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-util/cmake/ChangeLog,v 1.171 2011/10/15 15:06:12 dilfridge Exp $
+
+*cmake-2.8.6-r1 (15 Oct 2011)
+
+ 15 Oct 2011; Andreas K. Huettel <dilfridge@gentoo.org>
+ +cmake-2.8.6-r1.ebuild, +files/cmake-2.8.6-FindBLAS.patch,
+ +files/cmake-2.8.6-FindLAPACK.patch:
+ Version bump (thanks johu!)
*cmake-2.8.5-r2 (18 Jul 2011)
AUX cmake-2.8.4-FindQt4.patch 10926 RMD160 15da9e13df5a98f9171a263c0c9d23f45707b494 SHA1 a7f1c589b115f6e5f9abfeb589cb07095510b1f4 SHA256 0aaa6b6a8fa4fdf3aea8efeaa831a3443e60a5a453cd7b71207e57980bce5564
AUX cmake-2.8.5-FindBLAS.patch 1096 RMD160 632ad06a5b3fa645d5d29d46602151d941049fb2 SHA1 69e089cf3bb8c9f748c8118a6d6dcbc218adc4cc SHA256 39e0fe4aa61b1efd149151b44b2c84bc651e11e96dd29321bd7d87e76158ac77
AUX cmake-2.8.5-FindLAPACK.patch 1170 RMD160 1ea32132a982d3cb03072855a21059c68392bdf4 SHA1 8cbc7da551885c43863decabafec3d4d095cadaf SHA256 570707887e4d45a656bfeecfc06f203c7676d05bba988776a8a259cfeefb14d8
+AUX cmake-2.8.6-FindBLAS.patch 1064 RMD160 f359d84913dd868165f37d7bb9e507109552bf22 SHA1 1455e3602d9484a4fc339768eec221b037862ba1 SHA256 ef4b5e455ebf7431fdd4dd37a671c2c93b7e9db24cd13ac1eac9d3dccb1f828e
+AUX cmake-2.8.6-FindLAPACK.patch 1150 RMD160 6f18fcb48dfa7ee92bd440198fcb2bc3822d3ad5 SHA1 9f9f92d7657025968ebfe74f5983c8b0ced94721 SHA256 033e3b0a217e0168b47588f01f2e4b216f0ade5dd0297264e8dc3f672a979caf
AUX cmake.vim 217 RMD160 3ac23077646d31e9c29ff32ae2eba20b63c07809 SHA1 527b989aec74eb260c16f93baf189c2e6794b3d8 SHA256 7366c1d45bdcc93efb1954216a5427a5f9df7e98a1f706c357576d7835aaebc5
DIST cmake-2.8.4.tar.gz 5477628 RMD160 8b92eb11391b07433e7fe02bbb80c3ebcaaf1893 SHA1 6c42699bd63fdfcc7743d4906e3208d051d7f19b SHA256 d97ea9f807f5407030d4f7246accc26addc520c9ee3897c4582eba3da49253cc
DIST cmake-2.8.5.tar.gz 5517977 RMD160 e4767dc0ea3e53da3ab14cc6af5d42dd190eda76 SHA1 8dd4c31cbccf1a297829a476a0ef79d1614ca368 SHA256 5e18bff75f01656c64f553412a8905527e1b85efaf3163c6fb81ea5aaced0b91
+DIST cmake-2.8.6.tar.gz 5583905 RMD160 c3095a4776367496f895b8075fda373568f01878 SHA1 7c2cbd42d27e26580cd4923892197b84b2a90675 SHA256 e6999b81ac367d85ffb0f69b6c4a0ef96f95dc154efd3592f9cfebacdf75728e
EBUILD cmake-2.8.4-r1.ebuild 4510 RMD160 64efe5aa8c2b68908940ccf922d4754fc1a40d09 SHA1 0ef8f21873968242807661aa4ebb5617bb8e063b SHA256 b4aa824de85f7e74e6ec2c062d1ded1261fad04f3de7fbd0295faf32a6ebda5a
EBUILD cmake-2.8.5-r2.ebuild 4662 RMD160 d0c60d71df4e4ac7b68e5a67e6218945ee2a30e1 SHA1 5f6fde7c9106ccf12c6c317d4ea58c408e979395 SHA256 72a80ae698d517fa66e4ad72e0e32b825be3f265d7666c29324c89613dceea99
EBUILD cmake-2.8.5.ebuild 4553 RMD160 be92e42ac98a4cf72296e17cb5d3f3a6cdf4ee6f SHA1 9566c96f2a274250e5fb2ef92b69070e3e136c08 SHA256 85110a3edcd14ab4cd92558cc23932e9345aa15e2551733446b1633bbdab2f4f
-MISC ChangeLog 27173 RMD160 8538b531bcc6c47c0e9ad2d953149042d20d5642 SHA1 3f129e4015e943fec772f28935e7595a1ca9ebe9 SHA256 0f6fbae66432f7419d14cf9a253d28bd48a14b4ed6f167a96f64e5a377509617
+EBUILD cmake-2.8.6-r1.ebuild 4612 RMD160 c959f6d4611d102f6d11df08445e2fd7c67f2f29 SHA1 6a57dead1f38b5ebc50a1b60149caee88cf39de6 SHA256 706b1862f603b778b5d10ac074b6b3d82f952acee6d2626f8b7d18492f802ee9
+MISC ChangeLog 27392 RMD160 5b19078de24e8853ab833f17ce87ae04038cb358 SHA1 c18ae69b2bdafd01e0c62f1c9cf5054397fc599c SHA256 86b5c25fec9d78f9afcd51c22ae917591dcc4bb54dfec0020a47f7e93de5c140
MISC metadata.xml 157 RMD160 09fb7b798f3f68127626e97c69e5215a0513ecbb SHA1 d5ffebb2f4248fc8f65ab21c3af6e4f5dbf8bf6e SHA256 01f6fa4357ce08e8b0f7900a51fa78c7f060fefc7c7da98acaec1e283dd59892
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (GNU/Linux)
-iQIcBAEBCgAGBQJOI/cCAAoJEEb+UGWnxTyHYzYP/i5YuR8tyscsiR/Dq+WQMjiY
-PLwct5Z2SzNPu5w45z9BoO/+lROnNupXzaqSSzKiTridte3oLm3OgdckwGWi5Exw
-xCkes7D+wFwWd9oQN2Qpyp68P3Zj925poc5clr6lx7Pscfpr633+7lpUzlnlJBPc
-92KnVhQR3d9oBtHRyvbxPCnhjn59D8Pu2/RfrNEz7UMVdHu46aKB1T7pbvxqDxJz
-mNWPRalQk5PgNMBXAuyxl9WX+egREdAOZGTB8QaUBpQduYccR3W1MnQXqOzoYIyV
-XLsbRVMKuCOlHIkliHTOipqSGq0X7GuiRTMQFmi28WntGUdq0MuvwNmAp+Afj30n
-nuvN1GR4+9x5FvgjXh5nVrl4Me2ylVK8FvB1jeVg/j69Fngqa+1tZrdMuw3ZfTXu
-uK6c80Lv8hjb0Zg0LSP1YeIWxAyG17FLA7Wjoyuy4EpZrK6k7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General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-util/cmake/cmake-2.8.6-r1.ebuild,v 1.1 2011/10/15 15:06:12 dilfridge Exp $
+
+EAPI=4
+
+CMAKE_REMOVE_MODULES="no"
+inherit elisp-common toolchain-funcs eutils versionator flag-o-matic base cmake-utils virtualx
+
+MY_P="${PN}-$(replace_version_separator 3 - ${MY_PV})"
+
+DESCRIPTION="Cross platform Make"
+HOMEPAGE="http://www.cmake.org/"
+SRC_URI="http://www.cmake.org/files/v$(get_version_component_range 1-2)/${MY_P}.tar.gz"
+
+LICENSE="CMake"
+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"
+SLOT="0"
+IUSE="emacs ncurses qt4 vim-syntax"
+
+DEPEND="
+ >=app-arch/libarchive-2.8.0
+ >=net-misc/curl-7.20.0-r1[ssl]
+ >=dev-libs/expat-2.0.1
+ dev-util/pkgconfig
+ sys-libs/zlib
+ ncurses? ( sys-libs/ncurses )
+ qt4? ( x11-libs/qt-gui:4 )
+"
+RDEPEND="${DEPEND}
+ emacs? ( virtual/emacs )
+ vim-syntax? (
+ || (
+ app-editors/vim
+ app-editors/gvim
+ )
+ )
+"
+
+SITEFILE="50${PN}-gentoo.el"
+VIMFILE="${PN}.vim"
+
+S="${WORKDIR}/${MY_P}"
+
+CMAKE_BINARY="${S}/Bootstrap.cmk/cmake"
+
+# Fixme:
+# Boost patchset is foobared and should respect eselect / slotting
+PATCHES=(
+ "${FILESDIR}"/${PN}-2.6.3-darwin-bundle.patch
+ "${FILESDIR}"/${PN}-2.6.3-no-duplicates-in-rpath.patch
+ "${FILESDIR}"/${PN}-2.6.3-fix_broken_lfs_on_aix.patch
+ "${FILESDIR}"/${PN}-2.8.0-darwin-default-install_name.patch
+ "${FILESDIR}"/${PN}-2.8.1-libform.patch
+ "${FILESDIR}"/${PN}-2.8.4-FindPythonLibs.patch
+ "${FILESDIR}"/${PN}-2.8.3-more-no_host_paths.patch
+ "${FILESDIR}"/${PN}-2.8.3-ruby_libname.patch
+ "${FILESDIR}"/${PN}-2.8.4-FindBoost.patch
+ "${FILESDIR}"/${PN}-2.8.6-FindBLAS.patch
+ "${FILESDIR}"/${PN}-2.8.6-FindLAPACK.patch
+)
+cmake_src_bootstrap() {
+ # Cleanup args to extract only JOBS.
+ # Because bootstrap does not know anything else.
+ echo ${MAKEOPTS} | egrep -o '(\-j|\-\-jobs)(=?|[[:space:]]*)[[:digit:]]+' > /dev/null
+ if [ $? -eq 0 ]; then
+ par_arg=$(echo ${MAKEOPTS} | egrep -o '(\-j|\-\-jobs)(=?|[[:space:]]*)[[:digit:]]+' | egrep -o '[[:digit:]]+')
+ par_arg="--parallel=${par_arg}"
+ else
+ par_arg="--parallel=1"
+ fi
+
+ tc-export CC CXX LD
+
+ ./bootstrap \
+ --prefix="${T}/cmakestrap/" \
+ ${par_arg} \
+ || die "Bootstrap failed"
+}
+
+cmake_src_test() {
+ # fix OutDir test
+ # this is altered thanks to our eclass
+ sed -i -e 's:#IGNORE ::g' "${S}"/Tests/OutDir/CMakeLists.txt || die
+ pushd "${CMAKE_BUILD_DIR}" > /dev/null
+ # Excluded tests:
+ # BootstrapTest: we actualy bootstrap it every time so why test it.
+ # SimpleCOnly_sdcc: sdcc choke on global cflags so just skip the test
+ # as it was never intended to be used this way.
+ "${CMAKE_BUILD_DIR}"/bin/ctest \
+ -E BootstrapTest SimpleCOnly_sdcc \
+ || die "Tests failed"
+ popd > /dev/null
+}
+
+src_prepare() {
+ base_src_prepare
+
+ # disable running of cmake in boostrap command
+ sed -i \
+ -e '/"${cmake_bootstrap_dir}\/cmake"/s/^/#DONOTRUN /' \
+ bootstrap || die "sed failed"
+
+ # Add gcc libs to the default link paths
+ sed -i \
+ -e "s|@GENTOO_PORTAGE_GCCLIBDIR@|${EPREFIX}/usr/${CHOST}/lib/|g" \
+ -e "s|@GENTOO_PORTAGE_EPREFIX@|${EPREFIX}/|g" \
+ Modules/Platform/{UnixPaths,Darwin}.cmake || die "sed failed"
+
+ cmake_src_bootstrap
+}
+
+src_configure() {
+ # make things work with gentoo java setup
+ # in case java-config cannot be run, the variable just becomes unset
+ # per bug #315229
+ export JAVA_HOME=$(java-config -g JAVA_HOME 2> /dev/null)
+
+ local mycmakeargs=(
+ -DCMAKE_USE_SYSTEM_LIBRARIES=ON
+ -DCMAKE_INSTALL_PREFIX="${EPREFIX}"/usr
+ -DCMAKE_DOC_DIR=/share/doc/${PF}
+ -DCMAKE_MAN_DIR=/share/man
+ -DCMAKE_DATA_DIR=/share/${PN}
+ $(cmake-utils_use_build ncurses CursesDialog)
+ $(cmake-utils_use_build qt4 QtDialog)
+ )
+ cmake-utils_src_configure
+}
+
+src_compile() {
+ cmake-utils_src_compile
+ use emacs && elisp-compile Docs/cmake-mode.el
+}
+
+src_test() {
+ VIRTUALX_COMMAND="cmake_src_test" virtualmake
+}
+
+src_install() {
+ cmake-utils_src_install
+ if use emacs; then
+ elisp-install ${PN} Docs/cmake-mode.el Docs/cmake-mode.elc
+ elisp-site-file-install "${FILESDIR}/${SITEFILE}"
+ fi
+ if use vim-syntax; then
+ insinto /usr/share/vim/vimfiles/syntax
+ doins Docs/cmake-syntax.vim
+
+ insinto /usr/share/vim/vimfiles/indent
+ doins Docs/cmake-indent.vim
+
+ insinto /usr/share/vim/vimfiles/ftdetect
+ doins "${FILESDIR}/${VIMFILE}"
+ fi
+}
+
+pkg_postinst() {
+ use emacs && elisp-site-regen
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}
--- /dev/null
+--- cmake-2.8.6.orig/Modules/FindBLAS.cmake 2011-10-09 23:32:55.096356973 +0800
++++ cmake-2.8.6/Modules/FindBLAS.cmake 2011-10-09 23:35:10.235667390 +0800
+@@ -1,3 +1,9 @@
++#
++# Version modified for Gentoo Linux
++# If a valid PkgConfig configuration for blas is found, this overrides and cancels
++# all further checks.
++#
++
+ # - Find BLAS library
+ # This module finds an installed fortran library that implements the BLAS
+ # linear-algebra interface (see http://www.netlib.org/blas/).
+@@ -39,6 +45,14 @@
+ # (To distribute this file outside of CMake, substitute the full
+ # License text for the above reference.)
+
++#
++# first, try PkgConfig
++#
++find_package(PkgConfig REQUIRED)
++pkg_check_modules(BLAS blas)
++if(NOT BLAS_FOUND)
++message(STATUS "No PkgConfig configuration for BLAS found; starting more extensive search.")
++
+ include(CheckFunctionExists)
+ include(CheckFortranFunctionExists)
+
+@@ -621,4 +635,6 @@
+ endif(NOT BLAS_FIND_QUIETLY)
+ endif(BLA_F95)
+
++endif(NOT BLAS_FOUND)
++
+ set(CMAKE_FIND_LIBRARY_SUFFIXES ${_blas_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES})
--- /dev/null
+--- cmake-2.8.6.orig/Modules/FindLAPACK.cmake 2011-10-09 23:38:48.956933106 +0800
++++ cmake-2.8.6/Modules/FindLAPACK.cmake 2011-10-09 23:39:52.002144646 +0800
+@@ -1,3 +1,9 @@
++#
++# Version modified for Gentoo Linux
++# If a valid PkgConfig configuration is found, this overrides and cancels
++# all further checks.
++#
++
+ # - Find LAPACK library
+ # This module finds an installed fortran library that implements the LAPACK
+ # linear-algebra interface (see http://www.netlib.org/lapack/).
+@@ -36,6 +42,14 @@
+ # (To distribute this file outside of CMake, substitute the full
+ # License text for the above reference.)
+
++#
++# first, try PkgConfig
++#
++find_package(PkgConfig REQUIRED)
++pkg_check_modules(LAPACK lapack)
++if(NOT LAPACK_FOUND)
++message(STATUS "No PkgConfig configuration for LAPACK found; starting more extensive search.")
++
+ set(_lapack_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
+
+ get_property(_LANGUAGES_ GLOBAL PROPERTY ENABLED_LANGUAGES)
+@@ -304,4 +318,6 @@
+ endif(NOT LAPACK_FIND_QUIETLY)
+ endif(BLA_F95)
+
++endif(NOT LAPACK_FOUND)
++
+ set(CMAKE_FIND_LIBRARY_SUFFIXES ${_lapack_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES})