void-packages/srcpkgs/ufoai/patches/sdl2_gl_macros.patch
Đoàn Trần Công Danh 5769f150de srcpkgs/u*: convert patches to -Np1
```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

15 lines
393 B
Diff

--- a/src/client/renderer/r_program.h 2014-06-05 06:18:39.000000000 +0200
+++ b/src/client/renderer/r_program.h 2017-01-25 16:15:42.467269009 +0100
@@ -30,8 +30,12 @@
char name[MAX_QPATH];
} r_shader_t;
+#if !defined(GL_UNIFORM)
#define GL_UNIFORM 1
+#endif
+#if !defined(GL_ATTRIBUTE)
#define GL_ATTRIBUTE 2
+#endif
/* program variables */
typedef struct r_progvar_s {
GLint type;