diff options
author | Bernard Cafarelli <voyageur@gentoo.org> | 2013-06-10 21:58:09 +0000 |
---|---|---|
committer | Bernard Cafarelli <voyageur@gentoo.org> | 2013-06-10 21:58:09 +0000 |
commit | a7107525fe5529ab2f0ffa19a354702b35e88522 (patch) | |
tree | a93960041c278563f0a3ae52d214712702793a30 /sys-devel/clang | |
parent | 3.3_rc bump, fix live ebuild test call (diff) | |
download | historical-a7107525fe5529ab2f0ffa19a354702b35e88522.tar.gz historical-a7107525fe5529ab2f0ffa19a354702b35e88522.tar.bz2 historical-a7107525fe5529ab2f0ffa19a354702b35e88522.zip |
3.3_rc bump
Package-Manager: portage-2.2.0_alpha179/cvs/Linux x86_64
Manifest-Sign-Key: 0xC74525F2
Diffstat (limited to 'sys-devel/clang')
-rw-r--r-- | sys-devel/clang/ChangeLog | 7 | ||||
-rw-r--r-- | sys-devel/clang/Manifest | 12 | ||||
-rw-r--r-- | sys-devel/clang/clang-3.3_rc3.ebuild | 202 |
3 files changed, 216 insertions, 5 deletions
diff --git a/sys-devel/clang/ChangeLog b/sys-devel/clang/ChangeLog index 79a1c31c2e08..b223fb044e05 100644 --- a/sys-devel/clang/ChangeLog +++ b/sys-devel/clang/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for sys-devel/clang # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-devel/clang/ChangeLog,v 1.86 2013/05/24 21:27:58 aballier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-devel/clang/ChangeLog,v 1.87 2013/06/10 21:57:45 voyageur Exp $ + +*clang-3.3_rc3 (10 Jun 2013) + + 10 Jun 2013; Bernard Cafarelli <voyageur@gentoo.org> +clang-3.3_rc3.ebuild: + 3.3_rc bump 24 May 2013; Alexis Ballier <aballier@gentoo.org> clang-3.2.ebuild: rekeyword ~amd64-fbsd: c++ include search for gcc ones is broken but works diff --git a/sys-devel/clang/Manifest b/sys-devel/clang/Manifest index c5e0577648da..8b88908b1ad0 100644 --- a/sys-devel/clang/Manifest +++ b/sys-devel/clang/Manifest @@ -21,6 +21,7 @@ AUX clang-3.1-gentoo-freebsd-fix-cxx-paths-v2.patch 8033 SHA256 ab6206b70185c7dd AUX clang-3.1-gentoo-freebsd-fix-lib-path.patch 646 SHA256 4e0ac4fd0d5ce22d055c010d6696f8e625cfe56b10e26dc6575c81084c151751 SHA512 6acf39f94a6b60be8efbfc129c7c1b7acdad6e7380b216e195297a870f5701d6501b54499dc67b2a2a698c27a3b96da8170977290045b677495bc3842ba2008f WHIRLPOOL d6c3e405ccb3a787a599eec9af9fadf85d98430cd3a1d458a0b2614c6dad715dd6f8eedfab2ccfc3e27d34c1cd589fbd0a99457478d62924864eb7a0879b00f7 AUX clang-3.1-gentoo-runtime-gcc-detection-v3.patch 1457 SHA256 f4b22281d21e39bc4681519cec90243c0e50262ce56ae68b0a8d9e7d92ce0375 SHA512 81c582791f4b0b1ccfcf3e8c82fbb68312320c5287402236d8c6d2d76767bbba031094c26d2b7bd9581c473896b78dda5a6284c5a87726e1bc0c539ae9294763 WHIRLPOOL bb68797804c89f8797561964697a72a015daf2c951d92f490f8c83f38aac6f50ce1527f39b53ccc6a3d93f84ec8f868e40340a5472b9e7ee4c34ceaa4b9ca845 AUX clang-3.1-increase-parser-recursion-limit.patch 480 SHA256 8c2fce5bbbeac965e0f116533e06a58d1a67df545855b7513c1ab6189596f757 SHA512 20a6caf48c1960883ea43243395e47fc44ce3de162552af89660949374c16a4ec1c651e8bb073feb015a8c3c6684f7e76ead927d58fc8a1b1d606bf89325535d WHIRLPOOL b701661a1bfce3091b6f57c99a790638ee1ced9ff35860c91cf43adf96901f8ead8bd6e984e48fb49f5035e26bd43076e9947b8496f9c9ebc952104548dd690c +DIST cfe-source-3.3rc3.tar.gz 9423822 SHA256 db2b5bdaa3a21632cd0c8fbf59c9cbe0c4688bcb444677bd75c5c8f62f372c6f SHA512 9e57f22a39d6331e6f37d312ab33219d2c0920a23caed1081e2796c17cb8dfd740c60a00f4f966d93e26f8812c19c30df2e62cca787061be5fe5b4d22861b96e WHIRLPOOL 9d16c43b2438fc31d3f6b5f432e9faccf4de8aa0eba9851d47d91b7fb9090ee6b3e52aef93125c6222b6bf24f475e5525306d4e12dcff4c4f4c14236bef564ab DIST clang-2.8.tgz 5666777 SHA256 ed83481553e6a39a8a2953e89630d881d87833506f096a90f18d93ec2bdee0c1 DIST clang-2.9.tgz 6243772 SHA256 70c41f3f782a71cbaa7bc8d6ea29fce4263ad3e8558dfecc6dc11cdef17909df SHA512 0046b716eae7c398a61fb733239f209b60bdd1817e6724730b9515e7ae765565a1e42a805cc06e6f1393d8254ebc845335b244aff825f3fcce551b958683d8f5 WHIRLPOOL 4c745b7c6a21035595307ba5e2d95c2262a5ca1d52cca413a822186b9d450fec384d514175cf384e35e7169ce41ac5152222fcc9cbee4af85695c78d7cd5492e DIST clang-3.0.tar.gz 7240578 SHA256 b64e72da356d7c3428cfd7ac620d49ec042c84eaee13c26024879f555f4e126d SHA512 0a31a2600cd4555424259331e0762f7fceeb5d828e7792983b2f8ae92bb75b3dc92cf84474e047deb5d4dab46062b4ac6273e6079159052debb76ae69927e517 WHIRLPOOL 521169cc588520090423cd1a2fa639da84e119281bf8260ea4b7b24fd2d8627806a281ddbbba5c378a736fc31279e25f10c4d3a3c81abd2c202970079a949ba5 @@ -28,23 +29,26 @@ DIST clang-3.1.src.tar.gz 8158418 SHA256 ff63e215dcd3e2838ffdea38502f8d35bab17e4 DIST clang-3.2.src.tar.gz 8805311 SHA256 2aaaf03f7c0f6b16fe97ecc81247dc2bf2d4bec7620a77cc74670b7e07ff5658 SHA512 99fc57d19b76c42af9821eaaa762056a926eb68178f6b7dd5e8bf092c9ee201a554b91d760d5a30a57f38102eae340e080ef8c6a39327f6881eda391b20b108d WHIRLPOOL 2cf88d1db0f108d8b8e8b0cf691cca18694ddb00b129dc8c1894fca67b5494a7f53f92ac9401d99ce687c9d8fb30dc267be1e68ee70edc542e998f5486ba8730 DIST compiler-rt-3.1.src.tar.gz 1259340 SHA256 1bd4624e7465b05ea713198f19c1c235bae2d35a411c15a4648300bc74294f5c SHA512 a010ed625ca54383bcc08dba77c4a686aed1c74d70c237a3cd20eafe9c1208f644699a600cbf1d14239db1b05a6d55f026f511f5a1eeec0a68888683c653e6fe WHIRLPOOL 6e21d28b30b52a039d5f16fb5b96238f453b58d5fabffffe0cc181061f619aaec2925bbe9f8af3dfe1ac39002fa52943617f94c44fb21cfe72d7aea460c0de0c DIST compiler-rt-3.2.src.tar.gz 1463061 SHA256 4ac311df0eead459cbb0f0890c06b55dae529ab45827ac73fef40bec632994aa SHA512 ef4223bd2d6051ec93a0943973aa61e7aa3686ac72f9a688d58a8b71deba1a7e64dcf821e0c53937899bbd7ba49218fee4e3649f19362fe59677daee314c063b WHIRLPOOL 176643360f683ddca28e4c77dc4ceb03513cec5cea98455598c934ec3e23bd6949a74852e50e42207c7171eb8013afe366f3b8c92799af66a04739ccebe4ed4e +DIST compiler-rt-source-3.3rc3.tar.gz 1567944 SHA256 e4d4b4598dac8215582b3aa291adc7d20b9984e28569673fd097523cd7ca7dcc SHA512 98223c334da3b47ca8486eac70a778401e7094bf338e7371d19327748d7564aa5b773ceac4bc233ea9f31617ae50fde10fad4e14d013ef405d7fcfdc3fc96cb7 WHIRLPOOL 3b1f1936b66dc7af94193836968b9d3f4a1ad0828d03872d2f92ae33da6524f94471c886ea4a3b22071996891c9b3e814cbdd91228f75037b078a88159fea47b DIST llvm-2.8-r1.tgz 9112527 SHA256 25addb742f1c6cc12877ed0ee924dda962d848368ee095be8e48342ae613d43b SHA512 8688d5cf415e8aef74cca6a14587af36234a6347e2238ac2c0d66805c42926b9399f36390e1a58a4081e902b0904adb818c1a360d5df572dfa893d6f79f5e35a WHIRLPOOL 0da9250e31242b55586c9138089e742aab5d414d5f3412ebf917ae8b9506f984c6134a932be93ec7e4c01c79f6c21d508cb0b2e0ec283419bd4ae4db745430ae DIST llvm-2.9.tgz 9574781 SHA256 661236cfa17428b48cfa9cbb9909f7569c64b8ecd219fd91dbc00e3b557b3779 SHA512 9cb0fa0bb8ac02661fd6f926001a15e0ad4a9660683421dc86b03f1cf5184142c5815f9f9283ee7cdf8d474e01177f83406122253342e0e95ddc878821660070 WHIRLPOOL f7b445b6b5d455f29ca68c342511b8b5e6eedec525af1cc60440c4de544df2332aa241bffca29eda5d2428a3f518e093a626bd45c7f8a9e0656d0f68aef5d9d1 DIST llvm-3.0.tar.gz 10350539 SHA256 519eb11d3499ce99c6ffdb8718651fc91425ed7690eac91c8d6853474f7c0477 SHA512 602bb5590b70cb9138bc19d8c630c62bbabdcb2132215c921fe4bce4e3f74dfc66440b9dcd458ff55a86047cc9cc0417c6563715c133e0db222e4b88f07c13bb WHIRLPOOL 6f4ece3ec747352cd78b08d25c5b1cda91140eb6957d509161e45395e47c074f8d2102bfcaeabcdef8c1f6672f2cf06d88e290667666122da029391b3528d440 DIST llvm-3.1.src.tar.gz 11077429 SHA256 1ea05135197b5400c1f88d00ff280d775ce778f8f9ea042e25a1e1e734a4b9ab SHA512 fb941094601043e405ccc57473414ef92437b09c200e71614f93d8e93b2a58cca8d78c385be037e064b0711cd6268802c774ce4a40fc0ea17bf576305304d2aa WHIRLPOOL c5c72e139296e1c186131f991010f52f958063a4fcfcb1f8527b53a2aaa7edcaca70ab6cf86c25d08640dcf6d720a865fda7dc7eb06cf1ce9c23fd37b5d597ef DIST llvm-3.2.src.tar.gz 12275252 SHA256 125090c4d26740f1d5e9838477c931ed7d9ad70d599ba265f46f3a42cb066343 SHA512 cc66171322dbbe40bcac0e0ea5b09df8ff52df63ded304f841f32f702270d6ab1512216413ee52498c3ebee8cd39c4cd23e3855d591944bc2ac0ae76f5be62cc WHIRLPOOL c3a39b2426293d0251b7769607ade873bb6bf8d54e7c8055773a9b75742bc8e39049fb71409a258c6f3d98775b78c280d4bfe4223ba91e5ed6ecae0eddf910e5 +DIST llvm-source-3.3rc3.tar.gz 13644242 SHA256 22202303fc2ff667bd2ed1777f46985aed87a266efcc5d438451c25ec50e743b SHA512 1cfcf287bd1c974476ed594bd8c2e7755366a9412099d1c7c8b4dfab617e6f63882492b61a61a51c77899a66ef120dbda5ff09af145f2765dee29037baca8b88 WHIRLPOOL 6bcb85e8a3bc0d753beae1b1ba609b665169afef4bb776cc6a74c71e725e4d9a3cb9cd9321bee6ddabec53462eca068f727b9b8f207e6cbfabba17d15cede48f EBUILD clang-2.8-r3.ebuild 6775 SHA256 2e356a45d80b276e8a349b7525f2526094ba03fe83ac9f49e7fb5136bd3a983d SHA512 c67e745804d7894597531328a30e6e0c171e34a1d6242f708d3f02dbb1c9383d94e9a9fbd641ca49a80959b454ddb1b6ca44289ce70eb674befde82c82c51c81 WHIRLPOOL faee8941ef6dcf173d9fa21ee3f01f4fb3d43377d5b7855138edd49388e411fbff519fffebaf65e2e2cd32071ebaea12f7c75a16c9dccb0e27c12b47a8229651 EBUILD clang-2.9-r1.ebuild 6438 SHA256 00d9147d62dc19548c841243fccb3b81aa5abb32ba46480d528952dcd4756711 SHA512 b0d2862222e87c3cdcec18d80ff08ed369cd21a8f5ec76b32b03dcf4cb14f0876e4b8ebb3868ab537615c080ce8b2134b5148f4cfef648ef8f40e7cb7deaee04 WHIRLPOOL 7b39c433ff21e1c2ef39d988678c9cc068c298e84118c0a4e669b2f1d43e988fa65b8fd37d37311d4b1e2b7d9a6b762a3795ac8a8fccdb774c06d5b830d91c33 EBUILD clang-3.0-r4.ebuild 7166 SHA256 50fe174e45d88d5f1b31119600ae9c8f06f27b14b497d8eee4a1c805bcba92f3 SHA512 834247ed9475353da30946eeabd206a6164eddff8195b5a717fa1bf0e1760d910ee7e0943fe805f3c259a811c0f4514e5bb5aa272a049a195e9f12f68b554669 WHIRLPOOL a8432fb8a00f29a0cd7126f0d028866c893f07d2d92122d09d952caf1c62fdbb0eaa18faa230ecab4bea556252085db152e8c0a3ed6d3cd1adcf3d987cfb9a67 EBUILD clang-3.1-r5.ebuild 6696 SHA256 4a4d884d8c37044fe7dc5f325e88f4733140997b3d2de64c0d6e35d9604c477f SHA512 2ba6057e08c8533fbaa45810f4d9588b57b20b08c9b99b8a53ed32b95d17a43ce13f15d81618e4cb3bc6cb4ded3c50fbba2a866a0d130a69a107195c90dc58ea WHIRLPOOL 890f64a0309c731e7784f5196ac3da602e204c65566412a398a8f9bd862d1b1e5337eae56fd309c1ffb9fc750741982481abcc13567973017df650c6e5dd1be8 EBUILD clang-3.2.ebuild 6519 SHA256 35e962bcd5fea3f406e4b684aaa74bb1be4bdfcda63d963a9bbab604a858fe50 SHA512 20afd7ecc1af578ac3e1d9b6694c3d82d6d6591153496c5a1a07eeb4189f1e3be54d8b18006239ced612bd9d94912bdbc34706599383beff46fe4aca9ed93952 WHIRLPOOL 1fbef46523a62b049375445b4749d42ec93ddae4966a1dcf818b2e1e1e770a8cc67c00ed849fdb291ad29100a5f8b66236a6317b7ecf9bdab02826396be2d18e +EBUILD clang-3.3_rc3.ebuild 6590 SHA256 a6db2fec71424c7bf55e76832c170f86be7e058a83534a40e166d07726f87c90 SHA512 b64cd4daa2f8a0889770138e055b36b181a2e21ae6fe9b8dc360f64e5396e309bf1399065c6cc9c96382d081a20cd7ade62021ddc7d5798f507b2809a27a9702 WHIRLPOOL 098ef18e84c2ebaf14d4be3969707940affb60d730d4351c5f195f27a994123c1d1f922a07c80b39943b4b5ebb7db0a734f8203a865b56b0037191ff8d7aa124 EBUILD clang-9999.ebuild 5655 SHA256 f5d1f81f127cf862ad88ccb610ff5cabaf622b3b1ef6d93d63edcaafe6f025e8 SHA512 b7865f011a9da3e00dfa573c37de2ecb0ac9d0277d3d2b044484ac6f9cf7619dd4c313f017d11b4f89e01c1fa227eba6d2ccf216d242aaed431e5f586b97dc31 WHIRLPOOL 076d180d8e97775b64de8611a0522d198ddf487c78e39b8306f4311900696777f8f8e17912acee77f6155a8ee546cf576e89622cb09e03357e858ffb06d5a379 -MISC ChangeLog 17219 SHA256 a7c3a0c757c29c8119f80aac17750c3a1beaf861e97d1811fa90bf21a6f49af4 SHA512 6179d1c9d09881717c2c7183a0c4ea18e25e9824bd3672fa6bb5d7df24d4aeb138f203d1471443a7d69e8a56993246ae11ae921ed541bf27395dcf4ef43bc1fa WHIRLPOOL 19bfaa9b3d33c93096a515fcdfa62f8ef8f9fb624894186d576e5757fa0df2b4ab9660a68e4ffac884f4369046eaad476d595b3c5fada5207719c10ce168d9af +MISC ChangeLog 17342 SHA256 9b7eacfb1ba5f8bea02e9ad2657ba5fe24a1064672cc3113ae0517d5f9223c42 SHA512 f1c27e92cd7ee56d164eef31b1facd39aa82d223c37e0a3094106a8aa905bb052877352f15ab58988650594e67461366afee432e2d3bf77ce32685c2ceb91163 WHIRLPOOL 66d0da84d56e2c4d6f57b11914e633c3cdbe29a32a1332e55b975f12811cdd9380976689cb90f2008138bc32b030ba7ea5e4b6bbaf6c85a0f6755190b91b96ac MISC metadata.xml 1522 SHA256 c0c8a45b9d836fac31adc4d76a2de92abf2c8d603b69146fc72e6c2484331f42 SHA512 b8780e7a635fa8c32c6cf73c842982d85a11f24daf8049bb3efb165808635875a2331072c01865df230b1dcac7135fcdf9fa7ea19ac46a35ac9f50ffaf4c5067 WHIRLPOOL 2bc088ce4d44c7d0d2673449116052d70ed7298afc14bc5cc460d5c60dda2c1df65a3cf89e8cd79e52e96414b2eb759dd95ed97055cfd41822a4b9f540fb662c -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.20 (GNU/Linux) -iEYEAREIAAYFAlGf218ACgkQvFcC4BYPU0q3vwCgp9YV40Q97Wy7IQ6DVlrUEAmX -PK8An3AxpTOsUffhH2uY0ZCvTLe+Gh1Z -=Myd4 +iF4EAREIAAYFAlG2S+gACgkQFYEBGcdFJfITHQD/fiSuj1vNwGJUOIs4fAlPha8h +Zxr/xpm1ZlUh7xBBvK4BAIvAN03MMzCIXNEURx9nCUQsvDkt7qVH93j0wxg1P2cj +=e+4w -----END PGP SIGNATURE----- diff --git a/sys-devel/clang/clang-3.3_rc3.ebuild b/sys-devel/clang/clang-3.3_rc3.ebuild new file mode 100644 index 000000000000..740cab9c775c --- /dev/null +++ b/sys-devel/clang/clang-3.3_rc3.ebuild @@ -0,0 +1,202 @@ +# 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-3.3_rc3.ebuild,v 1.1 2013/06/10 21:57:45 voyageur Exp $ + +EAPI=5 + +PYTHON_COMPAT=( python{2_6,2_7} pypy{1_9,2_0} ) + +inherit eutils multilib python-r1 + +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/pre-releases/${PV/_rc*}/${PV/3.3_}/llvm-source-${PV/_}.tar.gz + http://llvm.org/pre-releases/${PV/_rc*}/${PV/3.3_}/compiler-rt-source-${PV/_}.tar.gz + http://llvm.org/pre-releases/${PV/_rc*}/${PV/3.3_}/cfe-source-${PV/_}.tar.gz" + +LICENSE="UoI-NCSA" +SLOT="0" +KEYWORDS="~amd64 ~arm ~x86 ~amd64-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos" +IUSE="debug kernel_FreeBSD multitarget python +static-analyzer test" + +DEPEND="static-analyzer? ( dev-lang/perl ) + ${PYTHON_DEPS}" +RDEPEND="~sys-devel/llvm-${PV}[debug=,multitarget=] + ${PYTHON_DEPS}" + +S=${WORKDIR}/llvm.src + +src_prepare() { + rm -f "${S}"/tools/clang "${S}"/projects/compiler-rt \ + || die "symlinks removal failed" + mv "${WORKDIR}"/cfe.src "${S}"/tools/clang \ + || die "clang source directory move failed" + mv "${WORKDIR}"/compiler-rt.src "${S}"/projects/compiler-rt \ + || die "compiler-rt source directory move failed" + + # Same as llvm doc patches + epatch "${FILESDIR}"/${PN}-2.7-fixdoc.patch + + # multilib-strict + sed -e "/PROJ_headers/s#lib/clang#$(get_libdir)/clang#" \ + -i tools/clang/lib/Headers/Makefile \ + || die "clang Makefile failed" + sed -e "/PROJ_resources/s#lib/clang#$(get_libdir)/clang#" \ + -i tools/clang/runtime/compiler-rt/Makefile \ + || die "compiler-rt 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#${EPREFIX}/usr/share/${PN}#" \ + -i tools/clang/tools/scan-build/scan-build \ + || die "scan-build sed failed" + # Set correct path for gold plugin + sed -e "/LLVMgold.so/s#lib/#$(get_libdir)/llvm/#" \ + -i tools/clang/lib/Driver/Tools.cpp \ + || die "gold plugin path sed failed" + + # From llvm src_prepare + einfo "Fixing install dirs" + sed -e 's,^PROJ_docsdir.*,PROJ_docsdir := $(PROJ_prefix)/share/doc/'${PF}, \ + -e 's,^PROJ_etcdir.*,PROJ_etcdir := '"${EPREFIX}"'/etc/llvm,' \ + -e 's,^PROJ_libdir.*,PROJ_libdir := $(PROJ_prefix)/'$(get_libdir)/llvm, \ + -i Makefile.config.in || die "Makefile.config sed failed" + + einfo "Fixing rpath and CFLAGS" + sed -e 's,\$(RPATH) -Wl\,\$(\(ToolDir\|LibDir\)),$(RPATH) -Wl\,'"${EPREFIX}"/usr/$(get_libdir)/llvm, \ + -e '/OmitFramePointer/s/-fomit-frame-pointer//' \ + -i Makefile.rules || die "rpath sed failed" + + # Use system llc (from llvm ebuild) for tests + sed -e "/^llc_props =/s/os.path.join(llvm_tools_dir, 'llc')/'llc'/" \ + -i tools/clang/test/lit.cfg || die "test path sed failed" + + # Automatically select active system GCC's libraries, bugs #406163 and #417913 + epatch "${FILESDIR}"/${PN}-3.1-gentoo-runtime-gcc-detection-v3.patch + + # Fix search paths on FreeBSD, bug #409269 + epatch "${FILESDIR}"/${PN}-3.1-gentoo-freebsd-fix-lib-path.patch + + # Fix regression caused by removal of USE=system-cxx-headers, bug #417541 + # Needs to be updated for 3.2 + #epatch "${FILESDIR}"/${PN}-3.1-gentoo-freebsd-fix-cxx-paths-v2.patch + + # User patches + epatch_user +} + +src_configure() { + local CONF_FLAGS="--enable-shared + --with-optimize-option= + $(use_enable !debug optimized) + $(use_enable debug assertions) + $(use_enable debug expensive-checks)" + + # Setup the search path to include the Prefix includes + if use prefix ; then + CONF_FLAGS="${CONF_FLAGS} \ + --with-c-include-dirs=${EPREFIX}/usr/include:/usr/include" + fi + + if use multitarget; then + CONF_FLAGS="${CONF_FLAGS} --enable-targets=all" + else + CONF_FLAGS="${CONF_FLAGS} --enable-targets=host,cpp" + fi + + if use amd64; then + CONF_FLAGS="${CONF_FLAGS} --enable-pic" + fi + + # build with a suitable Python version + python_export_best + + # clang prefers clang over gcc, so we may need to force that + tc-export CC CXX + econf ${CONF_FLAGS} +} + +src_compile() { + emake VERBOSE=1 KEEP_SYMBOLS=1 REQUIRES_RTTI=1 clang-only +} + +src_test() { + cd "${S}"/tools/clang || die "cd clang failed" + + echo ">>> Test phase [test]: ${CATEGORY}/${PF}" + + 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() { + cd "${S}"/tools/clang || die "cd clang failed" + emake KEEP_SYMBOLS=1 DESTDIR="${D}" install + + if use static-analyzer ; then + dobin tools/scan-build/ccc-analyzer + dosym ccc-analyzer /usr/bin/c++-analyzer + dobin tools/scan-build/scan-build + + insinto /usr/share/${PN} + doins tools/scan-build/scanview.css + doins tools/scan-build/sorttable.js + fi + + 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 + if [[ ${CHOST} == *-darwin* ]] ; then + for lib in libclang.dylib ; do + ebegin "fixing install_name of $lib" + install_name_tool -id "${EPREFIX}"/usr/lib/llvm/${lib} \ + "${ED}"/usr/lib/llvm/${lib} + eend $? + done + for f in usr/bin/{c-index-test,clang} usr/lib/llvm/libclang.dylib ; do + ebegin "fixing references in ${f##*/}" + install_name_tool \ + -change "@rpath/libclang.dylib" \ + "${EPREFIX}"/usr/lib/llvm/libclang.dylib \ + -change "@executable_path/../lib/libLLVM-${PV}.dylib" \ + "${EPREFIX}"/usr/lib/llvm/libLLVM-${PV}.dylib \ + -change "${S}"/Release/lib/libclang.dylib \ + "${EPREFIX}"/usr/lib/llvm/libclang.dylib \ + "${ED}"/$f + eend $? + done + fi + + # Remove unnecessary headers on FreeBSD, bug #417171 + use kernel_FreeBSD && rm "${ED}"usr/$(get_libdir)/clang/${PV}/include/{arm_neon,std,float,iso,limits,tgmath,varargs}*.h +} |