c987560802
```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 ```
38 lines
1.6 KiB
Diff
38 lines
1.6 KiB
Diff
Description: Restore filepos2z() implementation from apcalc 2.12.1.5
|
|
Fixes a FTBFS bug on big endian machines.
|
|
This is probably not the right solution, but at least it works.
|
|
.
|
|
Update 2019-01-14: Still required with calc 2.12.7.2 on mips, otherwise, we
|
|
get this (on minkus.debian.org, sid chroot):
|
|
.
|
|
gcc -DCALC_SRC -DCUSTOM -Wall -g -O2 -fdebug-prefix-map=/home/mbuck/apcalc-2.12.7.2=. -fstack-protector-strong -Wformat -Werror=format-security -O3 -g3 -Wno-error=long-long -Wno-long-long -c file.c
|
|
In file included from qmath.h:32,
|
|
from cmath.h:32,
|
|
from value.h:33,
|
|
from calc.h:33,
|
|
from file.c:39:
|
|
file.c: In function 'filepos2z':
|
|
zmath.h:85:46: error: incompatible types when assigning to type 'HALF' {aka 'long unsigned int'} from type 'FILEPOS' {aka 'struct _G_fpos_t'}
|
|
#define SWAP_HALF_IN_B32(dest, src) (*(dest) = *(src))
|
|
^
|
|
fposval.h:15:42: note: in expansion of macro 'SWAP_HALF_IN_B32'
|
|
#define SWAP_HALF_IN_FILEPOS(dest, src) SWAP_HALF_IN_B32(dest, src)
|
|
^~~~~~~~~~~~~~~~
|
|
file.c:1370:2: note: in expansion of macro 'SWAP_HALF_IN_FILEPOS'
|
|
SWAP_HALF_IN_FILEPOS(ret.v, &pos);
|
|
^~~~~~~~~~~~~~~~~~~~
|
|
Bug-Debian: http://bugs.debian.org/414893
|
|
Forwarded: yes
|
|
Author: Martin Buck <mbuck@debian.org>
|
|
---
|
|
--- a/file.c
|
|
+++ b/file.c
|
|
@@ -1367,7 +1367,7 @@
|
|
ret.len = FILEPOS_BITS/BASEB;
|
|
ret.v = alloc(ret.len);
|
|
zclearval(ret);
|
|
- SWAP_HALF_IN_FILEPOS(ret.v, &pos);
|
|
+ SWAP_HALF_IN_FILEPOS(ret.v, (HALF *)&pos);
|
|
ret.sign = 0;
|
|
ztrim(&ret);
|
|
|