summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorViorel Munteanu <ceamac@gentoo.org>2023-12-16 12:38:22 +0200
committerViorel Munteanu <ceamac@gentoo.org>2023-12-16 12:38:22 +0200
commited57d39eb8c2eb8f64654befcc19d51a93708d41 (patch)
tree8d1d9f96047475adab5dccf158779e8b5b240224 /sys-apps/busybox
parentsys-apps/busybox: respect CFLAGS (diff)
downloadgentoo-ed57d39eb8c2eb8f64654befcc19d51a93708d41.tar.gz
gentoo-ed57d39eb8c2eb8f64654befcc19d51a93708d41.tar.bz2
gentoo-ed57d39eb8c2eb8f64654befcc19d51a93708d41.zip
sys-apps/busybox: sync live ebuild
Signed-off-by: Viorel Munteanu <ceamac@gentoo.org>
Diffstat (limited to 'sys-apps/busybox')
-rw-r--r--sys-apps/busybox/busybox-9999.ebuild20
1 files 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
}