commit:     ed57d39eb8c2eb8f64654befcc19d51a93708d41
Author:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
AuthorDate: Sat Dec 16 10:38:22 2023 +0000
Commit:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
CommitDate: Sat Dec 16 10:38:22 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ed57d39e

sys-apps/busybox: sync live ebuild

Signed-off-by: Viorel Munteanu <ceamac <AT> gentoo.org>

 sys-apps/busybox/busybox-9999.ebuild | 20 ++++++++++++++++++--
 1 file changed, 18 insertions(+), 2 deletions(-)

diff --git a/sys-apps/busybox/busybox-9999.ebuild 
b/sys-apps/busybox/busybox-9999.ebuild
index 8a030a712279..5028429069a8 100644
--- a/sys-apps/busybox/busybox-9999.ebuild
+++ b/sys-apps/busybox/busybox-9999.ebuild
@@ -5,7 +5,7 @@
 
 EAPI=8
 
-inherit flag-o-matic savedconfig toolchain-funcs
+inherit flag-o-matic readme.gentoo-r1 savedconfig toolchain-funcs
 
 DESCRIPTION="Utilities for rescue and embedded systems"
 HOMEPAGE="https://www.busybox.net/";
@@ -43,6 +43,10 @@ DEPEND="${RDEPEND}
        sys-kernel/linux-headers"
 BDEPEND="virtual/pkgconfig"
 
+DISABLE_AUTOFORMATTING=yes
+DOC_CONTENTS='
+If you want a smaller executable, add `-Oz` to your busybox `CFLAGS`.'
+
 busybox_config_option() {
        local flag=$1 ; shift
        if [[ ${flag} != [yn] && ${flag} != \"* ]] ; then
@@ -91,7 +95,7 @@ src_prepare() {
 
        # flag cleanup
        sed -i -r \
-               -e 
's:[[:space:]]?-(Werror|Os|falign-(functions|jumps|loops|labels)=1|fomit-frame-pointer)\>::g'
 \
+               -e 
's:[[:space:]]?-(Werror|Os|Oz|falign-(functions|jumps|loops|labels)=1|fomit-frame-pointer)\>::g'
 \
                Makefile.flags || die
        #sed -i '/bbsh/s:^//::' include/applets.h
        sed -i '/^#error Aborting compilation./d' applets/applets.c || die
@@ -331,6 +335,8 @@ src_install() {
 
        cd ../networking || die
        dodoc httpd_indexcgi.c httpd_post_upload.cgi
+
+       readme.gentoo_create_doc
 }
 
 pkg_preinst() {
@@ -360,4 +366,14 @@ pkg_postinst() {
                elog "To get a rescue shell, you may boot with:"
                elog "     init=/ginit bb"
        fi
+
+       if [[ ${MERGE_TYPE} != binary ]] && ! is-flagq -Oz; then
+               for v in ${REPLACING_VERSIONS}; do
+                       if ver_test ${v} -le 1.36.1; then
+                               FORCE_PRINT_ELOG=yes
+                       fi
+               done
+
+               readme.gentoo_print_elog
+       fi
 }

Reply via email to