void-packages/srcpkgs/vdrift/patches/0002-Scons-python-3-fixes.patch
Đoàn Trần Công Danh 76acfa2dd2 srcpkgs/v*: 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

65 lines
2.2 KiB
Diff

From b5af38086bcb972f6f454f65281121cca9d0ed93 Mon Sep 17 00:00:00 2001
From: logzero <core13@gmx.net>
Date: Thu, 30 Jul 2020 19:01:13 +0200
Subject: [PATCH 2/3] Scons python 3 fixes.
---
SConstruct | 10 +++++-----
src/SConscript | 2 +-
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git SConstruct SConstruct
index 763f2e36..f20e1745 100644
--- a/SConstruct
+++ b/SConstruct
@@ -91,9 +91,9 @@ elif sys.platform == 'darwin':
for a in env['universal']:
if not sdk_path:
- print 'Building a universal binary require access to an ' + \
+ print('Building a universal binary require access to an ' + \
'SDK that has universal \nbinary support.If you know ' + \
- 'the location of such an SDK, specify it using the \n"SDK" option'
+ 'the location of such an SDK, specify it using the \n"SDK" option')
Exit(1)
env.Append( CCFLAGS = ['-arch', a], LINKFLAGS = ['-arch', a] )
@@ -231,7 +231,7 @@ def distcopy (target, source, env):
def tarballer (target, source, env):
cmd = 'tar -jcf "%s" -C "%s" .' % ( str(target[0]), str(source[0]) )
#cmd = 'tar -jcf ' + str (target[0]) + ' ' + str(source[0]) + " --exclude '*~' "
- print 'running ', cmd, ' ... '
+ print('running ', cmd, ' ... ')
p = os.popen (cmd)
return p.close ()
@@ -361,11 +361,11 @@ env.ParseConfig('pkg-config bullet --libs --cflags')
conf = Configure(env)
for header in check_headers:
if not conf.CheckCXXHeader(header):
- print 'You do not have the %s headers installed. Exiting.' % header
+ print('You do not have the %s headers installed. Exiting.' % header)
Exit(1)
for lib in check_libs:
if not conf.CheckLibWithHeader(lib[0], lib[1], 'C', lib[2]):
- print lib[3]
+ print(lib[3])
Exit(1)
env = conf.Finish()
diff --git src/SConscript src/SConscript
index c980a2e6..67cecebd 100644
--- a/src/SConscript
+++ b/src/SConscript
@@ -151,7 +151,7 @@ src = Split("""
utils.cpp
window.cpp""")
-src.sort(lambda x, y: cmp(x.lower(),y.lower()))
+src.sort(key = str.lower)
#------------------------#
# Copy Build Environment #
--
2.29.0.rc1