commit:     0129e062287948921ea13e781b87dca9c3a0134a
Author:     Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
AuthorDate: Wed Jun 21 09:31:43 2023 +0000
Commit:     Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
CommitDate: Wed Jun 21 09:36:09 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0129e062

sci-libs/linux-gpib-modules: migrate to linux-mod-r1.eclass

Upstream has one target for all modules, this doesn't really
work with linux-mod(-r1) src_compile so we keep the workaround
that was already in the ebuild.

Now using MODULES_KERNEL_MIN to check the kernel version, got
rid of the custom solution in the ebuild.

Call modules_post_process to strip, compress and sign the modules

Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> gentoo.org>

 .../linux-gpib-modules-4.3.5-r1.ebuild             | 67 ++++++++++++++++++++++
 1 file changed, 67 insertions(+)

diff --git a/sci-libs/linux-gpib-modules/linux-gpib-modules-4.3.5-r1.ebuild 
b/sci-libs/linux-gpib-modules/linux-gpib-modules-4.3.5-r1.ebuild
new file mode 100644
index 000000000000..eae3c0404cb4
--- /dev/null
+++ b/sci-libs/linux-gpib-modules/linux-gpib-modules-4.3.5-r1.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit linux-mod-r1
+
+DESCRIPTION="Kernel modules for GPIB (IEEE 488.2) hardware"
+HOMEPAGE="https://linux-gpib.sourceforge.io/";
+SRC_URI="mirror://sourceforge/linux-gpib/linux-gpib-${PV}.tar.gz"
+S="${WORKDIR}/linux-gpib-kernel-${PV}"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~arm ~x86"
+IUSE="debug"
+
+COMMONDEPEND=""
+RDEPEND="${COMMONDEPEND}
+       acct-group/gpib
+"
+DEPEND="${COMMONDEPEND}"
+BDEPEND="virtual/pkgconfig"
+
+PATCHES=(
+       # don't fix debian bugs if they break gentoo
+       "${FILESDIR}/${PN}-4.3.4-depmod.patch"
+)
+
+MODULES_KERNEL_MIN=2.6.8
+
+src_unpack() {
+       default
+       unpack "${WORKDIR}/linux-gpib-${PV}/linux-gpib-kernel-${PV}.tar.gz"
+}
+
+src_configure() {
+       my_gpib_makeopts=''
+       use debug && my_gpib_makeopts+='GPIB-DEBUG=1 '
+
+       my_gpib_makeopts+="LINUX_SRCDIR=${KERNEL_DIR} "
+}
+
+src_compile() {
+       set_arch_to_kernel
+
+       # The individual modules don't have separate targets so we can't use
+       # modlist here.
+       emake \
+               ${my_gpib_makeopts}
+}
+
+src_install() {
+       set_arch_to_kernel
+       emake \
+               DESTDIR="${ED}" \
+               INSTALL_MOD_PATH="${ED}" \
+               DEPMOD="/bin/true" \
+               docdir="${ED}/usr/share/doc/${PF}/html" \
+               ${my_gpib_makeopts} \
+               install
+
+       modules_post_process
+
+       dodoc ChangeLog AUTHORS README* NEWS
+       einstalldocs
+}

Reply via email to