--- busybox-1.7.3.ebuild 2007-11-04 21:09:38.000000000 +0200 +++ busybox-1.8.2.ebuild 2007-11-26 12:49:52.000000000 +0200 @@ -58,7 +58,7 @@ fi LICENSE="GPL-2" SLOT="0" KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" -IUSE="debug pam static make-symlinks selinux" +IUSE="debug pam static make-symlinks selinux uclibc" RESTRICT="test" DEPEND="selinux? ( sys-libs/libselinux ) @@ -90,16 +90,12 @@ src_unpack() { # work around broken ass powerpc compilers use ppc64 && append-flags -mminimal-toc - # flag cleanup - sed -i \ - -e 's:,-Werror,:,,:' \ - -e 's:-Os -falign-functions=1 -falign-jumps=1 -falign-loops=1::' \ - -e 's:-fomit-frame-pointer::' \ - Makefile.flags - sed -i 's:-Wl,--gc-sections::' Makefile - sed -i '/^#error Aborting compilation./d' applets/applets.c - sed -i "/^CFLAGS.*:=/s:$: ${CFLAGS}:" Makefile - echo "CROSS_COMPILE := ${CHOST}-" >> Makefile.flags + if ! use uclibc; then + epatch "${FILESDIR}/${P}-flags-strip.patch" + sed -i 's:-Wl,--gc-sections::' scripts/trylink + sed -i '/^#error Aborting compilation./d' applets/applets.c + fi + echo "CROSS_COMPILE := ${CHOST}-" >> Makefile.local # check for a busybox config before making one of our own. # if one exist lets return and use it. @@ -110,19 +106,29 @@ src_unpack() { return 0 else ewarn "Could not locate user configfile, so we will save a default one" - fi - # setup the config file - make allyesconfig > /dev/null - busybox_config_option n DMALLOC - busybox_config_option n FEATURE_SUID_CONFIG - busybox_config_option n BUILD_AT_ONCE - busybox_config_option n BUILD_LIBBUSYBOX - - # If these are not set and we are using a uclibc/busybox setup - # all calls to system() will fail. - busybox_config_option y FEATURE_SH_IS_ASH - busybox_config_option n FEATURE_SH_IS_NONE + # setup the config file + make allyesconfig > /dev/null + busybox_config_option n DMALLOC + busybox_config_option n FEATURE_SUID_CONFIG + busybox_config_option n BUILD_AT_ONCE + busybox_config_option n BUILD_LIBBUSYBOX + + # If these are not set and we are using a uclibc/busybox setup + # all calls to system() will fail. + busybox_config_option y FEATURE_SH_IS_ASH + busybox_config_option n FEATURE_SH_IS_NONE + + # default a bunch of uncommon options to off + for opt in LOCALE_SUPPORT TFTP FTP{GET,PUT} IPCALC TFTP HUSH \ + LASH MSH INETD DPKG RPM2CPIO RPM FOLD LOGNAME OD CRONTAB \ + UUDECODE UUENCODE SULOGIN DC DEBUG_INIT \ + DEBUG_CROND_OPTION FEATURE_UDHCP_DEBUG TASKSET \ + WERROR + do + busybox_config_option n ${opt} + done + fi if use static && use pam ; then ewarn "You cannot have USE='static pam'. Assuming static is more important." @@ -139,15 +145,6 @@ src_unpack() { busybox_config_option selinux SELINUX - # default a bunch of uncommon options to off - for opt in LOCALE_SUPPORT TFTP FTP{GET,PUT} IPCALC TFTP HUSH \ - LASH MSH INETD DPKG RPM2CPIO RPM FOLD LOGNAME OD CRONTAB \ - UUDECODE UUENCODE SULOGIN DC DEBUG_YANK_SUSv2 DEBUG_INIT \ - DEBUG_CROND_OPTION FEATURE_UDHCP_DEBUG TASKSET - do - busybox_config_option n ${opt} - done - make oldconfig > /dev/null }