commit: ecf0ca3165e692a45ef186cd6816a5205af352ed Author: Nowa Ammerlaan <nowa <AT> gentoo <DOT> org> AuthorDate: Fri Jan 17 15:51:26 2025 +0000 Commit: Nowa Ammerlaan <nowa <AT> gentoo <DOT> org> CommitDate: Fri Jan 17 15:54:12 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ecf0ca31
sci-libs/linux-gpib-modules: add 9999 Bug: https://bugs.gentoo.org/944714 Signed-off-by: Nowa Ammerlaan <nowa <AT> gentoo.org> .../files/linux-gpib-modules-9999-depmod.patch | 22 +++++++ .../linux-gpib-modules-9999.ebuild | 70 ++++++++++++++++++++++ 2 files changed, 92 insertions(+) diff --git a/sci-libs/linux-gpib-modules/files/linux-gpib-modules-9999-depmod.patch b/sci-libs/linux-gpib-modules/files/linux-gpib-modules-9999-depmod.patch new file mode 100644 index 000000000000..34ae11eea6c7 --- /dev/null +++ b/sci-libs/linux-gpib-modules/files/linux-gpib-modules-9999-depmod.patch @@ -0,0 +1,22 @@ +Depmod fails here since we're still in DESTDIR and the actual target path may +not exist... + + +diff --git a/Makefile b/Makefile +index 356bba54..8f5b4b63 100644 +--- a/Makefile ++++ b/Makefile +@@ -27,13 +27,9 @@ clean: + M="$(GPIB_SRCDIR)/drivers/gpib" \ + GPIB_TOP_DIR=$(GPIB_SRCDIR) + +-#We run depmod explicitly because the depmod.sh script run +-#by modules_install fails on Debian due to it failing to find +-#the System.map file. + install: + $(MAKE) -C $(LINUX_SRCDIR) V=$(VERBOSE) modules_install\ + M="$(GPIB_SRCDIR)/drivers/gpib" \ + GPIB_TOP_DIR=$(GPIB_SRCDIR) \ + INSTALL_MOD_DIR=gpib +- /sbin/depmod -A + diff --git a/sci-libs/linux-gpib-modules/linux-gpib-modules-9999.ebuild b/sci-libs/linux-gpib-modules/linux-gpib-modules-9999.ebuild new file mode 100644 index 000000000000..cf690543f994 --- /dev/null +++ b/sci-libs/linux-gpib-modules/linux-gpib-modules-9999.ebuild @@ -0,0 +1,70 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit linux-mod-r1 + +if [[ ${PV} == 9999 ]]; then + inherit git-r3 + EGIT_REPO_URI="https://git.code.sf.net/p/linux-gpib/git" + S="${WORKDIR}/${P}/linux-gpib-kernel" +else + SRC_URI="https://downloads.sourceforge.net/linux-gpib/linux-gpib-${PV}.tar.gz" + S="${WORKDIR}/linux-gpib-kernel-${PV}" + KEYWORDS="~amd64 ~arm ~x86" +fi + +DESCRIPTION="Kernel modules for GPIB (IEEE 488.2) hardware" +HOMEPAGE="https://linux-gpib.sourceforge.io/" + +LICENSE="GPL-2" +SLOT="0" +IUSE="debug" + +RDEPEND=" + acct-group/gpib +" +BDEPEND="virtual/pkgconfig" + +PATCHES=( + # don't fix debian bugs if they break gentoo + "${FILESDIR}/${PN}-9999-depmod.patch" +) + +MODULES_KERNEL_MIN=2.6.8 + +src_unpack() { + if [[ ${PV} == 9999 ]]; then + git-r3_src_unpack + else + default + unpack "${WORKDIR}/linux-gpib-${PV}/linux-gpib-kernel-${PV}.tar.gz" + fi +} + +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 AUTHORS README* NEWS + [[ ${PV} != 9999 ]] && dodoc ChangeLog + einstalldocs +}
