commit:     d737f2afe4b37770fe9d7cc0fedc14b16caaa540
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Wed Dec  3 08:52:12 2014 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Wed Dec  3 08:52:12 2014 +0000
URL:        
http://sources.gentoo.org/gitweb/?p=dev/mgorny.git;a=commit;h=d737f2af

sys-devel/gcc: fixes to install

Simplify (and fix) fixed include removal. Fix info- and man-page install.

Package-Manager: portage-2.2.14

---
 sys-devel/gcc/gcc-4.9.2-r100.ebuild | 25 ++++++++-----------------
 1 file changed, 8 insertions(+), 17 deletions(-)

diff --git a/sys-devel/gcc/gcc-4.9.2-r100.ebuild 
b/sys-devel/gcc/gcc-4.9.2-r100.ebuild
index a552b15..d0b386f 100644
--- a/sys-devel/gcc/gcc-4.9.2-r100.ebuild
+++ b/sys-devel/gcc/gcc-4.9.2-r100.ebuild
@@ -410,8 +410,8 @@ src_configure() {
        export gcc_cv_prog_makeinfo_modern=no
 
        # Build in a separate build tree
-       mkdir -p "${WORKDIR}"/build
-       pushd "${WORKDIR}"/build > /dev/null
+       mkdir -p "${WORKDIR}"/build || die
+       cd "${WORKDIR}"/build || die
 
        # and now to do the actual configuration
        addwrite /dev/zero
@@ -419,9 +419,8 @@ src_configure() {
        echo "${@}"
        "${@}" || die 'configure failed'
 
-       # return to whatever directory we were in before
-       popd > /dev/null
-
+       # we don't want fixed includes :)
+       echo : > "${S}"/fixincludes/fixinc.in
 }
 
 src_compile() {
@@ -460,6 +459,7 @@ create_gcc_symlinks() {
                # Add CTARGET-ed symlinks to make gcc-wrapper happy.
                ln -s "${t}" "${CTARGET}-${t}" || die
 
+               # BROKEN: no gcc-ar, gcc-nm, gcc-ranlib
                # Install versioned symlinks in /usr/bin.
                dosym "${BINPATH}/${t}" /usr/bin/"${CTARGET}-${t}-${PV}"
                dosym "${CTARGET}-${t}-${PV}" /usr/bin/"${t}-${PV}"
@@ -551,16 +551,7 @@ src_install() {
        local f
        while read -r -d '' f; do
                cp "${S}/${f}" "${f}" || die
-       done < <(cd "${S}" && find gcc -name '*.info')
-
-       # Clean up include-fixed
-       find gcc/include-fixed -type l -delete || die
-       while read -r -d '' f; do
-               if grep 'auto-edited by fixincludes' "${f}"; then
-                       rm "${f}" || die
-               fi
-       done < <(find gcc/include-fixed -type f)
-       find gcc/include-fixed -type d -empty -delete || die
+       done < <(cd "${S}" && find gcc -name '*.info' -print0)
 
        emake -j1 DESTDIR="${D}" install
 
@@ -570,9 +561,9 @@ src_install() {
        create_gcc_symlinks
        strip_gcc_executables
 
-       if use doc; then
+       if use cxx && use doc; then
                cd "${WORKDIR}/build/${CTARGET}/libstdc++-v3/doc/doxygen/man" 
|| die
-               doman man*/*
+               cp -r man* "${D}${DATAPATH}"/man/ || die
        fi
 
        # Don't scan .gox files for executable stacks - false positives

Reply via email to