Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:15.2:Update
gpick
0001-build-support-scons-python3.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0001-build-support-scons-python3.patch of Package gpick
From 8300e6cc051b3eb957e8e6a39f7904bd605a41b1 Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger <dimstar@opensuse.org> Date: Mon, 20 Nov 2017 17:01:36 +0100 Subject: [PATCH] build: support scons/python3 --- SConscript | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Index: gpick_0.2.5/SConscript =================================================================== --- gpick_0.2.5.orig/SConscript +++ gpick_0.2.5/SConscript @@ -48,7 +48,7 @@ env.AddCustomBuilders() env.GetVersionInfo() try: - umask = os.umask(022) + umask = os.umask(0o022) except OSError: # ignore on systems that don't support umask pass @@ -81,21 +81,21 @@ if not env.GetOption('clean'): env = conf.Finish() -if os.environ.has_key('CC'): +if 'CC' in os.environ: env['CC'] = os.environ['CC'] -if os.environ.has_key('CFLAGS'): +if 'CFLAGS' in os.environ: env['CCFLAGS'] += SCons.Util.CLVar(os.environ['CFLAGS']) -if os.environ.has_key('CXX'): +if 'CXX' in os.environ: env['CXX'] = os.environ['CXX'] -if os.environ.has_key('CXXFLAGS'): +if 'CXXFLAGS' in os.environ: env['CXXFLAGS'] += SCons.Util.CLVar(os.environ['CXXFLAGS']) -if os.environ.has_key('LDFLAGS'): +if 'LDFLAGS' in os.environ: env['LINKFLAGS'] += SCons.Util.CLVar(os.environ['LDFLAGS']) Decider('MD5-timestamp') if not env['TOOLCHAIN'] == 'msvc': - if not (os.environ.has_key('CFLAGS') or os.environ.has_key('CXXFLAGS') or os.environ.has_key('LDFLAGS')): + if not ('CFLAGS' in os.environ or 'CXXFLAGS' in os.environ or 'LDFLAGS' in os.environ): if env['DEBUG']: env.Append( CPPFLAGS = ['-Wall', '-g3', '-O0'], Index: gpick_0.2.5/tools/gpick.py =================================================================== --- gpick_0.2.5.orig/tools/gpick.py +++ gpick_0.2.5/tools/gpick.py @@ -9,10 +9,10 @@ import sys import glob import subprocess -from lemon import * -from flex import * -from gettext import * -from resource_template import * +from tools.lemon import * +from tools.flex import * +from tools.gettext import * +from tools.resource_template import * from SCons.Script import * from SCons.Util import * @@ -79,9 +79,9 @@ class GpickEnvironment(SConsEnvironment) def ConfirmPrograms(self, conf, programs): conf.AddTests({'CheckProgram': CheckProgram}) - for evar, args in programs.iteritems(): + for evar, args in programs.items(): found = False - for name, member_name in args['checks'].iteritems(): + for name, member_name in args['checks'].items(): if conf.CheckProgram(self, name, member_name): found = True; break @@ -95,9 +95,9 @@ class GpickEnvironment(SConsEnvironment) def ConfirmLibs(self, conf, libs): conf.AddTests({'CheckPKG': CheckPKG}) - for evar, args in libs.iteritems(): + for evar, args in libs.items(): found = False - for name, version in args['checks'].iteritems(): + for name, version in args['checks'].items(): if conf.CheckPKG(name + ' ' + version): self[evar]=name found = True; @@ -127,9 +127,9 @@ class GpickEnvironment(SConsEnvironment) self.AddPostAction(i, Chmod(i, perm)) return dir - InstallProgram = lambda self, dir, source: GpickEnvironment.InstallPerm(self, dir, source, 0755) - InstallData = lambda self, dir, source: GpickEnvironment.InstallPerm(self, dir, source, 0644) - InstallDataAutoDir = lambda self, dir, relative_dir, source: GpickEnvironment.InstallPermAutoDir(self, dir, relative_dir, source, 0644) + InstallProgram = lambda self, dir, source: GpickEnvironment.InstallPerm(self, dir, source, 0o0755) + InstallData = lambda self, dir, source: GpickEnvironment.InstallPerm(self, dir, source, 0o0644) + InstallDataAutoDir = lambda self, dir, relative_dir, source: GpickEnvironment.InstallPermAutoDir(self, dir, relative_dir, source, 0o0644) def GetSourceFiles(self, dir_exclude_pattern, file_exclude_pattern): dir_exclude_prog = re.compile(dir_exclude_pattern) Index: gpick_0.2.5/source/SConscript =================================================================== --- gpick_0.2.5.orig/source/SConscript +++ gpick_0.2.5/source/SConscript @@ -47,7 +47,7 @@ if local_env['BUILD_TARGET'] == 'win32': else: local_env.Append(LINKFLAGS = ['/SUBSYSTEM:WINDOWS', '/ENTRY:mainCRTStartup'], CPPDEFINES = ['XML_STATIC']) objects.append(SConscript(['winres/SConscript'], exports='env')) -elif local_env['BUILD_TARGET'] == 'linux2': +elif local_env['BUILD_TARGET'] == 'linux2' or local_env['BUILD_TARGET'] == 'linux': local_env.Append(LIBS=['rt', 'expat']) executable = local_env.Program(
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor