gentoo-linux-surface-overlay/dev-libs/libwacom-surface/libwacom-surface-2.12.2.ebuild

87 lines
2.6 KiB
Bash
Raw Permalink Normal View History

2021-07-27 12:35:19 -07:00
# Copyright 2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
2023-09-13 21:04:48 -07:00
EAPI=8
2021-07-27 12:35:19 -07:00
2024-08-26 21:24:44 -07:00
PYTHON_COMPAT=( python3_{7..13} )
2021-07-27 12:35:19 -07:00
2024-08-26 21:24:44 -07:00
###inherit eutils meson python-any-r1 toolchain-funcs udev
2023-09-13 21:04:48 -07:00
inherit meson python-any-r1 toolchain-funcs udev
2021-07-27 12:35:19 -07:00
DESCRIPTION="Library for identifying Wacom tablets and their model-specific features with patches from linux-surface"
HOMEPAGE="https://github.com/linux-surface/linux-surface"
2024-08-26 21:24:44 -07:00
SRC_URI="https://github.com/linuxwacom/libwacom/releases/download/libwacom-${PV}/libwacom-${PV}.tar.xz"
2021-07-27 12:35:19 -07:00
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="doc test"
RESTRICT="!test? ( test )"
BDEPEND="
virtual/pkgconfig
2024-08-26 21:24:44 -07:00
doc? ( app-text/doxygen )
2021-07-27 12:35:19 -07:00
test? (
${PYTHON_DEPS}
$(python_gen_any_dep '
dev-python/python-libevdev[${PYTHON_USEDEP}]
dev-python/pyudev[${PYTHON_USEDEP}]
dev-python/pytest[${PYTHON_USEDEP}]
')
)
"
RDEPEND="
dev-libs/glib:2
dev-libs/libgudev:=
!!dev-libs/libwacom
"
DEPEND="${RDEPEND}"
python_check_deps() {
has_version -b "dev-python/python-libevdev[${PYTHON_USEDEP}]" &&
has_version -b "dev-python/pyudev[${PYTHON_USEDEP}]" &&
has_version -b "dev-python/pytest[${PYTHON_USEDEP}]"
}
pkg_setup() {
tc-ld-disable-gold # bug https://github.com/linuxwacom/libwacom/issues/170
if use test; then
python-any-r1_pkg_setup
fi
}
S="${WORKDIR}/libwacom-${PV}"
src_prepare() {
2024-08-26 21:24:44 -07:00
eapply "${FILESDIR}/v2/0001-Add-support-for-BUS_VIRTUAL.patch"
eapply "${FILESDIR}/v2/0002-Add-support-for-Intel-Management-Engine-bus.patch"
eapply "${FILESDIR}/v2/0003-data-Add-Microsoft-Surface-Pro-3.patch"
eapply "${FILESDIR}/v2/0004-data-Add-Microsoft-Surface-Pro-4.patch"
eapply "${FILESDIR}/v2/0005-data-Add-Microsoft-Surface-Pro-5.patch"
eapply "${FILESDIR}/v2/0006-data-Add-Microsoft-Surface-Pro-6.patch"
eapply "${FILESDIR}/v2/0007-data-Add-Microsoft-Surface-Pro-7.patch"
eapply "${FILESDIR}/v2/0008-data-Add-Microsoft-Surface-Pro-7.patch"
eapply "${FILESDIR}/v2/0009-data-Add-Microsoft-Surface-Pro-8.patch"
eapply "${FILESDIR}/v2/0010-data-Add-Microsoft-Surface-Pro-9.patch"
eapply "${FILESDIR}/v2/0011-data-Add-Microsoft-Surface-Book.patch"
eapply "${FILESDIR}/v2/0012-data-Add-Microsoft-Surface-Book-2-13.5.patch"
eapply "${FILESDIR}/v2/0013-data-Add-Microsoft-Surface-Book-2-15.patch"
eapply "${FILESDIR}/v2/0014-data-Add-Microsoft-Surface-Book-3-13.5.patch"
eapply "${FILESDIR}/v2/0015-data-Add-Microsoft-Surface-Book-3-15.patch"
eapply "${FILESDIR}/v2/0016-data-Add-Microsoft-Surface-Laptop-Studio.patch"
2021-07-27 12:35:19 -07:00
eapply_user
}
src_configure() {
local emesonargs=(
$(meson_feature doc documentation)
$(meson_feature test tests)
-Dudev-dir=$(get_udevdir)
)
meson_src_configure
}