Overlay/x11-drivers/evdi/evdi-9999.ebuild

86 lines
1.6 KiB
Bash
Raw Normal View History

2024-01-20 01:25:45 +03:00
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
2024-06-27 22:02:52 +03:00
PYTHON_COMPAT=( python3_{10..12} )
inherit linux-mod-r1 python-single-r1
2024-01-20 01:25:45 +03:00
DESCRIPTION="Extensible Virtual Display Interface"
HOMEPAGE="https://github.com/DisplayLink/evdi"
if [[ ${PV} == "9999" ]] ; then
EGIT_REPO_URI=${EGIT_REPO_URI:-"https://github.com/DisplayLink/evdi.git"}
2024-02-05 22:11:51 +03:00
EGIT_BRANCH="main"
2024-01-20 01:25:45 +03:00
inherit git-r3
KEYWORDS=""
else
SRC_URI="https://github.com/DisplayLink/evdi/archive/v${PV}.tar.gz -> ${P}.tar.gz"
2024-06-27 15:56:43 +03:00
KEYWORDS=""
2024-01-20 01:25:45 +03:00
fi
LICENSE="GPL-2 LGPL-2.1"
SLOT="0"
2024-06-27 22:04:05 +03:00
KEYWORDS=""
2024-06-27 22:02:52 +03:00
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}]
)
')
)
"
2024-01-20 01:25:45 +03:00
DEPEND="${RDEPEND}
2024-06-27 22:02:52 +03:00
sys-kernel/linux-headers
"
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
2024-01-20 01:25:45 +03:00
2024-06-27 22:02:52 +03:00
RESTRICT="!test? ( test )"
2024-01-20 01:25:45 +03:00
2024-06-27 22:02:52 +03:00
CONFIG_CHECK="~FB_VIRTUAL ~I2C"
2024-01-20 01:25:45 +03:00
2024-03-04 17:16:13 +03:00
PATCHES=(
2024-06-27 22:02:52 +03:00
"${FILESDIR}/${PN}-1.14.4-format-truncation.patch"
2024-03-04 17:16:13 +03:00
"${FILESDIR}"/linux_src_path.patch
)
2024-01-20 01:25:45 +03:00
pkg_setup() {
2024-06-27 22:02:52 +03:00
linux-mod-r1_pkg_setup
use python && python-single-r1_pkg_setup
2024-01-20 01:25:45 +03:00
}
src_compile() {
2024-06-27 22:02:52 +03:00
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
2024-01-20 01:25:45 +03:00
}
src_install() {
2024-06-27 22:02:52 +03:00
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
2024-01-20 01:25:45 +03:00
}