Index: busybox-1.2.1.ebuild =================================================================== RCS file: /var/cvsroot/gentoo-x86/sys-apps/busybox/busybox-1.2.1.ebuild,v retrieving revision 1.7 diff -u -p -r1.7 busybox-1.2.1.ebuild --- busybox-1.2.1.ebuild 9 Aug 2006 18:18:00 -0000 1.7 +++ busybox-1.2.1.ebuild 28 Aug 2006 05:54:07 -0000 @@ -169,8 +169,11 @@ src_unpack() { src_compile() { busybox_set_env + + # work around broken ass powerpc compilers use ppc64 && append-flags -mminimal-toc $(test-flags-CC -fno-stack-protector) use ppc && append-flags $(test-flags-CC -fno-stack-protector) + emake CROSS="${CROSS}" busybox || die "build failed" if ! use static ; then mv busybox_unstripped{,.bak} @@ -203,27 +206,12 @@ src_install() { && dosym busybox /bin/bb \ || dobin bb - if use make-symlinks ; then - if [[ ! ${VERY_BRAVE_OR_VERY_DUMB} == "yes" ]] && [[ ${ROOT} == "/" ]] ; then - ewarn "setting USE=make-symlinks and emerging to / is very dangerous." - ewarn "it WILL overwrite lots of system programs like: ls bash awk grep (bug 60805 for full list)." - ewarn "If you are creating a binary only and not merging this is probably ok." - ewarn "set env VERY_BRAVE_OR_VERY_DUMB=yes if this is realy what you want." - die "silly options will destroy your system" - fi - make CROSS="${CROSS}" install || die - cp -pPR _install/${x}/* "${D}"/ || die "copying links for ${x} failed" - cd "${D}" - # XXX: should really move this to pkg_preinst() ... - local symlink - for symlink in {,usr/}{bin,sbin}/* linuxrc ; do - [[ -L ${symlink} ]] || continue - [[ -e ${ROOT}/${symlink} ]] \ - && eerror "Deleting symlink ${symlink} because it exists in ${ROOT}" \ - && rm ${symlink} - done - cd "${S}" - fi + # bundle up the symlink files for use later + make CROSS="${CROSS}" install || die + rm _install/bin/busybox + tar cf busybox-links.tar -C _install . || die + insinto /usr/share/${PN} + doins busybox-links.tar || die dodoc AUTHORS README TODO @@ -234,9 +222,6 @@ src_install() { dodoc *.pod dohtml *.html *.sgml - # no man files? - # cd ../man && doman *.1 - cd ../examples || die docinto examples dodoc inittab depmod.pl *.conf *.script undeb unrpm @@ -244,23 +229,28 @@ src_install() { cd bootfloppy || die docinto bootfloppy dodoc * etc/* etc/init.d/* 2>/dev/null +} - cd ../../ || die - if has buildpkg ${FEATURES} && has keepwork ${FEATURES} ; then - cd "${S}" - # this should install to the ./_install/ dir by default. - # we make a micro pkg of busybox that can be used for - # embedded systems -solar - if ! use make-symlinks ; then - make CROSS="${CROSS}" install || die - fi - cd ./_install/ \ - && tar --no-same-owner -jcvf ${WORKDIR}/${MY_P}-${ARCH}.bz2 . \ - && cd .. +pkg_preinst() { + if use make-symlinks && [[ ! ${VERY_BRAVE_OR_VERY_DUMB} == "yes" ]] && [[ ${ROOT} == "/" ]] ; then + ewarn "setting USE=make-symlinks and emerging to / is very dangerous." + ewarn "it WILL overwrite lots of system programs like: ls bash awk grep (bug 60805 for full list)." + ewarn "If you are creating a binary only and not merging this is probably ok." + ewarn "set env VERY_BRAVE_OR_VERY_DUMB=yes if this is realy what you want." + die "silly options will destroy your system" fi + + mv "${D}"/usr/share/${PN}/busybox-links.tar "${T}"/ || die } pkg_postinst() { + if use make-symlinks ; then + cd "${T}" || die + mkdir _install + tar xf busybox-links.tar -C _install || die + cp -vpPR _install/* "${ROOT}"/ || die "copying links for ${x} failed" + fi + if use savedconfig ; then local config_dir="${PORTAGE_CONFIGROOT:-${ROOT}}/etc/portage/savedconfig" einfo "Saving this build config to ${config_dir}/${PF}.config" @@ -275,6 +265,3 @@ pkg_postinst() { einfo "if you want to add or remove functionality for ${PN}" echo } - - -