app-benchmarks/stress-ng: Upgrade to 0.13.09

- Copy 0.13.09 ebuild from upstream by manual
- Change EAPI to 7
- Change keywords to any
- Run ebuild command to create Manifest

BUG=b:209917181
TEST=emerge with arm and amd64 boards

Change-Id: Ic80267d3f53aae356240786a342a0c231bbc568b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/overlays/portage-stable/+/3372391
Tested-by: Kansho Nishida <kansho@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Kansho Nishida <kansho@chromium.org>
diff --git a/app-benchmarks/stress-ng/Manifest b/app-benchmarks/stress-ng/Manifest
index 284311c..2644b12 100644
--- a/app-benchmarks/stress-ng/Manifest
+++ b/app-benchmarks/stress-ng/Manifest
@@ -1 +1 @@
-DIST stress-ng-0.12.09.tar.xz 545756 BLAKE2B 72c5b1acf3f82f8d609da8b213f6321486cda9b8e05fd7390b846bea541610bab70bceb99c3684fbff732805eade7c37840d77e4ce901cc81a53ded0968bc6a1 SHA512 510b210a920b540c25e9f4cc0597924f72a80a85e6cd647346f7e91335e127e776bfa1bdcf0e67f557b7c154d2e6f2b2ed5abe9612b2552f53a8d21c920dc6c1
+DIST stress-ng-0.13.09.tar.gz 1038381 BLAKE2B 8680bccd0a97a80edaa7995577222b3d90fe3132a99d36c94101fdbfeddfa4a6f02b155cdc59c4abcc71fddba6daeef3a050368cb04fc9d31db921bbb1a9d985 SHA512 a65654f56056ff9876a6afff139e35d9a53a8368122fb24bd372e6a28fdd625f74d0775f6111300161bc36aa9012892cc9a0ed77386b6ba0c10eb17cba90670d
diff --git a/app-benchmarks/stress-ng/stress-ng-0.12.09.ebuild b/app-benchmarks/stress-ng/stress-ng-0.12.09.ebuild
deleted file mode 100644
index 09c9d88..0000000
--- a/app-benchmarks/stress-ng/stress-ng-0.12.09.ebuild
+++ /dev/null
@@ -1,48 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit optfeature toolchain-funcs
-
-DESCRIPTION="Stress test for a computer system with various selectable ways"
-HOMEPAGE="https://kernel.ubuntu.com/~cking/stress-ng/"
-SRC_URI="https://kernel.ubuntu.com/~cking/tarballs/${PN}/${P}.tar.xz"
-
-LICENSE="GPL-2+"
-SLOT="0"
-KEYWORDS="*"
-
-DEPEND="
-	dev-libs/libaio
-	dev-libs/libbsd
-	dev-libs/libgcrypt:0=
-	sys-apps/attr
-	sys-apps/keyutils:=
-	sys-libs/libcap
-	sys-libs/zlib
-"
-
-RDEPEND="${DEPEND}"
-
-DOCS=( "README" "README.Android" "TODO" "syscalls.txt" )
-
-src_prepare() {
-	default
-
-	# Don't reset build jobs to '-j0'
-	sed -e '/-f Makefile.config/s/-j//' -i Makefile || die
-}
-
-src_compile() {
-	export MAN_COMPRESS=0
-	export VERBOSE=1
-	tc-export CC
-
-	default
-}
-
-pkg_postinst() {
-	optfeature "AppArmor support" sys-libs/libapparmor
-	optfeature "SCTP support" net-misc/lksctp-tools
-}
diff --git a/app-benchmarks/stress-ng/stress-ng-0.13.09.ebuild b/app-benchmarks/stress-ng/stress-ng-0.13.09.ebuild
new file mode 100644
index 0000000..2b23d44
--- /dev/null
+++ b/app-benchmarks/stress-ng/stress-ng-0.13.09.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+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="*"
+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-utils
+		sys-libs/libapparmor
+	)
+	sctp? ( net-misc/lksctp-tools )
+"
+
+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[@]}"
+}