aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAstroFloyd <AstroFloyd@gmail.com>2020-12-09 14:43:06 +0100
committerAstroFloyd <AstroFloyd@gmail.com>2020-12-09 14:43:06 +0100
commita0a536c523008711ee774cf43b4de86c767abdaf (patch)
treee29caf6dfbdc221d15fa7f8385f6c9a9c6413861
parentsci-libs/pg2plplot: quick fix after previous commit (diff)
downloadAstroFloyd-a0a536c523008711ee774cf43b4de86c767abdaf.tar.gz
AstroFloyd-a0a536c523008711ee774cf43b4de86c767abdaf.tar.bz2
AstroFloyd-a0a536c523008711ee774cf43b4de86c767abdaf.zip
sci-electronics/labjack-ljm-64bit: revision bump to v20171221-r2.
Package-Manager: Portage-3.0.9, Repoman-3.0.2 Signed-off-by: AstroFloyd <AstroFloyd@gmail.com>
-rw-r--r--sci-electronics/labjack-ljm-64bit/ChangeLog6
-rw-r--r--sci-electronics/labjack-ljm-64bit/Manifest3
-rw-r--r--sci-electronics/labjack-ljm-64bit/labjack-ljm-64bit-20171221-r2.ebuild140
3 files changed, 148 insertions, 1 deletions
diff --git a/sci-electronics/labjack-ljm-64bit/ChangeLog b/sci-electronics/labjack-ljm-64bit/ChangeLog
index beeed4d..7ccc421 100644
--- a/sci-electronics/labjack-ljm-64bit/ChangeLog
+++ b/sci-electronics/labjack-ljm-64bit/ChangeLog
@@ -1,3 +1,9 @@
+*labjack-ljm-64bit-20171221-r2 (09 Dec 2020)
+
+ 09 Dec 2020; AstroFloyd <AstroFloyd@gmail.com>
+ +labjack-ljm-64bit-20171221-r2.ebuild:
+ sci-electronics/labjack-ljm-64bit: revision bump to v20171221-r2.
+
*labjack-ljm-64bit-20171221-r1 (10 Nov 2020)
10 Nov 2020; AstroFloyd <AstroFloyd@gmail.com>
diff --git a/sci-electronics/labjack-ljm-64bit/Manifest b/sci-electronics/labjack-ljm-64bit/Manifest
index 461fe0d..71a0f75 100644
--- a/sci-electronics/labjack-ljm-64bit/Manifest
+++ b/sci-electronics/labjack-ljm-64bit/Manifest
@@ -1,5 +1,6 @@
DIST labjack_ljm_software_2017_12_21_x86_64.tar.gz 69663743 BLAKE2B 2a654c72221eefa241fc3b877231177da7c6cec6d0396545daf297cb6cff0cbba132e9abb21509ca3c69432eb4ebc6fd36fd783202fb3fe129e191b3ab725af4 SHA512 a67bce9def668309eaf7298ef4b20d2337487f5badf1ca2fa9d4ad8b595d16e822133aea3df46c72528b151feafab0bcea172f6dcc4ff999300bdf3e5c6f7edf
EBUILD labjack-ljm-64bit-20171221-r1.ebuild 5970 BLAKE2B 375933e58eaad9ed47737e87f63c75443941dfdd0932a4973bf9649f54c926915ebc169b91ac8ceffebbbbe1b60d5630ca31f509ad81c58ca9e661e44bfa1bcb SHA512 0856f66d1dda8b64579dcb35db575297f2359ee6e1037e56ec5a14f971a5348e353e661ba2d07e73e5197de2968c517ef72f539e4acd1615777cccac3fa3f8c6
+EBUILD labjack-ljm-64bit-20171221-r2.ebuild 6005 BLAKE2B 72139bc53aa08ba478b11616b31b18b228c9ecef430898efe62d43e36344bed2d72e6d33f8f4818e14009a275f9cebd1989defd07588aae9885d1fb90192715a SHA512 0481d7f4da19476903b525820c0343c05e720d78408ef99ddf89f7c2479d66c6cf7a459a4760fb5c07dd6810090af0ece9550ece9d1fdecd3f99da76a7b0ab43
EBUILD labjack-ljm-64bit-20171221.ebuild 4772 BLAKE2B eaa207487f106454eaff054a53aa4010e1c0039289e47969f80b87b387c8fa9dbad768eed9f27eb15435d48d161b492e496089f8d3392cf42afc730d1af9d611 SHA512 173e766ff2484ec1fe4d088adb1c82f92c8d65f5d9e4b170391f75709c2160fa594a30d268c5c491c54adab344bdeeee42bafd30b7136ac27282d534143a2a41
-MISC ChangeLog 793 BLAKE2B 089bf6b207c5eac3be3c22165a79a034ce70528e79108aaded1d18c7c2c860520f30936790dd22b15d65febc8b7dc9def1770cb178ebc6b653d46f7903475d8f SHA512 2c0a56301b95c588310d2d7cc971d959124d94e2d244bfadc3aba8a9669b0f1a743ed7d698650439126e3127f341d5325d3b9937a8848783d5461dcab87d9864
+MISC ChangeLog 998 BLAKE2B d37f53280393c5a23e1fc70b1c711004e717e313cce85fb774f8dda9831930112d7414c78cc9da3b8c3cbfd0c5274b97f9445d51a72c74ed4c760184471c1fb5 SHA512 bfe49faac25b13f69e401318dfa04ba8eefbce7a188f5e653306b2ca078511e2dedd35095850b78122f59ac2a6fad99e6c94844810d2c9356c86b30faed3b1a5
MISC metadata.xml 329 BLAKE2B 8a3b4815e572375c40c64ef7c2266bf8823c3c2bd2b1cbd97e1f2c3daaaa6b101f28cf1569c3de1645795e73611ae408310ac94ff3de4b59458fd1062ccdaa82 SHA512 e5ac12d24d49db9203120c63cbc4e47ec61d43fed9168b03e0390cc9a934e0f819b5912257e77563d4d8ed26fea24fff8eb89b86b69949d029a22f5db74bdd41
diff --git a/sci-electronics/labjack-ljm-64bit/labjack-ljm-64bit-20171221-r2.ebuild b/sci-electronics/labjack-ljm-64bit/labjack-ljm-64bit-20171221-r2.ebuild
new file mode 100644
index 0000000..1ef804b
--- /dev/null
+++ b/sci-electronics/labjack-ljm-64bit/labjack-ljm-64bit-20171221-r2.ebuild
@@ -0,0 +1,140 @@
+# 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
+ kipling? ( gnome-base/gconf )
+ "
+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
+# }