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