Index: libtool.eclass =================================================================== RCS file: /var/cvsroot/gentoo-x86/eclass/libtool.eclass,v retrieving revision 1.35 diff -u -r1.35 libtool.eclass --- libtool.eclass 29 Sep 2004 03:49:59 -0000 1.35 +++ libtool.eclass 9 Oct 2004 09:38:50 -0000 @@ -118,7 +118,7 @@ local do_only_patches="no" local deptoremove= local my_dirlist= - local elt_patches="portage relink max_cmd_len sed test tmp" + local elt_patches="portage relink max_cmd_len sed egrep ltcc test tmp" local start_dir="${PWD}" my_dirlist="$(ELT_find_ltmain_sh)" @@ -161,6 +161,11 @@ esac done + if use ppc-macos ; then + glibtoolize --copy --force + darwintoolize + fi + for x in ${my_dirlist} do local tmp="$(echo "${x}" | sed -e "s|${S}||")" @@ -299,3 +304,31 @@ esac done } + +darwintoolize() { + local targets="" + local x + + if [ -z "$@" ] ; then + targets="$(find ${S} -name ltmain.sh -o -name ltconfig)" + fi + + einfo "Applying Darwin/libtool patches ..." + for x in ${targets} ; do + [ ! -s "${x}" ] && continue + case $(basename "${x}") in + ltmain.sh|ltconfig) + local ver="$(grep '^VERSION=' ${x})" + ver="${ver/VERSION=}" + if [ "${ver:0:3}" == "1.4" -o "${ver:0:3}" == "1.5" ]; + then + ver="1.3" # 1.4, 1.5 and 1.3 are compat + fi + + ebegin " Fixing \${S}${x/${S}}" + patch -p0 "${x}" "${ELT_PATCH_DIR}/darwin/$(basename "${x}")-${ver:0:3}.patch" > /dev/null + eend $? "PLEASE CHECK ${x}" + ;; + esac + done +}