diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /sci-libs/linux-gpib |
reinit the tree, so we can have metadata
Diffstat (limited to 'sci-libs/linux-gpib')
-rw-r--r-- | sci-libs/linux-gpib/Manifest | 14 | ||||
-rw-r--r-- | sci-libs/linux-gpib/files/linux-gpib-3.2.16-perl.patch | 9 | ||||
-rw-r--r-- | sci-libs/linux-gpib/files/linux-gpib-3.2.21-build.patch | 44 | ||||
-rw-r--r-- | sci-libs/linux-gpib/files/linux-gpib-4.0.3-reallydie.patch | 16 | ||||
-rw-r--r-- | sci-libs/linux-gpib/files/linux-gpib-4.0.4_rc2-kernel-4.11.0.patch | 10 | ||||
-rw-r--r-- | sci-libs/linux-gpib/linux-gpib-4.0.3-r1.ebuild | 216 | ||||
-rw-r--r-- | sci-libs/linux-gpib/linux-gpib-4.0.4_rc3.ebuild | 215 | ||||
-rw-r--r-- | sci-libs/linux-gpib/linux-gpib-4.1.0.ebuild | 215 | ||||
-rw-r--r-- | sci-libs/linux-gpib/metadata.xml | 19 |
9 files changed, 758 insertions, 0 deletions
diff --git a/sci-libs/linux-gpib/Manifest b/sci-libs/linux-gpib/Manifest new file mode 100644 index 000000000000..2d09a7ad0ed1 --- /dev/null +++ b/sci-libs/linux-gpib/Manifest @@ -0,0 +1,14 @@ +AUX linux-gpib-3.2.16-perl.patch 471 SHA256 7393237d7df3bad191d6c6790b87ff6e0b1f5fd006b77c0afeb5e1dcacb744fc SHA512 0ad75078406a8eb6fc09470be108464dcb3e7601d7a3c0813f1c6ba1d9e8f3895dea4da37f5d4928e6ea398a3aeea315a63bb6009a5fa211bba592093a776d10 WHIRLPOOL cd3995233836621a1ce3440a38290ef5162816e9251a5ed6362b9b20ea084cf804d7ad9c246264cfe6246b6e90b7443daa80c7b27225374f2ca97e091456a3d7 +AUX linux-gpib-3.2.21-build.patch 1676 SHA256 f0f2aadc12a7180dc1237f1e991d4a7d0bdde9b1ceca9ecef3e6bad5a2498c25 SHA512 df4229ee1ef181a9b58bf888cc85575feddb881d5d5c1f9dd43c14a7dd903a8854d898bd7d16f5cf2874133a9b5993fd59546fa1024421f66e10be62a6206f89 WHIRLPOOL bef19a7c8fd86faca355403abe0f8be4755d9511b1c58f3ae68fe9d87dca347d6464f9904ba503468417e12a2fb518c2be570eb457d57337f9ddf0ab1dc4df53 +AUX linux-gpib-4.0.3-reallydie.patch 621 SHA256 bb6ee69d9c5b059b95d710c387024642dd3d2db6ac6e50ccfd76bb2275269bbb SHA512 919229d276d5fddaa28c4ae7f9c8871966839cfb37be50903e92f43a5781345acfe512e6f07e90a55197cbf3fffb866695b308546a3fae88f480df9cf2e994a6 WHIRLPOOL 249ef2ea1a41f7ab54b1c33dc72fc897d1c10a053fa670e160e3bf4e70015d6c8d517df6b5ce241c3570f2b36dc824477faeb30c75dfe29552b1b80d5dd4611c +AUX linux-gpib-4.0.4_rc2-kernel-4.11.0.patch 387 SHA256 c4d00183327826ab1c07f0350399bf9b8f04fc144764b8a113803313191c62c2 SHA512 6f6b25695ae81671a93e8b86978ea1ef9e71ba5a38d14ad95b9a6aa59704bb2d6a8064c1ac006b1e7c4740d059184d4d4cefef88a2fd0c2a09406f64f6597187 WHIRLPOOL ce48b5c6ea8db9b13c379c32cfb0e0d809bf0105b90b8b5090f0d902647a3cb7b990411cf999c567582318164e4f5dacbaa13ed82b40d68112b2c49750b1d720 +DIST gpib_firmware-2006-11-12.tar.gz 169357 SHA256 98380a8d12e6e34dccc0c1d82b48ed796c0c0f5571107d6a685524560aa8d701 SHA512 164d6fcfb3af43933f0a16645276f7d527a7aa24ef311f6ae3dcd7f45c41f92c855cf221bc946772f43fc2f9524057abc34bbd7d805c89b33ed7e111bc6870af WHIRLPOOL 44506c9d03e746f5bc88f9a2f20e07879a4c4c72f52a5dae97accb381f8ac7f5b5c0cf5c58d1045b18ed6cbda20549a1fdb7e5ab0151a1081da1ec798c683e67 +DIST linux-gpib-4.0.3.tar.gz 1311963 SHA256 6af5113978d179d2f281f5d779f235935371bdfbb15c6c7ca848bca5c3f17c4a SHA512 6eb65cae5220d3c7ca607eed5a641e8a68b422d0e76a787e767d3bffd0695672d5137d44a097483176e933ded5eb376ff57e3a61cddd62aceaa43192218c9cfe WHIRLPOOL f0df699fbdaa7d77abd114c8fef1b6ff3aacd67cc233a68f78b0db67b30baeab615beff89861ed47a70216e1fe0d73c518050f80c9d70d0c8199b2b159e068a1 +DIST linux-gpib-4.0.4rc3.tar.gz 1276866 SHA256 437c58fe9f1dc37a7dae7378821dcb7709b30de3701a92d3c67d63867f2ced3f SHA512 915db5c41b613706053b431aec5d0c3d1f309e8a949842f18ee011614fa126ee464c6d5d46744d10a4ae85a73bb7489280d25dddbf7724b0d5e32f65eae67829 WHIRLPOOL f492694b709aba1e06fc3d45c4c266e73230a4e494fb9ff64dec91ab25142b3a2c96546a4cc226718c236e57d4961cbdfa7ebb14d7867986de4ca05f91c6c9b3 +DIST linux-gpib-4.1.0.tar.gz 1529480 SHA256 4cdd7f38e5b02aa6efe27745dae0e21084dbe3ff90b576fc0867be87a1791e26 SHA512 037ed9e484a83caccb15d2d142eef6f1eec356ae972480ca7a676a318d3e9f844fc1911c1b30869b4bb14ef0b4cd10587a803426df9145966bafe22ca7316bd8 WHIRLPOOL 598f66281577034c842d137015e03364a988f8e752901a0de87d26b3a9d50dc54cf73a4543880c846781e9613336794aeb0c28a7018b0046a45d358395fb94e9 +EBUILD linux-gpib-4.0.3-r1.ebuild 6155 SHA256 8a7ffb56a94caa0ac83ada0d12a23d0bb1b6055dcdafc853183c5627a8712c0e SHA512 ee62238b2be5a4be8175909b9741706ca2ae00f420100fdbe3352b9f56ea3a59bf9ee7db9f28a1eff00ad40fc04e4d8641f33689741b196e70db15ecb7e4cca5 WHIRLPOOL 14d3782f1de23e0a45dfc88eb503816ceec913d67ea5f4aff96529966bab404471e47765309a562aa04d2b974509ddfe2635dd3a696257d60f77dd5c0186d2d4 +EBUILD linux-gpib-4.0.4_rc3.ebuild 6128 SHA256 fc4490e0b5b5256d64aa829d0e26a22f6384a4af9673918118df15fb1577b5d4 SHA512 82b837565e9144470866fb2ccf9915dcfa5c5cdc5afd64f258416e3c212fc6d7c83a836a1ebba1511e8fae26cad3c45526e3060a2c077ee6414abaff676bec2c WHIRLPOOL ac1043ab2bcb073722ce418158a3b5181371e87dcf7a1f8e6e9d1b81622f1f907659be3840b116e2935b51bd8661219348fea370b5b44a13486fdbec8d25208a +EBUILD linux-gpib-4.1.0.ebuild 6128 SHA256 fc4490e0b5b5256d64aa829d0e26a22f6384a4af9673918118df15fb1577b5d4 SHA512 82b837565e9144470866fb2ccf9915dcfa5c5cdc5afd64f258416e3c212fc6d7c83a836a1ebba1511e8fae26cad3c45526e3060a2c077ee6414abaff676bec2c WHIRLPOOL ac1043ab2bcb073722ce418158a3b5181371e87dcf7a1f8e6e9d1b81622f1f907659be3840b116e2935b51bd8661219348fea370b5b44a13486fdbec8d25208a +MISC ChangeLog 3889 SHA256 633a5041c1732f93cd651918a1ebb1932396560448a5840e263afa399048554a SHA512 ca93c03abdfc2857f253330b1aca5c9601c1e88cb7c3c16a76a468662818e83c0b91377f43c16616c2aff1542ed95c79c407bd4ee253f17f8c36b2e58f6bbfb1 WHIRLPOOL 01ce4ad3112c71ba40ae76bfbbbe21b9bd616ceac0816f25b4521262d1f609f9e0d5e7ad3c7a86fdc6f989f9d1b5a8846b25b47a005aabeb7395cfbd59885110 +MISC ChangeLog-2015 6862 SHA256 3eda2a217dd7265d8a2af46341d3f86dc5005925be1d5fe061b4efd635a7dc67 SHA512 d7f46b46e7d593bfe8305be676e9b17961715ba4390463d1b9563d18f9dd9936a7d33ec9f39cf73fa8b4793be5b4b117ad22e330031958a0eae2709e1b18cbce WHIRLPOOL ff17c56a2d6aae9de86a75d98f8f6d35557dd1eef478fa157e38ad61bfdf615ec8dce590200dac18e0517529013c934d030bc90eb9d5bde3ac36c457c0405fc3 +MISC metadata.xml 688 SHA256 ef2d671cdf67ec75d794b09fcdbed7c8017cc394557938d4407da51c58659b48 SHA512 d5af868c802d6c01b8267038cc5bdffc61677403ecb88cdfaf97f31d6b80d1e9318bcd507199d6a850df221cda2baf2869a1de4d732cde75a4aea2ec54f944b8 WHIRLPOOL dc3581d03a2f9dd5598c8217c04086ea6512ee23a226bd4fb0cdf48d1bf2742e9a5cfb89f7af9f239e93f9ed85188a5c226e6b643a144117c1646df7e17c690f diff --git a/sci-libs/linux-gpib/files/linux-gpib-3.2.16-perl.patch b/sci-libs/linux-gpib/files/linux-gpib-3.2.16-perl.patch new file mode 100644 index 000000000000..16f2f15b0ad7 --- /dev/null +++ b/sci-libs/linux-gpib/files/linux-gpib-3.2.16-perl.patch @@ -0,0 +1,9 @@ +diff -ruN linux-gpib-3.2.16.orig/language/Makefile.am linux-gpib-3.2.16/language/Makefile.am +--- linux-gpib-3.2.16.orig/language/Makefile.am 2009-09-16 19:26:53.000000000 +0200 ++++ linux-gpib-3.2.16/language/Makefile.am 2011-08-14 03:32:53.000000000 +0200 +@@ -67,4 +67,4 @@ + $(RM) perl/Makefile + + perl/Makefile: +- -(cd perl && $(PERL) Makefile.PL) ++ -(cd perl && $(PERL) Makefile.PL PREFIX=$(EPREFIX)/usr INSTALLDIRS=vendor INSTALLMAN3DIR='none' DESTDIR="$(DESTDIR)" ) diff --git a/sci-libs/linux-gpib/files/linux-gpib-3.2.21-build.patch b/sci-libs/linux-gpib/files/linux-gpib-3.2.21-build.patch new file mode 100644 index 000000000000..86ce197ba821 --- /dev/null +++ b/sci-libs/linux-gpib/files/linux-gpib-3.2.21-build.patch @@ -0,0 +1,44 @@ +diff -ruN linux-gpib-3.2.21.orig/drivers/Makefile.am linux-gpib-3.2.21/drivers/Makefile.am +--- linux-gpib-3.2.21.orig/drivers/Makefile.am 2014-12-13 11:27:55.000000000 +0100 ++++ linux-gpib-3.2.21/drivers/Makefile.am 2014-12-17 17:51:47.152588400 +0100 +@@ -28,39 +28,13 @@ + CC="$(LINUX_CC) -I@abs_top_srcdir@ -I@abs_top_srcdir@/drivers/gpib/include -I@abs_top_srcdir@/include" \ + SUBDIRS="$(GPIB_ABS_MODULE_SUBDIR)" + +-install-data-hook: device-file-check /etc/gpib.conf ++install-data-hook: /etc/gpib.conf + $(MAKE) -C $(LINUX_SRCDIR) V=1 modules_install\ + CC="$(LINUX_CC) -I@abs_top_srcdir@ -I@abs_top_srcdir@/driver/include -I@abs_top_srcdir@/include" \ + SUBDIRS="$(GPIB_ABS_MODULE_SUBDIR)" INSTALL_MOD_DIR="gpib" +- $(DEPMOD) -a +- +-/dev/gpib0: +- groupadd gpib || echo "group gpib exists" +- for i in `seq 0 15`; \ +- do \ +- mknod -m u=rw,g=rw,o= /dev/gpib$${i} c $(IBMAJOR) $${i} || exit 1; \ +- chown root:gpib /dev/gpib$${i}; \ +- done +- +-.PHONY : device-file-check +-device-file-check: /dev/gpib0 +- @if [ ! -c /dev/gpib0 ]; then \ +- if [ -a /dev/gpib0 ]; then \ +- echo "A file or directory called /dev/gpib0 exists but it is not" \ +- "a character device. Delete or move it and try again."; \ +- exit 1; \ +- fi; \ +- fi +- @ls -l /dev/gpib0 | grep -q "$(IBMAJOR)"; \ +- if [ $$? != 0 ]; then \ +- echo "/dev/gpib0 has the wrong major number. " \ +- "Delete your /dev/gpibX files and try again."; \ +- exit 1; \ +- fi + + #should move this to util/templates Makefile.am when it exists + /etc/gpib.conf: +- $(INSTALL_DATA) -D $(top_srcdir)/util/templates/gpib.conf /etc/gpib.conf + + #make sure compiled files, etc don't make it into distribution tarballs + dist-hook: diff --git a/sci-libs/linux-gpib/files/linux-gpib-4.0.3-reallydie.patch b/sci-libs/linux-gpib/files/linux-gpib-4.0.3-reallydie.patch new file mode 100644 index 000000000000..e19f8d36755b --- /dev/null +++ b/sci-libs/linux-gpib/files/linux-gpib-4.0.3-reallydie.patch @@ -0,0 +1,16 @@ +Index: drivers/Makefile.am +=================================================================== +--- a/drivers/Makefile.am (revision 1602) ++++ b/drivers/Makefile.am (working copy) +@@ -15,10 +15,8 @@ + + -include $(top_srcdir)/util/linux_flags/flags + +-#ignore errors from kernel's make modules in all-local, to avoid failure of make install +-#on nfs filesystem with root_squash + all-local: +- -$(MAKE) -C $(LINUX_SRCDIR) V=1 modules\ ++ $(MAKE) -C $(LINUX_SRCDIR) V=1 modules\ + CC="$(LINUX_CC) -I@abs_top_srcdir@ -I@abs_top_srcdir@/drivers/gpib/include -I@abs_top_srcdir@/include" \ + SUBDIRS="$(GPIB_ABS_MODULE_SUBDIR)" + diff --git a/sci-libs/linux-gpib/files/linux-gpib-4.0.4_rc2-kernel-4.11.0.patch b/sci-libs/linux-gpib/files/linux-gpib-4.0.4_rc2-kernel-4.11.0.patch new file mode 100644 index 000000000000..c3a9764924c2 --- /dev/null +++ b/sci-libs/linux-gpib/files/linux-gpib-4.0.4_rc2-kernel-4.11.0.patch @@ -0,0 +1,10 @@ +--- linux-gpib-4.0.4rc2.orig/drivers/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c 2016-06-22 09:48:47.000000000 +0100 ++++ linux-gpib-4.0.4rc2/drivers/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c 2017-05-02 00:59:04.509950834 +0100 +@@ -37,6 +37,7 @@ + #include <linux/file.h> + #include <linux/timer.h> + #include <linux/delay.h> ++#include <linux/sched/signal.h> + #include <asm/uaccess.h> + + #include "gpibP.h" diff --git a/sci-libs/linux-gpib/linux-gpib-4.0.3-r1.ebuild b/sci-libs/linux-gpib/linux-gpib-4.0.3-r1.ebuild new file mode 100644 index 000000000000..8e7b27438b4f --- /dev/null +++ b/sci-libs/linux-gpib/linux-gpib-4.0.3-r1.ebuild @@ -0,0 +1,216 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +PYTHON_COMPAT=( python2_7 ) + +inherit linux-info readme.gentoo-r1 versionator eutils linux-mod autotools perl-functions python-single-r1 toolchain-funcs udev user + +MY_PV=${PV/_/} + +DESCRIPTION="Kernel module and driver library for GPIB (IEEE 488.2) hardware" +HOMEPAGE="http://linux-gpib.sourceforge.net/" +SRC_URI="mirror://sourceforge/linux-gpib/${PN}-${MY_PV}.tar.gz + firmware? ( http://linux-gpib.sourceforge.net/firmware/gpib_firmware-2006-11-12.tar.gz ) +" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 ~arm ~x86" +IUSE="isa pcmcia static debug guile perl php python tcl doc firmware" + +COMMONDEPEND=" + tcl? ( dev-lang/tcl:0= ) + guile? ( dev-scheme/guile:12 ) + perl? ( dev-lang/perl:= ) + php? ( dev-lang/php:= ) + python? ( ${PYTHON_DEPS} ) + firmware? ( sys-apps/fxload )" +RDEPEND="${COMMONDEPEND}" +DEPEND="${COMMONDEPEND} + virtual/pkgconfig + doc? ( app-text/docbook-sgml-utils ) + perl? ( virtual/perl-ExtUtils-MakeMaker )" + +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" + +PATCHES=( + "${FILESDIR}"/${PN}-3.2.21-build.patch + "${FILESDIR}"/${PN}-3.2.16-perl.patch + "${FILESDIR}"/${PN}-4.0.3-reallydie.patch +) + +S=${WORKDIR}/${PN}-${MY_PV} + +pkg_setup () { + use perl && perl_set_version + use python && python_setup + + CONFIG_CHECK="!VMAP_STACK" + linux-mod_pkg_setup + + if kernel_is -lt 2 6 8; then + die "Kernel versions older than 2.6.8 are not supported." + fi + + # https://sourceforge.net/tracker/?func=detail&aid=3285657&group_id=42378&atid=432940 + if use pcmcia && kernel_is -ge 2 6 38; then + die "pcmcia support is broken on kernels newer 2.6.38" + fi +} + +src_prepare () { + default + kernel_is ge 4 11 0 && eapply "${FILESDIR}"/${PN}-4.0.4_rc2-kernel-4.11.0.patch + eautoreconf +} + +src_configure() { + set_arch_to_kernel + econf \ + $(use_enable isa) \ + $(use_enable pcmcia) \ + $(use_enable static) \ + $(use_enable debug driver-debug) \ + $(use_enable guile guile-binding) \ + $(use_enable perl perl-binding) \ + $(use_enable php php-binding) \ + $(use_enable python python-binding) \ + $(use_enable tcl tcl-binding) \ + $(use_enable doc documentation) \ + --with-linux-srcdir=${KV_DIR} +} + +src_compile() { + set_arch_to_kernel + FIRM_DIR=/usr/share/usb + emake \ + DESTDIR="${D}" \ + INSTALL_MOD_PATH="${D}" \ + HOTPLUG_USB_CONF_DIR="${D}"/etc/hotplug/usb \ + UDEV_RULES_DIR="${D}$(get_udevdir)"/rules.d \ + USB_FIRMWARE_DIR="${D}"${FIRM_DIR} \ + docdir=/usr/share/doc/${PF}/html +} + +src_install() { + set_arch_to_kernel + FIRM_DIR=/usr/share/usb + emake \ + DESTDIR="${D}" \ + INSTALL_MOD_PATH="${D}" \ + HOTPLUG_USB_CONF_DIR="${D}"/etc/hotplug/usb \ + UDEV_RULES_DIR="${D}/$(get_udevdir)"/rules.d \ + USB_FIRMWARE_DIR="${D}"${FIRM_DIR} \ + docdir=/usr/share/doc/${PF}/html install + + if use perl; then + einfo "Installing perl module" + cd "${S}"/language/perl || die + DESTDIR=${D} emake install + perl_fix_packlist + perl_delete_emptybsdir + cd "${S}" || die + fi + + echo "KERNEL==\"gpib[0-9]*\", MODE=\"0660\", GROUP=\"gpib\"" >> 99-gpib.rules + udev_dorules 99-gpib.rules + + dodoc doc/linux-gpib.pdf ChangeLog AUTHORS README* NEWS + + insinto /etc + newins util/templates/gpib.conf gpib.conf + newins util/templates/gpib.conf gpib.conf.example + + if use pcmcia; then + dodir /etc/pcmcia + insinto /etc/pcmcia + doins "${S}"/etc/pcmcia/* + fi + + if use firmware; then + insinto "${FIRM_DIR}"/agilent_82357a + doins "${WORKDIR}"/gpib_firmware-2006-11-12/agilent_82357a/* + + insinto "${FIRM_DIR}"/ni_gpib_usb_b + doins "${WORKDIR}"/gpib_firmware-2006-11-12/ni_gpib_usb_b/* + + insinto /usr/share/linux-gpib/hp_82341 + # do not install precompiled generate_firmware + doins "${WORKDIR}"/gpib_firmware-2006-11-12/hp_82341/{*.bin,README} + fi + + # fix rules files + local f + find "${D}$(get_udevdir)"/rules.d -type f -print0 | while read -rd '' f ; do + grep -q "${D}" "${f}" && einfo "File ${f} contains a temporary path, fixing." + sed -i -e "s:${D}:/:g" "${f}" + done + + DOC_CONTENTS=" +You need to run the 'gpib_config' utility to setup the driver before +you can use it. In order to do it automatically you can add to your +start script something like this (supposing the appropriate driver +is loaded on the startup): +\n + gpib_config --minor 0 +\n +To give a user access to the computer's gpib board you will have to add +them to the group 'gpib' or, you could change the permissions on the device +files /dev/gpib[0-15] to something you like better, using 'chmod' +\n +Edit /etc/gpib.conf to match your interface board, and any devices you wish +to open via ibfind(). See the documentation in /usr/share/linux-gpib/html for +more information. +\n +" + + if use pcmcia; then + DOC_CONTENTS+=' +For PCMCIA cards:\n +All files needed for a PCMCIA board were copied to /etc/pcmcia. +You may wish to edit the options passed to the gpib_config call in the +/etc/pcmcia/linux-gpib-pcmcia script. +You may need to send a SIGHUP signal to the cardmgr daemon to force it +to reload the files in /etc/pcmcia \(alternatively you could use your +pcmcia init.d script to restart the cardmgr, or you could just reboot\). +The driver module will be loaded as needed by the cardmgr. + +' + fi + + if use firmware; then + DOC_CONTENTS+=' +For Agilent \(HP\) 82341C and 82341D cards: +The firmware for these boards is uploaded by passing the appropriate +firmware file from /usr/share/linux-gpib/hp_82341 directory to +gpib_config using the -I or --init-data command line option. Example:\n +gpib_config --minor 0 --init-data /usr/share/linux-gpib/hp_82341/hp_82341c_fw.bin +' + fi + + readme.gentoo_create_doc +} + +pkg_preinst () { + linux-mod_pkg_preinst + use perl && perl_set_version + enewgroup gpib +} + +pkg_postinst () { + linux-mod_pkg_postinst + readme.gentoo_print_elog + + local v + for v in ${REPLACING_VERSIONS}; do + if ! version_is_at_least 3.2.21-r1 ${v}; then + ewarn "sci-libs/linux-gpib-3.2.21-r1 introduces incompatible changes to the kernel" + ewarn "interface. You may need to reboot to make sure the newly built driver modules" + ewarn "are used (some of the driver modules cannot be unloaded)." + ewarn "If you do not do this, every gpib call will just result in an error message." + break + fi + done +} diff --git a/sci-libs/linux-gpib/linux-gpib-4.0.4_rc3.ebuild b/sci-libs/linux-gpib/linux-gpib-4.0.4_rc3.ebuild new file mode 100644 index 000000000000..16db1db66082 --- /dev/null +++ b/sci-libs/linux-gpib/linux-gpib-4.0.4_rc3.ebuild @@ -0,0 +1,215 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +PYTHON_COMPAT=( python2_7 ) + +inherit linux-info readme.gentoo-r1 versionator eutils linux-mod autotools perl-functions python-single-r1 toolchain-funcs udev user + +MY_PV=${PV/_/} + +DESCRIPTION="Kernel module and driver library for GPIB (IEEE 488.2) hardware" +HOMEPAGE="http://linux-gpib.sourceforge.net/" +SRC_URI="mirror://sourceforge/linux-gpib/${PN}-${MY_PV}.tar.gz + firmware? ( http://linux-gpib.sourceforge.net/firmware/gpib_firmware-2006-11-12.tar.gz ) +" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm ~x86" +IUSE="isa pcmcia static debug guile perl php python tcl doc firmware" + +COMMONDEPEND=" + tcl? ( dev-lang/tcl:0= ) + guile? ( dev-scheme/guile:12 ) + perl? ( dev-lang/perl:= ) + php? ( dev-lang/php:= ) + python? ( ${PYTHON_DEPS} ) + firmware? ( sys-apps/fxload )" +RDEPEND="${COMMONDEPEND}" +DEPEND="${COMMONDEPEND} + virtual/pkgconfig + doc? ( app-text/docbook-sgml-utils ) + perl? ( virtual/perl-ExtUtils-MakeMaker )" + +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" + +PATCHES=( + "${FILESDIR}"/${PN}-3.2.21-build.patch + "${FILESDIR}"/${PN}-3.2.16-perl.patch + "${FILESDIR}"/${PN}-4.0.3-reallydie.patch +) + +S=${WORKDIR}/${PN}-${MY_PV} + +pkg_setup () { + use perl && perl_set_version + use python && python_setup + + linux-mod_pkg_setup + + if kernel_is -lt 2 6 8; then + die "Kernel versions older than 2.6.8 are not supported." + fi + + # https://sourceforge.net/tracker/?func=detail&aid=3285657&group_id=42378&atid=432940 + if use pcmcia && kernel_is -ge 2 6 38; then + die "pcmcia support is broken on kernels newer 2.6.38" + fi +} + +src_prepare () { + default + kernel_is ge 4 11 0 && eapply "${FILESDIR}"/${PN}-4.0.4_rc2-kernel-4.11.0.patch + eautoreconf +} + +src_configure() { + set_arch_to_kernel + econf \ + $(use_enable isa) \ + $(use_enable pcmcia) \ + $(use_enable static) \ + $(use_enable debug driver-debug) \ + $(use_enable guile guile-binding) \ + $(use_enable perl perl-binding) \ + $(use_enable php php-binding) \ + $(use_enable python python-binding) \ + $(use_enable tcl tcl-binding) \ + $(use_enable doc documentation) \ + --with-linux-srcdir=${KV_DIR} +} + +src_compile() { + set_arch_to_kernel + FIRM_DIR=/usr/share/usb + emake \ + DESTDIR="${D}" \ + INSTALL_MOD_PATH="${D}" \ + HOTPLUG_USB_CONF_DIR="${D}"/etc/hotplug/usb \ + UDEV_RULES_DIR="${D}$(get_udevdir)"/rules.d \ + USB_FIRMWARE_DIR="${D}"${FIRM_DIR} \ + docdir=/usr/share/doc/${PF}/html +} + +src_install() { + set_arch_to_kernel + FIRM_DIR=/usr/share/usb + emake \ + DESTDIR="${D}" \ + INSTALL_MOD_PATH="${D}" \ + HOTPLUG_USB_CONF_DIR="${D}"/etc/hotplug/usb \ + UDEV_RULES_DIR="${D}/$(get_udevdir)"/rules.d \ + USB_FIRMWARE_DIR="${D}"${FIRM_DIR} \ + docdir=/usr/share/doc/${PF}/html install + + if use perl; then + einfo "Installing perl module" + cd "${S}"/language/perl || die + DESTDIR=${D} emake install + perl_fix_packlist + perl_delete_emptybsdir + cd "${S}" || die + fi + + echo "KERNEL==\"gpib[0-9]*\", MODE=\"0660\", GROUP=\"gpib\"" >> 99-gpib.rules + udev_dorules 99-gpib.rules + + dodoc doc/linux-gpib.pdf ChangeLog AUTHORS README* NEWS + + insinto /etc + newins util/templates/gpib.conf gpib.conf + newins util/templates/gpib.conf gpib.conf.example + + if use pcmcia; then + dodir /etc/pcmcia + insinto /etc/pcmcia + doins "${S}"/etc/pcmcia/* + fi + + if use firmware; then + insinto "${FIRM_DIR}"/agilent_82357a + doins "${WORKDIR}"/gpib_firmware-2006-11-12/agilent_82357a/* + + insinto "${FIRM_DIR}"/ni_gpib_usb_b + doins "${WORKDIR}"/gpib_firmware-2006-11-12/ni_gpib_usb_b/* + + insinto /usr/share/linux-gpib/hp_82341 + # do not install precompiled generate_firmware + doins "${WORKDIR}"/gpib_firmware-2006-11-12/hp_82341/{*.bin,README} + fi + + # fix rules files + local f + find "${D}$(get_udevdir)"/rules.d -type f -print0 | while read -rd '' f ; do + grep -q "${D}" "${f}" && einfo "File ${f} contains a temporary path, fixing." + sed -i -e "s:${D}:/:g" "${f}" + done + + DOC_CONTENTS=" +You need to run the 'gpib_config' utility to setup the driver before +you can use it. In order to do it automatically you can add to your +start script something like this (supposing the appropriate driver +is loaded on the startup): +\n + gpib_config --minor 0 +\n +To give a user access to the computer's gpib board you will have to add +them to the group 'gpib' or, you could change the permissions on the device +files /dev/gpib[0-15] to something you like better, using 'chmod' +\n +Edit /etc/gpib.conf to match your interface board, and any devices you wish +to open via ibfind(). See the documentation in /usr/share/linux-gpib/html for +more information. +\n +" + + if use pcmcia; then + DOC_CONTENTS+=' +For PCMCIA cards:\n +All files needed for a PCMCIA board were copied to /etc/pcmcia. +You may wish to edit the options passed to the gpib_config call in the +/etc/pcmcia/linux-gpib-pcmcia script. +You may need to send a SIGHUP signal to the cardmgr daemon to force it +to reload the files in /etc/pcmcia \(alternatively you could use your +pcmcia init.d script to restart the cardmgr, or you could just reboot\). +The driver module will be loaded as needed by the cardmgr. + +' + fi + + if use firmware; then + DOC_CONTENTS+=' +For Agilent \(HP\) 82341C and 82341D cards: +The firmware for these boards is uploaded by passing the appropriate +firmware file from /usr/share/linux-gpib/hp_82341 directory to +gpib_config using the -I or --init-data command line option. Example:\n +gpib_config --minor 0 --init-data /usr/share/linux-gpib/hp_82341/hp_82341c_fw.bin +' + fi + + readme.gentoo_create_doc +} + +pkg_preinst () { + linux-mod_pkg_preinst + use perl && perl_set_version + enewgroup gpib +} + +pkg_postinst () { + linux-mod_pkg_postinst + readme.gentoo_print_elog + + local v + for v in ${REPLACING_VERSIONS}; do + if ! version_is_at_least 3.2.21-r1 ${v}; then + ewarn "sci-libs/linux-gpib-3.2.21-r1 introduces incompatible changes to the kernel" + ewarn "interface. You may need to reboot to make sure the newly built driver modules" + ewarn "are used (some of the driver modules cannot be unloaded)." + ewarn "If you do not do this, every gpib call will just result in an error message." + break + fi + done +} diff --git a/sci-libs/linux-gpib/linux-gpib-4.1.0.ebuild b/sci-libs/linux-gpib/linux-gpib-4.1.0.ebuild new file mode 100644 index 000000000000..16db1db66082 --- /dev/null +++ b/sci-libs/linux-gpib/linux-gpib-4.1.0.ebuild @@ -0,0 +1,215 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +PYTHON_COMPAT=( python2_7 ) + +inherit linux-info readme.gentoo-r1 versionator eutils linux-mod autotools perl-functions python-single-r1 toolchain-funcs udev user + +MY_PV=${PV/_/} + +DESCRIPTION="Kernel module and driver library for GPIB (IEEE 488.2) hardware" +HOMEPAGE="http://linux-gpib.sourceforge.net/" +SRC_URI="mirror://sourceforge/linux-gpib/${PN}-${MY_PV}.tar.gz + firmware? ( http://linux-gpib.sourceforge.net/firmware/gpib_firmware-2006-11-12.tar.gz ) +" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm ~x86" +IUSE="isa pcmcia static debug guile perl php python tcl doc firmware" + +COMMONDEPEND=" + tcl? ( dev-lang/tcl:0= ) + guile? ( dev-scheme/guile:12 ) + perl? ( dev-lang/perl:= ) + php? ( dev-lang/php:= ) + python? ( ${PYTHON_DEPS} ) + firmware? ( sys-apps/fxload )" +RDEPEND="${COMMONDEPEND}" +DEPEND="${COMMONDEPEND} + virtual/pkgconfig + doc? ( app-text/docbook-sgml-utils ) + perl? ( virtual/perl-ExtUtils-MakeMaker )" + +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" + +PATCHES=( + "${FILESDIR}"/${PN}-3.2.21-build.patch + "${FILESDIR}"/${PN}-3.2.16-perl.patch + "${FILESDIR}"/${PN}-4.0.3-reallydie.patch +) + +S=${WORKDIR}/${PN}-${MY_PV} + +pkg_setup () { + use perl && perl_set_version + use python && python_setup + + linux-mod_pkg_setup + + if kernel_is -lt 2 6 8; then + die "Kernel versions older than 2.6.8 are not supported." + fi + + # https://sourceforge.net/tracker/?func=detail&aid=3285657&group_id=42378&atid=432940 + if use pcmcia && kernel_is -ge 2 6 38; then + die "pcmcia support is broken on kernels newer 2.6.38" + fi +} + +src_prepare () { + default + kernel_is ge 4 11 0 && eapply "${FILESDIR}"/${PN}-4.0.4_rc2-kernel-4.11.0.patch + eautoreconf +} + +src_configure() { + set_arch_to_kernel + econf \ + $(use_enable isa) \ + $(use_enable pcmcia) \ + $(use_enable static) \ + $(use_enable debug driver-debug) \ + $(use_enable guile guile-binding) \ + $(use_enable perl perl-binding) \ + $(use_enable php php-binding) \ + $(use_enable python python-binding) \ + $(use_enable tcl tcl-binding) \ + $(use_enable doc documentation) \ + --with-linux-srcdir=${KV_DIR} +} + +src_compile() { + set_arch_to_kernel + FIRM_DIR=/usr/share/usb + emake \ + DESTDIR="${D}" \ + INSTALL_MOD_PATH="${D}" \ + HOTPLUG_USB_CONF_DIR="${D}"/etc/hotplug/usb \ + UDEV_RULES_DIR="${D}$(get_udevdir)"/rules.d \ + USB_FIRMWARE_DIR="${D}"${FIRM_DIR} \ + docdir=/usr/share/doc/${PF}/html +} + +src_install() { + set_arch_to_kernel + FIRM_DIR=/usr/share/usb + emake \ + DESTDIR="${D}" \ + INSTALL_MOD_PATH="${D}" \ + HOTPLUG_USB_CONF_DIR="${D}"/etc/hotplug/usb \ + UDEV_RULES_DIR="${D}/$(get_udevdir)"/rules.d \ + USB_FIRMWARE_DIR="${D}"${FIRM_DIR} \ + docdir=/usr/share/doc/${PF}/html install + + if use perl; then + einfo "Installing perl module" + cd "${S}"/language/perl || die + DESTDIR=${D} emake install + perl_fix_packlist + perl_delete_emptybsdir + cd "${S}" || die + fi + + echo "KERNEL==\"gpib[0-9]*\", MODE=\"0660\", GROUP=\"gpib\"" >> 99-gpib.rules + udev_dorules 99-gpib.rules + + dodoc doc/linux-gpib.pdf ChangeLog AUTHORS README* NEWS + + insinto /etc + newins util/templates/gpib.conf gpib.conf + newins util/templates/gpib.conf gpib.conf.example + + if use pcmcia; then + dodir /etc/pcmcia + insinto /etc/pcmcia + doins "${S}"/etc/pcmcia/* + fi + + if use firmware; then + insinto "${FIRM_DIR}"/agilent_82357a + doins "${WORKDIR}"/gpib_firmware-2006-11-12/agilent_82357a/* + + insinto "${FIRM_DIR}"/ni_gpib_usb_b + doins "${WORKDIR}"/gpib_firmware-2006-11-12/ni_gpib_usb_b/* + + insinto /usr/share/linux-gpib/hp_82341 + # do not install precompiled generate_firmware + doins "${WORKDIR}"/gpib_firmware-2006-11-12/hp_82341/{*.bin,README} + fi + + # fix rules files + local f + find "${D}$(get_udevdir)"/rules.d -type f -print0 | while read -rd '' f ; do + grep -q "${D}" "${f}" && einfo "File ${f} contains a temporary path, fixing." + sed -i -e "s:${D}:/:g" "${f}" + done + + DOC_CONTENTS=" +You need to run the 'gpib_config' utility to setup the driver before +you can use it. In order to do it automatically you can add to your +start script something like this (supposing the appropriate driver +is loaded on the startup): +\n + gpib_config --minor 0 +\n +To give a user access to the computer's gpib board you will have to add +them to the group 'gpib' or, you could change the permissions on the device +files /dev/gpib[0-15] to something you like better, using 'chmod' +\n +Edit /etc/gpib.conf to match your interface board, and any devices you wish +to open via ibfind(). See the documentation in /usr/share/linux-gpib/html for +more information. +\n +" + + if use pcmcia; then + DOC_CONTENTS+=' +For PCMCIA cards:\n +All files needed for a PCMCIA board were copied to /etc/pcmcia. +You may wish to edit the options passed to the gpib_config call in the +/etc/pcmcia/linux-gpib-pcmcia script. +You may need to send a SIGHUP signal to the cardmgr daemon to force it +to reload the files in /etc/pcmcia \(alternatively you could use your +pcmcia init.d script to restart the cardmgr, or you could just reboot\). +The driver module will be loaded as needed by the cardmgr. + +' + fi + + if use firmware; then + DOC_CONTENTS+=' +For Agilent \(HP\) 82341C and 82341D cards: +The firmware for these boards is uploaded by passing the appropriate +firmware file from /usr/share/linux-gpib/hp_82341 directory to +gpib_config using the -I or --init-data command line option. Example:\n +gpib_config --minor 0 --init-data /usr/share/linux-gpib/hp_82341/hp_82341c_fw.bin +' + fi + + readme.gentoo_create_doc +} + +pkg_preinst () { + linux-mod_pkg_preinst + use perl && perl_set_version + enewgroup gpib +} + +pkg_postinst () { + linux-mod_pkg_postinst + readme.gentoo_print_elog + + local v + for v in ${REPLACING_VERSIONS}; do + if ! version_is_at_least 3.2.21-r1 ${v}; then + ewarn "sci-libs/linux-gpib-3.2.21-r1 introduces incompatible changes to the kernel" + ewarn "interface. You may need to reboot to make sure the newly built driver modules" + ewarn "are used (some of the driver modules cannot be unloaded)." + ewarn "If you do not do this, every gpib call will just result in an error message." + break + fi + done +} diff --git a/sci-libs/linux-gpib/metadata.xml b/sci-libs/linux-gpib/metadata.xml new file mode 100644 index 000000000000..18c6ece75d7b --- /dev/null +++ b/sci-libs/linux-gpib/metadata.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>dilfridge@gentoo.org</email> + <name>Andreas K. Huettel</name> + </maintainer> + <maintainer type="project"> + <email>sci-electronics@gentoo.org</email> + <name>Gentoo Electronics Project</name> + </maintainer> + <use> + <flag name="firmware">Install firmware</flag> + <flag name="isa">Build ISA kernel modules; from 3.12 on the setting is ignored and the decision based on the kernel configuration</flag> + </use> + <upstream> + <remote-id type="sourceforge">linux-gpib</remote-id> + </upstream> +</pkgmetadata> |