void-packages/srcpkgs/goldendict/patches/endian.patch
Đoàn Trần Công Danh 7fc9190f0e srcpkgs/g*: convert patches to -Np1
* gcc is kept at -Np0, because of void-cross

```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

25 lines
882 B
Diff

commit eb90c044c0092da49e3cbf393ad68599354616b2
Author: q66 <daniel@octaforge.org>
Date: Sat Jan 4 23:12:59 2020 +0100
Fix build on some 64-bit big endian systems
The problem here is that qbswap is defined for quint64, which
is an alias to unsigned long long, while the uint64_t type in
the failing contexts is unsigned long.
This will fail with undefined reference to qbswap<unsigned long>.
diff --git ripemd.cc ripemd.cc
index bad8fc7..24ac811 100644
--- a/ripemd.cc
+++ b/ripemd.cc
@@ -173,7 +173,7 @@ void RIPEMD128::update( const uint8_t * data, size_t len )
void RIPEMD128::digest( uint8_t * digest )
{
- uint64_t finalcount = qFromLittleEndian( count << 3 );
+ uint64_t finalcount = qFromLittleEndian<quint64>( count << 3 );
update( (const uint8_t *) "\200", 1 );
while ( ( count & 63 ) != 56 )
update( ( const uint8_t * ) "", 1 );