From 698d631742fb43eaaa147f1087a7f57cd6251305 Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Tue, 10 Dec 2024 13:55:20 +0300 Subject: [PATCH] scripts: waifulib: sdl2: avoid abspath usage that causes problems when the path is concatenated with something else --- scripts/waifulib/sdl2.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/waifulib/sdl2.py b/scripts/waifulib/sdl2.py index 9a9b79bbb3..a9aa0bcc7f 100644 --- a/scripts/waifulib/sdl2.py +++ b/scripts/waifulib/sdl2.py @@ -41,14 +41,14 @@ def sdl2_configure_path(conf, path, libname): conf.env[HAVE] = 1 if conf.env.DEST_OS == 'darwin': - conf.env[INCLUDES] = [os.path.abspath(os.path.join(path, 'Headers'))] + conf.env[INCLUDES] = [os.path.join(path, 'Headers')] conf.env[FRAMEWORKPATH] = [my_dirname(path)] conf.env[FRAMEWORK] = [libname] conf.end_msg('yes: {0}, {1}, {2}'.format(conf.env[FRAMEWORK], conf.env[FRAMEWORKPATH], conf.env[INCLUDES])) else: conf.env[INCLUDES] = [ - os.path.abspath(os.path.join(path, 'include')), - os.path.abspath(os.path.join(path, 'include/%s' % libname)) + os.path.join(path, 'include'), + os.path.join(path, 'include/%s' % libname) ] libpath = 'lib' if conf.env.COMPILER_CC == 'msvc': @@ -56,7 +56,7 @@ def sdl2_configure_path(conf, path, libname): libpath = 'lib/x64' else: libpath = 'lib/' + conf.env.DEST_CPU - conf.env[LIBPATH] = [os.path.abspath(os.path.join(path, libpath))] + conf.env[LIBPATH] = [os.path.join(path, libpath)] conf.env[LIB] = [libname] conf.end_msg('yes: {0}, {1}, {2}'.format(conf.env[LIB], conf.env[LIBPATH], conf.env[INCLUDES]))