Revert "egl: put full path to libEGL_mesa.so in GLVND json"
authorEric Engestrom <eric@engestrom.ch>
Wed, 5 Feb 2020 22:58:23 +0000 (22:58 +0000)
committerMarge Bot <eric+marge@anholt.net>
Thu, 6 Feb 2020 00:19:13 +0000 (00:19 +0000)
This reverts commit 0021f7dc307f4852955359adb5ac2b7667e6d4ac.

That commit had 2 issues:
- I missed the `.0` from the filename, causing issues on Debian & Ubuntu
  platforms.
- I didn't think about multilib/multi-arch systems, where we'd now need
  a separate json for each arch as they point to different libs.

Reverting this commit for now, I'll try again later.

Requested-by: Michel Dänzer <michel@daenzer.net>
Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2466
Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2471
Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2480
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3726>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3726>

src/egl/glvnd_icd.py [deleted file]
src/egl/main/50_mesa.json [new file with mode: 0644]
src/egl/meson.build

diff --git a/src/egl/glvnd_icd.py b/src/egl/glvnd_icd.py
deleted file mode 100644 (file)
index 3985087..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-# Copyright 2019 Intel Corporation
-# SPDX-License-Identifier: MIT
-
-import argparse
-import json
-import os.path
-
-if __name__ == '__main__':
-    parser = argparse.ArgumentParser()
-    parser.add_argument('--out', help='Output json file.', required=True)
-    parser.add_argument('--lib-path', help='Path to libEGL_mesa.so', required=True)
-    args = parser.parse_args()
-
-    path = os.path.join(args.lib_path, 'libEGL_mesa.so')
-
-    json_data = {
-        'file_format_version': '1.0.0',
-        'ICD': {
-            'library_path': path,
-        },
-    }
-
-    with open(args.out, 'w') as f:
-        json.dump(json_data, f, indent=4, sort_keys=True, separators=(',', ': '))
diff --git a/src/egl/main/50_mesa.json b/src/egl/main/50_mesa.json
new file mode 100644 (file)
index 0000000..8aaaa10
--- /dev/null
@@ -0,0 +1,6 @@
+{
+    "file_format_version" : "1.0.0",
+    "ICD" : {
+        "library_path" : "libEGL_mesa.so.0"
+    }
+}
index db34453ee9b21c9c772f27326f753e29e1876040..12d74ec37faacbb4c53e4ddcb9c0d21d28bd4551 100644 (file)
@@ -152,18 +152,8 @@ else
   deps_for_egl += dep_glvnd
   files_egl += [g_egldispatchstubs_h, g_egldispatchstubs_c]
   files_egl += files('main/eglglvnd.c', 'main/egldispatchstubs.c')
-
-  egl_icd = custom_target(
-    'glvnd_icd',
-    input : 'glvnd_icd.py',
-    output : '50_mesa.json',
-    command : [
-      prog_python, '@INPUT@',
-      '--lib-path', join_paths(get_option('prefix'), get_option('libdir')),
-      '--out', '@OUTPUT@',
-    ],
-    build_by_default : true,
-    install : true,
+  install_data(
+    'main/50_mesa.json',
     install_dir : join_paths(get_option('datadir'), 'glvnd', 'egl_vendor.d')
   )
 endif