--- libperl-5.8.7.ebuild 2005-08-12 10:25:12 -0500 +++ libperl-5.8.7.ebuild-new 2005-08-12 10:24:46 -0500 @@ -129,7 +129,8 @@ # # LIBPERL=libperl.so.${SLOT}.`echo ${PV} | cut -d. -f1,2` # - cd ${S}; epatch ${FILESDIR}/${PN}-create-libperl-soname.patch + cd ${S} + use userland_Darwin || epatch ${FILESDIR}/${PN}-create-libperl-soname.patch # uclibc support - dragonheart 2004.06.16 # Now upstreamed - MPC 2005.06.28 @@ -242,14 +243,18 @@ if [ "${PN}" = "libperl" ] then dolib.so ${WORKDIR}/${LIBPERL} - preplib + if [[ ${USERLAND} == "Darwin" ]]; then + install_name_tool -id /usr/$(get_libdir)/${LIBPERL} ${D}/usr/$(get_libdir)/${LIBPERL} + else + preplib + fi else # Need to do this, else apps do not link to dynamic version of # the library ... local coredir="/usr/lib/perl5/${PV}/${myarch}${mythreading}/CORE" dodir ${coredir} dosym ../../../../../$(get_libdir)/${LIBPERL} ${coredir}/${LIBPERL} - dosym ../../../../../$(get_libdir)/${LIBPERL} ${coredir}/libperl$(get_libname).${PERLSLOT} + dosym ../../../../../$(get_libdir)/${LIBPERL} ${coredir}/libperl$(get_libname ${PERLSLOT}) dosym ../../../../../$(get_libdir)/${LIBPERL} ${coredir}/libperl$(get_libname) # Fix for "stupid" modules and programs @@ -327,12 +332,12 @@ # Next bit is to try and setup the /usr/lib/libperl.so symlink # properly ... - local libnumber="`ls -1 ${ROOT}usr/$(get_libdir)/libperl$(get_libname).?.* | grep -v '\.old' | wc -l`" + local libnumber="`ls -1 ${ROOT}usr/$(get_libdir)/libperl$(get_libname ?.*) | grep -v '\.old' | wc -l`" if [ "${libnumber}" -eq 1 ] then # Only this version of libperl is installed, so just link libperl.so # to the *soname* version of it ... - ln -snf libperl$(get_libname).${PERLSLOT} ${ROOT}usr/$(get_libdir)/libperl$(get_libname) + ln -snf libperl$(get_libname ${PERLSLOT}) ${ROOT}usr/$(get_libdir)/libperl$(get_libname) else if [ -x "${ROOT}/usr/bin/perl" ] then @@ -343,13 +348,13 @@ cd ${ROOT}usr/$(get_libdir) # Link libperl.so to the *soname* versioned lib ... - ln -snf `echo libperl$(get_libname).?.${perlversion} | cut -d. -f1,2,3` libperl$(get_libname) + ln -snf `echo libperl$(get_libname ?.${perlversion}) | cut -d. -f1,2,3` libperl$(get_libname) else local x latest # Nope, we are not so lucky ... try to figure out what version # is the latest, and keep fingers crossed ... - for x in `ls -1 ${ROOT}usr/$(get_libdir)/libperl$(get_libname).?.*` + for x in `ls -1 ${ROOT}usr/$(get_libdir)/libperl$(get_libname ?.*)` do latest="${x}" done