evdi-1.14.1 + displaylink-driver-5.8.0 added

This commit is contained in:
Шашкин Николай 2024-01-20 01:03:05 +03:00
parent 8aa4edadbc
commit 1ae56929f2
11 changed files with 350 additions and 0 deletions

View File

@ -0,0 +1,8 @@
AUX 99-displaylink.rules 784 BLAKE2B d90ea5cb237360a40ff995deb1ab7110a5c42536a22c61a6b8c3889684997a8e41586ddcbb18370cf60ac1d4c1ae6ca81e05b2e06b6ccdde5e8172e6b80f94e2 SHA512 9fc44e1d1bf320f095ef0b7473559802bbbc5a1c5a26426f9b7b1f0f8e204f7abf6172a95f6eb2eacde3c03472446bd6b99bfd65a0f1217e5a97d54113919a06
AUX dlm.service 295 BLAKE2B 196b9f50ab48e554e30d9dd841080fce9ed98c322aae63eb13c2373aa606251d2f58197eed8170d5c03e7b1efb81ffa65019022877618126adef57702babba1a SHA512 a6c8128d92cbc8b14d8bb3f492e601f3f9d8635469be1cc7afaa669d0af48e2db84d8453910c1144e6e72a42afc61ecfbb7cead543a2483ffb3f6cfde73d6f75
AUX pm-displaylink 981 BLAKE2B 854e07129c29475978a0944296d6c4bd0596c3290418ace98ed6f03814e8fc69cd856021fc80b7e7e6cef898769d7dc756db0bc0067ea47c099d03ef1e762f0d SHA512 1a755fc94fb754f33f1bb8a71ee5d876a062b49e4dd6755a5cd3caa4c7989bcccceec862050a9af849a044a1908e8dfe421970583f413df1e29eacd92fb5eaf6
AUX rc-displaylink-1.3 430 BLAKE2B afb7a6a8e13b985652ce2f1ca7da67b86b35d909e8363a01d9062d2633b4e9c197d6484c60900f0ff73e10c4be260260f3b5cf4be1abf29ebc1ef8849e7f87d2 SHA512 dff38b6c388de8f2bf5c2bb155a2d115edc6b4a941aa2184b9ece5e2575ff1eab6d3594325579375458dfcc8031e89ef323da225245de07b6fb4b98de15443ee
AUX udev.sh 1773 BLAKE2B 2802fe43e01e91d5613462903e7b974163842bd85546cae0e9ccdbebe8d584d9fcb3ca5898e5826d2e607c1ea0e44a2d58a2b8ea320b95c1c049e7b700f81f8f SHA512 5b7028bd2f3107cc248309661dd09a94426b18f85701fbb7e32a92622a011c5fce67e7be58ba8afd7226756728d60d7b49aa894cf995e84e483b0f0f984c29b1
DIST displaylink-driver-5.8.0.zip 18341463 BLAKE2B 5dd2eec5f868ee3ebc652f2ff82ed42bc2f0d6064c66ba40e2c324b302e12e7fba995cb047db57cb4644a6fdb900251548b99244c901c9ceedccbc3e1c039bef SHA512 59d470614cb8fdafaf4bea80771a806ad42fa4f1e12661adb4c17fc558bfa5e8e49fe6c3efc5775a8ec98d141a79ed9162b7bc769579f7d0f8f0979031b8d491
EBUILD displaylink-driver-5.8.0.ebuild 2194 BLAKE2B 32203902ce3b712efeae02db70257ffe9415d7544d40731a7afcd75e89df7f3465a847b6bd05de43cfdea24a967e20177d78ab7f4b4c822f307a9bd495dd5355 SHA512 a26faf26134b04433fda7eef98a32260a18c1343efe6032a106b2771b6b11469aea9bce588ace969d356321dc68a976f0f350343603ba4232b4742cda94f0a4f
MISC metadata.xml 253 BLAKE2B 6ed1c6ee3ee1fba0e494f00ba4f9ac5312f39a5e5e3f557304c55f4bba86338e1e2961a5e2bbf64c9060410e1171b19004a42959df7cef835e4523e8f83f8560 SHA512 be4f98293b1e9e87b12cd381496ae9fd0503c5c84136794c673df2a7cc64a89adc1d4af334751c385d2a2c7deb779ba01b9779bf9176ad156e0a8b22a0a0fc90

