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: Wed, 21 Nov 2018 14:59:47
Message-Id: 1542812369.f49ee57e9159b284a0c21c166e8c9e6fe641c811.dilfridge@gentoo
1 commit: f49ee57e9159b284a0c21c166e8c9e6fe641c811
2 Author: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
3 AuthorDate: Wed Nov 21 14:58:57 2018 +0000
4 Commit: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
5 CommitDate: Wed Nov 21 14:59:29 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f49ee57e
7
8 sci-libs/linux-gpib: Version bump
9
10 Package-Manager: Portage-2.3.51, Repoman-2.3.12
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.2.0.ebuild | 175 ++++++++++++++++++++++++++++
15 2 files changed, 176 insertions(+)
16
17 diff --git a/sci-libs/linux-gpib/Manifest b/sci-libs/linux-gpib/Manifest
18 index 91418f7d9c9..49f6727082c 100644
19 --- a/sci-libs/linux-gpib/Manifest
20 +++ b/sci-libs/linux-gpib/Manifest
21 @@ -1,3 +1,4 @@
22 DIST gpib_firmware-2006-11-12.tar.gz 169357 BLAKE2B 05f1be78545e025d76e2b9819a5dcac5a6715dfbb6df5c6fbe8b78900adf8ca7b1c28db350674ff1dd9c77e24507e98b536ca1af8b558c9a46ef8c25034c9769 SHA512 164d6fcfb3af43933f0a16645276f7d527a7aa24ef311f6ae3dcd7f45c41f92c855cf221bc946772f43fc2f9524057abc34bbd7d805c89b33ed7e111bc6870af
23 DIST linux-gpib-4.1.0.tar.gz 1529480 BLAKE2B b49df07f15d0f91b9d475052993421979d6776ef15aaa9b7e49632db9018f0cbd9ff38d12e2afa9e8027202e450dfc487ac9e2e6ab719086646d983cc41b3482 SHA512 037ed9e484a83caccb15d2d142eef6f1eec356ae972480ca7a676a318d3e9f844fc1911c1b30869b4bb14ef0b4cd10587a803426df9145966bafe22ca7316bd8
24 +DIST linux-gpib-4.2.0.tar.gz 1431440 BLAKE2B 7b6adf562963e0785f960c072f3f3d67cb91df9090205d8fecb0dc3170d3a1ac3719732919bae112e06b47387499ffe49a0144e72caa27ba39c85c8b98e56786 SHA512 1505c2c04f16bf7e92b9dd474f09edd242520a96f9e4d8eea88ebd44d0a82d653055155c1bfcde69da5355d609d400e3cb682da8aae83f59f1e565307a3fc4a7
25 DIST linux-gpib-user-4.2.0_rc1.tar.gz 1098181 BLAKE2B 3f35eacfcffe04598322af6faed921b20b49959433b6e3c3a4bb2c0b9e3f71a2c00a13d7dec6b4e0bc415f1f8635945419805d5c9dec4ddcddb18fc7e8c5e7b4 SHA512 69d8b3059eab8d1d09006b4da13dbf3479c9a9d45e464767a13a2b1d6d32705e91e2800ca79015d302ea05e4fcbddb433dd817d208d751b6af8ac3867b7cee78
26
27 diff --git a/sci-libs/linux-gpib/linux-gpib-4.2.0.ebuild b/sci-libs/linux-gpib/linux-gpib-4.2.0.ebuild
28 new file mode 100644
29 index 00000000000..7ac1727146f
30 --- /dev/null
31 +++ b/sci-libs/linux-gpib/linux-gpib-4.2.0.ebuild
32 @@ -0,0 +1,175 @@
33 +# Copyright 1999-2018 Gentoo Authors
34 +# Distributed under the terms of the GNU General Public License v2
35 +
36 +EAPI=6
37 +
38 +PYTHON_COMPAT=( python2_7 python3_6 python3_7 )
39 +
40 +inherit readme.gentoo-r1 autotools perl-functions python-single-r1 toolchain-funcs udev user
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 + ~sci-libs/linux-gpib-modules-${PV}
65 +"
66 +DEPEND="${COMMONDEPEND}
67 + virtual/pkgconfig
68 + doc? ( app-text/docbook-sgml-utils )
69 + perl? ( virtual/perl-ExtUtils-MakeMaker )"
70 +
71 +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
72 +
73 +PATCHES=(
74 + "${FILESDIR}"/${PN}-3.2.16-perl.patch
75 +)
76 +
77 +pkg_setup () {
78 + use perl && perl_set_version
79 + use python && python_setup
80 +}
81 +
82 +src_unpack() {
83 + default
84 + unpack "${WORKDIR}/${P}/${PN}-user-${PV}.tar.gz"
85 +}
86 +
87 +src_prepare () {
88 + default
89 + eautoreconf
90 +}
91 +
92 +src_configure() {
93 + econf \
94 + $(use_enable static) \
95 + $(use_enable guile guile-binding) \
96 + $(use_enable perl perl-binding) \
97 + $(use_enable php php-binding) \
98 + $(use_enable python python-binding) \
99 + $(use_enable tcl tcl-binding) \
100 + $(use_enable doc documentation)
101 +}
102 +
103 +src_compile() {
104 + FIRM_DIR=/usr/share/usb
105 + emake \
106 + DESTDIR="${D}" \
107 + INSTALL_MOD_PATH="${D}" \
108 + HOTPLUG_USB_CONF_DIR=/etc/hotplug/usb \
109 + UDEV_RULES_DIR="$(get_udevdir)"/rules.d \
110 + USB_FIRMWARE_DIR=${FIRM_DIR} \
111 + docdir=/usr/share/doc/${PF}/html
112 +}
113 +
114 +src_install() {
115 + FIRM_DIR=/usr/share/usb
116 + emake \
117 + DESTDIR="${D}" \
118 + INSTALL_MOD_PATH="${D}" \
119 + HOTPLUG_USB_CONF_DIR=/etc/hotplug/usb \
120 + UDEV_RULES_DIR="$(get_udevdir)"/rules.d \
121 + USB_FIRMWARE_DIR=${FIRM_DIR} \
122 + docdir=/usr/share/doc/${PF}/html install
123 +
124 + if use perl; then
125 + einfo "Installing perl module"
126 + cd "${S}"/language/perl || die
127 + DESTDIR=${D} emake install
128 + perl_fix_packlist
129 + perl_delete_emptybsdir
130 + cd "${S}" || die
131 + fi
132 +
133 + echo "KERNEL==\"gpib[0-9]*\", MODE=\"0660\", GROUP=\"gpib\"" >> 99-gpib.rules
134 + udev_dorules 99-gpib.rules
135 +
136 + dodoc doc/linux-gpib.pdf ChangeLog AUTHORS README* NEWS
137 +
138 + insinto /etc
139 + newins util/templates/gpib.conf gpib.conf
140 + newins util/templates/gpib.conf gpib.conf.example
141 +
142 + if use pcmcia; then
143 + dodir /etc/pcmcia
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 +You need to run the 'gpib_config' utility to setup the driver before
157 +you can use it. In order to do it automatically you can add to your
158 +start script something like this (supposing the appropriate driver
159 +is loaded on the startup):
160 +\n
161 + gpib_config --minor 0
162 +\n
163 +To give a user access to the computer's gpib board you will have to add
164 +them to the group 'gpib' or, you could change the permissions on the device
165 +files /dev/gpib[0-15] to something you like better, using 'chmod'
166 +\n
167 +Edit /etc/gpib.conf to match your interface board, and any devices you wish
168 +to open via ibfind(). See the documentation in /usr/share/linux-gpib/html for
169 +more information.
170 +\n
171 +"
172 +
173 + if use pcmcia; then
174 + DOC_CONTENTS+='
175 +For PCMCIA cards:\n
176 +All files needed for a PCMCIA board were copied to /etc/pcmcia.
177 +You may wish to edit the options passed to the gpib_config call in the
178 +/etc/pcmcia/linux-gpib-pcmcia script.
179 +You may need to send a SIGHUP signal to the cardmgr daemon to force it
180 +to reload the files in /etc/pcmcia \(alternatively you could use your
181 +pcmcia init.d script to restart the cardmgr, or you could just reboot\).
182 +The driver module will be loaded as needed by the cardmgr.
183 +
184 +'
185 + fi
186 +
187 + if use firmware; then
188 + DOC_CONTENTS+='
189 +For Agilent \(HP\) 82341C and 82341D cards:
190 +The firmware for these boards is uploaded by passing the appropriate
191 +firmware file from /usr/share/linux-gpib/hp_82341 directory to
192 +gpib_config using the -I or --init-data command line option. Example:\n
193 +gpib_config --minor 0 --init-data /usr/share/linux-gpib/hp_82341/hp_82341c_fw.bin
194 +'
195 + fi
196 +
197 + readme.gentoo_create_doc
198 +}
199 +
200 +pkg_preinst () {
201 + use perl && perl_set_version
202 + enewgroup gpib
203 +}
204 +
205 +pkg_postinst () {
206 + readme.gentoo_print_elog
207 +}