Warning, /graphics/krita/3rdparty/ext_fontconfig/0001-Always-find-files-when-using-DESTDIR.patch is written in an unsupported language. File is not indexed.

0001 From b69cd1370d7b18b239c7f36ac6035fddd840f3f7 Mon Sep 17 00:00:00 2001
0002 From: Ivan Yossi <ghevan@gmail.com>
0003 Date: Mon, 17 Apr 2023 15:53:42 -0600
0004 Subject: [PATCH] Always find files when using DESTDIR
0005 
0006 ---
0007  conf.d/link_confs.py | 25 ++++++++++++++++---------
0008  1 file changed, 16 insertions(+), 9 deletions(-)
0009 
0010 diff --git a/conf.d/link_confs.py b/conf.d/link_confs.py
0011 index 03608c6..4e11bc8 100644
0012 --- a/conf.d/link_confs.py
0013 +++ b/conf.d/link_confs.py
0014 @@ -6,6 +6,19 @@ import argparse
0015  import platform
0016  import shutil
0017  
0018 +def fix_path(path):
0019 +    if os.path.isabs(path):
0020 +        destdir = os.environ.get('DESTDIR')
0021 +        if destdir:
0022 +            outpath = os.path.join(destdir, path[1:])
0023 +        else:
0024 +            outpath = path
0025 +    else:
0026 +        outpath = os.path.join(os.environ['MESON_INSTALL_DESTDIR_PREFIX'], path)
0027 +
0028 +    return outpath
0029 +
0030 +
0031  if __name__=='__main__':
0032      parser = argparse.ArgumentParser()
0033      parser.add_argument('availpath')
0034 @@ -13,20 +26,14 @@ if __name__=='__main__':
0035      parser.add_argument('links', nargs='+')
0036      args = parser.parse_args()
0037  
0038 -    if os.path.isabs(args.confpath):
0039 -        destdir = os.environ.get('DESTDIR')
0040 -        if destdir:
0041 -            confpath = os.path.join(destdir, args.confpath[1:])
0042 -        else:
0043 -            confpath = args.confpath
0044 -    else:
0045 -        confpath = os.path.join(os.environ['MESON_INSTALL_DESTDIR_PREFIX'], args.confpath)
0046 +    confpath = fix_path(args.confpath)
0047 +    availpath = fix_path(args.availpath)
0048  
0049      if not os.path.exists(confpath):
0050          os.makedirs(confpath)
0051  
0052      for link in args.links:
0053 -        src = os.path.join(args.availpath, link)
0054 +        src = os.path.join(availpath, link)
0055          dst = os.path.join(confpath, link)
0056          try:
0057              os.remove(dst)
0058 -- 
0059 2.37.1 (Apple Git-137.1)
0060