diff -Nru openttd-openmsx-0.3.1/debian/changelog openttd-openmsx-0.3.1/debian/changelog --- openttd-openmsx-0.3.1/debian/changelog 2020-03-31 15:52:59.000000000 +0000 +++ openttd-openmsx-0.3.1/debian/changelog 2020-08-12 18:12:48.000000000 +0000 @@ -1,8 +1,12 @@ -openttd-openmsx (0.3.1-5ubuntu1) focal; urgency=medium +openttd-openmsx (0.3.1-6) unstable; urgency=medium - * Build using python2. + * [16504fd] Backport patch for python3 compatibility + * [9866eca] Build using python3 (Closes: #967192) + * [4b7a180] Bump debhelper version to v13 + * [460cf2d] Support DEB_BUILD_OPTIONS=terse + * [a368048] Bump standards version to 4.5.0 - -- Matthias Klose Tue, 31 Mar 2020 17:52:59 +0200 + -- Matthijs Kooijman Wed, 12 Aug 2020 20:12:48 +0200 openttd-openmsx (0.3.1-5) unstable; urgency=medium diff -Nru openttd-openmsx-0.3.1/debian/compat openttd-openmsx-0.3.1/debian/compat --- openttd-openmsx-0.3.1/debian/compat 2018-05-10 19:45:36.000000000 +0000 +++ openttd-openmsx-0.3.1/debian/compat 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -11 diff -Nru openttd-openmsx-0.3.1/debian/control openttd-openmsx-0.3.1/debian/control --- openttd-openmsx-0.3.1/debian/control 2020-03-31 15:51:22.000000000 +0000 +++ openttd-openmsx-0.3.1/debian/control 2020-08-12 18:12:48.000000000 +0000 @@ -3,11 +3,12 @@ Priority: optional Maintainer: Matthijs Kooijman Uploaders: Jordi Mallach -Build-Depends: debhelper (>= 11), python2 -Standards-Version: 4.1.4 +Build-Depends: debhelper-compat (= 13), python3 +Standards-Version: 4.5.0 Vcs-Browser: https://salsa.debian.org/openttd-team/openttd-openmsx Vcs-Git: https://salsa.debian.org/openttd-team/openttd-openmsx.git -Homepage: http://dev.openttdcoop.org/projects/openmsx +Homepage: https://github.com/OpenTTD/OpenMSX +Rules-Requires-Root: no Package: openttd-openmsx Architecture: all diff -Nru openttd-openmsx-0.3.1/debian/copyright openttd-openmsx-0.3.1/debian/copyright --- openttd-openmsx-0.3.1/debian/copyright 2018-05-10 19:45:36.000000000 +0000 +++ openttd-openmsx-0.3.1/debian/copyright 2020-08-12 18:12:48.000000000 +0000 @@ -1,7 +1,7 @@ Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: OpenMSX -Upstream-Contact: https://dev.openttdcoop.org/projects/openmsx -Source: https://dev.openttdcoop.org/projects/openmsx +Upstream-Contact: https://github.com/OpenTTD/OpenMSX +Source: https://github.com/OpenTTD/OpenMSX Files: * Copyright: © 2010 various authors. See readme.txt for details. diff -Nru openttd-openmsx-0.3.1/debian/patches/python2.diff openttd-openmsx-0.3.1/debian/patches/python2.diff --- openttd-openmsx-0.3.1/debian/patches/python2.diff 2020-03-31 15:52:43.000000000 +0000 +++ openttd-openmsx-0.3.1/debian/patches/python2.diff 1970-01-01 00:00:00.000000000 +0000 @@ -1,81 +0,0 @@ -Index: b/scripts/authorlist.py -=================================================================== ---- a/scripts/authorlist.py -+++ b/scripts/authorlist.py -@@ -1,4 +1,4 @@ --#! /usr/bin/env python -+#! /usr/bin/python2 - # - # This file is part of the OpenMSX music set for OpenTTD. - # OpenMSX is free content; you can redistribute it and/or modify it under the terms of the -Index: b/scripts/md5list.py -=================================================================== ---- a/scripts/md5list.py -+++ b/scripts/md5list.py -@@ -1,4 +1,4 @@ --#! /usr/bin/env python -+#! /usr/bin/python2 - # - # This file is part of the OpenMSX music set for OpenTTD. - # OpenMSX is free content; you can redistribute it and/or modify it under the terms of the -Index: b/scripts/midifiles.py -=================================================================== ---- a/scripts/midifiles.py -+++ b/scripts/midifiles.py -@@ -1,4 +1,4 @@ --#! /usr/bin/env python -+#! /usr/bin/python2 - # - # This file is part of the OpenMSX music set for OpenTTD. - # OpenMSX is free content; you can redistribute it and/or modify it under the terms of the -Index: b/scripts/namelist.py -=================================================================== ---- a/scripts/namelist.py -+++ b/scripts/namelist.py -@@ -1,4 +1,4 @@ --#! /usr/bin/env python -+#! /usr/bin/python2 - # - # This file is part of the OpenMSX music set for OpenTTD. - # OpenMSX is free content; you can redistribute it and/or modify it under the terms of the -@@ -33,4 +33,4 @@ while 1: - def authorlist(mystr): - separate = string.split() - for str in separate: -- print string.strip(str) -\ No newline at end of file -+ print string.strip(str) -Index: b/scripts/playlist.py -=================================================================== ---- a/scripts/playlist.py -+++ b/scripts/playlist.py -@@ -1,4 +1,4 @@ --#! /usr/bin/env python -+#! /usr/bin/python2 - # - # This file is part of the OpenMSX music set for OpenTTD. - # OpenMSX is free content; you can redistribute it and/or modify it under the terms of the -@@ -37,4 +37,4 @@ while 1: - def authorlist(mystr): - separate = string.split() - for str in separate: -- print string.strip(str) -\ No newline at end of file -+ print string.strip(str) -Index: b/scripts/sanitize_list.py -=================================================================== ---- a/scripts/sanitize_list.py -+++ b/scripts/sanitize_list.py -@@ -1,4 +1,4 @@ --#! /usr/bin/env python -+#! /usr/bin/python2 - # - # This file is part of the OpenMSX music set for OpenTTD. - # OpenMSX is free content; you can redistribute it and/or modify it under the terms of the -@@ -40,4 +40,4 @@ while 1: - def authorlist(mystr): - separate = string.split() - for str in separate: -- print string.strip(str) -\ No newline at end of file -+ print string.strip(str) diff -Nru openttd-openmsx-0.3.1/debian/patches/python3-compatibility.patch openttd-openmsx-0.3.1/debian/patches/python3-compatibility.patch --- openttd-openmsx-0.3.1/debian/patches/python3-compatibility.patch 1970-01-01 00:00:00.000000000 +0000 +++ openttd-openmsx-0.3.1/debian/patches/python3-compatibility.patch 2020-08-12 18:12:48.000000000 +0000 @@ -0,0 +1,227 @@ +Description: Fix mixed indentation and do not call removed methods, to support Python 3 +Origin: upstream, https://github.com/OpenTTD/OpenMSX/commit/ffb7cb7f597b92d506f744c707c2c0d4cf3029fd, https://github.com/OpenTTD/OpenMSX/commit/95ae6129c9c2edcaa79d49117aee8b172d20e8a8 +Bug-Debian: https://bugs.debian.org/967192 +--- a/scripts/authorlist.py ++++ b/scripts/authorlist.py +@@ -18,10 +18,10 @@ while 1: + if data != '': + # do some processing of the contents of + # the data variable +- separate = string.split(data,";") +- print '%-30s %s' % (separate[1]+":", separate[2]) ++ separate = data.split(';') ++ print('%-30s %s' % (separate[1]+":", separate[2])) + # end of data processing command group +- # sys.stdout.write(res) ++ # sys.stdout.write(res) + else: + sys.stdout.flush() + break +--- a/scripts/md5list.py ++++ b/scripts/md5list.py +@@ -18,25 +18,25 @@ import os + while 1: + data = sys.stdin.readline() + if data != '': +- # leave out all comment lines (lines starting with '#') +- comment_pos = string.find(data,'#') +- if comment_pos == 0: +- continue +- # separate the single entries by ';' +- separate = string.split(data,";") +- if len(separate) != 4: +- continue +- systemtype = (os.uname())[0] +- if systemtype == 'Linux': +- md5call = ["md5sum"] +- elif systemtype == 'Darwin': +- md5call = ["md5", "-r"] +- else: +- md5call = ["md5sum"] +- md5call = md5call + ["src/"+string.strip(separate[1])] +- md5sum = subprocess.Popen(md5call, stdout=subprocess.PIPE).communicate()[0] +- md5sum = string.split(md5sum) +- res = "%-32s = %s\n" % (separate[1], md5sum[0]) ++ # leave out all comment lines (lines starting with '#') ++ comment_pos = data.find('#') ++ if comment_pos == 0: ++ continue ++ # separate the single entries by ';' ++ separate = data.split(';') ++ if len(separate) != 4: ++ continue ++ systemtype = (os.uname())[0] ++ if systemtype == 'Linux': ++ md5call = ["md5sum"] ++ elif systemtype == 'Darwin': ++ md5call = ["md5", "-r"] ++ else: ++ md5call = ["md5sum"] ++ md5call = md5call + ["src/"+separate[1].strip()] ++ md5sum = subprocess.Popen(md5call, stdout=subprocess.PIPE).communicate()[0] ++ md5sum = md5sum.split() ++ res = "%-32s = %s\n" % (separate[1], md5sum[0].decode()) + sys.stdout.write(res) + else: + sys.stdout.flush() +--- a/scripts/midifiles.py ++++ b/scripts/midifiles.py +@@ -17,16 +17,16 @@ res = "" + while 1: + data = sys.stdin.readline() + if data != '': +- # leave out all comment lines (lines starting with '#') +- comment_pos = string.find(data,'#') +- if comment_pos == 0: +- continue +- # separate the single entries by ';' +- separate = string.split(data,";") +- if len(separate) != 4: +- continue +- res = res + " src/" + string.strip(separate[1]) ++ # leave out all comment lines (lines starting with '#') ++ comment_pos = data.find('#') ++ if comment_pos == 0: ++ continue ++ # separate the single entries by ';' ++ separate = data.split(';') ++ if len(separate) != 4: ++ continue ++ res = res + " src/" + separate[1].strip() + else: +- sys.stdout.write(res) ++ sys.stdout.write(res) + sys.stdout.flush() + break +--- a/scripts/namelist.py ++++ b/scripts/namelist.py +@@ -16,21 +16,21 @@ import sys + while 1: + data = sys.stdin.readline() + if data != '': +- # leave out all comment lines (lines starting with '#') +- comment_pos = string.find(data,'#') +- if comment_pos == 0: +- continue +- # separate the single entries by ';' +- separate = string.split(data,";") +- if len(separate) != 4: +- continue +- res = "%-32s = %s\n" % (separate[1], string.strip(separate[3])) ++ # leave out all comment lines (lines starting with '#') ++ comment_pos = data.find('#') ++ if comment_pos == 0: ++ continue ++ # separate the single entries by ';' ++ separate = data.split(';') ++ if len(separate) != 4: ++ continue ++ res = "%-32s = %s\n" % (separate[1], separate[3].strip()) + sys.stdout.write(res) + else: + sys.stdout.flush() + break + + def authorlist(mystr): +- separate = string.split() +- for str in separate: +- print string.strip(str) +\ No newline at end of file ++ separate = separate.split() ++ for str in separate: ++ print(str.strip()) +--- a/scripts/playlist.py ++++ b/scripts/playlist.py +@@ -16,25 +16,25 @@ import sys + while 1: + data = sys.stdin.readline() + if data != '': +- # leave out all comment lines (lines starting with '#') +- comment_pos = string.find(data,'#') +- if comment_pos == 0: +- continue +- # separate the single entries by ';' +- separate = string.split(data,";") +- res = "" +- # leave out all lines which don't have the proper number of elements +- if len(separate) >= 1: +- res = string.strip(separate[0]) + " = " +- if len(separate) == 4: +- res = res + separate[1] +- res = res + "\n" ++ # leave out all comment lines (lines starting with '#') ++ comment_pos = data.find('#') ++ if comment_pos == 0: ++ continue ++ # separate the single entries by ';' ++ separate = data.split(';') ++ res = "" ++ # leave out all lines which don't have the proper number of elements ++ if len(separate) >= 1: ++ res = separate[0].strip() + " = " ++ if len(separate) == 4: ++ res = res + separate[1] ++ res = res + "\n" + sys.stdout.write(res) + else: + sys.stdout.flush() + break + + def authorlist(mystr): +- separate = string.split() +- for str in separate: +- print string.strip(str) +\ No newline at end of file ++ separate = separate.split() ++ for str in separate: ++ print(str.strip()) +--- a/scripts/sanitize_list.py ++++ b/scripts/sanitize_list.py +@@ -16,28 +16,28 @@ import sys + while 1: + data = sys.stdin.readline() + if data != '': +- # leave out all comment lines (lines starting with '#') +- comment_pos = string.find(data,'#') +- if comment_pos == 0: +- continue +- # separate the single entries by ';' +- separate = string.split(data,";") +- if len(separate) != 4: +- continue +- res = "" +- for str in separate: +- if res != '': +- res = res + ";" + string.strip(str) +- else: +- res = string.strip(str) ++ # leave out all comment lines (lines starting with '#') ++ comment_pos = data.find('#') ++ if comment_pos == 0: ++ continue ++ # separate the single entries by ';' ++ separate = data.split(';') ++ if len(separate) != 4: ++ continue ++ res = "" ++ for str in separate: ++ if res != '': ++ res = res + ";" + str.strip() ++ else: ++ res = str.strip() + # end of data processing command group +- res = res + "\n" ++ res = res + "\n" + sys.stdout.write(res) + else: + sys.stdout.flush() + break + + def authorlist(mystr): +- separate = string.split() +- for str in separate: +- print string.strip(str) +\ No newline at end of file ++ separate = separate.split() ++ for str in separate: ++ print(str.strip()) diff -Nru openttd-openmsx-0.3.1/debian/patches/series openttd-openmsx-0.3.1/debian/patches/series --- openttd-openmsx-0.3.1/debian/patches/series 2020-03-31 15:51:47.000000000 +0000 +++ openttd-openmsx-0.3.1/debian/patches/series 2020-08-12 18:12:48.000000000 +0000 @@ -1,3 +1,4 @@ +use-python3-to-build.patch +python3-compatibility.patch install-no-subdir.patch force-grep-as-text.patch -python2.diff diff -Nru openttd-openmsx-0.3.1/debian/patches/use-python3-to-build.patch openttd-openmsx-0.3.1/debian/patches/use-python3-to-build.patch --- openttd-openmsx-0.3.1/debian/patches/use-python3-to-build.patch 1970-01-01 00:00:00.000000000 +0000 +++ openttd-openmsx-0.3.1/debian/patches/use-python3-to-build.patch 2020-08-12 18:12:48.000000000 +0000 @@ -0,0 +1,52 @@ +Description: Use python3 during build +Author: Matthijs Kooijman +Forwarded: not-needed +Bug-Debian: https://bugs.debian.org/967192 +--- a/scripts/authorlist.py ++++ b/scripts/authorlist.py +@@ -1,4 +1,4 @@ +-#! /usr/bin/env python ++#! /usr/bin/python3 + # + # This file is part of the OpenMSX music set for OpenTTD. + # OpenMSX is free content; you can redistribute it and/or modify it under the terms of the +--- a/scripts/md5list.py ++++ b/scripts/md5list.py +@@ -1,4 +1,4 @@ +-#! /usr/bin/env python ++#! /usr/bin/python3 + # + # This file is part of the OpenMSX music set for OpenTTD. + # OpenMSX is free content; you can redistribute it and/or modify it under the terms of the +--- a/scripts/midifiles.py ++++ b/scripts/midifiles.py +@@ -1,4 +1,4 @@ +-#! /usr/bin/env python ++#! /usr/bin/python3 + # + # This file is part of the OpenMSX music set for OpenTTD. + # OpenMSX is free content; you can redistribute it and/or modify it under the terms of the +--- a/scripts/namelist.py ++++ b/scripts/namelist.py +@@ -1,4 +1,4 @@ +-#! /usr/bin/env python ++#! /usr/bin/python3 + # + # This file is part of the OpenMSX music set for OpenTTD. + # OpenMSX is free content; you can redistribute it and/or modify it under the terms of the +--- a/scripts/playlist.py ++++ b/scripts/playlist.py +@@ -1,4 +1,4 @@ +-#! /usr/bin/env python ++#! /usr/bin/python3 + # + # This file is part of the OpenMSX music set for OpenTTD. + # OpenMSX is free content; you can redistribute it and/or modify it under the terms of the +--- a/scripts/sanitize_list.py ++++ b/scripts/sanitize_list.py +@@ -1,4 +1,4 @@ +-#! /usr/bin/env python ++#! /usr/bin/python3 + # + # This file is part of the OpenMSX music set for OpenTTD. + # OpenMSX is free content; you can redistribute it and/or modify it under the terms of the diff -Nru openttd-openmsx-0.3.1/debian/rules openttd-openmsx-0.3.1/debian/rules --- openttd-openmsx-0.3.1/debian/rules 2018-05-10 19:45:36.000000000 +0000 +++ openttd-openmsx-0.3.1/debian/rules 2020-08-12 18:12:48.000000000 +0000 @@ -13,17 +13,18 @@ # Prevent the Makefile from autodetecting unix2dos, it's really not # needed OPTIONS += "UNIX2DOS=" -# Enable verbosity (default is _V=@ to suppress commands) +ifeq (,$(filter terse,$(DEB_BUILD_OPTIONS))) +# By default, _V is set to @ to suppress commands, clear it to *show* +# commands. OPTIONS += "_V=" +endif override_dh_auto_test: -ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) # Check md5sums of files. This isn't really useful (mostly meant # for use with opengfx), but we'll have to override dh_auto_test # anyway (since make test generates debug output), so we might # as well call make check. make check $(OPTIONS) -endif override_dh_auto_build: make $(OPTIONS)