live-bootstrap/sysa/bash-5.2.15/bash-5.2.15.sh

54 lines
1.6 KiB
Bash
Raw Normal View History

# SPDX-FileCopyrightText: 2021 Paul Dersey <pdersey@gmail.com>
2021-03-21 00:14:15 +00:00
# SPDX-FileCopyrightText: 2021 Andrius Štikonas <andrius@stikonas.eu>
# SPDX-FileCopyrightText: 2021 Bastian Bittorf <bb@npl.de>
# SPDX-FileCopyrightText: 2022 fosslinux <fosslinux@aussies.space>
#
# SPDX-License-Identifier: GPL-3.0-or-later
src_prepare() {
# Remove bison generated files
rm y.tab.c y.tab.h
2023-02-26 09:00:15 +00:00
# Remove prebuilt translation catalogs
rm po/*.gmo
# Skip documentation
mv doc/Makefile.in Makefile.in.doc
rm doc/*
mv Makefile.in.doc doc/Makefile.in
# Rebuild configure script
rm configure
2023-02-26 09:00:15 +00:00
autoconf-2.69
2021-03-21 16:10:53 +00:00
# avoid non-deterministic build:
printf '%s\n%s\n' \
'#!/bin/sh' \
'echo "#define PIPESIZE 65536"' >builtins/psize.sh
}
src_configure() {
# --build argument needed for reproducibility
# bash_cv_dev_stdin and bash_cv_dev_fd are also used to
# improve reproducibility because they make configure
# skip checking for /dev/{fd,stdin,stdout,stderr} (build
# output is affected by their availability otherwise).
2023-02-26 09:00:15 +00:00
# size is part of binutils and is not yet available.
CC=tcc LD=tcc AR="tcc -ar" SIZE=true ./configure --prefix="${PREFIX}" \
--without-bash-malloc \
2021-03-20 11:48:41 +00:00
--disable-nls \
--build=i386-unknown-linux-musl \
--enable-static-link \
bash_cv_dev_stdin=absent \
bash_cv_dev_fd=whacky
}
src_install() {
2022-01-14 10:53:30 +00:00
install -D bash "${DESTDIR}${PREFIX}/bin/bash"
# Work around weird symlink bug
install bash "${DESTDIR}${PREFIX}/bin/sh"
2022-01-14 10:53:30 +00:00
# Needs special handling b/c is currently running - tar doesn't like this
rm -f "${PREFIX}/bin/bash" "${PREFIX}/bin/sh"
}