Merge pull request #7967 from lrusak/projectm-opengles

visualization.projectm: allow building for arm and OpenGLES
This commit is contained in:
Matthias Reichl 2023-07-21 16:23:55 +02:00 committed by GitHub
commit c004713bc9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 34 additions and 6 deletions

View File

@ -8,7 +8,7 @@ PKG_SHA256="62b5b1b543b25cb8ad392d879378cfdc5c129165cf4d4f33fb159e364d42f135"
PKG_LICENSE="GPL"
PKG_SITE="https://github.com/projectM-visualizer/projectm"
PKG_URL="https://github.com/projectM-visualizer/projectm/archive/v${PKG_VERSION}.tar.gz"
PKG_DEPENDS_TARGET="toolchain freetype glm ${OPENGL}"
PKG_DEPENDS_TARGET="toolchain freetype glm"
PKG_LONGDESC="A MilkDrop compatible opensource music visualizer."
PKG_TOOLCHAIN="configure"
PKG_BUILD_FLAGS="+pic"
@ -18,9 +18,29 @@ PKG_CONFIGURE_OPTS_TARGET="--disable-shared \
--disable-qt \
--disable-pulseaudio \
--disable-jack \
--disable-sdl \
--disable-llvm \
--disable-emscripten \
--enable-threading \
--enable-preset-subdirs"
if [ "${OPENGL_SUPPORT}" = "yes" ]; then
PKG_DEPENDS_TARGET+=" ${OPENGL}"
PKG_CONFIGURE_OPTS_TARGET+=" --disable-gles \
--enable-gl"
fi
if [ "${OPENGLES_SUPPORT}" = "yes" ]; then
PKG_DEPENDS_TARGET+=" ${OPENGLES}"
PKG_CONFIGURE_OPTS_TARGET+=" --enable-gles \
--disable-gl"
fi
# workaround due broken release files, remove at next bump
pre_configure_target() {
./autogen.sh
if [ "${OPENGLES_SUPPORT}" = "yes" ]; then
export CFLAGS+=" -DSOIL_GLES2"
fi
}

View File

@ -0,0 +1,13 @@
diff --color -Naur a/configure.ac b/configure.ac
--- a/configure.ac 2021-02-20 11:40:39.000000000 -0800
+++ b/configure.ac 2023-07-06 16:06:18.679702443 -0700
@@ -37,7 +37,8 @@
enable_sdl=yes
], [
dnl Running in a normal OS (not emscripten)
- AX_CHECK_GL
+ AC_ARG_ENABLE([gl], AS_HELP_STRING([--enable-gl], [OpenGL support]), [], [enable_gl=no])
+ AS_IF([test "x$enable_gl" = "xyes"], [AX_CHECK_GL])
# check OS if mac or linux
AC_CANONICAL_HOST

View File

@ -6,7 +6,6 @@ PKG_NAME="visualization.projectm"
PKG_VERSION="20.2.0-Nexus"
PKG_SHA256="42599b0093ebc6730c3190ce28036a87042814af830441f3cb28ef11676277ae"
PKG_REV="1"
PKG_ARCH="x86_64"
PKG_LICENSE="GPL"
PKG_SITE="https://github.com/xbmc/visualization.projectm"
PKG_URL="https://github.com/xbmc/visualization.projectm/archive/${PKG_VERSION}.tar.gz"
@ -18,10 +17,6 @@ PKG_LONGDESC="visualization.projectm"
PKG_IS_ADDON="yes"
PKG_ADDON_TYPE="xbmc.player.musicviz"
if [ "${OPENGL}" = "no" ]; then
exit 0
fi
pre_configure_target() {
export LDFLAGS=$(echo ${LDFLAGS} | sed -e "s|-Wl,--as-needed||")
}