/[gentoo-x86]/dev-util/cmake/cmake-2.8.7-r5.ebuild
Gentoo

Contents of /dev-util/cmake/cmake-2.8.7-r5.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.12 - (hide annotations) (download)
Sun Sep 9 19:00:02 2012 UTC (6 years ago) by johu
Branch: MAIN
CVS Tags: HEAD
Changes since 1.11: +1 -1 lines
FILE REMOVED
Remove old.

(Portage version: 2.2.0_alpha124/cvs/Linux x86_64)

1 dilfridge 1.1 # Copyright 1999-2012 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3 johu 1.12 # $Header: /var/cvsroot/gentoo-x86/dev-util/cmake/cmake-2.8.7-r5.ebuild,v 1.11 2012/07/08 18:16:13 armin76 Exp $
4 dilfridge 1.1
5     EAPI=4
6    
7     CMAKE_REMOVE_MODULES="no"
8     inherit elisp-common toolchain-funcs eutils versionator flag-o-matic base cmake-utils virtualx
9    
10     MY_P="${PN}-$(replace_version_separator 3 - ${MY_PV})"
11    
12     DESCRIPTION="Cross platform Make"
13     HOMEPAGE="http://www.cmake.org/"
14     SRC_URI="http://www.cmake.org/files/v$(get_version_component_range 1-2)/${MY_P}.tar.gz"
15    
16     LICENSE="CMake"
17 armin76 1.11 KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~amd64-fbsd ~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"
18 dilfridge 1.1 SLOT="0"
19     IUSE="emacs ncurses qt4 vim-syntax"
20    
21     DEPEND="
22     >=app-arch/libarchive-2.8.0
23     >=net-misc/curl-7.20.0-r1[ssl]
24     >=dev-libs/expat-2.0.1
25 jdhore 1.3 virtual/pkgconfig
26 dilfridge 1.1 sys-libs/zlib
27     ncurses? ( sys-libs/ncurses )
28     qt4? ( x11-libs/qt-gui:4 )
29     "
30     RDEPEND="${DEPEND}
31     emacs? ( virtual/emacs )
32     vim-syntax? (
33     || (
34     app-editors/vim
35     app-editors/gvim
36     )
37     )
38     "
39    
40 kensington 1.10 # bug 390533
41     RESTRICT="test"
42    
43 dilfridge 1.1 SITEFILE="50${PN}-gentoo.el"
44     VIMFILE="${PN}.vim"
45    
46     S="${WORKDIR}/${MY_P}"
47    
48     CMAKE_BINARY="${S}/Bootstrap.cmk/cmake"
49    
50     # Fixme:
51     # Boost patchset is foobared and should respect eselect / slotting
52     PATCHES=(
53     "${FILESDIR}"/${PN}-2.6.3-darwin-bundle.patch
54     "${FILESDIR}"/${PN}-2.6.3-no-duplicates-in-rpath.patch
55     "${FILESDIR}"/${PN}-2.6.3-fix_broken_lfs_on_aix.patch
56     "${FILESDIR}"/${PN}-2.8.0-darwin-default-install_name.patch
57     "${FILESDIR}"/${PN}-2.8.1-libform.patch
58     "${FILESDIR}"/${PN}-2.8.4-FindPythonLibs.patch
59     "${FILESDIR}"/${PN}-2.8.3-more-no_host_paths.patch
60     "${FILESDIR}"/${PN}-2.8.4-FindBoost.patch
61     "${FILESDIR}"/${PN}-2.8.7-FindBoost-python.patch
62     "${FILESDIR}"/${PN}-2.8.7-FindOpenMP.patch
63     "${FILESDIR}"/${PN}-2.8.7-FindBLAS.patch
64     "${FILESDIR}"/${PN}-2.8.7-FindLAPACK.patch
65     )
66     cmake_src_bootstrap() {
67     # Cleanup args to extract only JOBS.
68     # Because bootstrap does not know anything else.
69     echo ${MAKEOPTS} | egrep -o '(\-j|\-\-jobs)(=?|[[:space:]]*)[[:digit:]]+' > /dev/null
70     if [ $? -eq 0 ]; then
71     par_arg=$(echo ${MAKEOPTS} | egrep -o '(\-j|\-\-jobs)(=?|[[:space:]]*)[[:digit:]]+' | egrep -o '[[:digit:]]+')
72     par_arg="--parallel=${par_arg}"
73     else
74     par_arg="--parallel=1"
75     fi
76    
77     tc-export CC CXX LD
78    
79     ./bootstrap \
80     --prefix="${T}/cmakestrap/" \
81     ${par_arg} \
82     || die "Bootstrap failed"
83     }
84    
85     cmake_src_test() {
86     # fix OutDir test
87     # this is altered thanks to our eclass
88     sed -i -e 's:#IGNORE ::g' "${S}"/Tests/OutDir/CMakeLists.txt || die
89    
90     pushd "${CMAKE_BUILD_DIR}" > /dev/null
91    
92     local ctestargs
93     [[ -n ${TEST_VERBOSE} ]] && ctestargs="--extra-verbose --output-on-failure"
94    
95     # Excluded tests:
96     # BootstrapTest: we actualy bootstrap it every time so why test it.
97     # SimpleCOnly_sdcc: sdcc choke on global cflags so just skip the test
98     # as it was never intended to be used this way.
99     "${CMAKE_BUILD_DIR}"/bin/ctest ${ctestargs} \
100     -E BootstrapTest SimpleCOnly_sdcc \
101     || die "Tests failed"
102    
103     popd > /dev/null
104     }
105    
106     pkg_setup() {
107     einfo "Fixing java access violations ..."
108     # bug 387227
109     addpredict /proc/self/coredump_filter
110     }
111    
112     src_prepare() {
113     base_src_prepare
114    
115     # disable running of cmake in boostrap command
116     sed -i \
117     -e '/"${cmake_bootstrap_dir}\/cmake"/s/^/#DONOTRUN /' \
118     bootstrap || die "sed failed"
119    
120     # Add gcc libs to the default link paths
121     sed -i \
122     -e "s|@GENTOO_PORTAGE_GCCLIBDIR@|${EPREFIX}/usr/${CHOST}/lib/|g" \
123     -e "s|@GENTOO_PORTAGE_EPREFIX@|${EPREFIX}/|g" \
124     Modules/Platform/{UnixPaths,Darwin}.cmake || die "sed failed"
125    
126     cmake_src_bootstrap
127     }
128    
129     src_configure() {
130     # make things work with gentoo java setup
131     # in case java-config cannot be run, the variable just becomes unset
132     # per bug #315229
133     export JAVA_HOME=$(java-config -g JAVA_HOME 2> /dev/null)
134    
135     local mycmakeargs=(
136     -DCMAKE_USE_SYSTEM_LIBRARIES=ON
137     -DCMAKE_INSTALL_PREFIX="${EPREFIX}"/usr
138     -DCMAKE_DOC_DIR=/share/doc/${PF}
139     -DCMAKE_MAN_DIR=/share/man
140     -DCMAKE_DATA_DIR=/share/${PN}
141     $(cmake-utils_use_build ncurses CursesDialog)
142     $(cmake-utils_use_build qt4 QtDialog)
143     )
144     cmake-utils_src_configure
145     }
146    
147     src_compile() {
148     cmake-utils_src_compile
149     use emacs && elisp-compile Docs/cmake-mode.el
150     }
151    
152     src_test() {
153     VIRTUALX_COMMAND="cmake_src_test" virtualmake
154     }
155    
156     src_install() {
157     cmake-utils_src_install
158     if use emacs; then
159     elisp-install ${PN} Docs/cmake-mode.el Docs/cmake-mode.elc
160     elisp-site-file-install "${FILESDIR}/${SITEFILE}"
161     fi
162     if use vim-syntax; then
163     insinto /usr/share/vim/vimfiles/syntax
164     doins Docs/cmake-syntax.vim
165    
166     insinto /usr/share/vim/vimfiles/indent
167     doins Docs/cmake-indent.vim
168    
169     insinto /usr/share/vim/vimfiles/ftdetect
170     doins "${FILESDIR}/${VIMFILE}"
171     fi
172     }
173    
174     pkg_postinst() {
175     use emacs && elisp-site-regen
176     }
177    
178     pkg_postrm() {
179     use emacs && elisp-site-regen
180     }

  ViewVC Help
Powered by ViewVC 1.1.20