commit:     3383cdddf094227a9f5669c42929a3cde5f1e106
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Wed Dec  3 09:54:57 2014 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Wed Dec  3 10:44:10 2014 +0000
URL:        
http://sources.gentoo.org/gitweb/?p=dev/mgorny.git;a=commit;h=3383cddd

sys-devel/gcc: clean up install, move gdb files to auto-load

Package-Manager: portage-2.2.14

---
 sys-devel/gcc/gcc-4.9.2-r100.ebuild | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/sys-devel/gcc/gcc-4.9.2-r100.ebuild 
b/sys-devel/gcc/gcc-4.9.2-r100.ebuild
index d0b386f..c61809d 100644
--- a/sys-devel/gcc/gcc-4.9.2-r100.ebuild
+++ b/sys-devel/gcc/gcc-4.9.2-r100.ebuild
@@ -557,12 +557,25 @@ src_install() {
 
        # Punt some tools which are really only useful while building gcc
        find "${D}" -name install-tools -prune -type d -exec rm -r {} + || die
+       # Some random 'dir' file?
+       rm "${D}${DATAPATH}"/info/dir || die
 
        create_gcc_symlinks
        strip_gcc_executables
 
+       # move *-gdb.py into /usr/share/gdb/auto-load tree
+       if use cxx; then
+               local py gdbdir=${D}usr/share/gdb/auto-load
+               while read -r -d '' py; do
+                       mkdir -p "${gdbdir}/${py%/*}" || die
+                       mv "${D}${py}" "${gdbdir}/${py%/*}"/ || die
+               done < <(cd "${D}" && find -name '*-gdb.py' -print0)
+       fi
+
        if use cxx && use doc; then
                cd "${WORKDIR}/build/${CTARGET}/libstdc++-v3/doc/doxygen/man" 
|| die
+               # clean up some random files with build-dir paths
+               rm -f man*/*"${P}"*
                cp -r man* "${D}${DATAPATH}"/man/ || die
        fi
 

Reply via email to