summaryrefslogtreecommitdiff
path: root/sys-apps/kmod/kmod-9999.ebuild
diff options
context:
space:
mode:
Diffstat (limited to 'sys-apps/kmod/kmod-9999.ebuild')
-rw-r--r--sys-apps/kmod/kmod-9999.ebuild102
1 files changed, 16 insertions, 86 deletions
diff --git a/sys-apps/kmod/kmod-9999.ebuild b/sys-apps/kmod/kmod-9999.ebuild
index a67cecf3e9af..d0de1d663e3e 100644
--- a/sys-apps/kmod/kmod-9999.ebuild
+++ b/sys-apps/kmod/kmod-9999.ebuild
@@ -3,9 +3,10 @@
EAPI=8
-PYTHON_COMPAT=( python3_{10..11} )
+inherit autotools libtool bash-completion-r1
-inherit autotools libtool bash-completion-r1 python-r1
+DESCRIPTION="Library and tools for managing linux kernel modules"
+HOMEPAGE="https://git.kernel.org/?p=utils/kernel/kmod/kmod.git"
if [[ ${PV} == 9999* ]]; then
EGIT_REPO_URI="https://git.kernel.org/pub/scm/utils/kernel/${PN}/${PN}.git"
@@ -15,12 +16,9 @@ else
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
fi
-DESCRIPTION="library and tools for managing linux kernel modules"
-HOMEPAGE="https://git.kernel.org/?p=utils/kernel/kmod/kmod.git"
-
LICENSE="LGPL-2"
SLOT="0"
-IUSE="debug doc +lzma pkcs7 python static-libs +tools +zlib +zstd"
+IUSE="debug doc +lzma pkcs7 static-libs +tools +zlib +zstd"
# Upstream does not support running the test suite with custom configure flags.
# I was also told that the test suite is intended for kmod developers.
@@ -31,15 +29,16 @@ IUSE="debug doc +lzma pkcs7 python static-libs +tools +zlib +zstd"
# - >=zlib-1.2.6 required because of bug #427130
# - Block systemd below 217 for -static-nodes-indicate-that-creation-of-static-nodes-.patch
# - >=zstd-1.5.2-r1 required for bug #771078
-RDEPEND="!sys-apps/module-init-tools
+RDEPEND="
+ !sys-apps/module-init-tools
!sys-apps/modutils
!<sys-apps/openrc-0.13.8
!<sys-apps/systemd-216-r3
lzma? ( >=app-arch/xz-utils-5.0.4-r1 )
- python? ( ${PYTHON_DEPS} )
pkcs7? ( >=dev-libs/openssl-1.1.0:= )
zlib? ( >=sys-libs/zlib-1.2.6 )
- zstd? ( >=app-arch/zstd-1.5.2-r1:= )"
+ zstd? ( >=app-arch/zstd-1.5.2-r1:= )
+"
DEPEND="${RDEPEND}"
BDEPEND="
doc? (
@@ -47,20 +46,15 @@ BDEPEND="
dev-build/gtk-doc-am
)
lzma? ( virtual/pkgconfig )
- python? (
- dev-python/cython[${PYTHON_USEDEP}]
- virtual/pkgconfig
- )
zlib? ( virtual/pkgconfig )
"
if [[ ${PV} == 9999* ]]; then
- BDEPEND="${BDEPEND}
- dev-libs/libxslt"
+ BDEPEND+=" dev-libs/libxslt"
fi
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-
-DOCS=( NEWS README.md TODO )
+PATCHES=(
+ "${FILESDIR}"/${PN}-31-musl-basename.patch
+)
src_prepare() {
default
@@ -89,8 +83,9 @@ src_configure() {
--enable-shared
--with-bashcompletiondir="$(get_bashcompdir)"
--with-rootlibdir="${EPREFIX}/$(get_libdir)"
+ --disable-python
$(use_enable debug)
- $(usex doc '--enable-gtk-doc' '')
+ $(usev doc '--enable-gtk-doc')
$(use_enable static-libs static)
$(use_enable tools)
$(use_with lzma xz)
@@ -99,76 +94,11 @@ src_configure() {
$(use_with zstd)
)
- local ECONF_SOURCE="${S}"
-
- kmod_configure() {
- mkdir -p "${BUILD_DIR}" || die
- run_in_build_dir econf "${myeconfargs[@]}" "$@"
- }
-
- BUILD_DIR="${WORKDIR}/build"
- kmod_configure --disable-python
-
- if use python; then
- python_foreach_impl kmod_configure --enable-python
- fi
-}
-
-src_compile() {
- emake -C "${BUILD_DIR}"
-
- if use python; then
- local native_builddir="${BUILD_DIR}"
-
- python_compile() {
- emake -C "${BUILD_DIR}" -f Makefile -f - python \
- VPATH="${native_builddir}:${S}" \
- native_builddir="${native_builddir}" \
- libkmod_python_kmod_{kmod,list,module,_util}_la_LIBADD='$(PYTHON_LIBS) $(native_builddir)/libkmod/libkmod.la' \
- <<< 'python: $(pkgpyexec_LTLIBRARIES)'
- }
-
- python_foreach_impl python_compile
- fi
-}
-
-src_test() {
- python_test() {
- mkdir "${T}/test-${EPYTHON}" || die
- emake -C "${BUILD_DIR}" DESTDIR="${T}/test-${EPYTHON}" \
- VPATH="${native_builddir}:${S}" \
- install-pkgpyexecLTLIBRARIES \
- install-dist_pkgpyexecPYTHON
-
- # Smoke test based on https://bugs.gentoo.org/891975#c5
- local -x PYTHONPATH="${T}/test-${EPYTHON}/usr/lib/${EPYTHON}/site-packages:${PYTHONPATH}"
- ${EPYTHON} -c 'import kmod; km = kmod.Kmod(); print([(m.name, m.size) for m in km.loaded()])' || die
- rm -r "${T}/test-${EPYTHON}" || die
- }
-
- if use python; then
- python_foreach_impl python_test
- fi
+ econf "${myeconfargs[@]}"
}
src_install() {
- emake -C "${BUILD_DIR}" DESTDIR="${D}" install
-
- einstalldocs
-
- if use python; then
- local native_builddir="${BUILD_DIR}"
-
- python_install() {
- emake -C "${BUILD_DIR}" DESTDIR="${D}" \
- VPATH="${native_builddir}:${S}" \
- install-pkgpyexecLTLIBRARIES \
- install-dist_pkgpyexecPYTHON
- python_optimize
- }
-
- python_foreach_impl python_install
- fi
+ default
find "${ED}" -type f -name "*.la" -delete || die