mirror of
https://github.com/gentoo-mirror/guru.git
synced 2025-04-18 23:39:00 -04:00
x11-driver/evdi: new package, add 14.4.4
Signed-off-by: Paul Zander <negril.nx+gentoo@gmail.com>
This commit is contained in:
parent
b34038766f
commit
cab90cf303
1
x11-drivers/evdi/Manifest
Normal file
1
x11-drivers/evdi/Manifest
Normal file
@ -0,0 +1 @@
|
||||
DIST evdi-1.14.4.tar.gz 88726 BLAKE2B 15aa13c1e6f67f923cf474a7f33bc1b8ce97e87e3ea19d53ae4c4b827581311907c5d98128190c97a530e566595b2ffd46a10450a63a8ecfc5a352d1f3e80f23 SHA512 53354fc9b09870768b54a6ea391dd7c406d372a248623f628334a1fecd433a59a729821b8a8af4ab31d0dca944d330156d88e79af308964c5686798ab20cabf3
|
75
x11-drivers/evdi/evdi-1.14.4.ebuild
Normal file
75
x11-drivers/evdi/evdi-1.14.4.ebuild
Normal file
@ -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
|
||||
}
|
22
x11-drivers/evdi/files/evdi-1.14.4-format-truncation.patch
Normal file
22
x11-drivers/evdi/files/evdi-1.14.4-format-truncation.patch
Normal file
@ -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;
|
14
x11-drivers/evdi/metadata.xml
Normal file
14
x11-drivers/evdi/metadata.xml
Normal file
@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="person">
|
||||
<email>negril.nx+gentoo@gmail.com</email>
|
||||
<name>Paul Zander</name>
|
||||
</maintainer>
|
||||
<upstream>
|
||||
<remote-id type="github">DisplayLink/evdi</remote-id>
|
||||
</upstream>
|
||||
<use>
|
||||
<flag name="python">Build PyEvdi</flag>
|
||||
</use>
|
||||
</pkgmetadata>
|
Loading…
x
Reference in New Issue
Block a user