|
| 1 | +# Copyright 1999-2025 Gentoo Authors |
| 2 | +# Distributed under the terms of the GNU General Public License v2 |
| 3 | + |
| 4 | +EAPI=8 |
| 5 | + |
| 6 | +PYTHON_COMPAT=( python3_{10..14} ) |
| 7 | + |
| 8 | +inherit cmake bash-completion-r1 python-single-r1 |
| 9 | + |
| 10 | +HOMEPAGE="https://www.open-scap.org/tools/openscap-base" |
| 11 | +DESCRIPTION="NIST Certified SCAP 1.2 toolkit" |
| 12 | + |
| 13 | +if [[ ${PV} != *9999* ]]; then |
| 14 | + SRC_URI="https://github.com/OpenSCAP/openscap/releases/download/${PV}/${P}.tar.gz" |
| 15 | + KEYWORDS="~amd64 ~arm ~arm64 ~riscv ~x86" |
| 16 | +else |
| 17 | + inherit git-r3 |
| 18 | + EGIT_REPO_URI="https://github.com/OpenSCAP/openscap.git" |
| 19 | +fi |
| 20 | + |
| 21 | +LICENSE="LGPL-2.1" |
| 22 | +SLOT="0/1" |
| 23 | +IUSE="+acl +caps debug doc ldap nss +perl +python rpm selinux sce sql test +xattr" |
| 24 | + |
| 25 | +RDEPEND="!nss? ( dev-libs/libgcrypt:0 ) |
| 26 | + nss? ( dev-libs/nss ) |
| 27 | + acl? ( virtual/acl ) |
| 28 | + caps? ( sys-libs/libcap ) |
| 29 | + ldap? ( net-nds/openldap ) |
| 30 | + rpm? ( >=app-arch/rpm-4.9 ) |
| 31 | + sql? ( dev-db/opendbx ) |
| 32 | + xattr? ( sys-apps/attr ) |
| 33 | + dev-libs/libpcre |
| 34 | + dev-libs/libxml2 |
| 35 | + dev-libs/libxslt |
| 36 | + dev-libs/xmlsec |
| 37 | + dev-libs/dbus-glib |
| 38 | + dev-libs/glib |
| 39 | + dev-libs/popt |
| 40 | + net-misc/curl |
| 41 | + sys-apps/dbus |
| 42 | + ${PYTHON_DEPS}" |
| 43 | + |
| 44 | +DEPEND="${RDEPEND} |
| 45 | + doc? ( app-text/doxygen ) |
| 46 | + perl? ( dev-lang/swig ) |
| 47 | + python? ( dev-lang/swig ) |
| 48 | + test? ( |
| 49 | + app-arch/unzip |
| 50 | + dev-perl/XML-XPath |
| 51 | + net-misc/ipcalc |
| 52 | + sys-apps/grep )" |
| 53 | + |
| 54 | +RESTRICT="!test? ( test )" |
| 55 | + |
| 56 | +REQUIRED_USE="${PYTHON_REQUIRED_USE}" |
| 57 | +PATCHES=( |
| 58 | + #"${FILESDIR}/run-a-minor-testsuite.patch" |
| 59 | +) |
| 60 | + |
| 61 | +DOCS=( README.md ) |
| 62 | + |
| 63 | +src_configure() { |
| 64 | + local mycmakeargs=( |
| 65 | + -DENABLE_OSCAP_REMEDIATE_SERVICE=OFF |
| 66 | + -DENABLE_PERL="$(usex perl)" |
| 67 | + -DENABLE_PYTHON3="$(usex python)" |
| 68 | + -DOPENSCAP_PROBE_UNIX_GCONF=OFF |
| 69 | + -DGCONF_LIBRARY= |
| 70 | + -DENABLE_DOCS="$(usex doc)" |
| 71 | + ) |
| 72 | + |
| 73 | + cmake_src_configure |
| 74 | +} |
0 commit comments