void-packages/srcpkgs/deadbeef/patches/ppc-musl.patch
Đoàn Trần Công Danh b6bcd8cd34 srcpkgs/d*: convert patches to -Np1
* daemontools and dmraid is kept at -Np0

```sh

git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" |
while read template; do
	for p in ${template%/template}/patches/*; do
		sed -i '
			\,^[+-][+-][+-] /dev/null,b
			/^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b
			s,^[*][*][*] ,&a/,
			/^--- /{
				s,\(^--- \)\(./\)*,\1a/,
				s,[.][Oo][Rr][Ii][Gg]\([	/]\),\1,
				s/[.][Oo][Rr][Ii][Gg]$//
				s/[.]patched[.]\([^.]\)/.\1/
				h
			}
			/^+++ -/{
				g
				s/^--- a/+++ b/
				b
			}
			s,\(^+++ \)\(./\)*,\1b/,
		' "$p"
	done
	sed -i '/^patch_args=/d' $template
done
```
2021-06-20 13:17:29 +07:00

17 lines
764 B
Diff

This removes an invalid assumption that results in both BLARGG_LITTLE_ENDIAN
and BLARGG_BIG_ENDIAN being defined on little endian musl, as we're already
covered by __LITTLE_ENDIAN__/__BIG_ENDIAN__ (which is specified as a part
of the ELFv2 ABI itself to be always present). Glibc was not broken because
it has its own check before that.
--- a/plugins/gme/game-music-emu-0.6pre/gme/blargg_endian.h
+++ b/plugins/gme/game-music-emu-0.6pre/gme/blargg_endian.h
@@ -36,7 +36,7 @@
#endif
#if defined (MSB_FIRST) || defined (__BIG_ENDIAN__) || defined (WORDS_BIGENDIAN) || \
- defined (__sparc__) || BLARGG_CPU_POWERPC || \
+ defined (__sparc__) || \
(defined (BIG_ENDIAN) && BIG_ENDIAN+0 != 4321)
#define BLARGG_BIG_ENDIAN 1
#elif !defined (__mips__)