2021-02-25 19:52:05 +00:00
|
|
|
# SPDX-FileCopyrightText: 2021 Paul Dersey <pdersey@gmail.com>
|
2021-03-21 00:14:15 +00:00
|
|
|
# SPDX-FileCopyrightText: 2021 Andrius Štikonas <andrius@stikonas.eu>
|
2021-04-15 12:56:27 +01:00
|
|
|
# SPDX-FileCopyrightText: 2021 Bastian Bittorf <bb@npl.de>
|
2022-03-07 07:58:20 +00:00
|
|
|
# SPDX-FileCopyrightText: 2022 fosslinux <fosslinux@aussies.space>
|
2021-02-25 19:52:05 +00:00
|
|
|
#
|
|
|
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
|
|
|
|
src_prepare() {
|
|
|
|
# Remove bison generated files
|
|
|
|
rm y.tab.c y.tab.h
|
|
|
|
|
|
|
|
# Rebuild configure script
|
|
|
|
rm configure
|
2021-03-20 11:48:41 +00:00
|
|
|
autoconf-2.61
|
2021-03-21 16:10:53 +00:00
|
|
|
|
2021-04-15 12:56:27 +01:00
|
|
|
# avoid non-deterministic build:
|
|
|
|
printf '%s\n%s\n' \
|
|
|
|
'#!/bin/sh' \
|
|
|
|
'echo "#define PIPESIZE 65536"' >builtins/psize.sh
|
2021-02-25 19:52:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
src_configure() {
|
2021-07-06 00:13:58 +01:00
|
|
|
# --build argument needed for reproducibility
|
2021-03-21 16:10:53 +00:00
|
|
|
./configure --prefix="${PREFIX}" \
|
2021-02-25 19:52:05 +00:00
|
|
|
--without-bash-malloc \
|
2021-03-20 11:48:41 +00:00
|
|
|
--disable-nls \
|
2021-07-06 00:13:58 +01:00
|
|
|
--build=i386-unknown-linux-musl \
|
2021-03-20 11:48:41 +00:00
|
|
|
--enable-static-link
|
2021-02-25 19:52:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
src_install() {
|
2021-04-02 12:24:40 +01:00
|
|
|
# Do not install prebuilt .mo translation catalogs
|
2022-01-14 10:53:30 +00:00
|
|
|
install -D bash "${DESTDIR}${PREFIX}/bin/bash"
|
2021-08-05 13:16:19 +01:00
|
|
|
# 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"
|
2021-02-25 19:52:05 +00:00
|
|
|
}
|