Fix up librga and SDL2.
This commit is contained in:
parent
248bdffc52
commit
0735f65f24
4 changed files with 37 additions and 28 deletions
|
@ -9,3 +9,4 @@ PKG_DEPENDS_TARGET="toolchain libdrm"
|
|||
PKG_SITE="https://github.com/JustEnoughLinuxOS/linux-rga"
|
||||
PKG_URL="${PKG_SITE}.git"
|
||||
PKG_LONGDESC="The RGA driver userspace "
|
||||
PKG_TOOLCHAIN="auto"
|
||||
|
|
14
packages/devel/librga/patches/001-path.patch
Normal file
14
packages/devel/librga/patches/001-path.patch
Normal file
|
@ -0,0 +1,14 @@
|
|||
diff -rupN librga.orig/include/RgaApi.h librga/include/RgaApi.h
|
||||
--- librga.orig/include/RgaApi.h 2022-07-03 11:02:32.877956155 -0400
|
||||
+++ librga/include/RgaApi.h 2022-07-03 11:02:55.601611579 -0400
|
||||
@@ -30,8 +30,8 @@
|
||||
#include <sys/mman.h>
|
||||
#include <linux/stddef.h>
|
||||
|
||||
-#include "drmrga.h"
|
||||
-#include "rga.h"
|
||||
+#include "rga/drmrga.h"
|
||||
+#include "rga/rga.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"{
|
|
@ -14,19 +14,19 @@ PKG_DEPENDS_HOST="toolchain:host distutilscross:host"
|
|||
PKG_PATCH_DIRS+="${DEVICE}"
|
||||
|
||||
|
||||
if [ "${TARGET_ARCH}" = "arm" ] || [ "${TARGET_ARCH}" = "aarch64" ]
|
||||
then
|
||||
PKG_DEPENDS_TARGET="${PKG_DEPENDS_TARGET} librga"
|
||||
pre_make_host() {
|
||||
sed -i "s| -lrga||g" ${PKG_BUILD}/CMakeLists.txt
|
||||
}
|
||||
#if [ "${ARCH}" = "arm" ] || [ "${ARCH}" = "aarch64" ]
|
||||
#then
|
||||
PKG_DEPENDS_TARGET+=" librga"
|
||||
pre_make_host() {
|
||||
sed -i "s| -lrga||g" ${PKG_BUILD}/CMakeLists.txt
|
||||
}
|
||||
|
||||
pre_make_target() {
|
||||
if ! `grep -rnw "${PKG_BUILD}/CMakeLists.txt" -e '-lrga'`; then
|
||||
sed -i "s|--no-undefined|--no-undefined -lrga|" ${PKG_BUILD}/CMakeLists.txt
|
||||
fi
|
||||
}
|
||||
fi
|
||||
pre_make_target() {
|
||||
if ! `grep -rnw "${PKG_BUILD}/CMakeLists.txt" -e '-lrga'`; then
|
||||
sed -i "s|--no-undefined|--no-undefined -lrga|" ${PKG_BUILD}/CMakeLists.txt
|
||||
fi
|
||||
}
|
||||
#fi
|
||||
|
||||
pre_configure_target(){
|
||||
PKG_CMAKE_OPTS_TARGET="-DSDL_STATIC=OFF \
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
|
||||
# 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"
|
||||
PKG_VERSION="2.4.111"
|
||||
PKG_SHA256="1ad7164f77424de6f4ecba7c262bde196a214c6e19a6fbf497f0815f4d7ab2a9"
|
||||
PKG_VERSION="2.4.108"
|
||||
PKG_SHA256="a1d7948cbc536763fde14b4beb5e4da7867607966d4cf46301087e8b8fe3d6a0"
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_SITE="http://dri.freedesktop.org"
|
||||
PKG_URL="http://dri.freedesktop.org/libdrm/libdrm-${PKG_VERSION}.tar.xz"
|
||||
|
@ -14,7 +15,8 @@ PKG_TOOLCHAIN="meson"
|
|||
|
||||
get_graphicdrivers
|
||||
|
||||
PKG_MESON_OPTS_TARGET="-Dnouveau=false \
|
||||
PKG_MESON_OPTS_TARGET="-Dlibkms=false \
|
||||
-Dnouveau=false \
|
||||
-Domap=false \
|
||||
-Dexynos=false \
|
||||
-Dtegra=false \
|
||||
|
@ -22,13 +24,13 @@ PKG_MESON_OPTS_TARGET="-Dnouveau=false \
|
|||
-Dman-pages=false \
|
||||
-Dvalgrind=false \
|
||||
-Dfreedreno-kgsl=false \
|
||||
-Dinstall-test-programs=true \
|
||||
-Dinstall-test-programs=false \
|
||||
-Dudev=false"
|
||||
|
||||
listcontains "${GRAPHIC_DRIVERS}" "(crocus|i915|iris)" &&
|
||||
listcontains "${GRAPHIC_DRIVERS}" "(iris|i915|i965)" &&
|
||||
PKG_MESON_OPTS_TARGET+=" -Dintel=true" || PKG_MESON_OPTS_TARGET+=" -Dintel=false"
|
||||
|
||||
listcontains "${GRAPHIC_DRIVERS}" "(r300|r600|radeonsi)" &&
|
||||
listcontains "${GRAPHIC_DRIVERS}" "(r200|r300|r600|radeonsi)" &&
|
||||
PKG_MESON_OPTS_TARGET+=" -Dradeon=true" || PKG_MESON_OPTS_TARGET+=" -Dradeon=false"
|
||||
|
||||
listcontains "${GRAPHIC_DRIVERS}" "radeonsi" &&
|
||||
|
@ -47,14 +49,6 @@ listcontains "${GRAPHIC_DRIVERS}" "etnaviv" &&
|
|||
PKG_MESON_OPTS_TARGET+=" -Detnaviv=true" || PKG_MESON_OPTS_TARGET+=" -Detnaviv=false"
|
||||
|
||||
post_makeinstall_target() {
|
||||
# Remove all test programs installed by install-test-programs=true except modetest
|
||||
# Do not "not use" the ninja install and replace this with a simple "cp modetest"
|
||||
# as ninja strips the unnecessary build rpath during the install.
|
||||
safe_remove ${INSTALL}/usr/bin/amdgpu_stress
|
||||
safe_remove ${INSTALL}/usr/bin/drmdevice
|
||||
safe_remove ${INSTALL}/usr/bin/kms-steal-crtc
|
||||
safe_remove ${INSTALL}/usr/bin/kms-universal-planes
|
||||
safe_remove ${INSTALL}/usr/bin/modeprint
|
||||
safe_remove ${INSTALL}/usr/bin/proptest
|
||||
safe_remove ${INSTALL}/usr/bin/vbltest
|
||||
mkdir -p ${INSTALL}/usr/bin
|
||||
cp -a ${PKG_BUILD}/.${TARGET_NAME}/tests/modetest/modetest ${INSTALL}/usr/bin/
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue