Summary: | Pleasre review Prefix changes for sys-devel/clang | ||
---|---|---|---|
Product: | Gentoo/Alt | Reporter: | Matthias Maier <tamiko> |
Component: | Prefix Support | Assignee: | Bernard Cafarelli <voyageur> |
Status: | RESOLVED FIXED | ||
Severity: | enhancement | CC: | prefix |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | 333387 | ||
Bug Blocks: | 315803 | ||
Attachments: |
clang-2.7-r2-prefix.patch
Proposed clang-9999.ebuild for prefix |
Description
Matthias Maier
2010-08-13 12:45:54 UTC
Please review and comment on the changes to clang-2.7-r2, necessary for Prefix support. The install_name_tool bit is to accomodate Darwin installs only. Index: clang-2.7-r2.ebuild =================================================================== RCS file: /var/cvsroot/gentoo-x86/sys-devel/clang/clang-2.7-r2.ebuild,v retrieving revision 1.1 diff -u -r1.1 clang-2.7-r2.ebuild --- clang-2.7-r2.ebuild 27 Jul 2010 13:06:47 -0000 1.1 +++ clang-2.7-r2.ebuild 22 Aug 2010 13:57:46 -0000 @@ -2,7 +2,7 @@ # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/sys-devel/clang/clang-2.7-r2.ebuild,v 1.1 2010/07/27 13:06:47 voyageur Exp $ -EAPI=2 +EAPI=3 RESTRICT_PYTHON_ABIS="3.*" SUPPORT_PYTHON_ABIS="1" @@ -17,7 +17,7 @@ LICENSE="UoI-NCSA" SLOT="0" -KEYWORDS="~amd64 ~x86" +KEYWORDS="~amd64 ~x86 ~ppc-macos" IUSE="debug +static-analyzer system-cxx-headers test" # Note: for LTO support, clang will depend on binutils with gold plugins, and LLVM built after that - http://llvm.org/docs/GoldPlugin.html @@ -50,7 +50,7 @@ # 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 := /etc/llvm,' \ + -e 's,^PROJ_etcdir.*,PROJ_etcdir := '"${EPREFIX}"'/etc/llvm,' \ -e 's,^PROJ_libdir.*,PROJ_libdir := $(PROJ_prefix)/'$(get_libdir), \ -i Makefile.config.in || die "Makefile.config sed failed" @@ -73,6 +73,12 @@ --disable-expensive-checks" fi + # 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 amd64; then CONF_FLAGS="${CONF_FLAGS} --enable-pic" fi @@ -127,10 +133,19 @@ install-scan-view() { insinto "$(python_get_sitedir)"/clang doins Reporter.py Resources ScanView.py startfile.py - touch "${D}"/"$(python_get_sitedir)"/clang/__init__.py + touch "${ED}"/"$(python_get_sitedir)"/clang/__init__.py } python_execute_function install-scan-view 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 + for lib in libCIndex.dylib ; do + install_name_tool -id "${EPREFIX}"/usr/lib/${lib} \ + "${ED}"/usr/lib/${lib} + done + fi } pkg_postinst() { Please upload the patch as an attachment, due to the line-wrapping in Bugzilla this patch is malformed. Created attachment 244047 [details, diff]
clang-2.7-r2-prefix.patch
it was meant for review only, I can just commit it when ok, but here you go
Created attachment 244167 [details, diff]
Proposed clang-9999.ebuild for prefix
This is Fabian's patch applied to the 9999-ebuild. (It would be very nice to have the svn-version in the prefix too :) )
Compiles and runs fine on a ~amd64-linux - host.
Can someone with a Darwin - target please review whether the changes work as intended?
Close to llvm changes, these are also good for me! committed, thanks! |