public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] gentoo-x86 commit in sys-devel/clang: ChangeLog clang-2.6-r1.ebuild clang-2.6.ebuild
@ 2009-10-27 12:12 Bernard Cafarelli (voyageur)
  0 siblings, 0 replies; only message in thread
From: Bernard Cafarelli (voyageur) @ 2009-10-27 12:12 UTC (permalink / raw
  To: gentoo-commits

voyageur    09/10/27 12:12:35

  Modified:             ChangeLog
  Added:                clang-2.6-r1.ebuild
  Removed:              clang-2.6.ebuild
  Log:
  Install missing files for static analyzer, bug #290697
  (Portage version: 2.2_rc46/cvs/Linux x86_64)

Revision  Changes    Path
1.5                  sys-devel/clang/ChangeLog

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-devel/clang/ChangeLog?rev=1.5&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-devel/clang/ChangeLog?rev=1.5&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-devel/clang/ChangeLog?r1=1.4&r2=1.5

Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/sys-devel/clang/ChangeLog,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- ChangeLog	26 Oct 2009 20:08:58 -0000	1.4
+++ ChangeLog	27 Oct 2009 12:12:35 -0000	1.5
@@ -1,6 +1,12 @@
 # ChangeLog for sys-devel/clang
 # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-devel/clang/ChangeLog,v 1.4 2009/10/26 20:08:58 voyageur Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/clang/ChangeLog,v 1.5 2009/10/27 12:12:35 voyageur Exp $
+
+*clang-2.6-r1 (27 Oct 2009)
+
+  27 Oct 2009; Bernard Cafarelli <voyageur@gentoo.org> -clang-2.6.ebuild,
+  +clang-2.6-r1.ebuild:
+  Install missing files for static analyzer, bug #290697
 
   26 Oct 2009; Bernard Cafarelli <voyageur@gentoo.org> clang-2.6.ebuild:
   Add some comments, fix running tests. Now about 50 of them fail not



1.1                  sys-devel/clang/clang-2.6-r1.ebuild

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-devel/clang/clang-2.6-r1.ebuild?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-devel/clang/clang-2.6-r1.ebuild?rev=1.1&content-type=text/plain

Index: clang-2.6-r1.ebuild
===================================================================
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-devel/clang/clang-2.6-r1.ebuild,v 1.1 2009/10/27 12:12:35 voyageur Exp $

EAPI=2
inherit eutils python

DESCRIPTION="C language family frontend for LLVM"
HOMEPAGE="http://clang.llvm.org/"
# Fetching LLVM as well: see http://llvm.org/bugs/show_bug.cgi?id=4840
SRC_URI="http://llvm.org/releases/${PV}/llvm-${PV}.tar.gz
	http://llvm.org/releases/${PV}/${P}.tar.gz"

LICENSE="UoI-NCSA"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="debug +static-analyzer test"

# Note: for LTO support, clang will depend on binutils with gold plugins, and LLVM built after that - http://llvm.org/docs/GoldPlugin.html
DEPEND="static-analyzer? ( dev-lang/perl )
	test? ( dev-util/dejagnu )"
RDEPEND="~sys-devel/llvm-${PV}"

S="${WORKDIR}/llvm-2.6"

src_prepare() {
	mv "${WORKDIR}"/clang-2.6 "${S}"/tools/clang || die "clang source directory not found"

	# Same as llvm doc patches
	epatch "${FILESDIR}"/${PN}-2.6-fixdoc.patch

	# multilib-strict
	sed -e "s#lib/clang/1.0#$(get_libdir)/clang/1.0#" \
		-i "${S}"/tools/clang/lib/Headers/Makefile \
		|| die "clang Makefile failed"
	# fix the static analyzer for in-tree install
	sed -e 's/import ScanView/from clang \0/'  \
		-i "${S}"/tools/clang/tools/scan-view/scan-view \
		|| die "scan-view sed failed"
	sed -e "/scanview.css\|sorttable.js/s#\$RealBin#/usr/share/${PN}#" \
		-i "${S}"/tools/clang/utils/scan-build \
		|| die "scan-build sed failed"

	# From llvm src_prepare
	einfo "Fixing install dirs"
	sed -e 's,^PROJ_docsdir.*,PROJ_docsdir := $(DESTDIR)$(PROJ_prefix)/share/doc/'${PF}, \
		-e 's,^PROJ_etcdir.*,PROJ_etcdir := $(DESTDIR)/etc/llvm,' \
		-e 's,^PROJ_libdir.*,PROJ_libdir := $(DESTDIR)/usr/'$(get_libdir), \
		-i Makefile.config.in || die "Makefile.config sed failed"

	einfo "Fixing rpath"
	sed -e 's/\$(RPATH) -Wl,\$(\(ToolDir\|LibDir\))//g' -i Makefile.rules \
		|| die "rpath sed failed"
}

src_configure() {
	local CONF_FLAGS=""

	if use debug; then
		CONF_FLAGS="${CONF_FLAGS} --disable-optimized"
		einfo "Note: Compiling LLVM in debug mode will create huge and slow binaries"
		# ...and you probably shouldn't use tmpfs, unless it can hold 900MB
	else
		CONF_FLAGS="${CONF_FLAGS} \
			--enable-optimized \
			--disable-assertions \
			--disable-expensive-checks"
	fi

	if use amd64; then
		CONF_FLAGS="${CONF_FLAGS} --enable-pic"
	fi

	econf ${CONF_FLAGS} || die "econf failed"
}

src_compile() {
	emake VERBOSE=1 KEEP_SYMBOLS=1  clang-only || die "emake failed"
}

src_test() {
	cd "${S}"/tools/clang || die "cd clang failed"

	# 20091026: many tests fail not finding headers?
	vecho ">>> Test phase [test]: ${CATEGORY}/${PF}"
	if ! emake -j1 VERBOSE=1 test; then
		hasq test $FEATURES && die "Make test failed. See above for details."
		hasq test $FEATURES || eerror "Make test failed. See above for details."
	fi
}

src_install() {
	cd "${S}"/tools/clang || die "cd clang failed"
	emake KEEP_SYMBOLS=1 DESTDIR="${D}" install || die "install failed"

	if use static-analyzer ; then
		dobin utils/ccc-analyzer
		dobin utils/scan-build

		insinto /usr/share/${PN}
		doins utils/scanview.css
		doins utils/sorttable.js

		cd tools/scan-view || "die cd scan-view failed"
		dobin scan-view
		python_version
		insinto /usr/$(get_libdir)/python${PYVER}/site-packages/clang
		doins Reporter.py Resources ScanView.py startfile.py
		touch "${D}"/usr/$(get_libdir)/python${PYVER}/site-packages/clang/__init__.py
	fi
}

pkg_postinst() {
	python_version
	python_mod_optimize /usr/$(get_libdir)/python${PYVER}/site-packages/clang
}

pkg_postrm() {
	python_mod_cleanup
}






^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-10-27 12:12 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-27 12:12 [gentoo-commits] gentoo-x86 commit in sys-devel/clang: ChangeLog clang-2.6-r1.ebuild clang-2.6.ebuild Bernard Cafarelli (voyageur)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox