games-emulation/dosbox-x: Respect user's '-O*' compiler flags

Closes: https://bugs.gentoo.org/887669
Signed-off-by: Yuan Liao <liaoyuan@gmail.com>
This commit is contained in:
Yuan Liao
2022-12-21 16:06:40 -08:00
parent fb22627017
commit 331b5bbba4
3 changed files with 20 additions and 0 deletions

View File

@@ -81,6 +81,12 @@ pkg_pretend() {
src_prepare() { src_prepare() {
default default
# https://bugs.gentoo.org/887669
# Comment out lines touching '-O*', and avoid creating an empty
# command list as a result to not break 'if', 'for', or functions
sed -i -E -e 's/(\s?)((C|CXX)FLAGS=.*-O)/\1: #\2/' configure.ac ||
die "Failed to stop configure.ac from touching '-O*' compiler flags"
# Patch command lines like the following in Makefile.am: # Patch command lines like the following in Makefile.am:
# -test -x /usr/sbin/setcap && setcap cap_net_raw=ep $(DESTDIR)$(bindir)/dosbox-x # -test -x /usr/sbin/setcap && setcap cap_net_raw=ep $(DESTDIR)$(bindir)/dosbox-x
# #

View File

@@ -88,6 +88,13 @@ pkg_pretend() {
src_prepare() { src_prepare() {
default default
# https://bugs.gentoo.org/887669
# Comment out lines touching '-O*', and avoid creating an empty
# command list as a result to not break 'if', 'for', or functions
sed -i -E -e 's/(\s?)((C|CXX)FLAGS=.*-O)/\1: #\2/' configure.ac ||
die "Failed to stop configure.ac from touching '-O*' compiler flags"
eautoreconf eautoreconf
} }

View File

@@ -88,6 +88,13 @@ pkg_pretend() {
src_prepare() { src_prepare() {
default default
# https://bugs.gentoo.org/887669
# Comment out lines touching '-O*', and avoid creating an empty
# command list as a result to not break 'if', 'for', or functions
sed -i -E -e 's/(\s?)((C|CXX)FLAGS=.*-O)/\1: #\2/' configure.ac ||
die "Failed to stop configure.ac from touching '-O*' compiler flags"
eautoreconf eautoreconf
} }