--- com_err-1.38.ebuild 2005-07-21 00:26:09 -0500 +++ com_err-1.38.ebuild-new 2005-07-21 00:25:58 -0500 @@ -2,7 +2,7 @@ # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/sys-libs/com_err/com_err-1.38.ebuild,v 1.7 2005/07/20 12:25:14 corsair Exp $ -inherit eutils flag-o-matic toolchain-funcs +inherit eutils flag-o-matic toolchain-funcs libtool DESCRIPTION="common error display library" HOMEPAGE="http://e2fsprogs.sourceforge.net/" @@ -10,7 +10,7 @@ LICENSE="GPL-2" SLOT="0" -KEYWORDS="alpha amd64 arm ~hppa ~ia64 m68k ~mips ppc ppc64 s390 sh sparc x86" +KEYWORDS="alpha amd64 arm ~hppa ~ia64 m68k ~mips ppc ~ppc-macos ppc64 s390 sh sparc x86" IUSE="nls" RDEPEND="" @@ -22,7 +22,7 @@ unpack ${A} cd "${S}" # Clean up makefile to suck less - epatch "${FILESDIR}"/${PN}-1.37-makefile.patch + #epatch "${FILESDIR}"/${PN}-1.37-makefile.patch # Keep the package from doing silly things export LDCONFIG=/bin/true @@ -31,10 +31,13 @@ } src_compile() { + mycnf= + mycnf="--with-ldopts=${LDFLAGS}" + use userland_Darwin && mycnf="${mycnf} --enable-bsd-shlibs" \ + || mycnf="${mycnf} --enable-elf-shlibs" econf \ - --enable-elf-shlibs \ - --with-ldopts="${LDFLAGS}" \ $(use_enable nls) \ + ${mycnf} \ || die emake -C lib/et || die } @@ -44,16 +47,22 @@ } src_install() { - make -C lib/et DESTDIR="${D}" install || die + + if use userland_Darwin ; then + dodir /usr/$(get_libdir) + make -C lib/et DESTDIR="${D}" install || die + dosym /usr/$(get_libdir)/libcom_err.1.1.dylib /usr/$(get_libdir)/libcom_err.dylib + else + make -C lib/et DESTDIR="${D}" install || die + # Move shared libraries to /lib/, install static libraries + # to /usr/lib/ and install linker scripts to /usr/lib/. + dodir /$(get_libdir) + mv "${D}"/usr/$(get_libdir)/*.so* "${D}"/$(get_libdir)/ + gen_usr_ldscript libcom_err.so + fi dosed '/^ET_DIR=/s:=.*:=/usr/share/et:' /usr/bin/compile_et dosym et/com_err.h /usr/include/com_err.h - - # Move shared libraries to /lib/, install static libraries to /usr/lib/, - # and install linker scripts to /usr/lib/. - dodir /$(get_libdir) - mv "${D}"/usr/$(get_libdir)/*.so* "${D}"/$(get_libdir)/ dolib.a lib/libcom_err.a || die "dolib.a" - gen_usr_ldscript libcom_err.so } pkg_postinst() {