void-packages/srcpkgs/SDL2/patches/gl_version_es_cm_1_0.patch
Đoàn Trần Công Danh ec4c2d75fa srcpkgs/[A-Z]*: 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

14 lines
517 B
Diff

--- a/include/SDL_opengl_glext.h 2019-07-25 06:32:36.000000000 +0200
+++ b/include/SDL_opengl_glext.h 2019-12-13 01:24:33.908796188 +0100
@@ -469,9 +469,10 @@
typedef long GLsizeiptr;
typedef long GLintptr;
#else
+#define GL_VERSION_ES_CM_1_0 1 /* Avoid redifinition in /usr/include/GLES/gl.h */
typedef ptrdiff_t GLsizeiptr;
typedef ptrdiff_t GLintptr;
#endif
#define GL_BUFFER_SIZE 0x8764
#define GL_BUFFER_USAGE 0x8765
#define GL_QUERY_COUNTER_BITS 0x8864