[gegl] build: fix lua build on msys2/mingw - msys2/mingw does not like symlinked source files so create cop
- From: Øyvind "pippin" Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] build: fix lua build on msys2/mingw - msys2/mingw does not like symlinked source files so create cop
- Date: Thu, 18 Feb 2021 18:02:41 +0000 (UTC)
commit 71b2cfa8c52db3a6dfb13980114b7c2536302e56
Author: John Marshall <jtm home gmail com>
Date: Tue Feb 9 11:18:03 2021 +0000
build: fix lua build on msys2/mingw
- msys2/mingw does not like symlinked source files so create copies
bin/lua/meson.build | 25 ++++++++++++++++++++++---
bin/meson.build | 3 ++-
2 files changed, 24 insertions(+), 4 deletions(-)
---
diff --git a/bin/lua/meson.build b/bin/lua/meson.build
index 8f067f1cb..38dc98e91 100644
--- a/bin/lua/meson.build
+++ b/bin/lua/meson.build
@@ -1,15 +1,13 @@
+
lua_files = files(
'cairo_h.lua',
'cairo.lua',
'gegl_box-blur.lua',
'gegl_c2g.lua',
- 'gegl_crop.lua',
'gegl_edge-neon.lua',
- 'gegl_fill-path.lua',
'gegl_gaussian-blur.lua',
'gegl_linear-gradient.lua',
'gegl_median-blur.lua',
- 'gegl_radial-gradient.lua',
'gegl_rectangle.lua',
'gegl_rotate.lua',
'gegl_snn-mean.lua',
@@ -25,6 +23,27 @@ lua_files = files(
'viewer.lua',
)
+lua_symlink_files = {
+ 'gegl_crop.lua' : 'gegl_rectangle.lua',
+ 'gegl_fill-path.lua' : 'gegl_vector-stroke.lua',
+ 'gegl_radial-gradient.lua' : 'gegl_linear-gradient.lua',
+}
+# Windows doesn't like *nix symlinks so we check if the symlinked lua
+# files are valid and if not copy the original to the build dir in place
+# of the symlink
+fs=import('fs')
+foreach _link, _file : lua_symlink_files
+ if fs.is_symlink(_link)
+ lua_files += _link
+ else
+ lua_files += configure_file(
+ input: _file,
+ output: _link,
+ copy: true,
+ )
+ endif
+endforeach
+
if lua.found()
install_data(
lua_files,
diff --git a/bin/meson.build b/bin/meson.build
index 4daf6cb49..36e58f377 100644
--- a/bin/meson.build
+++ b/bin/meson.build
@@ -1,4 +1,5 @@
-subdir('lua')
+
+subdir('lua', if_found: lua)
gegl_sources = files(
'gegl-options.c',
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]