diff options
Diffstat (limited to 'sys-devel/clang/clang-9999.ebuild')
-rw-r--r-- | sys-devel/clang/clang-9999.ebuild | 79 |
1 files changed, 41 insertions, 38 deletions
diff --git a/sys-devel/clang/clang-9999.ebuild b/sys-devel/clang/clang-9999.ebuild index 9754e207e2c7..5d3c1a6a7e23 100644 --- a/sys-devel/clang/clang-9999.ebuild +++ b/sys-devel/clang/clang-9999.ebuild @@ -1,13 +1,12 @@ # Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-devel/clang/clang-9999.ebuild,v 1.33 2013/01/03 23:36:58 voyageur Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-devel/clang/clang-9999.ebuild,v 1.34 2013/02/02 23:28:27 mgorny Exp $ -EAPI=4 +EAPI=5 -RESTRICT_PYTHON_ABIS="3.*" -SUPPORT_PYTHON_ABIS="1" +PYTHON_COMPAT=( python{2_6,2_7} pypy{1_9,2_0} ) -inherit subversion eutils multilib python +inherit subversion eutils multilib python-r1 DESCRIPTION="C language family frontend for LLVM" HOMEPAGE="http://clang.llvm.org/" @@ -17,10 +16,12 @@ ESVN_REPO_URI="http://llvm.org/svn/llvm-project/cfe/trunk" LICENSE="UoI-NCSA" SLOT="0" KEYWORDS="" -IUSE="debug multitarget +static-analyzer test" +IUSE="debug multitarget python +static-analyzer test" -DEPEND="static-analyzer? ( dev-lang/perl )" -RDEPEND="~sys-devel/llvm-${PV}[debug=,multitarget=]" +DEPEND="static-analyzer? ( dev-lang/perl ) + ${PYTHON_DEPS}" +RDEPEND="~sys-devel/llvm-${PV}[debug=,multitarget=] + ${PYTHON_DEPS}" S="${WORKDIR}/llvm" @@ -53,10 +54,6 @@ src_prepare() { sed -e "/LLVMgold.so/s#lib/#$(get_libdir)/llvm/#" \ -i tools/clang/lib/Driver/Tools.cpp \ || die "gold plugin path sed failed" - # Specify python version - python_convert_shebangs 2 tools/clang/tools/scan-view/scan-view - python_convert_shebangs -r 2 test/Scripts - python_convert_shebangs 2 projects/compiler-rt/lib/asan/scripts/asan_symbolize.py # From llvm src_prepare einfo "Fixing install dirs" @@ -115,13 +112,12 @@ src_test() { echo ">>> Test phase [test]: ${CATEGORY}/${PF}" - testing() { - if ! emake -j1 VERBOSE=1 test; then - has test $FEATURES && die "Make test failed. See above for details." - has test $FEATURES || eerror "Make test failed. See above for details." - fi - } - python_execute_function testing + python_export_best + + if ! emake -j1 VERBOSE=1 test; then + has test $FEATURES && die "Make test failed. See above for details." + has test $FEATURES || eerror "Make test failed. See above for details." + fi } src_install() { @@ -136,19 +132,34 @@ src_install() { insinto /usr/share/${PN} doins tools/scan-build/scanview.css doins tools/scan-build/sorttable.js - - cd tools/scan-view || die "cd scan-view failed" - dobin scan-view - install-scan-view() { - insinto "$(python_get_sitedir)"/clang - doins Reporter.py Resources ScanView.py startfile.py - touch "${ED}"/"$(python_get_sitedir)"/clang/__init__.py - } - python_execute_function install-scan-view fi - # AddressSanitizer symbolizer (currently separate) - dobin "${S}"/projects/compiler-rt/lib/asan/scripts/asan_symbolize.py + python_inst() { + if use static-analyzer ; then + pushd tools/scan-view >/dev/null || die + + python_doscript scan-view + + touch __init__.py || die + python_moduleinto clang + python_domodule __init__.py Reporter.py Resources ScanView.py startfile.py + + popd >/dev/null || die + fi + + if use python ; then + pushd bindings/python/clang >/dev/null || die + + python_moduleinto clang + python_domodule __init__.py cindex.py enumerations.py + + popd >/dev/null || die + fi + + # AddressSanitizer symbolizer (currently separate) + python_doscript "${S}"/projects/compiler-rt/lib/asan/scripts/asan_symbolize.py + } + python_foreach_impl python_inst # Fix install_names on Darwin. The build system is too complicated # to just fix this, so we correct it post-install @@ -173,11 +184,3 @@ src_install() { done fi } - -pkg_postinst() { - python_mod_optimize clang -} - -pkg_postrm() { - python_mod_cleanup clang -} |