diff options
author | Zac Medico <zmedico@gentoo.org> | 2009-12-08 19:41:09 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2009-12-08 19:41:09 +0000 |
commit | 6626ada74c71410161261f075a3100e4b7f0d860 (patch) | |
tree | 6c75a2cafc3108d8a1ccf344569039fb868f4ef2 /bin/ebuild.sh | |
parent | cb95fed24283dfd591770d5ec6b6de5516714da7 (diff) | |
download | portage-6626ada74c71410161261f075a3100e4b7f0d860.tar.gz portage-6626ada74c71410161261f075a3100e4b7f0d860.tar.bz2 portage-6626ada74c71410161261f075a3100e4b7f0d860.zip |
Bump EAPI conditionals to account for rename of EAPI 3 to 4. Thanks to
Jonathan Callen <abcd@g.o> for this patch.
svn path=/main/trunk/; revision=14965
Diffstat (limited to 'bin/ebuild.sh')
-rwxr-xr-x | bin/ebuild.sh | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/bin/ebuild.sh b/bin/ebuild.sh index 6915296bf..ef8dc2a0d 100755 --- a/bin/ebuild.sh +++ b/bin/ebuild.sh @@ -138,7 +138,7 @@ useq() { # Skip this for older EAPIs since lots of ebuilds/eclasses # have stuff in global scope that really belongs somewhere # like pkg_setup or src_configure. - if [[ -n $EAPI ]] && ! hasq "$EAPI" 0 1 2 ; then + if [[ -n $EAPI ]] && ! hasq "$EAPI" 0 1 2 3 ; then die "use() called during invalid phase: $EBUILD_PHASE" fi @@ -433,7 +433,7 @@ unpack() { _unpack_tar lzma ;; xz) - if hasq $eapi 0 1 2 ; then + if hasq $eapi 0 1 2 3 ; then vecho "unpack ${x}: file format not recognized. Ignoring." else _unpack_tar xz @@ -495,7 +495,7 @@ econf() { fi # EAPI=3 adds --disable-dependency-tracking to econf - if ! hasq "$EAPI" 0 1 2 ; then + if ! hasq "$EAPI" 0 1 2 3 ; then set -- --disable-dependency-tracking "$@" fi @@ -642,7 +642,7 @@ _eapi2_src_compile() { fi } -_eapi3_src_install() { +_eapi4_src_install() { if [[ -f Makefile || -f GNUmakefile || -f makefile ]] ; then emake DESTDIR="${D}" install fi @@ -906,7 +906,7 @@ dyn_prepare() { if [[ -d $S ]] ; then cd "${S}" - elif hasq $EAPI 0 1 2; then + elif hasq $EAPI 0 1 2 3; then cd "${WORKDIR}" elif [[ -z ${A} ]] && ! has_phase_defined_up_to prepare; then cd "${WORKDIR}" @@ -937,7 +937,7 @@ dyn_configure() { if [[ -d $S ]] ; then cd "${S}" - elif hasq $EAPI 0 1 2; then + elif hasq $EAPI 0 1 2 3; then cd "${WORKDIR}" elif [[ -z ${A} ]] && ! has_phase_defined_up_to configure; then cd "${WORKDIR}" @@ -970,7 +970,7 @@ dyn_compile() { if [[ -d $S ]] ; then cd "${S}" - elif hasq $EAPI 0 1 2; then + elif hasq $EAPI 0 1 2 3; then cd "${WORKDIR}" elif [[ -z ${A} ]] && ! has_phase_defined_up_to compile; then cd "${WORKDIR}" @@ -1047,7 +1047,7 @@ dyn_install() { mkdir "${PORTAGE_BUILDDIR}/image" if [[ -d $S ]] ; then cd "${S}" - elif hasq $EAPI 0 1 2; then + elif hasq $EAPI 0 1 2 3; then cd "${WORKDIR}" elif [[ -z ${A} ]] && ! has_phase_defined_up_to install; then cd "${WORKDIR}" @@ -1401,7 +1401,7 @@ _ebuild_arg_to_phase() { case "$arg" in pretend) - ! hasq $eapi 0 1 2 && \ + ! hasq $eapi 0 1 2 3 && \ phase_func=pkg_pretend ;; setup) @@ -1497,8 +1497,8 @@ _ebuild_phase_funcs() { declare -F src_compile >/dev/null || \ src_compile() { _eapi2_src_compile "$@" ; } - [[ $eapi == 2 ]] || declare -F src_install >/dev/null || \ - src_install() { _eapi3_src_install "$@" ; } + has $eapi 2 3 || declare -F src_install >/dev/null || \ + src_install() { _eapi4_src_install "$@" ; } if hasq $phase_func $default_phases ; then @@ -1853,7 +1853,7 @@ if ! hasq "$EBUILD_PHASE" clean cleanrm ; then [[ -n $EAPI ]] || EAPI=0 - if has "$EAPI" 0 1 2 ; then + if has "$EAPI" 0 1 2 3 ; then export RDEPEND=${RDEPEND-${DEPEND}} debug-print "RDEPEND: not set... Setting to: ${DEPEND}" fi @@ -1873,7 +1873,7 @@ if ! hasq "$EBUILD_PHASE" clean cleanrm ; then pkg_nofetch pkg_postinst pkg_postrm pkg_preinst pkg_prerm pkg_setup src_test src_unpack" ;; - 2) + 2|3) _valid_phases="src_compile pkg_config src_configure pkg_info src_install pkg_nofetch pkg_postinst pkg_postrm pkg_preinst src_prepare pkg_prerm pkg_setup src_test src_unpack" @@ -1934,8 +1934,8 @@ ebuild_main() { # we may want to make this configurable somewhere else local ebuild_helpers_path case ${EAPI} in - 3|3_pre1) - ebuild_helpers_path="${PORTAGE_BIN_PATH}/ebuild-helpers/3:${PORTAGE_BIN_PATH}/ebuild-helpers" + 4|4_pre1) + ebuild_helpers_path="${PORTAGE_BIN_PATH}/ebuild-helpers/4:${PORTAGE_BIN_PATH}/ebuild-helpers" ;; *) ebuild_helpers_path="${PORTAGE_BIN_PATH}/ebuild-helpers" |