void-packages/srcpkgs/pioneer/patches/endian.patch
Đoàn Trần Công Danh 49cb564d14 srcpkgs/p*: convert patches to -Np1
* par 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

19 lines
688 B
Diff

commit b2bfa86a8d01c38a907a837fc58a85577697a6f0
Author: q66 <daniel@octaforge.org>
Date: Sun Jan 5 22:02:18 2020 +0100
Fix big endian build
diff --git src/PngWriter.cpp src/PngWriter.cpp
index 76bfb0e..5908480 100644
--- a/src/PngWriter.cpp
+++ b/src/PngWriter.cpp
@@ -10,7 +10,7 @@ void write_png(FileSystem::FileSourceFS &fs, const std::string &path, const Uint
// Set up the pixel format color masks for RGB(A) byte arrays.
Uint32 rmask, gmask, bmask, amask;
#if SDL_BYTEORDER == SDL_BIG_ENDIAN
- int shift = ((sd.bpp == 3) ? 8 : 0;
+ int shift = (bytes_per_pixel == 3) ? 8 : 0;
rmask = 0xff000000 >> shift;
gmask = 0x00ff0000 >> shift;
bmask = 0x0000ff00 >> shift;