void-packages/srcpkgs/gltron/patches/gltron-0.70-debian.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

35 lines
885 B
Diff

Ripped from Debian patchset 6
--- a/src/include/game/game_data.h
+++ b/src/include/game/game_data.h
@@ -71,7 +71,7 @@
typedef struct AI {
int active;
int tdiff;
- long lasttime;
+ unsigned int lasttime;
segment2 left, right, front, backleft;
} AI;
--- a/src/include/video/fonttex.h
+++ b/src/include/video/fonttex.h
@@ -10,7 +10,7 @@
int lower; /* lowest ascii character (normally: 32) */
int upper; /* highest ascii character (normally: 126) */
- int *texID;
+ unsigned int *texID;
char *fontname;
char *bitmapname;
--- a/src/video/trail.c
+++ b/src/video/trail.c
@@ -19,7 +19,7 @@
n[1] = s->vStart.v[1] - s->vDirection.v[0];
tmp[0] = eye[0] - s->vStart.v[0];
tmp[1] = eye[1] - s->vStart.v[1];
- if(n[0] == n[1] == 0) return length(tmp);
+ if(n[0] == 0 && n[1] == 0) return length(tmp);
return abs(scalarprod2(n, tmp) / length(n));
}