[gentoo-commits] proj/android:master commit in: eclass/

2017-11-26 Thread Benda XU
commit: ebdd8464a4a6072da5f2fd6775ae062a080c3776
Author: Benda Xu  gentoo  org>
AuthorDate: Mon Nov 27 01:08:42 2017 +
Commit: Benda XU  gentoo  org>
CommitDate: Mon Nov 27 01:08:42 2017 +
URL:https://gitweb.gentoo.org/proj/android.git/commit/?id=ebdd8464

db.eclass, user.eclass: upstreamed.

 eclass/db.eclass   | 210 
 eclass/user.eclass | 474 -
 2 files changed, 684 deletions(-)

diff --git a/eclass/db.eclass b/eclass/db.eclass
deleted file mode 100644
index f7070d4..000
--- a/eclass/db.eclass
+++ /dev/null
@@ -1,210 +0,0 @@
-# Copyright 1999-2013 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/db.eclass,v 1.49 2013/07/21 09:23:45 
pacho Exp $
-# This is a common location for functions used in the sys-libs/db ebuilds
-#
-# Bugs: maintainer-nee...@gentoo.org
-
-inherit eutils multilib
-
-IUSE="doc test examples"
-
-EXPORT_FUNCTIONS src_test
-
-DEPEND="test? ( >=dev-lang/tcl-8.4 )"
-
-RDEPEND=""
-
-db_fix_so() {
-   has "${EAPI:-0}" 0 1 2 && ! use prefix && EROOT="${ROOT}"
-   LIB="${EROOT}/usr/$(get_libdir)"
-
-   cd "${LIB}"
-
-   # first clean up old symlinks
-   find "${LIB}" -maxdepth 1 -type l -name 'libdb[1_-]*'"$(get_libname)" 
-delete
-   find "${LIB}" -maxdepth 1 -type l -name 'libdb[1_-]*'"$(get_libname 
"[23]")" -delete
-   find "${LIB}" -maxdepth 1 -type l -name "libdb$(get_libname)" -delete 
#519364
-   find "${LIB}" -maxdepth 1 -type l -name "libdb$(get_libname "[23]")" 
-delete #519364
-   find "${LIB}" -maxdepth 1 -type l -name 'libdb[1._-]*a' -delete
-
-   # now rebuild all the correct ones
-   for ext in so a dylib sl; do
-   for name in libdb libdb_{cxx,tcl,java,sql,stl}; do
-   target=`find . -maxdepth 1 -type f -name 
"${name}-*.${ext}" |sort -n |tail -n 1`
-   [ -n "${target}" ] || continue;
-   case ${CHOST} in 
-   *-aix*)
-   aixdll --merge-runtime \
-   --keepdir=false \
-   --target="${name}.${ext}" \
-   --current="${target}" \
-   `find . -maxdepth 1 -type f -name 
"${name}-*.${ext}"`
-   ;;
-   *)
-   ln -sf ${target//.\//} ${name}.${ext}
-   ;;
-   esac;
-   done;
-   done;
-
-   # db[23] gets some extra-special stuff
-   if [ -f libdb1$(get_libname 2) ]; then
-   ln -sf libdb1$(get_libname 2) libdb$(get_libname 2)
-   ln -sf libdb1$(get_libname 2) libdb1$(get_libname)
-   ln -sf libdb1$(get_libname 2) libdb-1$(get_libame)
-   fi
-   # what do we do if we ever get 3.3 ?
-   for i in libdb libdb_{cxx,tcl,java,sql,stl}; do
-   if [ -f $i-3$(get_libname 2) ]; then
-   ln -sf $i-3$(get_libname 2) $i-3$(get_libname)
-   ln -sf $i-3$(get_libname 2) $i$(get_libname 3)
-   fi
-   done
-
-   # do the same for headers now
-   # but since there are only two of them, just overwrite them
-   cd "${EROOT}"/usr/include
-   target=`find . -maxdepth 1 -type d -name 'db[0-9]*' | sort -n |cut -d/ 
-f2- | tail -n1`
-   if [ -n "${target}" ] && [ -e "${target}/db.h" ] && ( ! [[ -e db.h ]] 
|| [[ -h db.h ]] ); then
-   einfo "Creating db.h symlinks to ${target}"
-   ln -sf "${target}"/db.h .
-   ln -sf "${target}"/db_185.h .
-   elif [ ! -e "${target}/db.h" ]; then
-   if [ -n "${target}" ]; then
-   ewarn "Could not find ${target}/db.h"
-   elif [ -h db.h ]; then
-   einfo "Apparently you just removed the last instance of 
$PN. Removing the symlinks"
-   rm -f db.h db_185.h
-   fi
-   fi
-}
-
-db_src_install_doc() {
-   has "${EAPI:-0}" 0 1 2 && ! use prefix && ED="${D}"
-   # not everybody wants this wad of documentation as it is primarily API 
docs
-   if use doc; then
-   dodir /usr/share/doc/${PF}/html
-   mv "${ED}"/usr/docs/* "${ED}"/usr/share/doc/${PF}/html/
-   rm -rf "${ED}"/usr/docs
-   else
-   rm -rf "${ED}"/usr/docs
-   fi
-
-   db_src_install_examples
-}
-
-db_src_install_examples() {
-   has "${EAPI:-0}" 0 1 2 && ! use prefix && ED="${D}"
-   if use examples ; then
-   local langs="c cxx stl"
-   [[ "${IUSE/java}" != "${IUSE}" ]] \
-   && use java \
-   && langs="${langs} java"
-   for i in $langs ; do
- 

[gentoo-commits] proj/android:master commit in: eclass/

2017-08-30 Thread Benda XU
commit: 9ef840da9329237f76d336c7b490281714391429
Author: Benda Xu  gentoo  org>
AuthorDate: Thu Aug 24 08:06:40 2017 +
Commit: Benda XU  gentoo  org>
CommitDate: Thu Aug 24 08:06:40 2017 +
URL:https://gitweb.gentoo.org/proj/android.git/commit/?id=9ef840da

eclass/R-packages.eclass: merged to R_Overlay.

 eclass/R-packages.eclass | 51 
 1 file changed, 51 deletions(-)

diff --git a/eclass/R-packages.eclass b/eclass/R-packages.eclass
deleted file mode 100644
index cea7eba..000
--- a/eclass/R-packages.eclass
+++ /dev/null
@@ -1,51 +0,0 @@
-# Copyright 1999-2012 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: $
-
-inherit eutils
-
-EXPORT_FUNCTIONS src_unpack src_prepare src_compile src_install pkg_postinst
-
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE="byte-compile"
-
-DEPEND="dev-lang/R"
-RDEPEND="${DEPEND}"
-
-S="${WORKDIR}"
-
-R-packages_src_unpack() {
-   unpack ${A}
-   mv ${PN//_/.} ${P}
-}
-
-R-packages_src_prepare() {
-   cd ${P}
-   epatch_user
-}
-
-R-packages_src_compile() {
-   einfo "R CMD INSTALL ${S}/${P} -l . $(use byte-compile && echo 
--byte-compile)"
-   MAKEFLAGS="CFLAGS=${CFLAGS// /\\ } CXXFLAGS=${CXXFLAGS// /\\ } 
FFLAGS=${FFLAGS// /\\ } FCFLAGS=${FCFLAGS// /\\ } LDFLAGS=${LDFLAGS// /\\ }" \
-   R CMD INSTALL ${S}/${P} -l . $(use byte-compile && echo 
--byte-compile)
-}
-
-R-packages_src_install() {
-   insinto /usr/$(get_libdir)/R/site-library
-   doins -r ${PN//_/.}
-}
-
-R-packages_pkg_postinst() {
-   if [[ "${_UNRESOLVABLE_PACKAGES:-}" ]]; then
-   # _UNRESOLVABLE_PACKAGES is only set if it has more than zero 
items
-   local _max=${#_UNRESOLVABLE_PACKAGES[*]} i=
-
-   einfo "Dependency(-ies):"
-   for (( i=0; i<${_max}; i++ )); do
-   einfo "- ${_UNRESOLVABLE_PACKAGES[$i]}"
-   done
-   einfo 'are (is) suggested by upstream but could not be found.'
-   einfo 'Please install it manually from the R interpreter if you 
need it.'
-   fi
-}



[gentoo-commits] proj/android:master commit in: eclass/

2017-08-06 Thread Benda XU
commit: 2ce0208d19c5417cc5ac001c265da5880147d4b2
Author: Benda Xu  gentoo  org>
AuthorDate: Mon Aug  7 06:12:17 2017 +
Commit: Benda XU  gentoo  org>
CommitDate: Mon Aug  7 06:12:17 2017 +
URL:https://gitweb.gentoo.org/proj/android.git/commit/?id=2ce0208d

toolchain.eclass: merged to gentoo main.

 eclass/toolchain.eclass | 2382 ---
 1 file changed, 2382 deletions(-)

diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
deleted file mode 100644
index ca64091..000
--- a/eclass/toolchain.eclass
+++ /dev/null
@@ -1,2382 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-# Maintainer: Toolchain Ninjas 
-
-DESCRIPTION="The GNU Compiler Collection"
-HOMEPAGE="https://gcc.gnu.org/";
-RESTRICT="strip" # cross-compilers need controlled stripping
-
-inherit eutils fixheadtails flag-o-matic gnuconfig libtool multilib pax-utils 
toolchain-funcs versionator prefix
-
-if [[ ${PV} == *_pre* ]] ; then
-   EGIT_REPO_URI="git://gcc.gnu.org/git/gcc.git"
-   # naming style:
-   # gcc-4.7.1_pre -> gcc-4_7-branch
-   #  Note that the micro version is required or lots of stuff will break.
-   #  To checkout master set gcc_LIVE_BRANCH="master" in the ebuild before
-   #  inheriting this eclass.
-   EGIT_BRANCH="${PN}-${PV%.?_pre}-branch"
-   EGIT_BRANCH=${EGIT_BRANCH//./_}
-   inherit git-2
-fi
-
-FEATURES=${FEATURES/multilib-strict/}
-
-EXPORTED_FUNCTIONS="pkg_setup src_unpack src_compile src_test src_install 
pkg_postinst pkg_postrm"
-case ${EAPI:-0} in
-   0|1)die "Need to upgrade to at least EAPI=2";;
-   2|3)EXPORTED_FUNCTIONS+=" src_prepare src_configure" ;;
-   4*|5*)  EXPORTED_FUNCTIONS+=" pkg_pretend src_prepare src_configure" ;;
-   *)  die "I don't speak EAPI ${EAPI}."
-esac
-EXPORT_FUNCTIONS ${EXPORTED_FUNCTIONS}
-
-#>> globals <<
-
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} = ${CHOST} ]] ; then
-   if [[ ${CATEGORY} == cross-* ]] ; then
-   export CTARGET=${CATEGORY#cross-}
-   fi
-fi
-: ${TARGET_ABI:=${ABI}}
-: ${TARGET_MULTILIB_ABIS:=${MULTILIB_ABIS}}
-: ${TARGET_DEFAULT_ABI:=${DEFAULT_ABI}}
-
-is_crosscompile() {
-   [[ ${CHOST} != ${CTARGET} ]]
-}
-
-if [[ ${EAPI:-0} == [012] ]] ; then
-   : ${ED:=${D}}
-   : ${EROOT:=${ROOT}}
-fi
-
-# General purpose version check.  Without a second arg matches up to minor 
version (x.x.x)
-tc_version_is_at_least() {
-   version_is_at_least "$1" "${2:-${GCC_RELEASE_VER}}"
-}
-
-# General purpose version range check
-# Note that it matches up to but NOT including the second version
-tc_version_is_between() {
-   tc_version_is_at_least "${1}" && ! tc_version_is_at_least "${2}"
-}
-
-GCC_PV=${TOOLCHAIN_GCC_PV:-${PV}}
-GCC_PVR=${GCC_PV}
-[[ ${PR} != "r0" ]] && GCC_PVR=${GCC_PVR}-${PR}
-GCC_RELEASE_VER=$(get_version_component_range 1-3 ${GCC_PV})
-GCC_BRANCH_VER=$(get_version_component_range 1-2 ${GCC_PV})
-GCCMAJOR=$(get_version_component_range 1 ${GCC_PV})
-GCCMINOR=$(get_version_component_range 2 ${GCC_PV})
-GCCMICRO=$(get_version_component_range 3 ${GCC_PV})
-[[ ${BRANCH_UPDATE-notset} == "notset" ]] && \
-   BRANCH_UPDATE=$(get_version_component_range 4 ${GCC_PV})
-
-# According to gcc/c-cppbuiltin.c, GCC_CONFIG_VER MUST match this regex.
-# ([^0-9]*-)?[0-9]+[.][0-9]+([.][0-9]+)?([- ].*)?
-GCC_CONFIG_VER=${GCC_CONFIG_VER:-$(replace_version_separator 3 '-' ${GCC_PV})}
-
-# Pre-release support
-if [[ ${GCC_PV} == *_pre* ]] ; then
-   PRERELEASE=${GCC_PV/_pre/-}
-elif [[ ${GCC_PV} == *_alpha* ]] ; then
-   SNAPSHOT=${GCC_BRANCH_VER}-${GCC_PV##*_alpha}
-elif [[ ${GCC_PV} == *_beta* ]] ; then
-   SNAPSHOT=${GCC_BRANCH_VER}-${GCC_PV##*_beta}
-elif [[ ${GCC_PV} == *_rc* ]] ; then
-   SNAPSHOT=${GCC_PV%_rc*}-RC-${GCC_PV##*_rc}
-fi
-
-if [[ ${SNAPSHOT} == [56789].0-* ]] ; then
-   # The gcc-5+ releases have dropped the .0 for some reason.
-   SNAPSHOT=${SNAPSHOT/.0}
-fi
-
-export GCC_FILESDIR=${GCC_FILESDIR:-${FILESDIR}}
-
-PREFIX=${TOOLCHAIN_PREFIX:-${EPREFIX}/usr}
-
-if tc_version_is_at_least 3.4.0 ; then
-   
LIBPATH=${TOOLCHAIN_LIBPATH:-${PREFIX}/lib/gcc/${CTARGET}/${GCC_CONFIG_VER}}
-else
-   
LIBPATH=${TOOLCHAIN_LIBPATH:-${PREFIX}/lib/gcc-lib/${CTARGET}/${GCC_CONFIG_VER}}
-fi
-INCLUDEPATH=${TOOLCHAIN_INCLUDEPATH:-${LIBPATH}/include}
-
-if is_crosscompile ; then
-   
BINPATH=${TOOLCHAIN_BINPATH:-${PREFIX}/${CHOST}/${CTARGET}/gcc-bin/${GCC_CONFIG_VER}}
-   HOSTLIBPATH=${PREFIX}/${CHOST}/${CTARGET}/lib/${GCC_CONFIG_VER}
-else
-   
BINPATH=${TOOLCHAIN_BINPATH:-${PREFIX}/${CTARGET}/gcc-bin/${GCC_CONFIG_VER}}
-fi
-
-DATAPATH=${TOOLCHAIN_DATAPATH:-${PREFIX}/share/gcc-data/${CTARGET}/${GCC_CONFIG_VER}}
-
-# Dont install in /usr/include/g++-v3/, but in gcc internal directory.
-# We will handle /usr/include/g++-v3/ with gcc-config ...

[gentoo-commits] proj/android:master commit in: eclass/

2017-02-08 Thread Benda XU
commit: 53e9bfd4ab6a03c036ec7f95e666cd45fc466e63
Author: Benda Xu  gentoo  org>
AuthorDate: Thu Feb  9 04:51:55 2017 +
Commit: Benda XU  gentoo  org>
CommitDate: Thu Feb  9 04:51:55 2017 +
URL:https://gitweb.gentoo.org/proj/android.git/commit/?id=53e9bfd4

java-utils-2.eclass: merged.

 eclass/java-utils-2.eclass | 2888 
 1 file changed, 2888 deletions(-)

diff --git a/eclass/java-utils-2.eclass b/eclass/java-utils-2.eclass
deleted file mode 100644
index b4246b3..000
--- a/eclass/java-utils-2.eclass
+++ /dev/null
@@ -1,2888 +0,0 @@
-# Copyright 2004-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-# @ECLASS: java-utils-2.eclass
-# @MAINTAINER:
-# j...@gentoo.org
-# @AUTHOR:
-# Thomas Matthijs , Karl Trygve Kalleberg 
-# @BLURB: Base eclass for Java packages
-# @DESCRIPTION:
-# This eclass provides functionality which is used by java-pkg-2.eclass,
-# java-pkg-opt-2.eclass and java-ant-2 eclass, as well as from ebuilds.
-#
-# This eclass should not be inherited this directly from an ebuild. Instead,
-# you should inherit java-pkg-2 for Java packages or java-pkg-opt-2 for 
packages
-# that have optional Java support. In addition you can inherit java-ant-2 for
-# Ant-based packages.
-inherit eutils versionator multilib
-
-IUSE="elibc_FreeBSD"
-
-# Make sure we use java-config-2
-export WANT_JAVA_CONFIG="2"
-
-# @VARIABLE: JAVA_PKG_PORTAGE_DEP
-# @INTERNAL
-# @DESCRIPTION:
-# The version of portage we need to function properly. Previously it was
-# portage with phase hooks support but now we use a version with proper env
-# saving. For EAPI 2 we have new enough stuff so let's have cleaner deps.
-has "${EAPI}" 0 1 && JAVA_PKG_PORTAGE_DEP=">=sys-apps/portage-2.1.2.7"
-
-# @VARIABLE: JAVA_PKG_E_DEPEND
-# @INTERNAL
-# @DESCRIPTION:
-# This is a convience variable to be used from the other java eclasses. This is
-# the version of java-config we want to use. Usually the latest stable version
-# so that ebuilds can use new features without depending on specific versions.
-JAVA_PKG_E_DEPEND=">=dev-java/java-config-2.2.0-r3 ${JAVA_PKG_PORTAGE_DEP}"
-has source ${JAVA_PKG_IUSE} && JAVA_PKG_E_DEPEND="${JAVA_PKG_E_DEPEND} source? 
( app-arch/zip )"
-
-# @ECLASS-VARIABLE: JAVA_PKG_WANT_BOOTCLASSPATH
-# @DEFAULT_UNSET
-# @DESCRIPTION:
-# The version of bootclasspath the package needs to work. Translates to a 
proper
-# dependency. The bootclasspath can then be obtained by 
java-ant_rewrite-bootclasspath
-if [[ -n "${JAVA_PKG_WANT_BOOTCLASSPATH}" ]]; then
-   if [[ "${JAVA_PKG_WANT_BOOTCLASSPATH}" == "1.5" ]]; then
-   JAVA_PKG_E_DEPEND="${JAVA_PKG_E_DEPEND} 
>=dev-java/gnu-classpath-0.98-r1:0.98"
-   else
-   eerror "Unknown value of JAVA_PKG_WANT_BOOTCLASSPATH"
-   # since die in global scope doesn't work, this will make 
repoman fail
-   JAVA_PKG_E_DEPEND="${JAVA_PKG_E_DEPEND} 
BAD_JAVA_PKG_WANT_BOOTCLASSPATH"
-   fi
-fi
-
-# @ECLASS-VARIABLE: JAVA_PKG_ALLOW_VM_CHANGE
-# @DESCRIPTION:
-# Allow this eclass to change the active VM?
-# If your system VM isn't sufficient for the package, the build will fail
-# instead of trying to switch to another VM.
-#
-# Overriding the default can be useful for testing specific VMs locally, but
-# should not be used in the final ebuild.
-JAVA_PKG_ALLOW_VM_CHANGE=${JAVA_PKG_ALLOW_VM_CHANGE:="yes"}
-
-# @ECLASS-VARIABLE: JAVA_PKG_FORCE_VM
-# @DEFAULT_UNSET
-# @DESCRIPTION:
-# Explicitly set a particular VM to use. If its not valid, it'll fall back to
-# whatever /etc/java-config-2/build/jdk.conf would elect to use.
-#
-# Should only be used for testing and debugging.
-#
-# Example: use sun-jdk-1.5 to emerge foo:
-# @CODE
-#  JAVA_PKG_FORCE_VM=sun-jdk-1.5 emerge foo
-# @CODE
-
-# @ECLASS-VARIABLE: JAVA_PKG_WANT_BUILD_VM
-# @DEFAULT_UNSET
-# @DESCRIPTION:
-# A list of VM handles to choose a build VM from. If the list contains the
-# currently active VM use that one, otherwise step through the list till a
-# usable/installed VM is found.
-#
-# This allows to use an explicit list of JDKs in DEPEND instead of a virtual.
-# Users of this variable must make sure at least one of the listed handles is
-# covered by DEPEND.
-# Requires JAVA_PKG_WANT_SOURCE and JAVA_PKG_WANT_TARGET to be set as well.
-
-# @ECLASS-VARIABLE: JAVA_PKG_WANT_SOURCE
-# @DEFAULT_UNSET
-# @DESCRIPTION:
-# Specify a non-standard Java source version for compilation (via javac -source
-# parameter or Ant equivalent via build.xml rewriting done by java-ant-2 
eclass).
-# Normally this is determined from the jdk version specified in DEPEND.
-# See java-pkg_get-source function below.
-#
-# Should generally only be used for testing and debugging.
-#
-# Use 1.4 source to emerge baz
-# @CODE
-#  JAVA_PKG_WANT_SOURCE=1.4 emerge baz
-# @CODE
-
-# @ECLASS-VARIABLE: JAVA_PKG_WANT_TARGET
-# @DEFAULT_UNSET
-# @DESCRIPTION:
-# Same as JAVA_PKG_WANT_

[gentoo-commits] proj/android:master commit in: eclass/

2017-01-07 Thread Benda XU
commit: 7003d2b7a7b5f93d3eefc996c2863d5decbf2b39
Author: Benda Xu  gentoo  org>
AuthorDate: Sat Jan  7 14:27:50 2017 +
Commit: Benda XU  gentoo  org>
CommitDate: Sat Jan  7 14:27:50 2017 +
URL:https://gitweb.gentoo.org/proj/android.git/commit/?id=7003d2b7

track.

toolchain.eclass refresh before commit.

 eclass/R-packages.eclass   |   51 +
 eclass/java-utils-2.eclass | 2888 
 eclass/linux-info.eclass   |  925 ++
 eclass/toolchain.eclass|  106 +-
 4 files changed, 3930 insertions(+), 40 deletions(-)

diff --git a/eclass/R-packages.eclass b/eclass/R-packages.eclass
new file mode 100644
index 000..cea7eba
--- /dev/null
+++ b/eclass/R-packages.eclass
@@ -0,0 +1,51 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+inherit eutils
+
+EXPORT_FUNCTIONS src_unpack src_prepare src_compile src_install pkg_postinst
+
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="byte-compile"
+
+DEPEND="dev-lang/R"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}"
+
+R-packages_src_unpack() {
+   unpack ${A}
+   mv ${PN//_/.} ${P}
+}
+
+R-packages_src_prepare() {
+   cd ${P}
+   epatch_user
+}
+
+R-packages_src_compile() {
+   einfo "R CMD INSTALL ${S}/${P} -l . $(use byte-compile && echo 
--byte-compile)"
+   MAKEFLAGS="CFLAGS=${CFLAGS// /\\ } CXXFLAGS=${CXXFLAGS// /\\ } 
FFLAGS=${FFLAGS// /\\ } FCFLAGS=${FCFLAGS// /\\ } LDFLAGS=${LDFLAGS// /\\ }" \
+   R CMD INSTALL ${S}/${P} -l . $(use byte-compile && echo 
--byte-compile)
+}
+
+R-packages_src_install() {
+   insinto /usr/$(get_libdir)/R/site-library
+   doins -r ${PN//_/.}
+}
+
+R-packages_pkg_postinst() {
+   if [[ "${_UNRESOLVABLE_PACKAGES:-}" ]]; then
+   # _UNRESOLVABLE_PACKAGES is only set if it has more than zero 
items
+   local _max=${#_UNRESOLVABLE_PACKAGES[*]} i=
+
+   einfo "Dependency(-ies):"
+   for (( i=0; i<${_max}; i++ )); do
+   einfo "- ${_UNRESOLVABLE_PACKAGES[$i]}"
+   done
+   einfo 'are (is) suggested by upstream but could not be found.'
+   einfo 'Please install it manually from the R interpreter if you 
need it.'
+   fi
+}

diff --git a/eclass/java-utils-2.eclass b/eclass/java-utils-2.eclass
new file mode 100644
index 000..b4246b3
--- /dev/null
+++ b/eclass/java-utils-2.eclass
@@ -0,0 +1,2888 @@
+# Copyright 2004-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# @ECLASS: java-utils-2.eclass
+# @MAINTAINER:
+# j...@gentoo.org
+# @AUTHOR:
+# Thomas Matthijs , Karl Trygve Kalleberg 
+# @BLURB: Base eclass for Java packages
+# @DESCRIPTION:
+# This eclass provides functionality which is used by java-pkg-2.eclass,
+# java-pkg-opt-2.eclass and java-ant-2 eclass, as well as from ebuilds.
+#
+# This eclass should not be inherited this directly from an ebuild. Instead,
+# you should inherit java-pkg-2 for Java packages or java-pkg-opt-2 for 
packages
+# that have optional Java support. In addition you can inherit java-ant-2 for
+# Ant-based packages.
+inherit eutils versionator multilib
+
+IUSE="elibc_FreeBSD"
+
+# Make sure we use java-config-2
+export WANT_JAVA_CONFIG="2"
+
+# @VARIABLE: JAVA_PKG_PORTAGE_DEP
+# @INTERNAL
+# @DESCRIPTION:
+# The version of portage we need to function properly. Previously it was
+# portage with phase hooks support but now we use a version with proper env
+# saving. For EAPI 2 we have new enough stuff so let's have cleaner deps.
+has "${EAPI}" 0 1 && JAVA_PKG_PORTAGE_DEP=">=sys-apps/portage-2.1.2.7"
+
+# @VARIABLE: JAVA_PKG_E_DEPEND
+# @INTERNAL
+# @DESCRIPTION:
+# This is a convience variable to be used from the other java eclasses. This is
+# the version of java-config we want to use. Usually the latest stable version
+# so that ebuilds can use new features without depending on specific versions.
+JAVA_PKG_E_DEPEND=">=dev-java/java-config-2.2.0-r3 ${JAVA_PKG_PORTAGE_DEP}"
+has source ${JAVA_PKG_IUSE} && JAVA_PKG_E_DEPEND="${JAVA_PKG_E_DEPEND} source? 
( app-arch/zip )"
+
+# @ECLASS-VARIABLE: JAVA_PKG_WANT_BOOTCLASSPATH
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# The version of bootclasspath the package needs to work. Translates to a 
proper
+# dependency. The bootclasspath can then be obtained by 
java-ant_rewrite-bootclasspath
+if [[ -n "${JAVA_PKG_WANT_BOOTCLASSPATH}" ]]; then
+   if [[ "${JAVA_PKG_WANT_BOOTCLASSPATH}" == "1.5" ]]; then
+   JAVA_PKG_E_DEPEND="${JAVA_PKG_E_DEPEND} 
>=dev-java/gnu-classpath-0.98-r1:0.98"
+   else
+   eerror "Unknown value of JAVA_PKG_WANT_BOOTCLASSPATH"
+   # since die in global scope doesn't work, this will make 
repoman fail
+   JAVA_PKG_E_DEPEND="${JAVA_PKG_E_DEPEND} 
BAD_JAVA_PKG_WANT_BOOTCLASSPATH"
+   fi
+fi
+
+# @ECLASS-VARIABLE: JAVA_PKG_ALLOW_VM_CHANGE
+# @DESCRIPTION:
+# Al

[gentoo-commits] proj/android:master commit in: eclass/

2016-10-24 Thread Benda XU
commit: c9eefea43ef844ba33fff731b2ba6c48e9133fcd
Author: Benda Xu  gentoo  org>
AuthorDate: Mon Oct 24 12:29:49 2016 +
Commit: Benda XU  gentoo  org>
CommitDate: Mon Oct 24 12:29:49 2016 +
URL:https://gitweb.gentoo.org/proj/android.git/commit/?id=c9eefea4

toolchain.eclass: prefixify the config shell.

 eclass/toolchain.eclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index 0d0fac9..27ff44a 100644
--- a/eclass/toolchain.eclass
+++ b/eclass/toolchain.eclass
@@ -1251,7 +1251,7 @@ toolchain_src_configure() {
echo "${S}"/configure "${confgcc[@]}"
# Older gcc versions did not detect bash and re-exec itself, so force 
the
# use of bash.  Newer ones will auto-detect, but this is not harmeful.
-   CONFIG_SHELL="/bin/bash" \
+   CONFIG_SHELL="${EPREFIX}/bin/bash" \
bash "${S}"/configure "${confgcc[@]}" || die "failed to run configure"
 
# return to whatever directory we were in before



[gentoo-commits] proj/android:master commit in: eclass/

2016-07-21 Thread Benda XU
commit: f9f6d9ab8a0c41373d665bed3d016653948f5da9
Author: Benda Xu  gentoo  org>
AuthorDate: Thu Jul 21 12:38:01 2016 +
Commit: Benda XU  gentoo  org>
CommitDate: Thu Jul 21 12:38:01 2016 +
URL:https://gitweb.gentoo.org/proj/android.git/commit/?id=f9f6d9ab

toolchain.eclass: migrate from fprefixify to prefixify_ro.

 eclass/toolchain.eclass | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index 5a4c92d..0d0fac9 100644
--- a/eclass/toolchain.eclass
+++ b/eclass/toolchain.eclass
@@ -1749,9 +1749,9 @@ toolchain_src_install() {
# between binary and source package borks things 
if ! is_crosscompile ; then
insinto "${DATAPATH#${EPREFIX}}"
-   fprefixify newins 
"${GCC_FILESDIR}"/awk/fixlafiles.awk-no_gcc_la fixlafiles.awk || die
+   newins "$(prefixify_ro 
"${GCC_FILESDIR}"/awk/fixlafiles.awk-no_gcc_la)" fixlafiles.awk || die
exeinto "${DATAPATH#${EPREFIX}}"
-   fprefixify doexe "${GCC_FILESDIR}"/fix_libtool_files.sh || die
+   doexe "$(prefixify_ro "${GCC_FILESDIR}"/fix_libtool_files.sh)" 
|| die
doexe "${GCC_FILESDIR}"/c{89,99} || die
fi
 



[gentoo-commits] proj/android:master commit in: eclass/

2016-07-20 Thread Benda XU
commit: f940e6ec473b0e918c6bde8801ca17d88f9834b0
Author: Benda Xu  gmail  com>
AuthorDate: Sun Jul 17 07:47:55 2016 +
Commit: Benda XU  gentoo  org>
CommitDate: Sun Jul 17 07:47:55 2016 +
URL:https://gitweb.gentoo.org/proj/android.git/commit/?id=f940e6ec

prefix.eclass: split the heuristics into hprefixify.

 eclass/prefix.eclass | 79 
 1 file changed, 61 insertions(+), 18 deletions(-)

diff --git a/eclass/prefix.eclass b/eclass/prefix.eclass
index 40e5097..411b365 100644
--- a/eclass/prefix.eclass
+++ b/eclass/prefix.eclass
@@ -27,25 +27,17 @@ fi
 # @FUNCTION: eprefixify
 # @USAGE: 
 # @DESCRIPTION:
-# replaces @GENTOO_PORTAGE_EPREFIX@ with ${EPREFIX} for the given files,
-# tries a set of heuristics if @GENTOO_PORTAGE_EPREFIX@ is not found,
-# dies if no arguments are given, a file does not exist, or changing a
+# Replaces @GENTOO_PORTAGE_EPREFIX@ with ${EPREFIX} for the given files,
+# Dies if no arguments are given, a file does not exist, or changing a
 # file failed.
 eprefixify() {
-   [[ $# -lt 1 ]] && die "at least one argument required"
-
+   [[ $# -lt 1 ]] && die "at least one file operand is required"
einfo "Adjusting to prefix ${EPREFIX:-/}"
local x
for x in "$@" ; do
if [[ -e ${x} ]] ; then
ebegin "  ${x##*/}"
-   if grep -q @GENTOO_PORTAGE_EPREFIX@ "${x}" ; then
-   sed -i -e 
"s|@GENTOO_PORTAGE_EPREFIX@|${EPREFIX}|g" "${x}"
-   else
-   sed -r \
-   -e 
"s,([^[:alnum:]}])/(usr|etc|bin|sbin|var|opt)/,\1${EPREFIX}/\2/,g" \
-   -i "${x}"
-   fi
+   sed -i -e "s|@GENTOO_PORTAGE_EPREFIX@|${EPREFIX}|g" 
"${x}"
eend $? || die "failed to eprefixify ${x}"
else
die "${x} does not exist"
@@ -55,28 +47,78 @@ eprefixify() {
return 0
 }
 
