mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-11-07 05:57:07 -08:00
The result was achieved via the following pipeline:
pkgcheck scan -c RestrictTestCheck -R FormatReporter \
--format '{category}/{package}/{package}-{version}.ebuild' |
xargs -n32 grep -L RESTRICT |
xargs -n32 sed -i -e '/^IUSE=.*test/aRESTRICT="!test? ( test )"'
The resulting metadata was compared before and after the change.
Few Go ebuilds had to be fixed manually due to implicit RESTRICT=strip
added by the eclass. Two ebuilds have to be fixed because of multiline
IUSE.
Suggested-by: Robin H. Johnson <robbat2@gentoo.org>
Closes: https://github.com/gentoo/gentoo/pull/13942
Signed-off-by: Michał Górny <mgorny@gentoo.org>
66 lines
1.3 KiB
Bash
66 lines
1.3 KiB
Bash
# Copyright 1999-2019 Gentoo Authors
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
EAPI=5
|
|
|
|
inherit findlib opam
|
|
|
|
DESCRIPTION="Map OCaml arrays onto C-like structs"
|
|
HOMEPAGE="https://github.com/mirage/ocaml-cstruct https://mirage.io"
|
|
SRC_URI="https://github.com/mirage/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
|
|
|
LICENSE="ISC"
|
|
SLOT="0/${PV}"
|
|
KEYWORDS="~amd64"
|
|
IUSE="async +lwt +ppx test"
|
|
RESTRICT="!test? ( test )"
|
|
|
|
RDEPEND="
|
|
async? (
|
|
dev-ml/async_kernel:=
|
|
dev-ml/async_unix:=
|
|
dev-ml/core_kernel:=
|
|
)
|
|
lwt? ( dev-ml/lwt:= )
|
|
ppx? (
|
|
dev-ml/ppx_tools:=
|
|
dev-ml/ocaml-migrate-parsetree:=
|
|
>=dev-ml/ppx_tools_versioned-5.0.1:=
|
|
)
|
|
dev-ml/ocplib-endian:=
|
|
dev-ml/sexplib:=
|
|
dev-ml/type-conv:=
|
|
"
|
|
DEPEND="
|
|
dev-ml/jbuilder
|
|
test? (
|
|
dev-ml/ounit
|
|
ppx? ( dev-ml/ppx_driver dev-ml/ppx_sexp_conv )
|
|
)
|
|
${RDEPEND}
|
|
"
|
|
|
|
get_targets() {
|
|
local tgt="cstruct,cstruct-unix"
|
|
use lwt && tgt+=",cstruct-lwt"
|
|
use async && tgt+=",cstruct-async"
|
|
use ppx && tgt+=",ppx_cstruct"
|
|
echo "${tgt}"
|
|
}
|
|
|
|
src_compile() {
|
|
jbuilder build -p $(get_targets) || die
|
|
}
|
|
|
|
src_test() {
|
|
jbuilder runtest -p $(get_targets) || die
|
|
}
|
|
|
|
src_install() {
|
|
opam-install cstruct
|
|
opam-install cstruct-unix
|
|
use lwt && opam-install cstruct-lwt
|
|
use async && opam-install cstruct-async
|
|
use ppx && opam-install ppx_cstruct
|
|
}
|