linux-xiaomi-ido: python3 compatibility (MR 1202)
This commit is contained in:
parent
7e6d63b1f2
commit
db671ccead
2 changed files with 53 additions and 4 deletions
|
@ -2,15 +2,15 @@
|
|||
|
||||
pkgname=linux-xiaomi-ido
|
||||
pkgver=3.10.107
|
||||
pkgrel=4
|
||||
pkgdesc="Xiaomi Xiaomi RedMi 3 kernel fork"
|
||||
pkgrel=5
|
||||
pkgdesc="Xiaomi RedMi 3 kernel fork"
|
||||
arch="aarch64"
|
||||
_carch="arm64"
|
||||
_flavor="xiaomi-ido"
|
||||
url="https://kernel.org"
|
||||
license="GPL2"
|
||||
options="!strip !check !tracedeps pmb:cross-native"
|
||||
makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev devicepkg-dev dtbtool python gcc6"
|
||||
makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev devicepkg-dev dtbtool python3 gcc6"
|
||||
|
||||
# Compiler: this kernel was only tested with GCC6. Feel free to make a merge
|
||||
# request if you find out that it is booting working with newer GCCs as
|
||||
|
@ -30,6 +30,7 @@ source="
|
|||
$_config
|
||||
compiler-gcc6.h
|
||||
01_fix_gcc6_errors.patch
|
||||
gcc-wrapper-port-to-py3.patch
|
||||
"
|
||||
builddir="$srcdir/$_repository-$_commit"
|
||||
|
||||
|
@ -54,4 +55,5 @@ package() {
|
|||
sha512sums="e22e3cff0819edd2d9f0f16bc952a97773a8b4b36394ab6acf61fd619988d6d0bf1f7d29cba904a09ca0c63209fcedcdf65ee522646193980c5ac6c60e1c3a97 linux-xiaomi-ido-8f4c7c59fb3a29344af202150030ae712f801d6b.tar.gz
|
||||
c7b9c2900c7d9fa49ea8ceb511092e58aa57e3cf6808e0c9130fac5a5619c7e67b7292e5c4dd23b0a9d3f14f73ba26cbc6c926d5947974395fd602c65324cc1d config-xiaomi-ido.aarch64
|
||||
d80980e9474c82ba0ef1a6903b434d8bd1b092c40367ba543e72d2c119301c8b2d05265740e4104ca1ac5d15f6c4aa49e8776cb44264a9a28dc551e0d1850dcc compiler-gcc6.h
|
||||
972e98523d6ef06342e69a09e979bdd86904cf7f9a843b519b37791e531b680182564a2ab537c94629c3589f4e775b2c39de04c64e210a0f8b6f10745c3596f1 01_fix_gcc6_errors.patch"
|
||||
972e98523d6ef06342e69a09e979bdd86904cf7f9a843b519b37791e531b680182564a2ab537c94629c3589f4e775b2c39de04c64e210a0f8b6f10745c3596f1 01_fix_gcc6_errors.patch
|
||||
13e289c889a48946cd3d976932f06f749bed5c6596776f4b683aada4e3e2f50b66286d6f550b8f2e260b58867b759591bbf8b54cc07ad9d3bb761ff477f036a1 gcc-wrapper-port-to-py3.patch"
|
||||
|
|
|
@ -0,0 +1,47 @@
|
|||
commit d5a70cdd4e2ce4ee432011504ea0fdfa0096ef7e
|
||||
Author: Alexey Min <alexey.min@gmail.com>
|
||||
Date: Sat May 2 00:22:09 2020 +0300
|
||||
|
||||
gcc-wrapper: port to py3
|
||||
|
||||
diff --git a/scripts/gcc-wrapper.py b/scripts/gcc-wrapper.py
|
||||
index 83f7e99da3b..499aac09244 100755
|
||||
--- a/scripts/gcc-wrapper.py
|
||||
+++ b/scripts/gcc-wrapper.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-#! /usr/bin/env python
|
||||
+#! /usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Copyright (c) 2011-2012, The Linux Foundation. All rights reserved.
|
||||
@@ -59,7 +59,7 @@ def interpret_warning(line):
|
||||
line = line.rstrip('\n')
|
||||
m = warning_re.match(line)
|
||||
if m and m.group(2) not in allowed_warnings:
|
||||
- print "error, forbidden warning:", m.group(2)
|
||||
+ print("error, forbidden warning:", m.group(2))
|
||||
|
||||
# If there is a warning, remove any object if it exists.
|
||||
if ofile:
|
||||
@@ -84,17 +84,16 @@ def run_gcc():
|
||||
try:
|
||||
proc = subprocess.Popen(args, stderr=subprocess.PIPE)
|
||||
for line in proc.stderr:
|
||||
- print line,
|
||||
- interpret_warning(line)
|
||||
+ print(line, interpret_warning(line))
|
||||
|
||||
result = proc.wait()
|
||||
except OSError as e:
|
||||
result = e.errno
|
||||
if result == errno.ENOENT:
|
||||
- print args[0] + ':',e.strerror
|
||||
- print 'Is your PATH set correctly?'
|
||||
+ print(args[0] + ':', e.strerror)
|
||||
+ print('Is your PATH set correctly?')
|
||||
else:
|
||||
- print ' '.join(args), str(e)
|
||||
+ print(' '.join(args), str(e))
|
||||
|
||||
return result
|
||||
|
Loading…
Reference in a new issue