vapier      14/09/10 05:59:03

  Modified:             src_unpack.eblit
  Added:                src_prepare.eblit
  Log:
  Split src_prepare out of src_unpack #473728 by Benda Xu.
  
  (Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key 
D2E96200)

Revision  Changes    Path
1.27                 sys-libs/glibc/files/eblits/src_unpack.eblit

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/glibc/files/eblits/src_unpack.eblit?rev=1.27&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/glibc/files/eblits/src_unpack.eblit?rev=1.27&content-type=text/plain
diff : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/glibc/files/eblits/src_unpack.eblit?r1=1.26&r2=1.27

Index: src_unpack.eblit
===================================================================
RCS file: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/eblits/src_unpack.eblit,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- src_unpack.eblit    21 Aug 2014 14:06:17 -0000      1.26
+++ src_unpack.eblit    10 Sep 2014 05:59:03 -0000      1.27
@@ -1,6 +1,8 @@
 # Copyright 1999-2014 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: 
/var/cvsroot/gentoo-x86/sys-libs/glibc/files/eblits/src_unpack.eblit,v 1.26 
2014/08/21 14:06:17 vapier Exp $
+# $Header: 
/var/cvsroot/gentoo-x86/sys-libs/glibc/files/eblits/src_unpack.eblit,v 1.27 
2014/09/10 05:59:03 vapier Exp $
+
+[[ ${EAPI:-0} == [01] ]] && source "${FILESDIR}/eblits/src_prepare.eblit"
 
 int_to_KV() {
        local version=$1 major minor micro
@@ -109,71 +111,11 @@
                        mv "${d}" "${S}" || die "moving ${d} failed"
                done
        fi
-
-       # XXX: We should do the branchupdate, before extracting the manpages and
-       # infopages else it does not help much (mtimes change if there is a 
change
-       # to them with branchupdate)
-       if [[ -n ${BRANCH_UPDATE} ]] ; then
-               cd "${S}"
-               epatch 
"${DISTDIR}"/glibc-${RELEASE_VER}-branch-update-${BRANCH_UPDATE}.patch.bz2
-
-               # Snapshot date patch
-               einfo "Patching version to display snapshot date ..."
-               sed -i -e "s:\(#define RELEASE\).*:\1 \"${BRANCH_UPDATE}\":" 
version.h
-       fi
-
-       # tag, glibc is it
-       cd "${S}"
-       if ! version_is_at_least 2.17 ; then
-               [[ -e csu/Banner ]] && die "need new banner location"
-               glibc_banner > csu/Banner
-       fi
-       if [[ -n ${PATCH_VER} ]] && ! use vanilla ; then
-               cd "${S}"
-               EPATCH_MULTI_MSG="Applying Gentoo Glibc Patchset 
${RELEASE_VER}-${PATCH_VER} ..." \
-               EPATCH_EXCLUDE=${GLIBC_PATCH_EXCLUDE} \
-               EPATCH_SUFFIX="patch" \
-               ARCH=$(tc-arch) \
-               epatch "${WORKDIR}"/patches
-       fi
-
-       if just_headers ; then
-               if [[ -e ports/sysdeps/mips/preconfigure ]] ; then
-                       # mips peeps like to screw with us.  if building 
headers,
-                       # we don't have a real compiler, so we can't let them
-                       # insert -mabi on us.
-                       sed -i '/CPPFLAGS=.*-mabi/s|.*|:|' 
ports/sysdeps/mips/preconfigure || die
-                       find ports/sysdeps/mips/ -name Makefile -exec sed -i 
'/^CC.*-mabi=/s:-mabi=.*:-D_MIPS_SZPTR=32:' {} +
-               fi
-       fi
-
-       epatch_user
-
-       gnuconfig_update
 }
 
 eblit-glibc-src_unpack() {
        setup_env
 
        toolchain-glibc_src_unpack
-
-       # Glibc is stupid sometimes, and doesn't realize that with a
-       # static C-Only gcc, -lgcc_eh doesn't exist.
-       # http://sourceware.org/ml/libc-alpha/2003-09/msg00100.html
-       # http://sourceware.org/ml/libc-alpha/2005-02/msg00042.html
-       # But! Finally fixed in recent versions:
-       # http://sourceware.org/ml/libc-alpha/2012-05/msg01865.html
-       if ! version_is_at_least 2.16 ; then
-               echo 'int main(){}' > "${T}"/gcc_eh_test.c
-               if ! $(tc-getCC ${CTARGET}) ${CFLAGS} ${LDFLAGS} 
"${T}"/gcc_eh_test.c -lgcc_eh 2>/dev/null ; then
-                       sed -i -e 's:-lgcc_eh::' Makeconfig || die "sed gcc_eh"
-               fi
-       fi
-
-       cd "${WORKDIR}"
-       find . -type f '(' -size 0 -o -name "*.orig" ')' -delete
-       find . -name configure -exec touch {} +
-
-       # Fix permissions on some of the scripts.
-       chmod u+x "${S}"/scripts/*.sh
+       [[ ${EAPI:-0} == [01] ]] && cd "${S}" && eblit-glibc-src_prepare
 }



1.1                  sys-libs/glibc/files/eblits/src_prepare.eblit

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/glibc/files/eblits/src_prepare.eblit?rev=1.1&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/glibc/files/eblits/src_prepare.eblit?rev=1.1&content-type=text/plain

Index: src_prepare.eblit
===================================================================
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: 
/var/cvsroot/gentoo-x86/sys-libs/glibc/files/eblits/src_prepare.eblit,v 1.1 
2014/09/10 05:59:03 vapier Exp $

eblit-glibc-src_prepare() {
        # XXX: We should do the branchupdate, before extracting the manpages and
        # infopages else it does not help much (mtimes change if there is a 
change
        # to them with branchupdate)
        if [[ -n ${BRANCH_UPDATE} ]] ; then
                epatch 
"${DISTDIR}"/glibc-${RELEASE_VER}-branch-update-${BRANCH_UPDATE}.patch.bz2

                # Snapshot date patch
                einfo "Patching version to display snapshot date ..."
                sed -i -e "s:\(#define RELEASE\).*:\1 \"${BRANCH_UPDATE}\":" 
version.h
        fi

        # tag, glibc is it
        if ! version_is_at_least 2.17 ; then
                [[ -e csu/Banner ]] && die "need new banner location"
                glibc_banner > csu/Banner
        fi
        if [[ -n ${PATCH_VER} ]] && ! use vanilla ; then
                EPATCH_MULTI_MSG="Applying Gentoo Glibc Patchset 
${RELEASE_VER}-${PATCH_VER} ..." \
                EPATCH_EXCLUDE=${GLIBC_PATCH_EXCLUDE} \
                EPATCH_SUFFIX="patch" \
                ARCH=$(tc-arch) \
                epatch "${WORKDIR}"/patches
        fi

        if just_headers ; then
                if [[ -e ports/sysdeps/mips/preconfigure ]] ; then
                        # mips peeps like to screw with us.  if building 
headers,
                        # we don't have a real compiler, so we can't let them
                        # insert -mabi on us.
                        sed -i '/CPPFLAGS=.*-mabi/s|.*|:|' 
ports/sysdeps/mips/preconfigure || die
                        find ports/sysdeps/mips/ -name Makefile -exec sed -i 
'/^CC.*-mabi=/s:-mabi=.*:-D_MIPS_SZPTR=32:' {} +
                fi
        fi

        epatch_user

        gnuconfig_update

        # Glibc is stupid sometimes, and doesn't realize that with a
        # static C-Only gcc, -lgcc_eh doesn't exist.
        # http://sourceware.org/ml/libc-alpha/2003-09/msg00100.html
        # http://sourceware.org/ml/libc-alpha/2005-02/msg00042.html
        # But! Finally fixed in recent versions:
        # http://sourceware.org/ml/libc-alpha/2012-05/msg01865.html
        if ! version_is_at_least 2.16 ; then
                echo 'int main(){}' > "${T}"/gcc_eh_test.c
                if ! $(tc-getCC ${CTARGET}) ${CFLAGS} ${LDFLAGS} 
"${T}"/gcc_eh_test.c -lgcc_eh 2>/dev/null ; then
                        sed -i -e 's:-lgcc_eh::' Makeconfig || die "sed gcc_eh"
                fi
        fi

        cd "${WORKDIR}"
        find . -type f '(' -size 0 -o -name "*.orig" ')' -delete
        find . -name configure -exec touch {} +

        # Fix permissions on some of the scripts.
        chmod u+x "${S}"/scripts/*.sh
}




Reply via email to