mgorny      14/06/29 09:59:33

  Modified:             llvm-9999.ebuild ChangeLog
  Log:
  Rename clang to ${CHOST}-clang-${PV}. Add multilib wrappers.
  
  (Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key 
EFB4464E!)

Revision  Changes    Path
1.88                 sys-devel/llvm/llvm-9999.ebuild

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/llvm/llvm-9999.ebuild?rev=1.88&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/llvm/llvm-9999.ebuild?rev=1.88&content-type=text/plain
diff : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/llvm/llvm-9999.ebuild?r1=1.87&r2=1.88

Index: llvm-9999.ebuild
===================================================================
RCS file: /var/cvsroot/gentoo-x86/sys-devel/llvm/llvm-9999.ebuild,v
retrieving revision 1.87
retrieving revision 1.88
diff -u -r1.87 -r1.88
--- llvm-9999.ebuild    1 May 2014 15:09:30 -0000       1.87
+++ llvm-9999.ebuild    29 Jun 2014 09:59:32 -0000      1.88
@@ -1,6 +1,6 @@
 # Copyright 1999-2014 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-devel/llvm/llvm-9999.ebuild,v 1.87 
2014/05/01 15:09:30 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/llvm/llvm-9999.ebuild,v 1.88 
2014/06/29 09:59:32 mgorny Exp $
 
 EAPI=5
 
@@ -65,10 +65,6 @@
 # so why did it call itself ninja in the first place?
 CMAKE_MAKEFILE_GENERATOR=emake
 
-MULTILIB_CHOST_TOOLS=(
-       /usr/bin/llvm-config
-)
-
 pkg_pretend() {
        # in megs
        # !clang !debug !multitarget -O2       400
@@ -344,14 +340,28 @@
 }
 
 src_install() {
+       local MULTILIB_CHOST_TOOLS=(
+               /usr/bin/llvm-config
+       )
+
        local MULTILIB_WRAPPED_HEADERS=(
                /usr/include/llvm/Config/config.h
                /usr/include/llvm/Config/llvm-config.h
        )
 
-       use clang && MULTILIB_WRAPPED_HEADERS+=(
-               /usr/include/clang/Config/config.h
-       )
+       if use clang; then
+               # note: magic applied below
+               MULTILIB_CHOST_TOOLS+=(
+                       /usr/bin/clang
+                       /usr/bin/clang++
+                       /usr/bin/clang-${PV}
+                       /usr/bin/clang++-${PV}
+               )
+
+               MULTILIB_WRAPPED_HEADERS+=(
+                       /usr/include/clang/Config/config.h
+               )
+       fi
 
        multilib-minimal_src_install
 }
@@ -382,6 +392,34 @@
                fi
        fi
 
+       # apply CHOST and PV to clang executables
+       # they're statically linked so we don't have to worry about the lib
+       if use clang; then
+               local clang_tools=( clang clang++ )
+               local i
+
+               # append ${PV} and symlink back
+               # TODO: use alternatives.eclass? does that make any sense?
+               # maybe with USE=-clang on :0 and USE=clang on older
+               for i in "${clang_tools[@]}"; do
+                       mv "${ED%/}/usr/bin/${i}"{,-${PV}} || die
+                       dosym "${i}"-${PV} /usr/bin/${i}
+               done
+
+               # now prepend ${CHOST} and let the multilib-build.eclass 
symlink it
+               if ! multilib_is_native_abi; then
+                       # non-native? let's replace it with a simple wrapper
+                       for i in "${clang_tools[@]}"; do
+                               rm "${ED%/}/usr/bin/${i}-${PV}" || die
+                               cat > "${T}"/wrapper.tmp <<-_EOF_
+                                       #!${EPREFIX}/bin/sh
+                                       exec "${i}-${PV}" $(get_abi_CFLAGS) 
"\${@}"
+                               _EOF_
+                               newbin "${T}"/wrapper.tmp "${i}-${PV}"
+                       done
+               fi
+       fi
+
        # Fix install_names on Darwin.  The build system is too complicated
        # to just fix this, so we correct it post-install
        local lib= f= odylib= libpv=${PV}



1.202                sys-devel/llvm/ChangeLog

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/llvm/ChangeLog?rev=1.202&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/llvm/ChangeLog?rev=1.202&content-type=text/plain
diff : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/llvm/ChangeLog?r1=1.201&r2=1.202

Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/sys-devel/llvm/ChangeLog,v
retrieving revision 1.201
retrieving revision 1.202
diff -u -r1.201 -r1.202
--- ChangeLog   23 Jun 2014 23:00:42 -0000      1.201
+++ ChangeLog   29 Jun 2014 09:59:33 -0000      1.202
@@ -1,6 +1,9 @@
 # ChangeLog for sys-devel/llvm
 # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-devel/llvm/ChangeLog,v 1.201 2014/06/23 
23:00:42 voyageur Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/llvm/ChangeLog,v 1.202 2014/06/29 
09:59:33 mgorny Exp $
+
+  29 Jun 2014; Michał Górny <mgo...@gentoo.org> llvm-9999.ebuild:
+  Rename clang to ${CHOST}-clang-${PV}. Add multilib wrappers.
 
 *llvm-3.4.2 (23 Jun 2014)
 




Reply via email to