View File

@ -0,0 +1,88 @@
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit systemd udev
DESCRIPTION="DisplayLink USB Graphics Software"
HOMEPAGE="http://www.displaylink.com/downloads/ubuntu"
SRC_URI="${P}.zip"
LICENSE="DisplayLink-EULA"
SLOT="0"
KEYWORDS="~amd64 ~arm ~x86 "
IUSE="systemd"
PV_EXTRA="63.33"
QA_PREBUILT="/opt/displaylink/DisplayLinkManager"
RESTRICT="fetch bindist"
DEPEND="app-admin/chrpath
app-arch/unzip"
RDEPEND=">=sys-devel/gcc-6.5.0
~x11-drivers/evdi-1.14.1
virtual/libusb:1
>=x11-base/xorg-server-1.17.0
!systemd? ( sys-auth/elogind )"
pkg_nofetch() {
einfo "Please download DisplayLink USB Graphics Software for Ubuntu${PV}-EXE.zip from"
einfo "http://www.displaylink.com/downloads/ubuntu"
einfo "and rename it to ${P}.zip"
}
src_unpack() {
default
sh ./"${PN}-${PV}-${PV_EXTRA}".run --noexec --target "${P}"
}
src_install() {
case "${ARCH}" in
amd64) MY_ARCH="x64-ubuntu-1604" ;;
x86) MY_ARCH="x86-ubuntu-1604" ;;
arm) MY_ARCH="arm-linux-gnueabihf" ;;
arm64) MY_ARCH="aarch64-linux-gnu" ;;
esac
DLM="${S}/${MY_ARCH}/DisplayLinkManager"
dodir /opt/displaylink
dodir /var/log/displaylink
exeinto /opt/displaylink
chrpath -d "${DLM}"
doexe "${DLM}"
insinto /opt/displaylink
doins *.spkg
udev_dorules "${FILESDIR}/99-displaylink.rules"
insinto /opt/displaylink
insopts -m0755
newins "${FILESDIR}/udev.sh" udev.sh
newins "${FILESDIR}/pm-displaylink" suspend.sh
if use systemd; then
dosym ../../../opt/displaylink/suspend.sh /lib/systemd/system-sleep/displaylink.sh
systemd_dounit "${FILESDIR}/dlm.service"
else
dosym ../../../opt/displaylink/suspend.sh /etc/pm/sleep.d/displaylink.sh
newinitd "${FILESDIR}/rc-displaylink-1.3" dlm
fi
}
pkg_postinst() {
udev_reload
elog "The DisplayLinkManager Init is now called dlm"
elog ""
elog "You should be able to use xrandr as follows:"
elog "xrandr --setprovideroutputsource 1 0"
elog "Repeat for more screens, like:"
elog "xrandr --setprovideroutputsource 2 0"
elog "Then, you can use xrandr or GUI tools like arandr to configure the screens, e.g."
elog "xrandr --output DVI-1-0 --auto"
}
pkg_postrm() {
udev_reload
}

View File

@ -0,0 +1,9 @@
# Copyright (c) 2016 - 2020 DisplayLink (UK) Ltd.
# File autogenerated by udev-installer.sh script
ACTION=="add", SUBSYSTEM=="usb", DRIVERS=="usb", ATTR{idVendor}=="17e9", IMPORT{builtin}="usb_id", ENV{DISPLAYLINK_DEVNAME}="$env{DEVNAME}", ENV{DISPLAYLINK_DEVICE_ID}="$env{ID_BUS}-$env{BUSNUM}-$env{DEVNUM}-$env{ID_SERIAL}", ENV{REMOVE_CMD}="/opt/displaylink/udev.sh $root $env{DISPLAYLINK_DEVICE_ID} $env{DISPLAYLINK_DEVNAME}"
ACTION=="add", SUBSYSTEM=="usb", DRIVERS=="usb", ATTRS{idVendor}=="17e9", ATTR{bInterfaceClass}=="ff", ATTR{bInterfaceProtocol}=="03", IMPORT{parent}="DISPLAYLINK*", RUN+="/opt/displaylink/udev.sh $root $env{DISPLAYLINK_DEVICE_ID} $env{DISPLAYLINK_DEVNAME}"
ACTION=="remove", ENV{PRODUCT}=="17e9/*", RUN+="/opt/displaylink/udev.sh $root $env{DEVNAME}"

