void-packages/srcpkgs/handbrake/patches/i686.patch
Đoàn Trần Công Danh 200bed5c06 srcpkgs/h*: 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

32 lines
911 B
Diff

diff --git libhb/ports.c libhb/ports.c
index bb1733a..b6d0b38 100644
--- a/libhb/ports.c
+++ b/libhb/ports.c
@@ -286,15 +286,15 @@ const char* hb_get_cpu_platform_name()
}
}
-#if ARCH_X86_64
+#if _ARCH_X86_64
# define REG_b "rbx"
# define REG_S "rsi"
-#elif ARCH_X86_32
+#elif _ARCH_X86_32
# define REG_b "ebx"
# define REG_S "esi"
#endif // ARCH_X86_32
-#if ARCH_X86_64 || ARCH_X86_32
+#if _ARCH_X86_64 || _ARCH_X86_32
#define cpuid(index, eax, ebx, ecx, edx) \
__asm__ volatile ( \
"mov %%"REG_b", %%"REG_S" \n\t" \
@@ -312,7 +312,7 @@ static void init_cpu_info()
if (av_get_cpu_flags() & AV_CPU_FLAG_SSE)
{
-#if ARCH_X86_64 || ARCH_X86_32
+#if _ARCH_X86_64 || _ARCH_X86_32
int eax, ebx, ecx, edx, family, model;
cpuid(1, &eax, &ebx, &ecx, &edx);