Gentoo Archives: gentoo-commits

From: "Andreas K. Hüttel" <dilfridge@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-libs/linux-gpib/
Date: Mon, 08 Feb 2021 19:00:47
Message-Id: 1612810832.7d19262754b00fa0536111a003b1734f6a458471.dilfridge@gentoo
1 commit: 7d19262754b00fa0536111a003b1734f6a458471
2 Author: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
3 AuthorDate: Mon Feb 8 19:00:11 2021 +0000
4 Commit: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
5 CommitDate: Mon Feb 8 19:00:32 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7d192627
7
8 sci-libs/linux-gpib: Version bump
9
10 Package-Manager: Portage-3.0.13, Repoman-3.0.2
11 Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>
12
13 sci-libs/linux-gpib/Manifest | 1 +
14 sci-libs/linux-gpib/linux-gpib-4.3.4.ebuild | 178 ++++++++++++++++++++++++++++
15 2 files changed, 179 insertions(+)
16
17 diff --git a/sci-libs/linux-gpib/Manifest b/sci-libs/linux-gpib/Manifest
18 index 81c7d8d928f..8275d6a7e6c 100644
19 --- a/sci-libs/linux-gpib/Manifest
20 +++ b/sci-libs/linux-gpib/Manifest
21 @@ -2,3 +2,4 @@ DIST gpib_firmware-2006-11-12.tar.gz 169357 BLAKE2B 05f1be78545e025d76e2b9819a5d
22 DIST linux-gpib-4.3.0.tar.gz 1375852 BLAKE2B e2daa444ddf4c0c34084f264247051d4ce1c8103d8ae5d91b02d4742131c1f92ded02775eb0f8b0ea29820e2ae7b61c3132c74084a876e86fbb4efaf11688773 SHA512 8db4eb6d606c68ffacc67988479684fec815fc552756a6c93466ef0dfc93368771bb551944e3afc31db83e72e464ec1fb289fdcf80b4a6be1617e734fe3b9d65
23 DIST linux-gpib-4.3.2.tar.gz 1377406 BLAKE2B 57ec8b3788606ffb42d204ad0e2476c432bc82f929b1854c6a1d48c73f48a149716d05b13906b4597a4bf03e4c10a0ffe2c66e6de8cf9a5891b86c3d459713fc SHA512 bf9963d885e0c974f41eed96359501bd41c7d4f051026f64d835e52f1031f39e6bba6ce976a27e660a8b36087e56b81205206066c68b42db9a1d578d351a8f8b
24 DIST linux-gpib-4.3.3.tar.gz 1381420 BLAKE2B 0ee8c4d740272a55be03f07bd49c9a93d0ec4808465c9b0abc4ede2ee9ef4bcb8a48fb8c98617d007c8b7af970eae185de65094a8814b05cb81bfc983bf9df3e SHA512 91b2c345dc82778b757122dc41ae74138831223a73057ddf9f04d10b8f6a059760e17134378df46a1ecb13c42bec1383aced0f2446f803af425391193a77066e
25 +DIST linux-gpib-4.3.4.tar.gz 1395770 BLAKE2B 3c7182ac127851ebf0f5416ea639d7f858c160ba00f01aa7f7e423f6fb7b3be5b089424d3a473497562d040c194483ebc93d8a2a0f64582fb8907b42e2c4b832 SHA512 397ad86883bf562b004673ae47218108d392f2a15121c95926ea38764e7a76b382cb199fd48c35c9777f34c8eb99965e3d4ea2028e86ce02bcda4bd23127cbd5
26
27 diff --git a/sci-libs/linux-gpib/linux-gpib-4.3.4.ebuild b/sci-libs/linux-gpib/linux-gpib-4.3.4.ebuild
28 new file mode 100644
29 index 00000000000..20f31d53754
30 --- /dev/null
31 +++ b/sci-libs/linux-gpib/linux-gpib-4.3.4.ebuild
32 @@ -0,0 +1,178 @@
33 +# Copyright 1999-2021 Gentoo Authors
34 +# Distributed under the terms of the GNU General Public License v2
35 +
36 +EAPI=6
37 +
38 +PYTHON_COMPAT=( python3_{7,8,9} )
39 +
40 +inherit readme.gentoo-r1 autotools perl-functions python-single-r1 toolchain-funcs udev
41 +
42 +DESCRIPTION="Driver library for GPIB (IEEE 488.2) hardware"
43 +HOMEPAGE="https://linux-gpib.sourceforge.io/"
44 +SRC_URI="mirror://sourceforge/linux-gpib/${P}.tar.gz
45 + firmware? ( https://linux-gpib.sourceforge.io/firmware/gpib_firmware-2006-11-12.tar.gz )
46 +"
47 +
48 +LICENSE="GPL-2"
49 +SLOT="0"
50 +KEYWORDS="~amd64 ~arm ~x86"
51 +IUSE="pcmcia static guile perl php python tcl doc firmware"
52 +
53 +S="${WORKDIR}/${PN}-user-${PV}"
54 +
55 +COMMONDEPEND="
56 + sys-libs/readline:=
57 + tcl? ( dev-lang/tcl:0= )
58 + guile? ( dev-scheme/guile:12 )
59 + perl? ( dev-lang/perl:= )
60 + php? ( dev-lang/php:= )
61 + python? ( ${PYTHON_DEPS} )
62 + firmware? ( sys-apps/fxload )"
63 +RDEPEND="${COMMONDEPEND}
64 + acct-group/gpib
65 + ~sci-libs/linux-gpib-modules-${PV}
66 +"
67 +DEPEND="${COMMONDEPEND}
68 + virtual/pkgconfig
69 + doc? ( app-text/docbook-sgml-utils )
70 + perl? ( virtual/perl-ExtUtils-MakeMaker )"
71 +
72 +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
73 +
74 +PATCHES=(
75 + "${FILESDIR}"/${PN}-4.3.0-perl.patch
76 +)
77 +
78 +pkg_setup() {
79 + use perl && perl_set_version
80 + use python && python_setup
81 +}
82 +
83 +src_unpack() {
84 + default
85 + unpack "${WORKDIR}/${P}/${PN}-user-${PV}.tar.gz"
86 +}
87 +
88 +src_prepare() {
89 + default
90 + eautoreconf
91 +}
92 +
93 +src_configure() {
94 + econf \
95 + $(use_enable static) \
96 + $(use_enable guile guile-binding) \
97 + $(use_enable perl perl-binding) \
98 + $(use_enable php php-binding) \
99 + $(use_enable python python-binding) \
100 + $(use_enable tcl tcl-binding) \
101 + $(use_enable doc documentation)
102 +}
103 +
104 +src_compile() {
105 + FIRM_DIR=/usr/share/usb
106 + emake \
107 + DESTDIR="${D}" \
108 + INSTALL_MOD_PATH="${D}" \
109 + HOTPLUG_USB_CONF_DIR=/etc/hotplug/usb \
110 + UDEV_RULES_DIR="$(get_udevdir)"/rules.d \
111 + USB_FIRMWARE_DIR=${FIRM_DIR} \
112 + docdir=/usr/share/doc/${PF}/html
113 +}
114 +
115 +src_install() {
116 + FIRM_DIR=/usr/share/usb
117 + emake \
118 + DESTDIR="${D}" \
119 + INSTALL_MOD_PATH="${D}" \
120 + HOTPLUG_USB_CONF_DIR=/etc/hotplug/usb \
121 + UDEV_RULES_DIR="$(get_udevdir)"/rules.d \
122 + USB_FIRMWARE_DIR=${FIRM_DIR} \
123 + docdir=/usr/share/doc/${PF}/html install
124 +
125 + if use perl; then
126 + einfo "Installing perl module"
127 + cd "${S}"/language/perl || die
128 + DESTDIR=${D} emake install
129 + perl_fix_packlist
130 + perl_delete_emptybsdir
131 + cd "${S}" || die
132 + fi
133 +
134 + echo "KERNEL==\"gpib[0-9]*\", MODE=\"0660\", GROUP=\"gpib\"" >> 99-gpib.rules
135 + udev_dorules 99-gpib.rules
136 +
137 + dodoc doc/linux-gpib.pdf ChangeLog AUTHORS README* NEWS
138 +
139 + insinto /etc
140 + newins util/templates/gpib.conf gpib.conf
141 + newins util/templates/gpib.conf gpib.conf.example
142 +
143 + if use pcmcia; then
144 + insinto /etc/pcmcia
145 + doins "${S}"/etc/pcmcia/*
146 + fi
147 +
148 + # fix rules files
149 + local f
150 + find "${D}$(get_udevdir)"/rules.d -type f -print0 | while read -rd '' f ; do
151 + grep -q "${D}" "${f}" && einfo "File ${f} contains a temporary path, fixing."
152 + sed -i -e "s:${D}:/:g" "${f}"
153 + done
154 +
155 + DOC_CONTENTS="
156 +As the udev rules were changed and refactored in this release it is
157 +necessary to remove any manually installed pre-4.3.0 gpib udev rules files
158 +in /etc/udev/rules.d/. The files to remove are:
159 +\n
160 + 99-agilent_82357a.rules\n
161 + 99-gpib-generic.rules\n
162 + 99-ni_usb_gpib.rules\n
163 +\n
164 +You need to run the 'gpib_config' utility to setup the driver before
165 +you can use it. In order to do it automatically you can add to your
166 +start script something like this (supposing the appropriate driver
167 +is loaded on the startup):
168 +\n
169 + gpib_config --minor 0
170 +\n
171 +To give a user access to the computer's gpib board you will have to add
172 +them to the group 'gpib' or, you could change the permissions on the device
173 +files /dev/gpib[0-15] to something you like better, using 'chmod'
174 +\n
175 +Edit /etc/gpib.conf to match your interface board, and any devices you wish
176 +to open via ibfind(). See the documentation in /usr/share/linux-gpib/html for
177 +more information.
178 +\n
179 +"
180 +
181 + if use pcmcia; then
182 + DOC_CONTENTS+='
183 +For PCMCIA cards:\n
184 +All files needed for a PCMCIA board were copied to /etc/pcmcia.
185 +You may wish to edit the options passed to the gpib_config call in the
186 +/etc/pcmcia/linux-gpib-pcmcia script.
187 +You may need to send a SIGHUP signal to the cardmgr daemon to force it
188 +to reload the files in /etc/pcmcia \(alternatively you could use your
189 +pcmcia init.d script to restart the cardmgr, or you could just reboot\).
190 +The driver module will be loaded as needed by the cardmgr.
191 +
192 +'
193 + fi
194 +
195 + if use firmware; then
196 + DOC_CONTENTS+='
197 +For Agilent \(HP\) 82341C and 82341D cards:
198 +The firmware for these boards is uploaded by passing the appropriate
199 +firmware file from /usr/share/linux-gpib/hp_82341 directory to
200 +gpib_config using the -I or --init-data command line option. Example:\n
201 +gpib_config --minor 0 --init-data /usr/share/linux-gpib/hp_82341/hp_82341c_fw.bin
202 +'
203 + fi
204 +
205 + readme.gentoo_create_doc
206 +}
207 +
208 +pkg_postinst() {
209 + readme.gentoo_print_elog
210 +}