blob: 8e7483895783d9f9bde8973bdae6539bbb42cc27 [file] [log] [blame]
#
# Copyright 2023 Google LLC
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# version 2 as published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
EAPI=7
inherit linux-info toolchain-funcs
DESCRIPTION="Stress test for a computer system with various selectable ways"
HOMEPAGE="https://github.com/ColinIanKing/stress-ng"
SRC_URI="https://github.com/ColinIanKing/${PN}/archive/refs/tags/V${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="GPL-2+"
SLOT="0"
KEYWORDS="-* amd64"
IUSE="apparmor sctp"
DEPEND="
dev-libs/libaio
dev-libs/libbsd
dev-libs/libgcrypt:0=
sys-apps/attr
sys-apps/keyutils:=
sys-libs/libcap
sys-libs/zlib
virtual/libcrypt:=
apparmor? (
sys-apps/apparmor
sys-libs/libapparmor
)
sctp? ( net-misc/lksctp-tools )
media-libs/libjpeg-turbo
"
RDEPEND="${DEPEND}"
DOCS=( "README.md" "README.Android" "TODO" "syscalls.txt" )
pkg_pretend() {
if use apparmor; then
CONFIG_CHECK="SECURITY_APPARMOR"
check_extra_config
fi
}
src_compile() {
tc-export CC
export MAN_COMPRESS="0"
local myemakeopts=(
HAVE_APPARMOR="$(usex apparmor 1 0)"
HAVE_LIB_SCTP="$(usex sctp 1 0)"
VERBOSE="1"
)
emake "${myemakeopts[@]}"
}