Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bundled wxWidgets build on OpenSUSE #2685

Merged
merged 1 commit into from
Feb 2, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion buildtools/build_wxwidgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -370,13 +370,19 @@ def main(wxDir, args):
if os.path.exists(frameworkRootDir):
shutil.rmtree(frameworkRootDir)

# Workaround OpenSUSE libdir issue by unsetting CONFIG_SITE envvar
env = None
if "CONFIG_SITE" in os.environ:
env = dict(os.environ)
del env["CONFIG_SITE"]

print("Configure options: " + repr(configure_opts))
wxBuilder = builder.AutoconfBuilder()
if not options.no_config and not options.clean:
olddir = os.getcwd()
if buildDir:
os.chdir(buildDir)
exitIfError(wxBuilder.configure(dir=wxRootDir, options=configure_opts),
exitIfError(wxBuilder.configure(dir=wxRootDir, options=configure_opts, env=env),
"Error running configure")
os.chdir(olddir)

Expand Down
6 changes: 3 additions & 3 deletions buildtools/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ class AutoconfBuilder(GNUMakeBuilder):
def __init__(self, formatName="autoconf"):
GNUMakeBuilder.__init__(self, formatName=formatName)

def configure(self, dir=None, options=None):
def configure(self, dir=None, options=None, env=None):
#olddir = os.getcwd()
#os.chdir(dir)

Expand Down Expand Up @@ -193,9 +193,9 @@ def configure(self, dir=None, options=None):
optionsStr = " ".join(options) if options else ""
command = "%s %s" % (configure_cmd, optionsStr)
print(command)
result = os.system(command)
result = subprocess.run(command, shell=True, env=env)
#os.chdir(olddir)
return result
return result.returncode


class MSVCBuilder(Builder):
Expand Down