+# @FUNCTION: hprefixify
+# @USAGE: [ -w  ] [-e ] 
+# @DESCRIPTION:
+#
+# Tries a set of heuristics to prefixify the given files, Dies if no
+# arguments are given, a file does not exist, or changing a file failed.
+#
+# Additional extended regular expression can be passed by -e or
+# environment variable PREFIX_EXTRA_REGEX.  The default heuristics can
+# be constrained to lines matching regular expressions passed by -w or
+# environment variable PREFIX_LINE_MATCH.
+hprefixify() {
+   local PREFIX_EXTRA_REGEX PREFIX_LINE_MATCH xl=() x
+   while [[ $# -gt 0 ]]; do
+   case $1 in
+   -e)
+   PREFIX_EXTRA_REGEX="$2"
+   shift
+   ;;
+   -w)
+   PREFIX_LINE_MATCHING="$2"
+   shift
+   ;;
+   *)
+   xl+=( "$1" )
+   ;;
+   esac
+   shift
+   done
+
+   [[ ${#xl[@]} -lt 1 ]] && die "at least one file operand is required"
+   einfo "Adjusting to prefix ${EPREFIX:-/}"
+   for x in "${xl[@]}" ; do
+   if [[ -e ${x} ]] ; then
+   ebegin "  ${x##*/}"
+   sed -r \
+   -e 
"${PREFIX_LINE_MATCH}s,([^[:alnum:]}\)\.])/(usr|lib(|[onx]?32|n?64)|etc|bin|sbin|var|opt),\1${EPREFIX}/\2,g"
 \
+   -e "${PREFIX_EXTRA_REGEX}" \
+   -i "${x}"
+   eend $? || die "failed to prefixify ${x}"
+   else
+   die "${x} does not exist"
+   fi
+   done
+}
+
 # @FUNCTION: __temp_prefixify
-# @USAGE: on a single file
+# @USAGE: a single file. Internal use only.
 # @DESCRIPTION:
 # copies the files to ${T}, calls eprefixify, echos the new file.
 __temp_prefixify() {
if [[ -e $1 ]] ; then
local f=${1##*/}
cp "$1" "${T}" || die "failed to copy file"
-   eprefixify "${T}"/${f} > /dev/null
-   echo "${T}"/${f}
+   local x="${T}"/${f}
+   if grep -qs @GENTOO_PORTAGE_EPREFIX@ "${x}" ; then
+   eprefixify "${T}"/${f} > /dev/null
+   else
+   hprefixify "${T}"/${f} > /dev/null
+   fi
+   echo "${x}"
else
die "$1 does not exist"
fi
 }
 
 # @FUNCTION: fprefixify
-# @USAGE: fprefixfy function files
+# @USAGE:  
 # @DESCRIPTION:
 # prefixify a function call.
 # copies the files to ${T}, calls eprefixify, and calls the function.
-#
-# For example:
+# @EXAMPLE:
 # fprefixify doexe ${FILESDIR}/fix_libtool_files.sh
 # fprefixify epatch ${FILESDIR}/${PN}-4.0.2-path.patch
 fp

[gentoo-commits] proj/android:master commit in: eclass/

2016-07-20 Thread Benda XU
commit: f237ba70585b97ba8e45882bb2f5926323b3e658
Author: Benda Xu  gentoo  org>
AuthorDate: Thu Jul 21 02:16:13 2016 +
Commit: Benda XU  gentoo  org>
CommitDate: Thu Jul 21 02:16:13 2016 +
URL:https://gitweb.gentoo.org/proj/android.git/commit/?id=f237ba70

toolchain.eclass: a couple of ED fixes.

 eclass/toolchain.eclass | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index b6df2da..5a4c92d 100644
--- a/eclass/toolchain.eclass
+++ b/eclass/toolchain.eclass
@@ -1711,7 +1711,7 @@ toolchain_src_install() {
# Now do the fun stripping stuff
env RESTRICT="" CHOST=${CHOST} prepstrip "${D}${BINPATH}"
is_crosscompile && \
-   env RESTRICT="" CHOST=${CHOST} prepstrip "${D}/${HOSTLIBPATH}"
+   env RESTRICT="" CHOST=${CHOST} prepstrip "${D}${HOSTLIBPATH}"
env RESTRICT="" CHOST=${CTARGET} prepstrip "${D}${LIBPATH}"
# gcc used to install helper binaries in lib/ but then moved to libexec/
[[ -d ${D}${PREFIX}/libexec/gcc ]] && \
@@ -1719,7 +1719,7 @@ toolchain_src_install() {
 
cd "${S}"
if is_crosscompile; then
-   rm -rf "${D}"/usr/share/{man,info}
+   rm -rf "${ED}"usr/share/{man,info}
rm -rf "${D}"${DATAPATH}/{man,info}
else
if tc_version_is_at_least 3.0 ; then
@@ -1729,10 +1729,10 @@ toolchain_src_install() {
fi
fi
has noinfo ${FEATURES} \
-   && rm -r "${D}/${DATAPATH}"/info \
+   && rm -r "${D}${DATAPATH}"/info \
|| prepinfo "${DATAPATH#${EPREFIX}}"
has noman ${FEATURES} \
-   && rm -r "${D}/${DATAPATH}"/man \
+   && rm -r "${D}${DATAPATH}"/man \
|| prepman "${DATAPATH#${EPREFIX}}"
fi
# prune empty dirs left behind
@@ -1834,7 +1834,7 @@ gcc_movelibs() {
# code to run on the target.
if tc_version_is_at_least 5 && is_crosscompile ; then
dodir "${HOSTLIBPATH#${EPREFIX}}"
-   mv "${ED}"/usr/$(get_libdir)/libcc1* "${D}${HOSTLIBPATH}" || die
+   mv "${ED}"usr/$(get_libdir)/libcc1* "${D}${HOSTLIBPATH}" || die
fi
 
# For all the libs that are built for CTARGET, move them into the



[gentoo-commits] proj/android:master commit in: eclass/

2016-06-23 Thread Benda XU
commit: c147c553072030cd06f55f6bde6360199bb1c9f9
Author: Benda Xu  gentoo  org>
AuthorDate: Fri Jun 24 03:07:13 2016 +
Commit: Benda XU  gentoo  org>
CommitDate: Fri Jun 24 03:07:13 2016 +
URL:https://gitweb.gentoo.org/proj/android.git/commit/?id=c147c553

toolchain.eclass: prefixify cross compile parts.

 eclass/toolchain.eclass | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index 44ec160..b6df2da 100644
--- a/eclass/toolchain.eclass
+++ b/eclass/toolchain.eclass
@@ -1833,8 +1833,8 @@ gcc_movelibs() {
# that you want to link against when building tools rather than building
# code to run on the target.
if tc_version_is_at_least 5 && is_crosscompile ; then
-   dodir "${HOSTLIBPATH}"
-   mv "${D}"/usr/$(get_libdir)/libcc1* "${D}${HOSTLIBPATH}" || die
+   dodir "${HOSTLIBPATH#${EPREFIX}}"
+   mv "${ED}"/usr/$(get_libdir)/libcc1* "${D}${HOSTLIBPATH}" || die
fi
 
# For all the libs that are built for CTARGET, move them into the



[gentoo-commits] proj/android:master commit in: eclass/

2016-06-15 Thread Benda XU
commit: da9025cda8eacec9f8a6eb4cedb0567f7523bea7
Author: Benda Xu  gentoo  org>
AuthorDate: Wed Jun 15 10:55:39 2016 +
Commit: Benda XU  gentoo  org>
CommitDate: Wed Jun 15 11:40:04 2016 +
URL:https://gitweb.gentoo.org/proj/android.git/commit/?id=da9025cd

kernel-2.eclass, toolchain-funcs.eclass: merged.

 eclass/kernel-2.eclass| 1321 -
 eclass/toolchain-funcs.eclass |  840 --
 2 files changed, 2161 deletions(-)

diff --git a/eclass/kernel-2.eclass b/eclass/kernel-2.eclass
deleted file mode 100644
index e8cb8f2..000
--- a/eclass/kernel-2.eclass
+++ /dev/null
@@ -1,1321 +0,0 @@
-# Copyright 1999-2014 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/kernel-2.eclass,v 1.297 2014/11/28 
17:40:20 mpagano Exp $
-
-# Description: kernel.eclass rewrite for a clean base regarding the 2.6
-#  series of kernel with back-compatibility for 2.4
-#
-# Original author: John Mylchreest 
-# Maintainer: kernel-m...@gentoo.org
-#
-# Please direct your bugs to the current eclass maintainer :)
-
-# added functionality:
-# unipatch - a flexible, singular method to extract, add and 
remove patches.
-
-# A Couple of env vars are available to effect usage of this eclass
-# These are as follows:
-#
-# K_USEPV  - When setting the EXTRAVERSION 
variable, it should
-#add PV to the end.
-#this is useful for thigns 
like wolk. IE:
-#EXTRAVERSION would be 
something like : -wolk-4.19-r1
-# K_NOSETEXTRAVERSION  - if this is set then EXTRAVERSION will not be
-#automatically set within the 
kernel Makefile
-# K_NOUSENAME  - if this is set then EXTRAVERSION will not 
include the
-#first part of ${PN} in 
EXTRAVERSION
-# K_NOUSEPR- if this is set then EXTRAVERSION will 
not include the
-#anything based on ${PR}.
-# K_PREPATCHED - if the patchset is prepatched (ie: mm-sources,
-#ck-sources, ac-sources) it 
will use PR (ie: -r5) as
-#the patchset version for
-#and not use it as a true 
package revision
-# K_EXTRAEINFO - this is a new-line seperated list of einfo 
displays in
-#postinst and can be used to 
carry additional postinst
-#messages
-# K_EXTRAELOG  - same as K_EXTRAEINFO except using elog 
instead of einfo
-# K_EXTRAEWARN - same as K_EXTRAEINFO except using ewarn 
instead of einfo
-# K_SYMLINK- if this is set, then forcably create 
symlink anyway
-#
-# K_DEFCONFIG  - Allow specifying a different defconfig target.
-#If length zero, defaults to 
"defconfig".
-# K_WANT_GENPATCHES- Apply genpatches to kernel source. Provide any
-#combination of "base", 
"extras" or "experimental".
-# K_EXP_GENPATCHES_PULL- If set, we pull "experimental" regardless of 
the USE FLAG
-#but expect the ebuild 
maintainer to use K_EXP_GENPATCHES_LIST.
-# K_EXP_GENPATCHES_NOUSE   - If set, no USE flag will be provided for 
"experimental";
-#as a result the user cannot 
choose to apply those patches.
-# K_EXP_GENPATCHES_LIST- A list of patches to pick from "experimental" 
to apply when
-#the USE flag is unset and 
K_EXP_GENPATCHES_PULL is set.
-# K_GENPATCHES_VER - The version of the genpatches tarball(s) to 
apply.
-#A value of "5" would apply 
genpatches-2.6.12-5 to
-#my-sources-2.6.12.ebuild
-# K_SECURITY_UNSUPPORTED- If set, this kernel is unsupported by Gentoo Security
-# K_DEBLOB_AVAILABLE   - A value of "0" will disable all of the optional deblob
-#code. If empty, will be set 
to "1" if deblobbing is
-#possible. Test ONLY for "1".
-# K_PREDEBLOBBED   - This kernel was already deblobbed elsewhere.
-#If false, either optional 
deblobbing will be available
-#or the license will note the 
in

[gentoo-commits] proj/android:master commit in: eclass/, app-shells/bash/

2016-06-15 Thread Benda XU
commit: 63fbe3a6739e5c9d6fcc59e95a81874935ff6b36
Author: Benda Xu  gentoo  org>
AuthorDate: Wed Jun 15 10:56:21 2016 +
Commit: Benda XU  gentoo  org>
CommitDate: Wed Jun 15 11:40:04 2016 +
URL:https://gitweb.gentoo.org/proj/android.git/commit/?id=63fbe3a6

app-shells/bash: introduce fprefixify.

 app-shells/bash/Manifest   |   2 +-
 app-shells/bash/bash-4.3_p42-r2.ebuild |   8 +-
 eclass/prefix.eclass   |  73 +--
 eclass/toolchain.eclass| 337 -
 4 files changed, 265 insertions(+), 155 deletions(-)

diff --git a/app-shells/bash/Manifest b/app-shells/bash/Manifest
index 95012e3..f6d2de2 100644
--- a/app-shells/bash/Manifest
+++ b/app-shells/bash/Manifest
@@ -55,6 +55,6 @@ DIST bash43-039 1531 SHA256 
ab94dced2215541097691f60c3eb323cc28ef2549463e6a5334b
 DIST bash43-040 1532 SHA256 
84bb396b9262992ca5424feab6ed3ec39f193ef5c76dfe4a62b551bd8dd9d76b SHA512 
25a0696f1f0e78cb971afa404e0b7fe634b70d49d6a5a9d6ff5506c42063968e8ede83ad80bd0b79601363676fe3abfedc3b76984f6f9ad2e7798790682e21d0
 WHIRLPOOL 
a435f25ae432161f676b4965cc20cc096fa18af8a191dca7cb311a41e3504e5d27c668fb3430fece1de45e0eed9cb34357dc887e83ace9819f24d585eddf6720
 DIST bash43-041 2362 SHA256 
4ec432966e4198524a7e0cd685fe222e96043769c9613e66742ac475db132c1a SHA512 
d75cdd6a1fb8aeb1a4e88f046cfea3ec493b994b96f60f27d5577b59408422bb7c51cc4525cadab821fd8c57f44fb07f811b087d077359242caff3b54cfc6819
 WHIRLPOOL 
c88e754d694b69bcb3ce390ab3e29932b30a74f8f15b75b570cc46699c072b0f872824766c45bc2a98627529896bdf5aaf6493a493ffd33932d9ed6a362defb3
 DIST bash43-042 1535 SHA256 
ac219322db2791da87a496ee6e8e5544846494bdaaea2626270c2f73c1044919 SHA512 
01a6601029c0a55c9bf1a4ace3f387f9d094a9b9ee3511e2113c000123d85b1d5813c369e62d5a6dd329f515ef0d67d11394a6c0e4516956387556c13d13009a
 WHIRLPOOL 
790b15282a81f5717fb675ea4ae752382ddb1b101766e32c68deb1ec1d64fcf8841b3da556b87ac685e18b528a1de31bc4b94900369f6386f8e3991ed76232c1
-EBUILD bash-4.3_p42-r2.ebuild 7456 SHA256 
2c3e289168f86fccadfc98a3d12ecc2e455c380fb0bf9bbaeda8e743a7b243f7 SHA512 
f1795707bc2889992b3ce2b3da9ac7c3c8128694dee7ee3a3119404ea714ee3359460bc26697d70eddb1b4af740530871959b833b518ce1d214e885f3f1271af
 WHIRLPOOL 
edc9669b7f0aa214a743cd9feb719255cd4e8e5de925df05227406790e8b7c1f6084655d2b8bb918cdede7e92e1b23e7a1d9a0c8da4a54bb9e55b2fcd2a76753
+EBUILD bash-4.3_p42-r2.ebuild 7354 SHA256 
0efd2ef5578c678f9f8b244d21172abd9e7c3dacc7a1cf93e725cbf4ca1dfc37 SHA512 
19992d88ddd5e1b32f8305fa5947909faa3244d1f7a955a6e975c0954cd05e45f568dc690f4a295d4a5286350e3a7edf7807d0156b7a794bcb6ae5c780355397
 WHIRLPOOL 
5d70945d03d62678bf6229f6d4cae6a98e4e3623ab9f85251a310b38d3a7f5c3b6a9fd37941ba46bff35cd769116174a4e2ed6cfc51a652fef12dfaffc13df2d
 EBUILD bash-4.4_rc1.ebuild 6959 SHA256 
d92507283358f9f797f7e125e7a58a650d8b53c24af2d99adcd61c73f359da9e SHA512 
c180b33b87da6ddedec29dd064c97524e02fd0d44b4e848a0a5cfb36cfbc5efdb68f1c256bee25bbbc4c8588fbbd284fc3cef8d314686a2dc27aa5375e8298cb
 WHIRLPOOL 
b9617eab24f0a7ecfeb532019c09579cd5517ed914a4aa751e8b67cf1248e3b7ee7dc326943d3ea6667a88d7d194ad529a23586096c6397081e31da7d2dc0c4a
 MISC metadata.xml 734 SHA256 
7850abd55e656b9360deafb278c98598922eb3b6f884d024d199110afdcf6ff0 SHA512 
a9301e8d2347e0cf90a97325d9a705076150c00609d28338e5d7d72c135468e4f0531b2a4077b69679ae6ccf89eee691e0e5f0748caab60689f5f017afb544f1
 WHIRLPOOL 
ce0e36bc0ae83b73aee7abee391d1b0a384f0277dfb7f7282043624a523699685d866ef3291a02e9ad1bde3abf196b47e1351f646e0149f942a40ed4dc940a37

diff --git a/app-shells/bash/bash-4.3_p42-r2.ebuild 
b/app-shells/bash/bash-4.3_p42-r2.ebuild
index 80d2094..da74e3d 100644
--- a/app-shells/bash/bash-4.3_p42-r2.ebuild
+++ b/app-shells/bash/bash-4.3_p42-r2.ebuild
@@ -88,11 +88,7 @@ src_prepare() {
epatch 
"${FILESDIR}"/${PN}-4.3-mapfile-improper-array-name-validation.patch
epatch "${FILESDIR}"/${PN}-4.3-arrayfunc.patch
 
-   epatch "${FILESDIR}"/${PN}-4.0-configs-prefix.patch
-   eprefixify pathnames.h.in
-   # modify the bashrc file for prefix
-   cp "${FILESDIR}"/bashrc "${T}"/ || die
-   eprefixify "${T}"/bashrc
+   fprefixify epatch "${FILESDIR}"/${PN}-4.0-configs-prefix.patch
 
epatch_user
 }
@@ -183,7 +179,7 @@ src_install() {
 
insinto /etc/bash
doins "${FILESDIR}"/bash_logout
-   doins "${T}"/bashrc
+   fprefixfy doins "${FILESDIR}"/bashrc
keepdir /etc/bash/bashrc.d
insinto /etc/skel
for f in bash{_logout,_profile,rc} ; do

diff --git a/eclass/prefix.eclass b/eclass/prefix.eclass
index 101cce2..40e5097 100644
--- a/eclass/prefix.eclass
+++ b/eclass/prefix.eclass
@@ -12,8 +12,6 @@
 # located somewhere in the filesystem.  Prefix ebuilds require
 # additional functions and variables which are defined by this eclass.
 
-inherit eutils
-
 # @ECLASS-VARIABLE: EPREFIX
 # @DESCRIPTION:
 # The offset prefix of a Gentoo Prefix installation.  When Gentoo Prefix
@@ -30,6 +28,7 @@ fi
 # @USAGE: 
 # @DESCRIPTION:
 

[gentoo-commits] proj/android:master commit in: eclass/

2016-06-15 Thread Benda XU
commit: ab80d9543ee6e002243e1d9cf5379c6fc0960e85
Author: Benda Xu  gentoo  org>
AuthorDate: Wed Jun 15 10:55:39 2016 +
Commit: Benda XU  gentoo  org>
CommitDate: Wed Jun 15 10:55:39 2016 +
URL:https://gitweb.gentoo.org/proj/android.git/commit/?id=ab80d954

kernel-2.eclass, toolchain-funcs.eclass: merged.

 eclass/kernel-2.eclass| 1321 -
 eclass/toolchain-funcs.eclass |  840 --
 2 files changed, 2161 deletions(-)

diff --git a/eclass/kernel-2.eclass b/eclass/kernel-2.eclass
deleted file mode 100644
index e8cb8f2..000
--- a/eclass/kernel-2.eclass
+++ /dev/null
@@ -1,1321 +0,0 @@
-# Copyright 1999-2014 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/kernel-2.eclass,v 1.297 2014/11/28 
17:40:20 mpagano Exp $
-
-# Description: kernel.eclass rewrite for a clean base regarding the 2.6
-#  series of kernel with back-compatibility for 2.4
-#
-# Original author: John Mylchreest 
-# Maintainer: kernel-m...@gentoo.org
-#
-# Please direct your bugs to the current eclass maintainer :)
-
-# added functionality:
-# unipatch - a flexible, singular method to extract, add and 
remove patches.
-
-# A Couple of env vars are available to effect usage of this eclass
-# These are as follows:
-#
-# K_USEPV  - When setting the EXTRAVERSION 
variable, it should
-#add PV to the end.
-#this is useful for thigns 
like wolk. IE:
-#EXTRAVERSION would be 
something like : -wolk-4.19-r1
-# K_NOSETEXTRAVERSION  - if this is set then EXTRAVERSION will not be
-#automatically set within the 
kernel Makefile
-# K_NOUSENAME  - if this is set then EXTRAVERSION will not 
include the
-#first part of ${PN} in 
EXTRAVERSION
-# K_NOUSEPR- if this is set then EXTRAVERSION will 
not include the
-#anything based on ${PR}.
-# K_PREPATCHED - if the patchset is prepatched (ie: mm-sources,
-#ck-sources, ac-sources) it 
will use PR (ie: -r5) as
-#the patchset version for
-#and not use it as a true 
package revision
-# K_EXTRAEINFO - this is a new-line seperated list of einfo 
displays in
-#postinst and can be used to 
carry additional postinst
-#messages
-# K_EXTRAELOG  - same as K_EXTRAEINFO except using elog 
instead of einfo
-# K_EXTRAEWARN - same as K_EXTRAEINFO except using ewarn 
instead of einfo
-# K_SYMLINK- if this is set, then forcably create 
symlink anyway
-#
-# K_DEFCONFIG  - Allow specifying a different defconfig target.
-#If length zero, defaults to 
"defconfig".
-# K_WANT_GENPATCHES- Apply genpatches to kernel source. Provide any
-#combination of "base", 
"extras" or "experimental".
-# K_EXP_GENPATCHES_PULL- If set, we pull "experimental" regardless of 
the USE FLAG
-#but expect the ebuild 
maintainer to use K_EXP_GENPATCHES_LIST.
-# K_EXP_GENPATCHES_NOUSE   - If set, no USE flag will be provided for 
"experimental";
-#as a result the user cannot 
choose to apply those patches.
-# K_EXP_GENPATCHES_LIST- A list of patches to pick from "experimental" 
to apply when
-#the USE flag is unset and 
K_EXP_GENPATCHES_PULL is set.
-# K_GENPATCHES_VER - The version of the genpatches tarball(s) to 
apply.
-#A value of "5" would apply 
genpatches-2.6.12-5 to
-#my-sources-2.6.12.ebuild
-# K_SECURITY_UNSUPPORTED- If set, this kernel is unsupported by Gentoo Security
-# K_DEBLOB_AVAILABLE   - A value of "0" will disable all of the optional deblob
-#code. If empty, will be set 
to "1" if deblobbing is
-#possible. Test ONLY for "1".
-# K_PREDEBLOBBED   - This kernel was already deblobbed elsewhere.
-#If false, either optional 
deblobbing will be available
-#or the license will note the 
in

[gentoo-commits] proj/android:master commit in: eclass/

2016-06-13 Thread Benda XU
commit: 476e3eade829ef401bcc2eaf8ae7d0262f3d121f
Author: Benda Xu  gentoo  org>
AuthorDate: Tue Jun 14 01:59:53 2016 +
Commit: Benda XU  gentoo  org>
CommitDate: Tue Jun 14 01:59:53 2016 +
URL:https://gitweb.gentoo.org/proj/android.git/commit/?id=476e3ead

user.eclass: gracefully return early on for enewgroup and enewuser.

 eclass/user.eclass | 12 ++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/eclass/user.eclass b/eclass/user.eclass
index 860aba0..9fddbbb 100644
--- a/eclass/user.eclass
+++ b/eclass/user.eclass
@@ -107,6 +107,10 @@ egetent() {
 # Default uid is (pass -1 for this) next available, default shell is
 # /bin/false, default homedir is /dev/null, and there are no default groups.
 enewuser() {
+   if [[ ${EUID} != 0 ]] ; then
+   einfo "Donot have enough privilege to execute ${FUNCNAME[0]}"
+   return 0
+   fi
_assert_pkg_ebuild_phase ${FUNCNAME}
 
# get the username
@@ -247,7 +251,7 @@ enewuser() {
;;
 
*)
-   useradd -r "${opts[@]}" "${euser}" || use prefix || die
+   useradd -r "${opts[@]}" "${euser}" || die
;;
esac
 
@@ -267,6 +271,10 @@ enewuser() {
 # do the rest.  You may specify the gid for the group or allow the group to
 # allocate the next available one.
 enewgroup() {
+   if [[ ${EUID} != 0 ]] ; then
+   einfo "Donot have enough privilege to execute ${FUNCNAME[0]}"
+   return 0
+   fi
_assert_pkg_ebuild_phase ${FUNCNAME}
 
# get the group
@@ -340,7 +348,7 @@ enewgroup() {
opts="-g ${egid}"
fi
# We specify -r so that we get a GID in the system range from 
login.defs
-   groupadd -r ${opts} "${egroup}" || use prefix || die
+   groupadd -r ${opts} "${egroup}" || die
;;
esac
 }



[gentoo-commits] proj/android:master commit in: eclass/

2016-06-07 Thread Benda XU
commit: 6e9aaffe12c8db2bb8c23326325440668c68eb4c
Author: Benda Xu  gentoo  org>
AuthorDate: Tue Jun  7 10:47:43 2016 +
Commit: Benda XU  gentoo  org>
CommitDate: Tue Jun  7 10:47:43 2016 +
URL:https://gitweb.gentoo.org/proj/android.git/commit/?id=6e9aaffe

toolchain.eclass: should preserve PATH to locate gcc-config.

 eclass/toolchain.eclass | 24 
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index aeb17b9..81bc4fb 100644
--- a/eclass/toolchain.eclass
+++ b/eclass/toolchain.eclass
@@ -50,8 +50,8 @@ is_crosscompile() {
 }
 
 if [[ ${EAPI:-0} == [012] ]] ; then
-: ${ED:=${D}}
-: ${EROOT:=${ROOT}}
+   : ${ED:=${D}}
+   : ${EROOT:=${ROOT}}
 fi
 
 # General purpose version check.  Without a second arg matches up to minor 
version (x.x.x)
@@ -1719,13 +1719,13 @@ toolchain_src_install() {
# Rather install the script, else portage with changing $FILESDIR
# between binary and source package borks things 
if ! is_crosscompile ; then
-cp "${GCC_FILESDIR}"/fix_libtool_files.sh "${T}"
-cp "${GCC_FILESDIR}"/awk/fixlafiles.awk-no_gcc_la "${T}"
-cp "${GCC_FILESDIR}"/awk/fixlafiles.awk "${T}"
+   cp "${GCC_FILESDIR}"/fix_libtool_files.sh "${T}"
+   cp 
"${GCC_FILESDIR}"/awk/fixlafiles.awk-no_gcc_la "${T}"
+   cp "${GCC_FILESDIR}"/awk/fixlafiles.awk "${T}"
eprefixify \
-"${T}"/fix_libtool_files.sh \
-"${T}"/fixlafiles.awk-no_gcc_la \
-"${T}"/fixlafiles.awk
+   "${T}"/fix_libtool_files.sh \
+   "${T}"/fixlafiles.awk-no_gcc_la 
\
+   "${T}"/fixlafiles.awk
 
insinto "${DATAPATH#${EPREFIX}}"
if tc_version_is_at_least 4.0 ; then
@@ -2031,13 +2031,13 @@ toolchain_pkg_postrm() {
 
 do_gcc_config() {
if ! should_we_gcc_config ; then
-   env -i ROOT="${ROOT}" gcc-config --use-old --force
+   env -i PATH="${PATH}" ROOT="${ROOT}" gcc-config --use-old 
--force
return 0
fi
 
local current_gcc_config="" current_specs="" use_specs=""
 
-   current_gcc_config=$(env -i ROOT="${ROOT}" gcc-config -c ${CTARGET} 
2>/dev/null)
+   current_gcc_config=$(env -i PATH="${PATH}" ROOT="${ROOT}" gcc-config -c 
${CTARGET} 2>/dev/null)
if [[ -n ${current_gcc_config} ]] ; then
# figure out which specs-specific config is active
current_specs=$(gcc-config -S ${current_gcc_config} | awk 
'{print $3}')
@@ -2061,12 +2061,12 @@ should_we_gcc_config() {
# if the current config is invalid, we definitely want a new one
# Note: due to bash quirkiness, the following must not be 1 line
local curr_config
-   curr_config=$(env -i ROOT="${ROOT}" gcc-config -c ${CTARGET} 2>&1) || 
return 0
+   curr_config=$(env -i PATH="${PATH}" ROOT="${ROOT}" gcc-config -c 
${CTARGET} 2>&1) || return 0
 
# if the previously selected config has the same major.minor (branch) as
# the version we are installing, then it will probably be uninstalled
# for being in the same SLOT, make sure we run gcc-config.
-   local curr_config_ver=$(env -i ROOT="${ROOT}" gcc-config -S 
${curr_config} | awk '{print $2}')
+   local curr_config_ver=$(env -i PATH="${PATH}" ROOT="${ROOT}" gcc-config 
-S ${curr_config} | awk '{print $2}')
 
local curr_branch_ver=$(get_version_component_range 1-2 
${curr_config_ver})