games-emulation/dosbox-x: Sync live ebuild

Signed-off-by: Yuan Liao <liaoyuan@gmail.com>
This commit is contained in:
Yuan Liao
2022-10-06 09:43:30 -07:00
parent 3cc18dd4dd
commit d4052f4cc1

View File

@@ -76,39 +76,11 @@ pkg_pretend() {
src_prepare() {
default
# Patch command lines like the following in Makefile.am:
# -test -x /usr/sbin/setcap && setcap cap_net_raw=ep $(DESTDIR)$(bindir)/dosbox-x
#
# The purpose of these commands is, if the 'setcap' program exists and is
# executable, then invoke it to set capabilities required by the PCAP
# networking back-end for better out-of-box user experience; otherwise,
# ignore unsatisfied preconditions or 'setcap' errors since they are not
# critical, which is achieved by having a '-' in front of each line.
#
# Unfortunately, 'test -x /usr/sbin/setcap' does not always work as
# expected on Gentoo because it ignores the fact that some distributions,
# including Gentoo, may still have split /sbin and /usr/sbin and install
# 'setcap' to /sbin.
#
# As long as sys-libs/libcap is declared in BDEPEND of this ebuild, the
# availability of 'setcap' can be assumed, rendering the test redundant.
# However, successfully setting capabilities via 'setcap' usually requires
# the root account (which is not guaranteed on Prefix) and xattr support
# for the file system being used, so the '-' in front of each line is
# preserved to tolerate the expected 'setcap' failures.
sed -i -e 's|test -x /usr/sbin/setcap && ||' Makefile.am ||
die "Failed to remove check for setcap in Makefile.am"
eautoreconf
}
src_configure() {
local myconf=(
# --disable-core-inline could cause compiler errors
# as of v2022.08.0, so enable it unconditionally
--enable-core-inline
# Always use SDL 2, even though the package provides the option to
# build with SDL 1.x, because this package is expected to be built
# with the bundled, heavily-modified version of SDL 1.x if that