View File

@ -0,0 +1,14 @@
[Unit]
Description=DisplayLink Manager Service
After=display-manager.service
Conflicts=getty@tty7.service
[Service]
ExecStartPre=/sbin/modprobe evdi
ExecStart=/opt/displaylink/DisplayLinkManager
Restart=always
WorkingDirectory=/opt/displaylink
RestartSec=5
[Install]
WantedBy=graphical.target

View File

@ -0,0 +1,54 @@
#!/usr/bin/env bash
# Copyright (c) 2015 - 2019 DisplayLink (UK) Ltd.
suspend_displaylink-driver()
{
#flush any bytes in pipe
while read -n 1 -t 1 SUSPEND_RESULT < /tmp/PmMessagesPort_out; do : ; done;
#suspend DisplayLinkManager
echo "S" > /tmp/PmMessagesPort_in
if [[ -p /tmp/PmMessagesPort_out ]]; then
#wait until suspend of DisplayLinkManager finish
read -n 1 -t 10 SUSPEND_RESULT < /tmp/PmMessagesPort_out
fi
}
resume_displaylink-driver()
{
#resume DisplayLinkManager
echo "R" > /tmp/PmMessagesPort_in
}
main_systemd()
{
case "$1/$2" in
pre/*)
suspend_displaylink-driver
;;
post/*)
resume_displaylink-driver
;;
esac
}
main_pm()
{
case "$1" in
suspend|hibernate)
suspend_displaylink-driver
;;
resume|thaw)
resume_displaylink-driver
;;
esac
true
}
DIR=$(cd "$(dirname "$0")" && pwd)
if [[ $DIR == *systemd* ]]; then
main_systemd "$@"
elif [[ $DIR == *pm* ]]; then
main_pm "$@"
fi

View File

@ -0,0 +1,19 @@
#!/sbin/openrc-run
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
depend() {
after xdm
}
start() {
modprobe -q evdi
start-stop-daemon --start --background --chdir /opt/displaylink --make-pidfile --pidfile /run/displaylink.pid --exec /opt/displaylink/DisplayLinkManager
eend $?
}
stop() {
start-stop-daemon --stop --pidfile /run/displaylink.pid
eend $?
}

View File

@ -0,0 +1,95 @@
#!/bin/sh
# Copyright (c) 2016 - 2020 DisplayLink (UK) Ltd.
# File autogenerated by udev-installer.sh script
get_displaylink_dev_count()
{
cat /sys/bus/usb/devices/*/idVendor | grep 17e9 | wc -l
}
get_displaylink_symlink_count()
{
root=$1
if [ ! -d "$root/displaylink/by-id" ]; then
echo "0"
return
fi
for f in $(find $root/displaylink/by-id -type l -exec realpath {} \; 2> /dev/null); do
test -c $f && echo $f;
done | wc -l
}
start_displaylink()
{
if [ "$(get_displaylink_dev_count)" != "0" ]; then
start_service
fi
}
stop_displaylink()
{
root=$1
if [ "$(get_displaylink_symlink_count $root)" = "0" ]; then
stop_service
fi
}
remove_dldir_if_empty()
{
root=$1
(cd $root; rmdir -p --ignore-fail-on-non-empty displaylink/by-id)
}
create_displaylink_symlink()
{
root=$1
device_id=$2
devnode=$3
mkdir -p $root/displaylink/by-id
ln -sf $devnode $root/displaylink/by-id/$device_id
}
unlink_displaylink_symlink()
{
root=$1
devname=$2
for f in $root/displaylink/by-id/*; do
if [ ! -e "$f" ] || ([ -L "$f" ] && [ "$f" -ef "$devname" ]); then
unlink "$f"
fi
done
(cd $root; rmdir -p --ignore-fail-on-non-empty displaylink/by-id)
}
prune_broken_links()
{
root=$1
dir="$root/displaylink/by-id"
find -L "$dir" -name "$dir" -o type d -prune -o -type -l -exec rm {} +
remove_dldir_if_empty $root
}
main()
{
action=$1
root=$2
devnode=$4
if [ "$action" = "add" ]; then
device_id=$3
create_displaylink_symlink $root $device_id $devnode
start_displaylink
elif [ "$action" = "remove" ]; then
devname=$3
unlink_displaylink_symlink "$root" "$devname"
stop_displaylink "$root"
elif [ "$action" = "START" ]; then
start_displaylink
fi
}

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type='person'>
<email>kabi-bugz.gentoo@zyrenth.com</email>
<name>Amy Nagle</name>
</maintainer>
</pkgmetadata>

View File

@ -0,0 +1,3 @@
DIST evdi-1.14.1.tar.gz 80554 BLAKE2B 4e574b9722050221603007b730efd31dc5c93e4a4fabaf369e47444d59b8a8a031004561c53daa25a239666da6f8e499ebf8d949b39ac8eecea5e610ffb26945 SHA512 a4eee90a395856b524b596989c24637cb328ddabc841d3f5a0d14fc0481f1c288a164d97cf9bb448c8dbae64a6b264425d793185625a5503726d396d91975c3f
EBUILD evdi-1.14.1.ebuild 926 BLAKE2B 032849d7f8f7da457287b6311d5a5282925d93198f9af280c5493178872c22ddc3bdfe7bc87c5045ec70fa1a127f016d0f3fefb3c3b50680422ae3346c7698cc SHA512 fc5b03be9811e7af85e3fe4b14633ed87db3fb8df75c8dd9102af82a52758cfe107c8f1c5b02d18dd732d88ddb8be7fa0517f42d631962499a6ea1d8a323e7d9
MISC metadata.xml 334 BLAKE2B 14e6e341ca6811e61ff7fdb34ed128b51b80a8516f817b24598173d6ef723ca77ac990c68a01a3ffdf6a5d2e4cf8b8e766eaabad5ffc3b1fd68f5aef5cbc827a SHA512 ae847ea569d82e9b8c4f9df494f4e26f19a9e5090abe51a6ca9cf7271c0931ec34818a64f15f32d405962659e9933af9ed3a5add2cb730b2c2a1de95b4e1b686

View File

@ -0,0 +1,41 @@
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit linux-mod
DESCRIPTION="Extensible Virtual Display Interface"
HOMEPAGE="https://github.com/DisplayLink/evdi"
SRC_URI="https://github.com/DisplayLink/evdi/archive/v${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="GPL-2 LGPL-2.1"
SLOT="0"
KEYWORDS="~amd64 ~arm ~x86"
RDEPEND="x11-libs/libdrm"
DEPEND="${RDEPEND}
sys-kernel/linux-headers"
MODULE_NAMES="evdi(video:${S}/module)"
#CONFIG_CHECK="~FB_VIRTUAL ~!INTEL_IOMMU"
CONFIG_CHECK="~FB_VIRTUAL ~I2C DRM ~USB_SUPPORT USB_ARCH_HAS_HCD"
pkg_setup() {
linux-mod_pkg_setup
}
src_compile() {
linux-mod_src_compile
cd "${S}/library"
default
#mv libevdi.so libevdi.so.${PV}
}
src_install() {
linux-mod_src_install
dolib.so library/libevdi.so.${PV}
dosym libevdi.so.${PV} "/usr/$(get_libdir)/libevdi.so.1"
dosym libevdi.so.1 "/usr/$(get_libdir)/libevdi.so"
}

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type='person'>
<email>kabi-bugz.gentoo@zyrenth.com</email>
<name>Amy Nagle</name>
</maintainer>
<upstream>
<remote-id type='github'>DisplayLink/evdi</remote-id>
</upstream>
</pkgmetadata>