diff options
author | Bernard Cafarelli <voyageur@gentoo.org> | 2010-04-26 21:46:54 +0000 |
---|---|---|
committer | Bernard Cafarelli <voyageur@gentoo.org> | 2010-04-26 21:46:54 +0000 |
commit | 645e8def77cef0a900da49761c6aeda9f9385242 (patch) | |
tree | fbc7deb0fbad2a978481a2f3759544d9e1cf1e46 /sys-devel/clang | |
parent | Fix Manifest (diff) | |
download | historical-645e8def77cef0a900da49761c6aeda9f9385242.tar.gz historical-645e8def77cef0a900da49761c6aeda9f9385242.tar.bz2 historical-645e8def77cef0a900da49761c6aeda9f9385242.zip |
python support enhancements, grabbed from my in-progress 2.7_pre2 ebuild
Package-Manager: portage-2.2_rc67/cvs/Linux x86_64
Diffstat (limited to 'sys-devel/clang')
-rw-r--r-- | sys-devel/clang/ChangeLog | 7 | ||||
-rw-r--r-- | sys-devel/clang/Manifest | 3 | ||||
-rw-r--r-- | sys-devel/clang/clang-2.6-r3.ebuild | 134 |
3 files changed, 142 insertions, 2 deletions
diff --git a/sys-devel/clang/ChangeLog b/sys-devel/clang/ChangeLog index 188ac7ff4b0d..d3927fdb8402 100644 --- a/sys-devel/clang/ChangeLog +++ b/sys-devel/clang/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for sys-devel/clang # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-devel/clang/ChangeLog,v 1.10 2010/03/18 21:33:10 voyageur Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-devel/clang/ChangeLog,v 1.11 2010/04/26 21:46:54 voyageur Exp $ + +*clang-2.6-r3 (26 Apr 2010) + + 26 Apr 2010; Bernard Cafarelli <voyageur@gentoo.org> +clang-2.6-r3.ebuild: + python support enhancements, grabbed from my in-progress 2.7_pre2 ebuild *clang-2.6-r2 (18 Mar 2010) diff --git a/sys-devel/clang/Manifest b/sys-devel/clang/Manifest index 96171ea08cba..be8c40aba035 100644 --- a/sys-devel/clang/Manifest +++ b/sys-devel/clang/Manifest @@ -3,5 +3,6 @@ AUX llvm-2.6-cflags.patch 1177 RMD160 9c9061834d87357930d3ea1ef9f56a355885acb9 S DIST clang-2.6.tar.gz 3857138 RMD160 b7e44abbf28902ff8e3fd4578a5ff9dd34f40817 SHA1 188f29ad3b2c64fcdc791aa34b323ed06452d7ae SHA256 98e22f4f5877fb3c73abb9ddcb3065ba9c94a21146387da7f905e6fd559d39ea DIST llvm-2.6.tar.gz 7790380 RMD160 24d58cb052ab5879aae59eaf4885ec41186ee22a SHA1 547471147cbf6d3e49539e01196ffada2c79c250 SHA256 4cd9257350c5ff8b9b139d19497e2396c0604eef0e5d6504f5c1463b09bf2d84 EBUILD clang-2.6-r2.ebuild 3918 RMD160 f30347c7512806c87fc64abd6e67a429d083d8d8 SHA1 25db8c502f95726c4544c22ff2ed4c498fdf834d SHA256 02d59e2da34283b08ef03d9d56fcdb4f916d42cf367b49e8067e356615de4c98 -MISC ChangeLog 1804 RMD160 af27ff495d6755e244c790a9f52f504157c8d9c0 SHA1 7a72da2090e94cd5e227dfa2c11cf709ebab6ef5 SHA256 1039a5b97cd792076bb0744cf0cb7536f505f53a8d83771d0f65c81e3a41eaf2 +EBUILD clang-2.6-r3.ebuild 4015 RMD160 333fa2955e6107c2ede5b6e3e9f1dd858fa91cbe SHA1 90df79453f19d3b93f3fa771c7a71e2991688492 SHA256 d3930b82440df0623ff0a42b3077978dac7bc4d1937142a16b46e7e2b1f81f41 +MISC ChangeLog 1986 RMD160 ffea9c49010d2fd29d815d8ddceb373fbbc1aa87 SHA1 a86819da86a701bebaeb20ec580ee3de8bc3766e SHA256 c82668e59ff9a7ca823563cc02669ba32731d34af1d203060eefab96442d2dfd MISC metadata.xml 1098 RMD160 472ed702bea452e68447b59908bc9279bbb890dd SHA1 ef26faea642b17778814391ccd3016f933ec8e12 SHA256 2d18687396a420ad6aa7179f1104b90962514d2fcf94e3838ce82cd109b359c0 diff --git a/sys-devel/clang/clang-2.6-r3.ebuild b/sys-devel/clang/clang-2.6-r3.ebuild new file mode 100644 index 000000000000..919cd9dc6c73 --- /dev/null +++ b/sys-devel/clang/clang-2.6-r3.ebuild @@ -0,0 +1,134 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-devel/clang/clang-2.6-r3.ebuild,v 1.1 2010/04/26 21:46:54 voyageur Exp $ + +EAPI=2 + +RESTRICT_PYTHON_ABIS="3.*" +SUPPORT_PYTHON_ABIS="1" + +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 "/PROJ_headers/s#lib/clang/1.0#$(get_libdir)/clang/1.0#" \ + -i 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 tools/clang/tools/scan-view/scan-view \ + || die "scan-view sed failed" + sed -e "/scanview.css\|sorttable.js/s#\$RealBin#/usr/share/${PN}#" \ + -i tools/clang/utils/scan-build \ + || die "scan-build sed failed" + # Specify python version + python_convert_shebangs 2 tools/clang/tools/scan-view/scan-view + # Broken test in 2.6, http://llvm.org/bugs/show_bug.cgi?id=5111 + rm tools/clang/test/Analysis/retain-release.m + + # 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" + + # Do not force -O3 -fomit-frame-pointer on users, from llvm ebuild + epatch "${FILESDIR}"/llvm-2.6-cflags.patch +} + +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 + + # Skip llvm-gcc parts even if installed + CONF_FLAGS="${CONF_FLAGS} --with-llvmgccdir=/dev/null" + + 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" + + echo ">>> 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 + install-scan-view() { + insinto "$(python_get_sitedir)"/clang + doins Reporter.py Resources ScanView.py startfile.py + touch "${D}"/"$(python_get_sitedir)"/clang/__init__.py + } + python_execute_function install-scan-view + fi +} + +pkg_postinst() { + python_mod_optimize clang +} + +pkg_postrm() { + python_mod_cleanup clang +} |