gogglesmm: fix build on big endian

This commit is contained in:
q66 2020-01-04 18:06:10 +01:00
parent 634cc5313c
commit 18691bd7d2
2 changed files with 30 additions and 2 deletions

View file

@ -0,0 +1,21 @@
commit aae8b485076dfa0fb1bd6683b36437eec0133376
Author: q66 <daniel@octaforge.org>
Date: Sat Jan 4 18:04:43 2020 +0100
Fix MSB_UINT on big endian
diff --git src/GMCover.cpp src/GMCover.cpp
index bbebd6a..2796360 100644
--- src/GMCover.cpp
+++ src/GMCover.cpp
@@ -26,8 +26,8 @@
#define MSB_UINT(x) ((x)[3]) | ((x)[2]<<8) | ((x)[1]<<16) | ((x)[0]<<24)
#define MSB_SHORT(x) ((x)[0]<<8) | ((x)[1])
#else
-#define MSB_UINT(data) (data[0]) | (data[1]<<8) | (data[2]<<16) | (data[3]<<24)
-#define MSB_SHORT(data) (data[1]<<8) | (data[0])
+#define MSB_UINT(x) ((x)[0]) | ((x)[1]<<8) | ((x)[2]<<16) | ((x)[3]<<24)
+#define MSB_SHORT(x) ((x)[1]<<8) | ((x)[0])
#endif

View file

@ -5,8 +5,8 @@ revision=3
build_style=cmake
hostmakedepends="pkg-config desktop-file-utils"
makedepends="libepoxy-devel glu-devel libSM-devel libXcursor-devel libXrandr-devel libXi-devel libXft-devel
libwebp-devel libjpeg-turbo-devel libpng-devel libressl-devel libmad-devel libvorbis-devel libogg-devel
libflac-devel faad2-devel opus-devel taglib-devel sqlite-devel dbus-devel alsa-lib-devel pulseaudio-devel"
libwebp-devel libjpeg-turbo-devel libpng-devel libressl-devel libvorbis-devel libogg-devel libflac-devel
faad2-devel opus-devel taglib-devel sqlite-devel dbus-devel alsa-lib-devel pulseaudio-devel"
depends="hicolor-icon-theme"
short_desc="Music Manager and Player"
maintainer="Jarbowski <jarbowski@cock.lu>"
@ -19,3 +19,10 @@ nocross="Tries to execute compiled code"
case "$XBPS_TARGET_MACHINE" in
*-musl) broken="PTHREAD_RWLOCK_PREFER_WRITER_NP usage" ;;
esac
# this plugin has little endian only code
if [ "$XBPS_TARGET_ENDIAN" = "be" ]; then
configure_args+=" -DWITH_MAD=OFF"
else
makedepends+=" libmad-devel"
fi