void-packages/srcpkgs/serf/patches/0001-Follow-up-to-r1811083-fix-building-with-scons-3.0.0-.patch
Đoàn Trần Công Danh 4b97cd2fb4 srcpkgs/s*: 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
1.1 KiB
Diff

From 5a73b7ce7350f19fd5f908803be104b1ded97366 Mon Sep 17 00:00:00 2001
From: Andreas Stieger <astieger@apache.org>
Date: Wed, 8 Nov 2017 17:05:28 +0000
Subject: [PATCH 1/3] Follow-up to r1811083, fix building with scons 3.0.0 and
Python3
* SConstruct: Append decode('utf-8) to FILE.get_contents() to avoid
TypeError: cannot use a string pattern on a bytes-like object
git-svn-id: https://svn.apache.org/repos/asf/serf/trunk@1814604 13f79535-47bb-0310-9956-ffa450edef68
---
SConstruct | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git SConstruct SConstruct
index 4358a23..1766870 100644
--- a/SConstruct
+++ b/SConstruct
@@ -166,7 +166,7 @@ env.Append(BUILDERS = {
match = re.search('SERF_MAJOR_VERSION ([0-9]+).*'
'SERF_MINOR_VERSION ([0-9]+).*'
'SERF_PATCH_VERSION ([0-9]+)',
- env.File('serf.h').get_contents(),
+ env.File('serf.h').get_contents().decode('utf-8'),
re.DOTALL)
MAJOR, MINOR, PATCH = [int(x) for x in match.groups()]
env.Append(MAJOR=str(MAJOR))
--
2.29.0.rc1