From 3dba45e9014f9d4be34f1906f01206c8ac52fa0a Mon Sep 17 00:00:00 2001
From: Alberto Fanjul <albertofanjul@gmail.com>
Date: Thu, 29 Apr 2021 03:28:12 +0200
Subject: [PATCH 2/2] hard copy symlinks

---
 cursors/meson.build | 11 -----------
 meson/symlink.py    |  5 +++--
 2 files changed, 3 insertions(+), 13 deletions(-)

diff --git a/cursors/meson.build b/cursors/meson.build
index c5bdc858..71de8872 100644
--- a/cursors/meson.build
+++ b/cursors/meson.build
@@ -268,17 +268,6 @@ links += [[
   ]
 ]]
 
-foreach link_entry : links
-    src = link_entry[0]
-    foreach dest : link_entry[1]
-        meson.add_install_script(
-            symlink,
-            '--src', join_paths (cursor_dir, src),
-            '--dest', join_paths (cursor_dir, dest)
-        )
-    endforeach
-endforeach
-
 install_data(
     'cursor.theme',
     install_dir: icon_dir
diff --git a/meson/symlink.py b/meson/symlink.py
index d98fc36b..40091f5f 100644
--- a/meson/symlink.py
+++ b/meson/symlink.py
@@ -2,6 +2,7 @@
 
 import argparse
 import os
+import shutil
 
 parser = argparse.ArgumentParser(description='Create a symlink')
 parser.add_argument('--src', nargs=1)
@@ -11,7 +12,7 @@ args = parser.parse_args()
 inst_prefix = os.environ['MESON_INSTALL_PREFIX']
 dest_prefix = os.environ['MESON_INSTALL_DESTDIR_PREFIX']
 
-src = os.path.basename(os.path.join(inst_prefix, args.src[0]))
+src = os.path.join(dest_prefix, args.src[0])
 dest = os.path.join(dest_prefix, args.dest[0])
 
 if os.path.exists(dest):
@@ -21,4 +22,4 @@ if os.path.exists(dest):
         print('File "' + dest + '" already exists, no symlink will be created')
 else:
     print('Linking ' + dest + ' to ' + src)
-    os.symlink(src, dest)
+    shutil.copytree(src, dest)
-- 
2.30.1

