void-packages/srcpkgs/lightzone/patches/ppc.patch
Đoàn Trần Công Danh 861ac185a6 srcpkgs/l*: 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

22 lines
755 B
Diff

Fixes bad macro checks, breaking altivec build.
--- a/lightcrafts/jnisrc/jai/bilateralFilter_sse.c
+++ b/lightcrafts/jnisrc/jai/bilateralFilter_sse.c
@@ -188,7 +188,7 @@ static inline void reset_denormals(csr_context oldMXCSR) {
#endif // defined(__i386__) || defined(__x86_64__)
-#if defined(__ppc__) || defined(__ppc64__)
+#if defined(__powerpc__) || defined(__powerpc64__)
#include <altivec.h>
static inline vFloat loadUnalignedFloat( float *target )
@@ -253,7 +253,7 @@ static void reset_denormals( csr_context oldJavaMode ) {
vec_mtvscr ( oldJavaMode );
}
-#endif // defined(__ppc__) || defined(__ppc64__)
+#endif // defined(__powerpc__) || defined(__powerpc64__)
#endif // defined(__SSE2__) || defined (__VEC__)
#if USE_VECTOR