summaryrefslogtreecommitdiff
path: root/sys-apps/kmod
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-03-02 05:41:39 +0000
committerV3n3RiX <venerix@koprulu.sector>2024-03-02 05:41:39 +0000
commita4036575de835600b3085b97974d0766ef7c7bc2 (patch)
tree545e8444bbb80f76c5faf48f8fef3719b931fd44 /sys-apps/kmod
parent1331637681273dc8391d7a7caa6175405dceb735 (diff)
gentoo auto-resync : 02:03:2024 - 05:41:39
Diffstat (limited to 'sys-apps/kmod')
-rw-r--r--sys-apps/kmod/Manifest7
-rw-r--r--sys-apps/kmod/files/kmod-30-configure-clang16.patch26
-rw-r--r--sys-apps/kmod/files/kmod-31-musl-basename.patch113
-rw-r--r--sys-apps/kmod/kmod-31-r1.ebuild (renamed from sys-apps/kmod/kmod-30-r1.ebuild)109
-rw-r--r--sys-apps/kmod/kmod-9999.ebuild102
5 files changed, 148 insertions, 209 deletions
diff --git a/sys-apps/kmod/Manifest b/sys-apps/kmod/Manifest
index 57cdff504c23..e93636b2f929 100644
--- a/sys-apps/kmod/Manifest
+++ b/sys-apps/kmod/Manifest
@@ -1,8 +1,7 @@
-AUX kmod-30-configure-clang16.patch 948 BLAKE2B 35403640d79e60d1600abd676be818331ea975f139136bd60cd06df183768d78e11427505e7eda56d501a964420bff07eebff61e414655a7b043076e082ab143 SHA512 5f1b765ba51e224d464814247aa343649d1677f619dcca99d0a00ca244580443cc7615bf5291773062aa03cdeb42c7475d40da749c39d79907ae4ba0c9ed9c29
+AUX kmod-31-musl-basename.patch 3352 BLAKE2B 3fc8fa107d22de1806b40ea2c52110952813877cb98798f15a76aafb900b3cf7382d5ca7d5c6acc0ca540099cc1eaf575d61a3ec0aa71a4a46d0dab61b1f963f SHA512 4349ac247039aed1015a14e6eda5ac479edaff97804d251adf2f48ff492706c0bc55a5258b1e37c38f6fefe9069589693ad66b99bf21eeec18c87ec296f8bd72
AUX kmod-static-nodes-r1 500 BLAKE2B 44ae03377e6cc7b5a271063828fcb39ec6925d82e52207771e1b6b4f921d0a07e51e97a8e6f432b542d88fb0195e1298cd54ba92d462a828ddd94dab7f924eb3 SHA512 8210d90f5d0702aea626b6db00adbabbd550009d8275fe430c8b113fcb0593a4dfb9efb22c061dde259e1bd94390be49823415d3fd99909e22a2bbf7ae349f63
-DIST kmod-30.tar.xz 567484 BLAKE2B c5cb690dbb8fad66ac603648ff330794b417ff2fa2f8f61b6e9cb76dab93f984128b3d83a826203f39f3fb94f174f0db7395db6a47e52e8b7c561486f9d00778 SHA512 e2cd34e600a72e44710760dfda9364b790b8352a99eafbd43e683e4a06f37e6b5c0b5d14e7c28070e30fc5fc6ceddedf7b97f3b6c2c5c2d91204fefd630b9a3e
DIST kmod-31.tar.xz 570936 BLAKE2B 0dc8572da570315cf0aadd87fa7e83d0f88dea91c8566749e6f3004f9a6df916dce337ca99ea5929d41f45b408c1e3effa50f9d24615d7fa28688150a5ce91cf SHA512 05ca70381808bec5f262b94db625662c385408988178a35e4aaf4960ee0716dc0cbfc327160ea4b61098d0c2130ab1b5142ea8156bea8e06ded7f4d288b6d085
-EBUILD kmod-30-r1.ebuild 6136 BLAKE2B 4285ca6d980306986e2d9f8c9234cfe516f30a22c3671ff9508beabde97dedab078eb454a2d472e8bb13db7639d48bdc9bd2e84d90897841ac00a6f8d316e02c SHA512 fabf19d73da3738474595ad339bcd2fbdb5d8dc0b23a5fd11c19a6cee2b9bfaa2920349fed6735c765d4a8b5f27330fca71eae2aaf2d240ee354b6adeafc6f3c
+EBUILD kmod-31-r1.ebuild 4060 BLAKE2B 51002c2d019b425de450833fd11776d68d35e8536ca8c52b3d431393f5eb089492c6ba16726eaf6de07ab8377427daba841028b8e44abcdb8890db4e3a896296 SHA512 3dbf1d3320920204e740fece6e05ffa37025bd16ce51eb44b738f0497144786f4c8c4f8a68c55a7fed849f7186c16e782652a8d93c07c843b4e67a61beb8e884
EBUILD kmod-31.ebuild 5880 BLAKE2B 636d01e1c32f4f22e64c868e56d49c238bd6beed835ed5d1b3aef655162ac5741adba02b03e5ed6d89e7303465a7727cf4dcfaed0f87b78318f2142edbb6d1c1 SHA512 eed9173f25d7a9436652a0f0661308ac68a85ef6fdfb88949264189bc836401b6394f62f5bcefadb1564f350a2e011873a3c73d8eadde3a0fc5686d017f0b12e
-EBUILD kmod-9999.ebuild 5888 BLAKE2B a31dcd044092ccbc5f8c9e05f99ca346878df0bc86ce304245aef40ccbaa5f58b6108482433d5a9ff8bd36e8f6ee128267801cb428bb8a3dace4ffec72fa001e SHA512 a4aa51e456355e92ecb0c79c67f1f18f36076b75729c81916078e02a0292ab778bfde656fc942bcf654c09cb9980927a4b808bf1e8e24774bd4eeb3a7a6b6483
+EBUILD kmod-9999.ebuild 4060 BLAKE2B 51002c2d019b425de450833fd11776d68d35e8536ca8c52b3d431393f5eb089492c6ba16726eaf6de07ab8377427daba841028b8e44abcdb8890db4e3a896296 SHA512 3dbf1d3320920204e740fece6e05ffa37025bd16ce51eb44b738f0497144786f4c8c4f8a68c55a7fed849f7186c16e782652a8d93c07c843b4e67a61beb8e884
MISC metadata.xml 681 BLAKE2B d99a380ff37258528d263ede7c4752ffbb9abfb458674e884504a3618d574cffd0cad0da260e9bca208c5bdce1878ce7b3bf26e48fe883e812c5221c6ae38a53 SHA512 032d9a89779ae60a3e34f4d5cdb6b89c6f07bec68dc23b063e1b06f57825cb071ea89322f3bd9408b2503dab423fef3bac42ab5c8a9ae899849f51e38e0ecef3
diff --git a/sys-apps/kmod/files/kmod-30-configure-clang16.patch b/sys-apps/kmod/files/kmod-30-configure-clang16.patch
deleted file mode 100644
index a9e1093aecff..000000000000
--- a/sys-apps/kmod/files/kmod-30-configure-clang16.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-https://github.com/kmod-project/kmod/commit/035e6667d1ace2fd77ef36f5e5d93cd4b1e128a2
-
-From 035e6667d1ace2fd77ef36f5e5d93cd4b1e128a2 Mon Sep 17 00:00:00 2001
-From: Florian Weimer <fweimer@redhat.com>
-Date: Sat, 17 Dec 2022 17:52:34 +0100
-Subject: [PATCH] kmod: configure.ac: In _Noreturn check, include <stdlib.h>
- for exit
-
-Otherwise, an implicit functiona declaration is used, causing
-a C99 compatibility issue.
-
-Signed-off-by: Florian Weimer <fweimer@redhat.com>
-Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
---- a/configure.ac
-+++ b/configure.ac
-@@ -68,7 +68,8 @@ AC_COMPILE_IFELSE(
-
- AC_MSG_CHECKING([whether _Noreturn is supported])
- AC_COMPILE_IFELSE(
-- [AC_LANG_SOURCE([[_Noreturn int foo(void) { exit(0); }]])],
-+ [AC_LANG_SOURCE([[#include <stdlib.h>
-+ _Noreturn int foo(void) { exit(0); }]])],
- [AC_DEFINE([HAVE_NORETURN], [1], [Define if _Noreturn is available])
- AC_MSG_RESULT([yes])],
- [AC_MSG_RESULT([no])])
-
diff --git a/sys-apps/kmod/files/kmod-31-musl-basename.patch b/sys-apps/kmod/files/kmod-31-musl-basename.patch
new file mode 100644
index 000000000000..f4839dad2474
--- /dev/null
+++ b/sys-apps/kmod/files/kmod-31-musl-basename.patch
@@ -0,0 +1,113 @@
+https://github.com/kmod-project/kmod/pull/32
+
+From 721ed6040c7aa47070faf6378c433089e178bd43 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 9 Dec 2023 17:35:59 -0800
+Subject: [PATCH] Use portable implementation for basename API
+
+musl has removed the non-prototype declaration of basename from
+string.h [1] which now results in build errors with clang-17+ compiler
+
+Implement GNU basename behavior using strchr which is portable across libcs
+
+Fixes
+../git/tools/kmod.c:71:19: error: call to undeclared function 'basename'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
+71 | "Commands:\n", basename(argv[0]));
+| ^
+
+[1] https://git.musl-libc.org/cgit/musl/commit/?id=725e17ed6dff4d0cd22487bb64470881e86a92e7
+
+Suggested-by: Rich Felker
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+--- a/libkmod/libkmod-config.c
++++ b/libkmod/libkmod-config.c
+@@ -794,7 +794,7 @@ static int conf_files_insert_sorted(struct kmod_ctx *ctx,
+ bool is_single = false;
+
+ if (name == NULL) {
+- name = basename(path);
++ name = gnu_basename(path);
+ is_single = true;
+ }
+
+--- a/shared/util.c
++++ b/shared/util.c
+@@ -172,9 +172,9 @@ char *modname_normalize(const char *modname, char buf[static PATH_MAX], size_t *
+
+ char *path_to_modname(const char *path, char buf[static PATH_MAX], size_t *len)
+ {
+- char *modname;
++ const char *modname;
+
+- modname = basename(path);
++ modname = gnu_basename(path);
+ if (modname == NULL || modname[0] == '\0')
+ return NULL;
+
+--- a/shared/util.h
++++ b/shared/util.h
+@@ -5,6 +5,7 @@
+ #include <stdbool.h>
+ #include <stdlib.h>
+ #include <stdio.h>
++#include <string.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <time.h>
+@@ -76,6 +77,12 @@ do { \
+ __p->__v = (val); \
+ } while(0)
+
++static _always_inline_ const char *gnu_basename(const char *s)
++{
++ const char *p = strrchr(s, '/');
++ return p ? p+1 : s;
++}
++
+ static _always_inline_ unsigned int ALIGN_POWER2(unsigned int u)
+ {
+ return 1 << ((sizeof(u) * 8) - __builtin_clz(u - 1));
+--- a/testsuite/testsuite.c
++++ b/testsuite/testsuite.c
+@@ -70,7 +70,7 @@ static void help(void)
+
+ printf("Usage:\n"
+ "\t%s [options] <test>\n"
+- "Options:\n", basename(progname));
++ "Options:\n", gnu_basename(progname));
+
+ for (itr = options, itr_short = options_short;
+ itr->name != NULL; itr++, itr_short++)
+--- a/tools/depmod.c
++++ b/tools/depmod.c
+@@ -762,7 +762,7 @@ static int cfg_files_insert_sorted(struct cfg_file ***p_files, size_t *p_n_files
+ if (name != NULL)
+ namelen = strlen(name);
+ else {
+- name = basename(dir);
++ name = gnu_basename(dir);
+ namelen = strlen(name);
+ dirlen -= namelen + 1;
+ }
+--- a/tools/kmod.c
++++ b/tools/kmod.c
+@@ -68,7 +68,7 @@ static int kmod_help(int argc, char *argv[])
+ "Options:\n"
+ "\t-V, --version show version\n"
+ "\t-h, --help show this help\n\n"
+- "Commands:\n", basename(argv[0]));
++ "Commands:\n", gnu_basename(argv[0]));
+
+ for (i = 0; i < ARRAY_SIZE(kmod_cmds); i++) {
+ if (kmod_cmds[i]->help != NULL) {
+@@ -156,7 +156,7 @@ static int handle_kmod_compat_commands(int argc, char *argv[])
+ const char *cmd;
+ size_t i;
+
+- cmd = basename(argv[0]);
++ cmd = gnu_basename(argv[0]);
+
+ for (i = 0; i < ARRAY_SIZE(kmod_compat_cmds); i++) {
+ if (streq(kmod_compat_cmds[i]->name, cmd))
+
diff --git a/sys-apps/kmod/kmod-30-r1.ebuild b/sys-apps/kmod/kmod-31-r1.ebuild
index 5dff1407325b..d0de1d663e3e 100644
--- a/sys-apps/kmod/kmod-30-r1.ebuild
+++ b/sys-apps/kmod/kmod-31-r1.ebuild
@@ -3,24 +3,22 @@
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"
inherit git-r3
else
SRC_URI="https://www.kernel.org/pub/linux/utils/kernel/kmod/${P}.tar.xz"
- KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
+ 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,23 +46,14 @@ 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}"/${P}-configure-clang16.patch
+ "${FILESDIR}"/${PN}-31-musl-basename.patch
)
src_prepare() {
@@ -78,10 +68,7 @@ src_prepare() {
fi
eautoreconf
else
- #elibtoolize
- # TODO: restore to elibtoolize in next release after 30
- # autoreconf only here for clang patch.
- eautoreconf
+ elibtoolize
fi
# Restore possibility of running --enable-static, bug #472608
@@ -96,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)
@@ -106,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
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