Gentoo Archives: gentoo-commits

From: "Andreas Hüttel" <dilfridge@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-libs/linux-gpib-modules/files/, sci-libs/linux-gpib-modules/
Date: Sat, 13 Oct 2018 16:14:15
Message-Id: 1539447229.9330c661a3112fde869c39145ae4793db74ccf28.dilfridge@gentoo
1 commit: 9330c661a3112fde869c39145ae4793db74ccf28
2 Author: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
3 AuthorDate: Sat Oct 13 16:09:56 2018 +0000
4 Commit: Andreas Hüttel <dilfridge <AT> gentoo <DOT> org>
5 CommitDate: Sat Oct 13 16:13:49 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9330c661
7
8 sci-libs/linux-gpib-modules: New package, split out of sci-libs/linux-gpib
9
10 Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>
11 Package-Manager: Portage-2.3.50, Repoman-2.3.11
12
13 sci-libs/linux-gpib-modules/Manifest | 1 +
14 ...inux-gpib-modules-4.0.4_rc2-kernel-4.11.0.patch | 10 +++
15 .../linux-gpib-modules-4.2.0_rc1-reallydie.patch | 15 ++++
16 .../linux-gpib-modules-4.2.0_rc1.ebuild | 83 ++++++++++++++++++++++
17 sci-libs/linux-gpib-modules/metadata.xml | 18 +++++
18 5 files changed, 127 insertions(+)
19
20 diff --git a/sci-libs/linux-gpib-modules/Manifest b/sci-libs/linux-gpib-modules/Manifest
21 new file mode 100644
22 index 00000000000..de0878b97c2
23 --- /dev/null
24 +++ b/sci-libs/linux-gpib-modules/Manifest
25 @@ -0,0 +1 @@
26 +DIST linux-gpib-kernel-4.2.0_rc1.tar.gz 332525 BLAKE2B e84f9da9902d139474cf68e49922f7b402c6d11113eab8c009683c1b4304a505eb6aba86a60b019e4d3ad0ef1d003c743f14f60b61b3d7f31e8aeca99a4a16c1 SHA512 8bf1a2b04d6128c513c5d13549fb95e563e719e43ffb3b303fc5aa2376f57a69774c1afdb901281933f6b253068461ce59bd9564146a0c5a6483e1ccc47d259f
27
28 diff --git a/sci-libs/linux-gpib-modules/files/linux-gpib-modules-4.0.4_rc2-kernel-4.11.0.patch b/sci-libs/linux-gpib-modules/files/linux-gpib-modules-4.0.4_rc2-kernel-4.11.0.patch
29 new file mode 100644
30 index 00000000000..c3a9764924c
31 --- /dev/null
32 +++ b/sci-libs/linux-gpib-modules/files/linux-gpib-modules-4.0.4_rc2-kernel-4.11.0.patch
33 @@ -0,0 +1,10 @@
34 +--- linux-gpib-4.0.4rc2.orig/drivers/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c 2016-06-22 09:48:47.000000000 +0100
35 ++++ linux-gpib-4.0.4rc2/drivers/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c 2017-05-02 00:59:04.509950834 +0100
36 +@@ -37,6 +37,7 @@
37 + #include <linux/file.h>
38 + #include <linux/timer.h>
39 + #include <linux/delay.h>
40 ++#include <linux/sched/signal.h>
41 + #include <asm/uaccess.h>
42 +
43 + #include "gpibP.h"
44
45 diff --git a/sci-libs/linux-gpib-modules/files/linux-gpib-modules-4.2.0_rc1-reallydie.patch b/sci-libs/linux-gpib-modules/files/linux-gpib-modules-4.2.0_rc1-reallydie.patch
46 new file mode 100644
47 index 00000000000..cba29eece37
48 --- /dev/null
49 +++ b/sci-libs/linux-gpib-modules/files/linux-gpib-modules-4.2.0_rc1-reallydie.patch
50 @@ -0,0 +1,15 @@
51 +diff -ruN linux-gpib-kernel-4.2.0_rc1.orig/drivers/Makefile.am linux-gpib-kernel-4.2.0_rc1/drivers/Makefile.am
52 +--- linux-gpib-kernel-4.2.0_rc1.orig/drivers/Makefile.am 2018-10-02 11:32:11.000000000 +0200
53 ++++ linux-gpib-kernel-4.2.0_rc1/drivers/Makefile.am 2018-10-09 12:03:21.272433209 +0200
54 +@@ -14,10 +14,8 @@
55 +
56 + -include $(top_srcdir)/util/linux_flags/flags
57 +
58 +-#ignore errors from kernel's make modules in all-local, to avoid failure of make install
59 +-#on nfs filesystem with root_squash
60 + all-local:
61 +- -$(MAKE) -C $(LINUX_SRCDIR) V=1 modules\
62 ++ $(MAKE) -C $(LINUX_SRCDIR) V=1 modules\
63 + CC="$(LINUX_CC) -I@abs_top_srcdir@ -I@abs_top_srcdir@/compat/include" \
64 + CONFIG_GPIB_ISA="$(ENABLE_ISA)" \
65 + SUBDIRS="$(GPIB_ABS_MODULE_SUBDIR)"
66
67 diff --git a/sci-libs/linux-gpib-modules/linux-gpib-modules-4.2.0_rc1.ebuild b/sci-libs/linux-gpib-modules/linux-gpib-modules-4.2.0_rc1.ebuild
68 new file mode 100644
69 index 00000000000..749c802706e
70 --- /dev/null
71 +++ b/sci-libs/linux-gpib-modules/linux-gpib-modules-4.2.0_rc1.ebuild
72 @@ -0,0 +1,83 @@
73 +# Copyright 1999-2018 Gentoo Authors
74 +# Distributed under the terms of the GNU General Public License v2
75 +
76 +EAPI=6
77 +
78 +inherit linux-info linux-mod autotools toolchain-funcs
79 +
80 +MY_PN=${PN/modules/kernel}
81 +
82 +DESCRIPTION="Kernel modules for GPIB (IEEE 488.2) hardware"
83 +HOMEPAGE="https://linux-gpib.sourceforge.io/"
84 +SRC_URI="mirror://sourceforge/linux-gpib/${MY_PN}-${PV}.tar.gz"
85 +
86 +LICENSE="GPL-2"
87 +SLOT="0"
88 +KEYWORDS="~amd64 ~arm ~x86"
89 +IUSE="isa pcmcia debug"
90 +
91 +COMMONDEPEND=""
92 +RDEPEND="${COMMONDEPEND}"
93 +DEPEND="${COMMONDEPEND}
94 + virtual/pkgconfig"
95 +
96 +PATCHES=(
97 + "${FILESDIR}"/${PN}-4.2.0_rc1-reallydie.patch
98 +)
99 +
100 +S=${WORKDIR}/${MY_PN}-${PV}
101 +
102 +pkg_setup () {
103 + linux-mod_pkg_setup
104 +
105 + if kernel_is -lt 2 6 8; then
106 + die "Kernel versions older than 2.6.8 are not supported."
107 + fi
108 +
109 + # https://sourceforge.net/p/linux-gpib/bugs/43/
110 + if use pcmcia && kernel_is -ge 2 6 38; then
111 + die "pcmcia support is broken on kernels newer 2.6.38"
112 + fi
113 +}
114 +
115 +src_prepare () {
116 + default
117 + kernel_is ge 4 11 0 && eapply "${FILESDIR}"/${PN}-4.0.4_rc2-kernel-4.11.0.patch
118 + eautoreconf
119 +}
120 +
121 +src_configure() {
122 + set_arch_to_kernel
123 + econf \
124 + $(use_enable isa) \
125 + $(use_enable pcmcia) \
126 + $(use_enable debug driver-debug) \
127 + --with-linux-srcdir=${KV_DIR}
128 +}
129 +
130 +src_compile() {
131 + set_arch_to_kernel
132 + emake \
133 + DESTDIR="${D}" \
134 + INSTALL_MOD_PATH="${D}" \
135 + docdir=/usr/share/doc/${PF}/html
136 +}
137 +
138 +src_install() {
139 + set_arch_to_kernel
140 + emake \
141 + DESTDIR="${D}" \
142 + INSTALL_MOD_PATH="${D}" \
143 + docdir=/usr/share/doc/${PF}/html install
144 +
145 + dodoc ChangeLog AUTHORS README* NEWS
146 +}
147 +
148 +pkg_preinst () {
149 + linux-mod_pkg_preinst
150 + enewgroup gpib
151 +}
152 +
153 +pkg_postinst () {
154 + linux-mod_pkg_postinst
155 +}
156
157 diff --git a/sci-libs/linux-gpib-modules/metadata.xml b/sci-libs/linux-gpib-modules/metadata.xml
158 new file mode 100644
159 index 00000000000..b53300ac1ed
160 --- /dev/null
161 +++ b/sci-libs/linux-gpib-modules/metadata.xml
162 @@ -0,0 +1,18 @@
163 +<?xml version="1.0" encoding="UTF-8"?>
164 +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
165 +<pkgmetadata>
166 + <maintainer type="person">
167 + <email>dilfridge@g.o</email>
168 + <name>Andreas K. Huettel</name>
169 + </maintainer>
170 + <maintainer type="project">
171 + <email>sci-electronics@g.o</email>
172 + <name>Gentoo Electronics Project</name>
173 + </maintainer>
174 + <use>
175 + <flag name="isa">Build ISA kernel modules; from 3.12 on the setting is ignored and the decision based on the kernel configuration</flag>
176 + </use>
177 + <upstream>
178 + <remote-id type="sourceforge">linux-gpib</remote-id>
179 + </upstream>
180 +</pkgmetadata>