summaryrefslogtreecommitdiff
path: root/sci-libs/linux-gpib-modules/linux-gpib-modules-4.3.5.ebuild
blob: b3f224d27e73aca4961d2e38c34bb8ca17d39da2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit linux-info linux-mod

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"
)

pkg_setup() {
	linux-mod_pkg_setup

	if kernel_is -lt 2 6 8; then
		die "Kernel versions older than 2.6.8 are not supported."
	fi
}

src_unpack() {
	default
	unpack "${WORKDIR}/linux-gpib-${PV}/linux-gpib-kernel-${PV}.tar.gz"
}

src_configure() {
	set_arch_to_kernel

	my_gpib_makeopts=''
	use debug && my_gpib_makeopts+='GPIB-DEBUG=1 '

	my_gpib_makeopts+="LINUX_SRCDIR=${KERNEL_DIR} "
}

src_compile() {
	set_arch_to_kernel
	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

	dodoc ChangeLog AUTHORS README* NEWS
}