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 6 Oct 2004 05:12:44 -0000 @@ -28,6 +28,9 @@ ELT_PATCH_DIR="${PORTDIR}/eclass/ELT-patches" ELT_APPLIED_PATCHES= +# LIBTOOL_CMD_SEP is a Mac OS X extension, see glibtool(1) for detail +export _S_=${LIBTOOL_CMD_SEP-\~} + # # Returns all the directories containing ltmain.sh # @@ -161,6 +164,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 +307,24 @@ 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) + ebegin " Fixing \${S}${x/${S}}" + patch -p0 "${x}" "${ELT_PATCH_DIR}/darwin/$(basename "${x}").patch" > /dev/null + eend $? "PLEASE CHECK ${x}" + ;; + esac + done +}