Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 349246 Details for
Bug 471330
sys-devel/llvm and sys-devel/clang should be SLOTted
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
add slots to sys-devel/llvm-3.2
llvm-3.2.ebuild.patch (text/plain), 4.65 KB, created by
klemensbaum
on 2013-05-26 12:46:48 UTC
(
hide
)
Description:
add slots to sys-devel/llvm-3.2
Filename:
MIME Type:
Creator:
klemensbaum
Created:
2013-05-26 12:46:48 UTC
Size:
4.65 KB
patch
obsolete
>diff --git a/sys-devel/llvm/llvm-3.2.ebuild b/sys-devel/llvm/llvm-3.2.ebuild >index e9635a8..e2cf62a 100644 >--- a/sys-devel/llvm/llvm-3.2.ebuild >+++ b/sys-devel/llvm/llvm-3.2.ebuild >@@ -16,7 +16,7 @@ SRC_URI="http://llvm.org/releases/${PV}/${P}.src.tar.gz > !doc? ( http://dev.gentoo.org/~voyageur/distfiles/${P}-manpages.tar.bz2 )" > > LICENSE="UoI-NCSA" >-SLOT="0" >+SLOT="${PV}" > KEYWORDS="~amd64 ~arm ~ppc ~x86 ~amd64-fbsd ~x86-fbsd ~x64-freebsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos" > IUSE="debug doc gold +libffi multitarget ocaml test udis86 vim-syntax" > >@@ -34,6 +34,7 @@ DEPEND="dev-lang/perl > udis86? ( dev-libs/udis86[pic(+)] ) > ${PYTHON_DEPS}" > RDEPEND="dev-lang/perl >+ app-admin/eselect-llvm > libffi? ( virtual/libffi ) > vim-syntax? ( || ( app-editors/vim app-editors/gvim ) )" > >@@ -88,7 +89,7 @@ src_prepare() { > -i tools/llvm-config/llvm-config.cpp || die "llvm-config sed failed" > > einfo "Fixing rpath and CFLAGS" >- sed -e 's,\$(RPATH) -Wl\,\$(\(ToolDir\|LibDir\)),$(RPATH) -Wl\,'"${EPREFIX}"/usr/$(get_libdir)/${PN}, \ >+ sed -e "s@\$(RPATH) -Wl,\$(\(ToolDir\|LibDir\))@\$(RPATH) -Wl,'${EPREFIX}/usr/$(get_libdir)/${PN}-${SLOT}'@" \ > -e '/OmitFramePointer/s/-fomit-frame-pointer//' \ > -i Makefile.rules || die "rpath sed failed" > if use gold; then >@@ -178,6 +179,71 @@ src_install() { > doins utils/vim/*.vim > fi > >+ # Register slot for app-admin/eselect-llvm >+ local eselect_dir="/usr/share/eselect-llvm/slots/${SLOT}" >+ dodir "${eselect_dir}" >+ eselect_dir="${ED}/${eselect_dir}" >+ echo "${CATEGORY}/${PF}" > "${eselect_dir}/ebuild" >+ >+ with_slot_suffix() { >+ local file=$(echo "$1" | sed -e "s/-${SLOT}//") >+ local ext="" >+ if [[ "${file}" =~ \. ]] ; then >+ ext=".${file#*.}" >+ fi >+ local base="${file%%.*}" >+ echo "${base}-${SLOT}${ext}" >+ } >+ >+ make_versioned() { >+ local dir=$1 >+ local candidates=(${ED%/}/${dir}) >+ if [[ ! ${dir##*/} ]] ; then >+ dir=${dir%/} >+ candidates=( "${candidates}"* ) >+ else >+ dir=$(dirname "${dir}") >+ fi >+ >+ pushd ${ED%/}/${dir} >/dev/null || die >+ >+ local candidate >+ for candidate in "${candidates[@]}" ; do >+ if [[ -h "${candidate}" ]] ; then >+ # Add slot suffix to symlink target >+ local target=$(readlink -s "${candidate}") >+ local slotted_target=$(with_slot_suffix "${target}") >+ if [[ -e "${target}" ]] || [[ -e "${slotted_target}" ]] ; then >+ ln -sf "${slotted_target}" "${candidate}" \ >+ || die "Could not update symlink" >+ fi >+ fi >+ >+ local base_name=$(basename "${candidate}") >+ local slotted_name=$(with_slot_suffix "${base_name}") >+ mv "${candidate}" "${ED}/${dir}/${slotted_name}" \ >+ || die "Could not rename ${candidate} to ${slotted_name}" >+ echo "/${dir#/}/${base_name}" >> "${eselect_dir}/versioned" >+ done >+ >+ popd >/dev/null || die >+ } >+ >+ # Trailing slash => version the content >+ # No trailing slash => version the directory itself >+ local paths=( >+ /usr/bin/ >+ /usr/$(get_libdir)/ >+ /usr/include/ >+ /usr/share/man/man1/ >+ ) >+ use vim-syntax && paths+=( /usr/share/vim/vimfiles/syntax/ ) >+ >+ local path >+ for path in "${paths[@]}" ; do >+ make_versioned "${path}" >+ done >+ > # 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} >@@ -186,21 +252,39 @@ src_install() { > [[ -n ${PACKAGE_VERSION} ]] && libpv=${PACKAGE_VERSION} > for lib in lib{EnhancedDisassembly,LLVM-${libpv},LTO,profile_rt}.dylib {BugpointPasses,LLVMHello}.dylib ; do > # libEnhancedDisassembly is Darwin10 only, so non-fatal >- [[ -f ${ED}/usr/lib/${PN}/${lib} ]] || continue >+ [[ -f ${ED}/usr/lib/${PN}-${SLOT}/${lib} ]] || continue > ebegin "fixing install_name of $lib" > install_name_tool \ >- -id "${EPREFIX}"/usr/lib/${PN}/${lib} \ >- "${ED}"/usr/lib/${PN}/${lib} >+ -id "${EPREFIX}"/usr/lib/${PN}-${SLOT}/${lib} \ >+ "${ED}"/usr/lib/${PN}-${SLOT}/${lib} > eend $? > done >- for f in "${ED}"/usr/bin/* "${ED}"/usr/lib/${PN}/libLTO.dylib ; do >+ for f in "${ED}"/usr/bin/* "${ED}"/usr/lib/${PN}-${SLOT}/libLTO.dylib ; do > odylib=$(scanmacho -BF'%n#f' "${f}" | tr ',' '\n' | grep libLLVM-${libpv}.dylib) > ebegin "fixing install_name reference to ${odylib} of ${f##*/}" > install_name_tool \ > -change "${odylib}" \ >- "${EPREFIX}"/usr/lib/${PN}/libLLVM-${libpv}.dylib \ >+ "${EPREFIX}"/usr/lib/${PN}-${SLOT}/libLLVM-${libpv}.dylib \ > "${f}" > eend $? > done > fi > } >+ >+pkg_postinst() { >+ if [[ $(eselect ${PN} show) = "(none)" ]] ; then >+ eselect ${PN} set ${SLOT} >+ fi >+} >+ >+pkg_prerm() { >+ if [[ $(eselect ${PN} show) = ${SLOT} ]] ; then >+ eselect ${PN} clear >+ fi >+} >+ >+pkg_postrm() { >+ if [[ -z ${REPLACED_BY_VERSION} ]] ; then >+ eselect ${PN} update >+ fi >+}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 471330
:
349238
|
349240
|
349242
|
349244
|
349246
|
349248
|
349250
|
349252
|
349254
|
349256
|
349258
|
349260
|
349262
|
349264
|
349266
|
349268
|
349270
|
349348
|
353392