sci-libs/linux-gpib-modules: Version bump
[gentoo.git] / sci-libs / linux-gpib-modules / linux-gpib-modules-4.3.0.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 inherit linux-info linux-mod toolchain-funcs
7
8 DESCRIPTION="Kernel modules for GPIB (IEEE 488.2) hardware"
9 HOMEPAGE="https://linux-gpib.sourceforge.io/"
10 SRC_URI="mirror://sourceforge/linux-gpib/linux-gpib-${PV}.tar.gz"
11
12 LICENSE="GPL-2"
13 SLOT="0"
14 KEYWORDS="amd64 ~arm ~x86"
15 IUSE="debug"
16
17 COMMONDEPEND=""
18 RDEPEND="${COMMONDEPEND}
19         acct-group/gpib
20         !<sci-libs/linux-gpib-4.2.0_rc1
21 "
22 DEPEND="${COMMONDEPEND}
23         virtual/pkgconfig"
24
25 S=${WORKDIR}/linux-gpib-kernel-${PV}
26
27 PATCHES=(
28         "${FILESDIR}/${PN}-4.3.0-kernel53.patch"
29 )
30
31 pkg_setup() {
32         linux-mod_pkg_setup
33
34         if kernel_is -lt 2 6 8; then
35                 die "Kernel versions older than 2.6.8 are not supported."
36         fi
37 }
38
39 src_unpack() {
40         default
41         unpack "${WORKDIR}/linux-gpib-${PV}/linux-gpib-kernel-${PV}.tar.gz"
42 }
43
44 src_configure() {
45         set_arch_to_kernel
46
47         my_gpib_makeopts=''
48         use debug && my_gpib_makeopts+='GPIB-DEBUG=1 '
49
50         my_gpib_makeopts+="LINUX_SRCDIR=${KERNEL_DIR} "
51 }
52
53 src_compile() {
54         set_arch_to_kernel
55         emake \
56                 DESTDIR="${D}" \
57                 INSTALL_MOD_PATH="${D}" \
58                 docdir=/usr/share/doc/${PF}/html \
59                 ${my_gpib_makeopts}
60 }
61
62 src_install() {
63         set_arch_to_kernel
64         emake \
65                 DESTDIR="${D}" \
66                 INSTALL_MOD_PATH="${D}" \
67                 DEPMOD="/bin/true" \
68                 docdir=/usr/share/doc/${PF}/html \
69                 ${my_gpib_makeopts} \
70                 install
71
72         dodoc ChangeLog AUTHORS README* NEWS
73 }