From: "Paul Zander" <negril.nx+gentoo@gmail.com>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/proj/guru:dev commit in: x11-drivers/evdi/, x11-drivers/evdi/files/
Date: Sat, 25 May 2024 20:56:17 +0000 (UTC) [thread overview]
Message-ID: <1716670571.cab90cf303784e3b5efdb70291729be3a83aa29d.negril.nx+gentoo@gentoo> (raw)
commit: cab90cf303784e3b5efdb70291729be3a83aa29d
Author: Paul Zander <negril.nx+gentoo <AT> gmail <DOT> com>
AuthorDate: Sat May 25 20:56:11 2024 +0000
Commit: Paul Zander <negril.nx+gentoo <AT> gmail <DOT> com>
CommitDate: Sat May 25 20:56:11 2024 +0000
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=cab90cf3
x11-driver/evdi: new package, add 14.4.4
Signed-off-by: Paul Zander <negril.nx+gentoo <AT> gmail.com>
x11-drivers/evdi/Manifest | 1 +
x11-drivers/evdi/evdi-1.14.4.ebuild | 75 ++++++++++++++++++++++
.../evdi/files/evdi-1.14.4-format-truncation.patch | 22 +++++++
x11-drivers/evdi/metadata.xml | 14 ++++
4 files changed, 112 insertions(+)
diff --git a/x11-drivers/evdi/Manifest b/x11-drivers/evdi/Manifest
new file mode 100644
index 000000000..ef25cc00d
--- /dev/null
+++ b/x11-drivers/evdi/Manifest
@@ -0,0 +1 @@
+DIST evdi-1.14.4.tar.gz 88726 BLAKE2B 15aa13c1e6f67f923cf474a7f33bc1b8ce97e87e3ea19d53ae4c4b827581311907c5d98128190c97a530e566595b2ffd46a10450a63a8ecfc5a352d1f3e80f23 SHA512 53354fc9b09870768b54a6ea391dd7c406d372a248623f628334a1fecd433a59a729821b8a8af4ab31d0dca944d330156d88e79af308964c5686798ab20cabf3
diff --git a/x11-drivers/evdi/evdi-1.14.4.ebuild b/x11-drivers/evdi/evdi-1.14.4.ebuild
new file mode 100644
index 000000000..b88c2a543
--- /dev/null
+++ b/x11-drivers/evdi/evdi-1.14.4.ebuild
@@ -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
+}
diff --git a/x11-drivers/evdi/files/evdi-1.14.4-format-truncation.patch b/x11-drivers/evdi/files/evdi-1.14.4-format-truncation.patch
new file mode 100644
index 000000000..fb6ccb835
--- /dev/null
+++ b/x11-drivers/evdi/files/evdi-1.14.4-format-truncation.patch
@@ -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;
diff --git a/x11-drivers/evdi/metadata.xml b/x11-drivers/evdi/metadata.xml
new file mode 100644
index 000000000..d4a93bd43
--- /dev/null
+++ b/x11-drivers/evdi/metadata.xml
@@ -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>
next reply other threads:[~2024-05-25 20:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-25 20:56 Paul Zander [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-11-21 16:23 [gentoo-commits] repo/proj/guru:dev commit in: x11-drivers/evdi/, x11-drivers/evdi/files/ Paul Zander
2025-01-13 12:42 Paul Zander
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1716670571.cab90cf303784e3b5efdb70291729be3a83aa29d.negril.nx+gentoo@gentoo \
--to=negril.nx+gentoo@gmail.com \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox