evdi-1.14.4 added
This commit is contained in:
parent
4de2116025
commit
2068096bbf
|
@ -1,2 +1,3 @@
|
|||
DIST evdi-1.14.1.tar.gz 80554 SHA256 a5f1c10602a6219ac4b13d4f590c16e6fb65bed94f28562260c9b481b48c3828 SHA512 a4eee90a395856b524b596989c24637cb328ddabc841d3f5a0d14fc0481f1c288a164d97cf9bb448c8dbae64a6b264425d793185625a5503726d396d91975c3f WHIRLPOOL 400a78f894cd4167a0193371ef1351ac1e156d865b8cc8576c5c739ac913ad47545311cbe10227bd87deba4c78870cc66e9ba03f7e40048c8ad30e3a9c16feec
|
||||
DIST evdi-1.14.2.tar.gz 87688 SHA256 5d14635bdf41ae594018e061032090f6752293b05b365b0324afb9401b340ac5 SHA512 27c516c14b9503528da5c04d8f318fc1c21a1692e72da860feb96957b13f437da9ed000b045b3e4ef1109cba7ca0fd7813c32f00c74f71419ecf50a58ca957eb WHIRLPOOL 7b5ce7f92ce096fe9526fa6e31851af4f5ac0c0a798a5d780e5a8f8b16ab3b977ab91bfed4a4a475c6e7ac9316089bd778f0edefaed3ec19963ec79bed9354ac
|
||||
DIST evdi-1.14.4.tar.gz 88726 SHA256 b2323f51e670ff08b07fa2412de104ed5389961df53dd4818d75a6e7431cf1ef SHA512 53354fc9b09870768b54a6ea391dd7c406d372a248623f628334a1fecd433a59a729821b8a8af4ab31d0dca944d330156d88e79af308964c5686798ab20cabf3 WHIRLPOOL 48874f28a1d8866769443e82a9faf72bfec11275a3ccdac3fae890f1acb3f57f37f8e0d1a156336899d3717bf769df45ac980c1087ff57512b0e47faa3d3fefe
|
||||
|
|
|
@ -0,0 +1,75 @@
|
|||
# Copyright 1999-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
PYTHON_COMPAT=( python3_{10..12} )
|
||||
inherit linux-mod-r1 python-single-r1
|
||||
|
||||
DESCRIPTION="Extensible Virtual Display Interface"
|
||||
HOMEPAGE="https://github.com/DisplayLink/evdi"
|
||||
SRC_URI="https://github.com/DisplayLink/evdi/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="GPL-2 LGPL-2.1"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~arm ~arm64 ~x86"
|
||||
|
||||
IUSE="python test"
|
||||
|
||||
RDEPEND="${PYTHON_DEPS}
|
||||
x11-libs/libdrm
|
||||
python? (
|
||||
$(python_gen_cond_dep '
|
||||
dev-python/pybind11[${PYTHON_USEDEP}]
|
||||
test? (
|
||||
dev-python/pytest-mock[${PYTHON_USEDEP}]
|
||||
)
|
||||
')
|
||||
)
|
||||
"
|
||||
|
||||
DEPEND="${RDEPEND}
|
||||
sys-kernel/linux-headers
|
||||
"
|
||||
|
||||
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
|
||||
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
CONFIG_CHECK="~FB_VIRTUAL ~I2C"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}/${PN}-1.14.4-format-truncation.patch"
|
||||
)
|
||||
|
||||
pkg_setup() {
|
||||
linux-mod-r1_pkg_setup
|
||||
use python && python-single-r1_pkg_setup
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
local modlist=(
|
||||
"evdi=video:${S}/module"
|
||||
)
|
||||
linux-mod-r1_src_compile
|
||||
|
||||
emake library
|
||||
ln -srf "${S}/library/libevdi.so"{".$(ver_cut 1)",} || die
|
||||
|
||||
use python && emake pyevdi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
use python && emake -C pyevdi tests
|
||||
}
|
||||
|
||||
src_install() {
|
||||
linux-mod-r1_src_install
|
||||
|
||||
dolib.so "library/libevdi.so.${PV}"
|
||||
|
||||
dosym "libevdi.so.${PV}" "/usr/$(get_libdir)/libevdi.so.$(ver_cut 1)"
|
||||
dosym "libevdi.so.$(ver_cut 1)" "/usr/$(get_libdir)/libevdi.so"
|
||||
|
||||
use python && DESTDIR="${D}" emake -C pyevdi install
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
diff --git a/library/evdi_lib.c b/library/evdi_lib.c
|
||||
index ec22b01..8618bc8 100644
|
||||
--- a/library/evdi_lib.c
|
||||
+++ b/library/evdi_lib.c
|
||||
@@ -473,7 +473,8 @@ static bool is_correct_parent_device(const char *dirname, size_t dirname_maxlen,
|
||||
{
|
||||
char link_path[PATH_MAX];
|
||||
|
||||
- snprintf(link_path, MIN(PATH_MAX - 7, dirname_maxlen), "%s/device", dirname);
|
||||
+ assert((strnlen(dirname, dirname_maxlen) + 7) < PATH_MAX);
|
||||
+ snprintf(link_path, sizeof(link_path), "%s/device", dirname);
|
||||
|
||||
if (parent_device == NULL)
|
||||
return access(link_path, F_OK) != 0;
|
||||
@@ -619,6 +620,7 @@ static enum evdi_device_status evdi_device_to_platform(int device, char *path)
|
||||
|
||||
snprintf(path, PATH_MAX,
|
||||
"/sys/bus/platform/devices/%s", fd_entry->d_name);
|
||||
+ assert((strnlen(path, PATH_MAX) + 5) < PATH_MAX);
|
||||
snprintf(card_path, PATH_MAX, "%s/drm/card%d", path, device);
|
||||
if (path_exists(card_path)) {
|
||||
status = AVAILABLE;
|
Loading…
Reference in New Issue