Mail archive
alpine-aports

[alpine-aports] [PATCH] community/deadbeef: fix byte order detection

From: alpine-mips-patches <info_at_mobile-stream.com>
Date: Mon, 3 Dec 2018 10:26:31 +0000

Unlock the generic <endian.h> fallback to detect CPU byte order and
delete ppc64le.patch since little-endian POWER is now covered too.
---
 community/deadbeef/APKBUILD           |  6 +++---
 community/deadbeef/ppc64le.patch      | 25 -------------------------
 community/deadbeef/use-endian-h.patch | 11 +++++++++++
 3 files changed, 14 insertions(+), 28 deletions(-)
 delete mode 100644 community/deadbeef/ppc64le.patch
 create mode 100644 community/deadbeef/use-endian-h.patch
diff --git a/community/deadbeef/APKBUILD b/community/deadbeef/APKBUILD
index cd775a4525..6525032021 100644
--- a/community/deadbeef/APKBUILD
+++ b/community/deadbeef/APKBUILD
_at_@ -4,7 +4,7 @@
 pkgname=deadbeef
 pkgver=0.7.2
 _ver=${pkgver/_rc/-rc}
-pkgrel=3
+pkgrel=4
 pkgdesc="fairly capable playlist-oriented audio player"
 url="http://deadbeef.sourceforge.net/"
 arch="all"
_at_@ -17,7 +17,7 @@ install=""
 subpackages="$pkgname-dev $pkgname-lang $pkgname-doc"
 source="https://downloads.sourceforge.net/project/$pkgname/$pkgname-$_ver.tar.bz2
 	arm-buildfix.patch
-	ppc64le.patch"
+	use-endian-h.patch"
 options="!check"
 
 builddir="${srcdir}/${pkgname}-$_ver"
_at_@ -44,4 +44,4 @@ package() {
 
 sha512sums="9ea61a3820d9d57f038b80652ce63bd87e6781259c0f58a93b70607b02e71debbf5598f4a06d607d3840a804c3b7fc5039a4c4b0a8bb01e8e5107bba3f0bd980  deadbeef-0.7.2.tar.bz2
 57e25e3478b5516f0ebc34fa561c619bdca4cdf7e9f6dc1d81317c972b10bd073a4a761dfc2327047fd56433e79ff57bf501c9cfe77079c450b46f5a0315555b  arm-buildfix.patch
-682629f5b677df106083d7187a01a832b92c6474f5a0a2e66e9aac36248aeb8c136fe8b13469e319df08e3eac634330aa62a2dea73f58a524254a6b3d1e92e09  ppc64le.patch"
+8a918b75ad20689cfa0c0fd073ca96377311c95a6fff55cf6939a77ce9911bc7dfed024d825f5bdaa639988864d3b6b2707697f75ce5e28b747b1a190e55e39d  use-endian-h.patch"
diff --git a/community/deadbeef/ppc64le.patch b/community/deadbeef/ppc64le.patch
deleted file mode 100644
index d8106c77a7..0000000000
--- a/community/deadbeef/ppc64le.patch
+++ /dev/null
_at_@ -1,25 +0,0 @@
-Author: Breno Leitao <breno.leitao_at_gmail.com>
-Date:   Fri Apr 7 22:00:01 2017 +0000
-
-    blargg_endian: Fails to build on non-x86 with musl
-    
-    Currently blargg_endian fails to detect endiness on non-x86, as ppc64le,
-    when not using glibc.
-    
-    In my case, I am using musl on ppc64le, and deadbeef fails to compile
-    because the endianess is not known.
-    
-    This patch defines BLARGG_LITTLE_ENDIAN if the system is ppc64le.
-
---- a/plugins/gme/game-music-emu-0.6pre/gme/blargg_endian.h
-+++ b/plugins/gme/game-music-emu-0.6pre/gme/blargg_endian.h
-_at_@ -16,6 +16,9 @@
- 		defined (__POWERPC__) || defined (__powerc)
- 	#define BLARGG_CPU_POWERPC 1
- 	#define BLARGG_CPU_RISC 1
-+	#if defined(__LITTLE_ENDIAN__)
-+		#define BLARGG_LITTLE_ENDIAN 1
-+	#endif
- #endif
- 
- // BLARGG_BIG_ENDIAN, BLARGG_LITTLE_ENDIAN: Determined automatically, otherwise only
diff --git a/community/deadbeef/use-endian-h.patch b/community/deadbeef/use-endian-h.patch
new file mode 100644
index 0000000000..1fd35b7eb1
--- /dev/null
+++ b/community/deadbeef/use-endian-h.patch
_at_@ -0,0 +1,11 @@
+--- a/plugins/gme/game-music-emu-0.6pre/gme/blargg_endian.h
++++ b/plugins/gme/game-music-emu-0.6pre/gme/blargg_endian.h
+_at_@ -21,7 +21,7 @@
+ // BLARGG_BIG_ENDIAN, BLARGG_LITTLE_ENDIAN: Determined automatically, otherwise only
+ // one may be #defined to 1. Only needed if something actually depends on byte order.
+ #if !defined (BLARGG_BIG_ENDIAN) && !defined (BLARGG_LITTLE_ENDIAN)
+-#ifdef __GLIBC__
++#ifdef __linux__
+ 	// GCC handles this for us
+ 	#include <endian.h>
+ 	#if __BYTE_ORDER == __LITTLE_ENDIAN
-- 
2.19.2
---
Unsubscribe:  alpine-aports+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-aports+help_at_lists.alpinelinux.org
---
Received on Mon Dec 03 2018 - 10:26:31 UTC