--- /usr/portage/sys-devel/clang/clang-3.1-r5.ebuild 2012-08-30 14:01:29.000000000 +0400 +++ clang-3.1-r7.ebuild 2012-11-17 00:26:34.000000000 +0400 @@ -19,9 +19,10 @@ LICENSE="UoI-NCSA" SLOT="0" KEYWORDS="~amd64 ~arm ~x86 ~amd64-fbsd ~x64-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos" -IUSE="debug kernel_FreeBSD multitarget +static-analyzer test" +IUSE="debug +doc kernel_FreeBSD multitarget +python static-analyzer test" -DEPEND="static-analyzer? ( dev-lang/perl )" +DEPEND="static-analyzer? ( dev-lang/perl ) + doc? ( app-doc/doxygen )" RDEPEND="~sys-devel/llvm-${PV}[multitarget=]" S=${WORKDIR}/llvm-${PV}.src @@ -125,7 +126,7 @@ } src_compile() { - emake VERBOSE=1 KEEP_SYMBOLS=1 REQUIRES_RTTI=1 clang-only + emake KEEP_SYMBOLS=1 REQUIRES_RTTI=1 clang-only } src_test() { @@ -148,6 +149,15 @@ src_install() { cd "${S}"/tools/clang || die "cd clang failed" emake KEEP_SYMBOLS=1 DESTDIR="${D}" install + # ATTENTION There is some BUG in a clang Makefiles: doxygened htmls won't + # install w/ `make install`... + if use doc; then + cd "${S}"/tools/clang/docs || die "cd clang/docs failed" + emake ENABLE_DOXYGEN=1 BUILD_FOR_WEBSITE=1 DESTDIR="${D}" install-doxygen + cd .. + # TODO `make install-doxygen` in clang is UGLY! Need to clean *.md5 and *.map + # files from installed API documentation! + fi if use static-analyzer ; then dobin tools/scan-build/ccc-analyzer @@ -168,6 +178,15 @@ python_execute_function install-scan-view fi + if use python; then + cd ${S}/tools/clang/bindings/python/clang + install-cindex() { + insinto "$(python_get_sitedir)"/clang + doins cindex.py __init__.py + } + python_execute_function install-cindex + fi + # Fix install_names on Darwin. The build system is too complicated # to just fix this, so we correct it post-install if [[ ${CHOST} == *-darwin* ]] ; then