2022-07-03 15:10:57 +00:00
|
|
|
|
2022-02-05 14:23:32 +00:00
|
|
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)
|
|
|
|
# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)
|
|
|
|
|
|
|
|
PKG_NAME="libdrm"
|
2023-11-13 22:18:49 +00:00
|
|
|
PKG_VERSION="2.4.117"
|
2022-02-05 14:23:32 +00:00
|
|
|
PKG_LICENSE="GPL"
|
|
|
|
PKG_SITE="http://dri.freedesktop.org"
|
|
|
|
PKG_URL="http://dri.freedesktop.org/libdrm/libdrm-${PKG_VERSION}.tar.xz"
|
|
|
|
PKG_DEPENDS_TARGET="toolchain libpciaccess"
|
|
|
|
PKG_LONGDESC="The userspace interface library to kernel DRM services."
|
|
|
|
PKG_TOOLCHAIN="meson"
|
|
|
|
|
|
|
|
get_graphicdrivers
|
|
|
|
|
2023-07-13 00:35:56 +00:00
|
|
|
PKG_MESON_OPTS_TARGET="-Dnouveau=disabled \
|
|
|
|
-Domap=disabled \
|
|
|
|
-Dexynos=disabled \
|
|
|
|
-Dtegra=disabled \
|
|
|
|
-Dcairo-tests=disabled \
|
|
|
|
-Dman-pages=disabled \
|
|
|
|
-Dvalgrind=disabled \
|
2022-02-05 14:23:32 +00:00
|
|
|
-Dfreedreno-kgsl=false \
|
2022-07-03 15:10:57 +00:00
|
|
|
-Dinstall-test-programs=false \
|
2022-02-05 14:23:32 +00:00
|
|
|
-Dudev=false"
|
|
|
|
|
2022-07-03 15:10:57 +00:00
|
|
|
listcontains "${GRAPHIC_DRIVERS}" "(iris|i915|i965)" &&
|
2023-07-13 00:35:56 +00:00
|
|
|
PKG_MESON_OPTS_TARGET+=" -Dintel=enabled" || PKG_MESON_OPTS_TARGET+=" -Dintel=disabled"
|
2022-02-05 14:23:32 +00:00
|
|
|
|
2022-07-03 15:10:57 +00:00
|
|
|
listcontains "${GRAPHIC_DRIVERS}" "(r200|r300|r600|radeonsi)" &&
|
2023-07-13 00:35:56 +00:00
|
|
|
PKG_MESON_OPTS_TARGET+=" -Dradeon=enabled" || PKG_MESON_OPTS_TARGET+=" -Dradeon=disabled"
|
2022-02-05 14:23:32 +00:00
|
|
|
|
|
|
|
listcontains "${GRAPHIC_DRIVERS}" "radeonsi" &&
|
2023-07-13 00:35:56 +00:00
|
|
|
PKG_MESON_OPTS_TARGET+=" -Damdgpu=enabled" || PKG_MESON_OPTS_TARGET+=" -Damdgpu=disabled"
|
2022-02-05 14:23:32 +00:00
|
|
|
|
|
|
|
listcontains "${GRAPHIC_DRIVERS}" "vmware" &&
|
2023-07-13 00:35:56 +00:00
|
|
|
PKG_MESON_OPTS_TARGET+=" -Dvmwgfx=enabled" || PKG_MESON_OPTS_TARGET+=" -Dvmwgfx=disabled"
|
2022-02-05 14:23:32 +00:00
|
|
|
|
|
|
|
listcontains "${GRAPHIC_DRIVERS}" "vc4" &&
|
2023-07-13 00:35:56 +00:00
|
|
|
PKG_MESON_OPTS_TARGET+=" -Dvc4=enabled" || PKG_MESON_OPTS_TARGET+=" -Dvc4=disabled"
|
2022-02-05 14:23:32 +00:00
|
|
|
|
|
|
|
listcontains "${GRAPHIC_DRIVERS}" "freedreno" &&
|
2023-07-13 00:35:56 +00:00
|
|
|
PKG_MESON_OPTS_TARGET+=" -Dfreedreno=enabled" || PKG_MESON_OPTS_TARGET+=" -Dfreedreno=disabled"
|
2022-02-05 14:23:32 +00:00
|
|
|
|
|
|
|
listcontains "${GRAPHIC_DRIVERS}" "etnaviv" &&
|
2023-07-13 00:35:56 +00:00
|
|
|
PKG_MESON_OPTS_TARGET+=" -Detnaviv=enabled" || PKG_MESON_OPTS_TARGET+=" -Detnaviv=disabled"
|
2022-02-05 14:23:32 +00:00
|
|
|
|
|
|
|
post_makeinstall_target() {
|
2022-07-03 15:10:57 +00:00
|
|
|
mkdir -p ${INSTALL}/usr/bin
|
|
|
|
cp -a ${PKG_BUILD}/.${TARGET_NAME}/tests/modetest/modetest ${INSTALL}/usr/bin/
|
2023-04-01 00:20:39 +00:00
|
|
|
for header in xf86drm.h xf86drmMode.h
|
|
|
|
do
|
|
|
|
sed -i "s#<drm.h>#<drm/drm.h>#g" ${SYSROOT_PREFIX}/usr/include/${header}
|
|
|
|
sed -i "s#<drm_mode.h#<drm/drm_mode.h>#g" ${SYSROOT_PREFIX}/usr/include/${header}
|
|
|
|
done
|
2022-02-05 14:23:32 +00:00
|
|
|
}
|