void-packages/srcpkgs/chromium/patches/chromium-system-nodejs.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

20 lines
898 B
Diff

--- a/third_party/node/node.py 2021-05-20 04:17:54.000000000 +0200
+++ b/third_party/node/node.py 2021-05-20 04:17:54.000000000 +0200
@@ -17,11 +17,12 @@
if platform.system() == 'Darwin' and platform.machine() == 'arm64':
return os.path.join(os_path.join(os_path.dirname(__file__), 'mac',
'node-darwin-arm64', 'bin', 'node'))
- return os_path.join(os_path.dirname(__file__), *{
- 'Darwin': ('mac', 'node-darwin-x64', 'bin', 'node'),
- 'Linux': ('linux', 'node-linux-x64', 'bin', 'node'),
- 'Windows': ('win', 'node.exe'),
- }[platform.system()])
+ return "/usr/bin/node"
+ #return os_path.join(os_path.dirname(__file__), *{
+ # 'Darwin': ('mac', 'node-darwin-x64', 'bin', 'node'),
+ # 'Linux': ('linux', 'node-linux-x64', 'bin', 'node'),
+ # 'Windows': ('win', 'node.exe'),
+ #}[platform.system()])
def RunNode(cmd_parts, stdout=None):