Summary: | PPC patches | ||
---|---|---|---|
Product: | Portage Development | Reporter: | chouser (RETIRED) <chouser> |
Component: | Unclassified | Assignee: | chouser (RETIRED) <chouser> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | azarah, vapier |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
chouser (RETIRED)
2002-02-04 17:50:52 UTC
--- /usr/sbin/ebuild.sh.orig Tue Jan 8 20:07:19 2002 +++ /usr/sbin/ebuild.sh Wed Jan 9 18:41:25 2002 @@ -24,7 +24,10 @@ export DIROPTIONS="-m0755" export MOPREFIX=${PN} export KVERS=`uname -r` +export ARCH=`uname -m | sed s/i[3-6]86/i386/` +function_set="src_unpack src_compile src_install pkg_preinst pkg_postinst pkg_prerm pkg_postrm pkg_config" +#variable_set="SRC_URI PATCHES DEPEND" unpack() { local x @@ -280,7 +283,7 @@ install -m0700 -d ${WORKDIR} cd ${WORKDIR} echo ">>> Unpacking source..." - src_unpack + ${src_unpack_all} echo ">>> Source unpacked." cd .. trap SIGINT SIGQUIT @@ -463,7 +466,7 @@ then cd ${S} fi - src_compile + ${src_compile_all} cd ${BUILDDIR} touch .compiled if [ ! -e "build-info" ] @@ -520,7 +523,7 @@ fi echo echo ">>> Install ${PF} into ${D} category ${CATEGORY}" - src_install + ${src_install_all} prepall cd ${D} echo ">>> Completed installing into ${D}" @@ -645,6 +648,33 @@ exit 1 fi +# there was not, so we try to find host-specific functions +for funct in $function_set +{ + if (type -p ${funct}_${ARCH}) + then + declare ${funct}_all=${funct}_${ARCH} + else + declare ${funct}_all=${funct} + fi +} + +# the same for host_specific variables +# note that replacement is done after +# substitution in ${EBUILD} so that +# one can use eg SRC_URI_ppc="$SRC_URI my_patch" +#for variable in $variable_set +#{ +# if (type -p ${variable}_${ARCH}) +# then +# { +# arch_var_name=${variable}_${ARCH} +# declare ${variable}="${!arch_var_name}" +# echo "$arch_var_name redefined"; +# } +# fi +#} + if [ "${SRC_URI}" != "" ] then rm -f ${T}/archives.orig @@ -687,10 +717,11 @@ prerm|postrm|preinst|postinst|config) if [ "$PORTAGE_DEBUG" = "0" ] then - pkg_${myarg} + pkg_func_name=pkg_${myarg}_all + ${!pkg_func_name} else set -x - pkg_${myarg} + ${!pkg_func_name} set +x fi ;; hasnt ARCH support been 'properly' addressed through the KEYWORDS variable now ? so can we close this bug ? ditto. |