aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sci-electronics')
-rw-r--r--sci-electronics/labjack-ljm-64bit/ChangeLog6
-rw-r--r--sci-electronics/labjack-ljm-64bit/Manifest5
-rw-r--r--sci-electronics/labjack-ljm-64bit/labjack-ljm-64bit-20171221-r1.ebuild138
-rw-r--r--sci-electronics/labjack-ljm-64bit/labjack-ljm-64bit-20171221.ebuild2
4 files changed, 148 insertions, 3 deletions
diff --git a/sci-electronics/labjack-ljm-64bit/ChangeLog b/sci-electronics/labjack-ljm-64bit/ChangeLog
index addf4b8..beeed4d 100644
--- a/sci-electronics/labjack-ljm-64bit/ChangeLog
+++ b/sci-electronics/labjack-ljm-64bit/ChangeLog
@@ -1,3 +1,9 @@
+*labjack-ljm-64bit-20171221-r1 (10 Nov 2020)
+
+ 10 Nov 2020; AstroFloyd <AstroFloyd@gmail.com>
+ +labjack-ljm-64bit-20171221-r1.ebuild, labjack-ljm-64bit-20171221.ebuild:
+ sci-electronics/labjack-ljm-64bit: revision bump to v20171221-r1.
+
30 Apr 2018; AstroFloyd <AstroFloyd@gmail.com>
labjack-ljm-64bit-20171221.ebuild:
sci-electronics/labjack-ljm-64bit: Remove lingering symlink and directory
diff --git a/sci-electronics/labjack-ljm-64bit/Manifest b/sci-electronics/labjack-ljm-64bit/Manifest
index ac399e5..461fe0d 100644
--- a/sci-electronics/labjack-ljm-64bit/Manifest
+++ b/sci-electronics/labjack-ljm-64bit/Manifest
@@ -1,4 +1,5 @@
DIST labjack_ljm_software_2017_12_21_x86_64.tar.gz 69663743 BLAKE2B 2a654c72221eefa241fc3b877231177da7c6cec6d0396545daf297cb6cff0cbba132e9abb21509ca3c69432eb4ebc6fd36fd783202fb3fe129e191b3ab725af4 SHA512 a67bce9def668309eaf7298ef4b20d2337487f5badf1ca2fa9d4ad8b595d16e822133aea3df46c72528b151feafab0bcea172f6dcc4ff999300bdf3e5c6f7edf
-EBUILD labjack-ljm-64bit-20171221.ebuild 4775 BLAKE2B 2bb43edbbfefb01966c267527efadbb2f5202e81612e29236f39fc2d5d5fc0e66c03c3d5d4844516a387aff1d64678666c7e55e3b65aa69dfd156f0c10d93624 SHA512 5594bdef9a02c567bb00675237b8455ecea893fffae7ffd0e9265ec18a3e4a44b4c05e0d5520c03336b9cc1976f7b8456c03ad25c9d262a954d501dab00a241d
-MISC ChangeLog 553 BLAKE2B 282d934b6a3d3570e546ce25bc2017635f37e0e218bf4e79f0bc2bb5963da341b64e4a0ba87be5b9168db2dc0403f7b167077680b770f17f36022320603e215d SHA512 510eed1fb0d2946caad218285848f3c86f23f366f564e4af93c98ee9472237dd4464294c2da256c2054565524f91e4a72e3e72c6fb03db4ce6dd9b0e2cd0f802
+EBUILD labjack-ljm-64bit-20171221-r1.ebuild 5970 BLAKE2B 375933e58eaad9ed47737e87f63c75443941dfdd0932a4973bf9649f54c926915ebc169b91ac8ceffebbbbe1b60d5630ca31f509ad81c58ca9e661e44bfa1bcb SHA512 0856f66d1dda8b64579dcb35db575297f2359ee6e1037e56ec5a14f971a5348e353e661ba2d07e73e5197de2968c517ef72f539e4acd1615777cccac3fa3f8c6
+EBUILD labjack-ljm-64bit-20171221.ebuild 4772 BLAKE2B eaa207487f106454eaff054a53aa4010e1c0039289e47969f80b87b387c8fa9dbad768eed9f27eb15435d48d161b492e496089f8d3392cf42afc730d1af9d611 SHA512 173e766ff2484ec1fe4d088adb1c82f92c8d65f5d9e4b170391f75709c2160fa594a30d268c5c491c54adab344bdeeee42bafd30b7136ac27282d534143a2a41
+MISC ChangeLog 793 BLAKE2B 089bf6b207c5eac3be3c22165a79a034ce70528e79108aaded1d18c7c2c860520f30936790dd22b15d65febc8b7dc9def1770cb178ebc6b653d46f7903475d8f SHA512 2c0a56301b95c588310d2d7cc971d959124d94e2d244bfadc3aba8a9669b0f1a743ed7d698650439126e3127f341d5325d3b9937a8848783d5461dcab87d9864
MISC metadata.xml 329 BLAKE2B 8a3b4815e572375c40c64ef7c2266bf8823c3c2bd2b1cbd97e1f2c3daaaa6b101f28cf1569c3de1645795e73611ae408310ac94ff3de4b59458fd1062ccdaa82 SHA512 e5ac12d24d49db9203120c63cbc4e47ec61d43fed9168b03e0390cc9a934e0f819b5912257e77563d4d8ed26fea24fff8eb89b86b69949d029a22f5db74bdd41
diff --git a/sci-electronics/labjack-ljm-64bit/labjack-ljm-64bit-20171221-r1.ebuild b/sci-electronics/labjack-ljm-64bit/labjack-ljm-64bit-20171221-r1.ebuild
new file mode 100644
index 0000000..54eb650
--- /dev/null
+++ b/sci-electronics/labjack-ljm-64bit/labjack-ljm-64bit-20171221-r1.ebuild
@@ -0,0 +1,138 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+DESCRIPTION="LabJackM driver + C library and Kipling for LabJack T4, T7, and Digit (64-bit)"
+HOMEPAGE="https://labjack.com/support/software/installers/ljm"
+SRC_URI="https://labjack.com/sites/default/files/software/labjack_ljm_software_2017_12_21_x86_64.tar.gz"
+
+LICENSE="LabJack Boost-1.0 LGPL-2.1 MIT"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="examples +kipling"
+
+DEPEND="app-arch/unmakeself"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/labjack_ljm_software_2017_12_21_x86_64"
+
+src_prepare() {
+ # Unpack selfextracting tarball:
+ unmakeself labjack_ljm_installer.run
+
+ # Fix destination directories:
+ sed -i \
+ -e "s:_DESTINATION=/usr/local/lib:_DESTINATION=${D}usr/lib64:" \
+ -e "s:_DESTINATION=/usr/local/:_DESTINATION=${D}usr/:" \
+ -e "s:_DESTINATION=/opt:_DESTINATION=${D}opt:" \
+ -e "s:/lib/udev/rules.d:${D}lib/udev/rules.d:" \
+ setup.sh
+
+ # Don't clean up. Print messages in success() in pkg_info():
+ sed -i 's:go rm -rf "./labjack_ljm_software":echo "The package was installed succesfully"; exit 0 # \&:' setup.sh
+
+ # The library path is added to /etc/ld.so.conf and ldconfig is run, but since we use the default dir (/usr/lib64/), this isn't necessary:
+ sed -i 's:^setup_ldconfig$:# setup_ldconfig:' setup.sh
+
+ # Cannot restart device rules at this stage:
+ sed -i 's:^restart_device_rules$:# restart_device_rules:' setup.sh
+
+ # Remove path from symbolic links in the same directory:
+ sed -i \
+ -e 's:ln -s -f ${LIB_DESTINATION}/${LJM_REALNAME} ${LIB_DESTINATION}/${LJM_SONAME}:ln -s -f ${LJM_REALNAME} ${LIB_DESTINATION}/${LJM_SONAME}:' \
+ -e 's:ln -s -f ${LIB_DESTINATION}/${LJM_SONAME} ${LIB_DESTINATION}/${LJM_LINKERNAME}:ln -s -f ${LJM_SONAME} ${LIB_DESTINATION}/${LJM_LINKERNAME}:' \
+ setup.sh
+
+ # Portage now refuses world-writable files and directories. This should be reported at the end:
+ # sed -i \
+ # -e 's| --mode=777 | --mode=755 |' \
+ # -e 's|chmod 777 |chmod 755 |' \
+ # -e 's| chmod 666 | chmod 644 |' \
+ # -e 's|chmod a+rw |chmod 644 |' \
+ # setup.sh
+
+}
+
+src_install() {
+ ## Note: installing in /usr/bin, /usr/lib, /usr/include and /usr/share doesn't work, since the /usr/local/... is hardcoded in some of the binaries...
+ mkdir -p "${D}/usr/bin" "${D}/usr/include" "${D}/usr/lib64" "${D}/usr/share" "${D}/opt" "${D}/lib/udev/rules.d"
+
+ VERSION=`head -n 100 labjack_ljm_installer.run | grep scriptargs= | sed -e 's/scriptargs=//' -e 's/"//g'` # v2017_12_21_x86_64 has LJM library v1.17.0
+ elog "${P} contains LJM library ${VERSION}"
+ elog "Running LabJack setup script..."
+ ./setup.sh ${VERSION} || die
+ elog "Exiting LabJack setup script..."
+
+ # Remove symlink to non-existing target:
+ rm -f "${D}/opt/labjack_kipling/node_modules/.bin/ncp"
+
+ # Install header files for examples to /usr/include, so that they can be used elsewhere:
+ insinto usr/include
+ doins labjack_ljm_examples/LabJackMModbusMap.h labjack_ljm_examples/examples/LJM_Utilities.h labjack_ljm_examples/examples/stream/LJM_StreamUtilities.h
+ chmod a-x "${D}usr/include/LabJackM.h" # Fix permissions
+
+ # Install examples if desired:
+ if use examples; then
+ elog "Copying examples..."
+ insinto usr/share/LabJack
+ doins -r labjack_ljm_examples
+ fi
+
+ # Do NOT install kipling if explicitly indicated witg the -kipling USE flag:
+ use kipling || rm -rf "${D}/opt/" "${D}/usr/bin/"
+
+ # Create symlinks from /usr/... to /usr/local/... so that things actually work:
+ mkdir -p "${D}/usr/local/bin" "${D}/usr/local/include" "${D}/usr/local/lib64" "${D}/usr/local/share"
+ MAJOR_VERSION=`echo ${VERSION} | sed 's:^\(.*\)\..*\..*$:\1:'`
+ use kipling && dosym ../../bin/labjack_kipling usr/local/bin/labjack_kipling
+
+ dosym ../../lib64/libLabJackM.so usr/local/lib64/libLabJackM.so
+ dosym ../../lib64/libLabJackM.so.${MAJOR_VERSION} usr/local/lib64/libLabJackM.so.${MAJOR_VERSION}
+ dosym ../../lib64/libLabJackM.so.${VERSION} usr/local/lib64/libLabJackM.so.${VERSION}
+
+ dosym ../../include/LabJackM.h usr/local/include/LabJackM.h
+ dosym ../../include/LabJackMModbusMap.h usr/local/include/LabJackMModbusMap.h
+ dosym ../../include/LJM_StreamUtilities.h usr/local/include/LJM_StreamUtilities.h
+ dosym ../../include/LJM_Utilities.h usr/local/include/LJM_Utilities.h
+
+ dosym ../../share/LabJack usr/local/share/LabJack
+}
+
+pkg_postinst() {
+ elog
+ elog "You may have to manually restart the device rules, e.g. using "
+ elog " 'udevadm control --reload' or restart your computer."
+ elog
+ elog "If you have any LabJack devices connected, please disconnect and"
+ elog " reconnect them afterwards for device rule changes to take effect"
+ elog " (or use 'udevadm trigger')."
+ elog
+ elog "Note that (user) settings will be saved in the world writable"
+ elog " directory /usr/share/LabJack/"
+ elog
+ # elog "labjack-ljm expects to be installed in /usr/local/, rather than /usr/."
+ # elog "Hence, you need to set the following symlinks in order for the package to work:"
+ # elog
+ # elog "ln -s ../../lib64/libLabJackM.so /usr/local/lib64/libLabJackM.so"
+ # elog "ln -s ../../lib64/libLabJackM.so.${MAJOR_VERSION} /usr/local/lib64/libLabJackM.so.${MAJOR_VERSION}"
+ # elog "ln -s ../../lib64/libLabJackM.so.${VERSION} /usr/local/lib64/libLabJackM.so.${VERSION}"
+ # elog
+ # elog "ln -s ../../include/LabJackM.h /usr/local/include/LabJackM.h"
+ # elog "ln -s ../../include/LabJackMModbusMap.h /usr/local/include/LabJackMModbusMap.h"
+ # elog "ln -s ../../include/LJM_StreamUtilities.h /usr/local/include/LJM_StreamUtilities.h"
+ # elog "ln -s ../../include/LJM_Utilities.h /usr/local/include/LJM_Utilities.h"
+ # elog
+ # elog "ln -s ../../share/LabJack /usr/local/share/LabJack"
+ # elog
+}
+
+# pkg_prerm() {
+# elog "Removing /usr/share/LabJack symlink to avoid searching all installed packages for files installed via above symlink(s)..."
+# rm -f /usr/local/share/LabJack
+# }
+#
+# pkg_postrm() {
+# elog "Removing /usr/share/LabJack/ so that no settings remain"
+# rm -rf /usr/share/LabJack
+# }
diff --git a/sci-electronics/labjack-ljm-64bit/labjack-ljm-64bit-20171221.ebuild b/sci-electronics/labjack-ljm-64bit/labjack-ljm-64bit-20171221.ebuild
index 679f0ec..6bf2222 100644
--- a/sci-electronics/labjack-ljm-64bit/labjack-ljm-64bit-20171221.ebuild
+++ b/sci-electronics/labjack-ljm-64bit/labjack-ljm-64bit-20171221.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=5