[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#947578: FTBFS with scons 3.1.2-1



Control: tags -1 + patch

Dear maintainer,

the attached patch fixes the build failure with the Python3-enabled
scons.

Regards,
  Reiner
diff -Nru rafkill-1.2.2/debian/patches/scons.patch rafkill-1.2.2/debian/patches/scons.patch
--- rafkill-1.2.2/debian/patches/scons.patch	1970-01-01 01:00:00.000000000 +0100
+++ rafkill-1.2.2/debian/patches/scons.patch	2020-02-02 15:43:25.000000000 +0100
@@ -0,0 +1,89 @@
+Author: Reiner Herrmann <reiner@reiner-h.de>
+Description: Fix build with Python3-enabled scons
+Bug-Debian: https://bugs.debian.org/947578
+
+--- a/SConstruct
++++ b/SConstruct
+@@ -6,7 +6,7 @@
+ 
+ # env.Append( CCFLAGS = flags, CPPPATH = [ "../src" ] );
+ 
+-print "Use 'scons -h' for help"
++print("Use 'scons -h' for help")
+ 
+ prefix = '/usr/local/games'
+ bin = '/usr/local/bin'
+@@ -19,9 +19,9 @@
+ 	prefix = 'gen'
+ 	bin = 'gen'
+ 
+-opts = Options( 'rafkill.conf' )
+-opts.Add( PathOption('prefix', 'Directory to install under', prefix ) )
+-opts.Add( PathOption('bin', 'Directory where symlinked executable should go', bin ) )
++opts = Variables( 'rafkill.conf' )
++opts.Add( PathVariable('prefix', 'Directory to install under', prefix ) )
++opts.Add( PathVariable('bin', 'Directory where symlinked executable should go', bin ) )
+ opts.Update( env )
+ opts.Save( 'rafkill.conf', env )
+ 
+@@ -34,7 +34,7 @@
+ 	env.Append( CCFLAGS = [ '-pg' ] )
+ 	env.Append( LINKFLAGS = [ '-pg' ] )
+ 
+-env.BuildDir( 'build/', 'src/' )
++env.VariantDir( 'build/', 'src/' )
+ env.Append( LIBS = [ 'aldmb', 'dumb' ] );
+ if sys.platform == 'win32':
+ 	env.Append( CCFLAGS = [ '-DWINDOWS' ] )
+@@ -51,11 +51,11 @@
+ 
+ # SConscript( 'src/SConscript', build_dir='build', exports = 'env' );
+ sources = SConscript( 'src/SConscript', exports = 'env' );
+-rafkill = env.Program( 'rafkill', map( lambda x: 'build/' + x, sources ) )
++rafkill = env.Program( 'rafkill', list(map( lambda x: 'build/' + x, sources )) )
+ 
+ def installReminder( target, source, env ):
+ 	print
+-	print "Run 'scons install' to install rafkill"
++	print("Run 'scons install' to install rafkill")
+ 	return 0
+ 
+ def ShutUp( target, source, env ):
+@@ -71,7 +71,7 @@
+ env.Alias( 'package', 'src/source.tar' )
+ 
+ def install( target, source, env ):
+-	print "Installing!"
++	print("Installing!")
+ 	return 0
+ 
+ installDir = '$prefix/'
+@@ -81,7 +81,7 @@
+ def addData( file ):
+ 	env.Install( installDir + 'rafkill/data', "data/%s" % file )
+ 
+-map( lambda x: addData( x ), Split( """
++list(map( lambda x: addData( x ), Split( """
+ 1.pck
+ 2.pck
+ 3.pck
+@@ -103,7 +103,7 @@
+ sound.dat
+ table.col
+ vulture.fnt
+-"""));
++""")));
+ 
+ def addMusic( file ):
+ 	env.Install( installDir + 'rafkill/music', "music/%s" % file )
+--- a/src/SConscript
++++ b/src/SConscript
+@@ -150,7 +150,7 @@
+ """)));
+ 
+ import re
+-headers = map( lambda x: re.compile( 'cpp' ).sub( 'h', x ), sources )
++headers = list(map( lambda x: re.compile( 'cpp' ).sub( 'h', x ), sources ))
+ headers.extend( [ 'fonts.h', 'sound.h', 'wormhole.h' ] )
+ 
+ import os
diff -Nru rafkill-1.2.2/debian/patches/series rafkill-1.2.2/debian/patches/series
--- rafkill-1.2.2/debian/patches/series	2018-01-19 14:24:15.000000000 +0100
+++ rafkill-1.2.2/debian/patches/series	2020-02-02 15:43:25.000000000 +0100
@@ -5,3 +5,4 @@
 103_gcc_4.3_fixes
 104_gcc-4.7.patch
 105_glibc-2.26.patch
+scons.patch

Attachment: signature.asc
Description: PGP signature


Reply to: