From cf2e4eb2cad25a7b4647faebe6509c1033b49ba8 Mon Sep 17 00:00:00 2001 From: Andrew Ammerlaan Date: Wed, 12 Jul 2023 14:02:13 +0200 Subject: sci-libs/linux-gpib-modules: add small patch for kernel 6.4 Closes: https://bugs.gentoo.org/910230 Signed-off-by: Andrew Ammerlaan --- .../linux-gpib-modules-4.3.4-kernel-6.4.patch | 27 ++++++++++ .../linux-gpib-modules-4.3.5-r2.ebuild | 60 --------------------- .../linux-gpib-modules-4.3.5-r3.ebuild | 62 ++++++++++++++++++++++ 3 files changed, 89 insertions(+), 60 deletions(-) create mode 100644 sci-libs/linux-gpib-modules/files/linux-gpib-modules-4.3.4-kernel-6.4.patch delete mode 100644 sci-libs/linux-gpib-modules/linux-gpib-modules-4.3.5-r2.ebuild create mode 100644 sci-libs/linux-gpib-modules/linux-gpib-modules-4.3.5-r3.ebuild (limited to 'sci-libs/linux-gpib-modules') diff --git a/sci-libs/linux-gpib-modules/files/linux-gpib-modules-4.3.4-kernel-6.4.patch b/sci-libs/linux-gpib-modules/files/linux-gpib-modules-4.3.4-kernel-6.4.patch new file mode 100644 index 000000000000..90112106584d --- /dev/null +++ b/sci-libs/linux-gpib-modules/files/linux-gpib-modules-4.3.4-kernel-6.4.patch @@ -0,0 +1,27 @@ +--- linux-gpib-kernel/compat/include/linux/device.h (revision 2052) ++++ linux-gpib-kernel/compat/include/linux/device.h (revision 2053) +@@ -47,6 +47,13 @@ + * for kernel versions prior to 2.6.26, so the 'drvdata' parameter of + * CLASS_DEVICE_CREATE() is pretty useless. + */ ++#if LINUX_VERSION_CODE < KERNEL_VERSION(6,4,0) ++#define CLASS_CREATE(owner, name) \ ++ class_create(owner, name) ++#else ++#define CLASS_CREATE(owner, name) \ ++ class_create(name) ++#endif + + #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) + #include +--- linux-gpib-kernel/drivers/gpib/sys/osinit.c (revision 2052) ++++ linux-gpib-kernel/drivers/gpib/sys/osinit.c (revision 2053) +@@ -207,7 +207,7 @@ + printk( "gpib: can't get major %d\n", GPIB_CODE ); + return -EIO; + } +- gpib_class = class_create(THIS_MODULE, "gpib_common"); ++ gpib_class = CLASS_CREATE(THIS_MODULE, "gpib_common"); + if(IS_ERR(gpib_class)) + { + printk("gpib: failed to create gpib class\n"); diff --git a/sci-libs/linux-gpib-modules/linux-gpib-modules-4.3.5-r2.ebuild b/sci-libs/linux-gpib-modules/linux-gpib-modules-4.3.5-r2.ebuild deleted file mode 100644 index 7be607ff4d47..000000000000 --- a/sci-libs/linux-gpib-modules/linux-gpib-modules-4.3.5-r2.ebuild +++ /dev/null @@ -1,60 +0,0 @@ -# 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() { - MODULES_MAKEARGS+=( LINUX_SRCDIR="${KV_OUT_DIR}" ) - use debug && MODULES_MAKEARGS+=( 'GPIB-DEBUG=1' ) -} - -src_compile() { - # The individual modules don't have separate targets so we can't use - # modlist here. - emake "${MODULES_MAKEARGS[@]}" -} - -src_install() { - emake \ - "${MODULES_MAKEARGS[@]}" \ - DESTDIR="${ED}" \ - INSTALL_MOD_PATH="${ED}" \ - docdir="${ED}/usr/share/doc/${PF}/html" \ - install - - modules_post_process - - dodoc ChangeLog AUTHORS README* NEWS - einstalldocs -} diff --git a/sci-libs/linux-gpib-modules/linux-gpib-modules-4.3.5-r3.ebuild b/sci-libs/linux-gpib-modules/linux-gpib-modules-4.3.5-r3.ebuild new file mode 100644 index 000000000000..0736e0159f4d --- /dev/null +++ b/sci-libs/linux-gpib-modules/linux-gpib-modules-4.3.5-r3.ebuild @@ -0,0 +1,62 @@ +# 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" + # https://sourceforge.net/p/linux-gpib/code/2053/ + "${FILESDIR}/${PN}-4.3.4-kernel-6.4.patch" +) + +MODULES_KERNEL_MIN=2.6.8 + +src_unpack() { + default + unpack "${WORKDIR}/linux-gpib-${PV}/linux-gpib-kernel-${PV}.tar.gz" +} + +src_configure() { + MODULES_MAKEARGS+=( LINUX_SRCDIR="${KV_OUT_DIR}" ) + use debug && MODULES_MAKEARGS+=( 'GPIB-DEBUG=1' ) +} + +src_compile() { + # The individual modules don't have separate targets so we can't use + # modlist here. + emake "${MODULES_MAKEARGS[@]}" +} + +src_install() { + emake \ + "${MODULES_MAKEARGS[@]}" \ + DESTDIR="${ED}" \ + INSTALL_MOD_PATH="${ED}" \ + docdir="${ED}/usr/share/doc/${PF}/html" \ + install + + modules_post_process + + dodoc ChangeLog AUTHORS README* NEWS + einstalldocs +} -- cgit v1.2.3-65-gdbad