void-packages/srcpkgs/chromium/patches/xxx-ppc64le-libvpx.patch
Đoàn Trần Công Danh c987560802 srcpkgs/c*: 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

72 lines
2.8 KiB
Diff

Uses generic target for now. To use ppc64le, change --target to ppc64le-gnu
and add --enable-vsx, and change generic to ppc for the rtcd header.
From 18e6c5c55cfae0cfb458d8210d7bc709360a0e90 Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Wed, 9 Sep 2020 19:08:25 +0200
Subject: [PATCH] enable generation of ppc64 libvpx bits
this doesn't update the gni file, that's done from
the template by running the appropriate scripts
---
third_party/libvpx/BUILD.gn | 4 ++++
third_party/libvpx/generate_gni.sh | 9 +++++++++
2 files changed, 13 insertions(+)
diff --git third_party/libvpx/BUILD.gn third_party/libvpx/BUILD.gn
index 7198e59..3300485 100644
--- a/third_party/libvpx/BUILD.gn
+++ b/third_party/libvpx/BUILD.gn
@@ -336,6 +336,8 @@ static_library("libvpx") {
} else {
sources = libvpx_srcs_arm64
}
+ } else if (current_cpu == "ppc64") {
+ sources = libvpx_srcs_ppc64
}
configs -= [ "//build/config/compiler:chromium_code" ]
diff --git third_party/libvpx/generate_gni.sh third_party/libvpx/generate_gni.sh
index bcf84b0..8a3f4f1 100755
--- a/third_party/libvpx/generate_gni.sh
+++ b/third_party/libvpx/generate_gni.sh
@@ -361,6 +361,7 @@ gen_config_files linux/arm-neon-highbd "--target=armv7-linux-gcc ${all_platforms
gen_config_files linux/arm64-highbd "--target=armv8-linux-gcc ${all_platforms} ${HIGHBD}"
gen_config_files linux/mipsel "--target=mips32-linux-gcc ${all_platforms}"
gen_config_files linux/mips64el "--target=mips64-linux-gcc ${all_platforms}"
+gen_config_files linux/ppc64 "--target=generic-gnu $HIGHBD ${all_platforms}"
gen_config_files linux/generic "--target=generic-gnu $HIGHBD ${all_platforms}"
gen_config_files win/arm64 "--target=arm64-win64-vs15 ${all_platforms} ${HIGHBD}"
gen_config_files win/ia32 "--target=x86-win32-vs14 ${all_platforms} ${x86_platforms}"
@@ -386,6 +387,7 @@ lint_config linux/arm-neon-highbd
lint_config linux/arm64-highbd
lint_config linux/mipsel
lint_config linux/mips64el
+lint_config linux/ppc64
lint_config linux/generic
lint_config win/arm64
lint_config win/ia32
@@ -415,6 +417,7 @@ gen_rtcd_header linux/arm-neon-highbd armv7
gen_rtcd_header linux/arm64-highbd armv8
gen_rtcd_header linux/mipsel mipsel
gen_rtcd_header linux/mips64el mips64el
+gen_rtcd_header linux/ppc64 generic
gen_rtcd_header linux/generic generic
gen_rtcd_header win/arm64 armv8
gen_rtcd_header win/ia32 x86 "${require_sse2}"
@@ -500,6 +503,12 @@ if [ -z $ONLY_CONFIGS ]; then
echo "MIPS64 source list is identical to MIPS source list. No need to generate it."
+ echo "Generate ppc64 source list."
+ config=$(print_config_basic linux/ppc64)
+ make_clean
+ make libvpx_srcs.txt target=libs $config > /dev/null
+ convert_srcs_to_project_files libvpx_srcs.txt libvpx_srcs_ppc64
+
echo "Generate NaCl source list."
config=$(print_config_basic nacl)
make_clean
--
2.28.0