Files
guru/x11-drivers/evdi/evdi-1.14.12.ebuild
ingenarel (NeoJesus) d56f4baa37 */*: Use [[ ${PV} ... ]] instead of POSIX [ ${PV} ... ]
as per the coding style guide:
https://projects.gentoo.org/qa/policy-guide/ebuild-format.html#pg0101

if it previously used [ ${PV} ... ] it uses [[ ${PV} ... ]] now
if it previously used [[ ${PV} = b ]] or [ ${PV} = b ], it uses
[[ ${PV} == b ]] now

the changes were generated using these two commands:

```
find -name '*.ebuild' -exec sed -i -E \
's|([^[])\[+(\s+)(\S*\$\S*PV\S*)(\s+)(\S+)(\s+)(\S+)(\s+)\]+([^]])|\1\[\[\2\3\4\5\6\7\8\]\]\9|g' \
{} \+

find -name '*.ebuild' -exec sed -i -E \
's|\[(\s+)(\S*\$\S*PV\S*)(\s+)==?(\s+)(\S+)(\s+)\]|\[\1\2\3==\4\5\6\]|g' \
{} \+
```

this is aimed to be a series of commits meant to replace all instance of
POSIX [ ... ] to bash's [[ ... ]], to make guru up to date with the
coding style guide

this process is divided up into a series of commits in order to make
review and testing more easy

Signed-off-by: ingenarel (NeoJesus) <ingenarel_neojesus@disroot.org>
Part-of: https://codeberg.org/gentoo/guru/pulls/6
Signed-off-by: Michał Górny <mgorny@gentoo.org>
2026-09-25 18:48:54 +02:00

99 lines
2.0 KiB
Bash

# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{12..13} )
inherit linux-mod-r1 python-single-r1 flag-o-matic
DESCRIPTION="Extensible Virtual Display Interface"
HOMEPAGE="https://github.com/DisplayLink/evdi"
if [[ "${PV}" == *9999* ]]; then
inherit git-r3
EGIT_REPO_URI="https://github.com/DisplayLink/evdi.git"
else
if [[ "${PV}" == *_p* ]] ; then
EVDI_COMMIT="5d708d117baab842d6960f0ec61808a1541bda57"
SRC_URI="https://github.com/DisplayLink/evdi/archive/${EVDI_COMMIT}.tar.gz -> ${P}.tar.gz"
S="${WORKDIR}/${PN}-${EVDI_COMMIT}"
else
SRC_URI="https://github.com/DisplayLink/evdi/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
fi
KEYWORDS="~amd64 ~arm ~arm64 ~x86"
fi
LICENSE="GPL-2 LGPL-2.1"
SLOT="0/$(ver_cut 1)"
IUSE="python test"
RDEPEND="${PYTHON_DEPS}
python? (
$(python_gen_cond_dep '
dev-python/pybind11[${PYTHON_USEDEP}]
test? (
dev-python/pytest-mock[${PYTHON_USEDEP}]
)
')
)
"
DEPEND="${RDEPEND}
x11-libs/libdrm
sys-kernel/linux-headers
"
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
RESTRICT="!test? ( test )"
PATCHES=(
"${FILESDIR}/${PN}-1.14.4-format-truncation.patch"
)
pkg_setup() {
# module/Kconfig
local CONFIG_CHECK="~FB_VIRTUAL ~I2C ~DRM ~USB_SUPPORT ~USB_ARCH_HAS_HCD MODULES"
linux-mod-r1_pkg_setup
use python && python-single-r1_pkg_setup
}
src_compile() {
# TODO ERROR: modpost: missing MODULE_LICENSE() in evdi.o
filter-lto
local modlist=(
"evdi=video:module"
)
local modargs=(
CONFIG_DRM_EVDI="m" # https://github.com/DisplayLink/evdi/issues/476
KVER="${KV_FULL}"
KDIR="${KV_OUT_DIR}"
)
linux-mod-r1_src_compile
emake -C library
use python && emake -C pyevdi
}
src_test() {
local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
use python && emake -C pyevdi tests
}
src_install() {
linux-mod-r1_src_install
local -x DESTDIR="${ED}" PREFIX="${EPREFIX}"
LIBDIR="/usr/$(get_libdir)" emake -C library install
use python && emake -C pyevdi install
}