[BACK]Return to patch-gio_tests_meson.build CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / pkgsrc / devel / glib2 / patches

File: [cvs.NetBSD.org] / pkgsrc / devel / glib2 / patches / patch-gio_tests_meson.build (download)

Revision 1.4, Tue Mar 10 17:30:00 2020 UTC (4 months ago) by minskim
Branch: MAIN
CVS Tags: pkgsrc-2020Q2-base, pkgsrc-2020Q2, pkgsrc-2020Q1-base, pkgsrc-2020Q1, HEAD
Changes since 1.3: +1 -19 lines

devel/glib2: Add the patch deleted in the recent update

The patch sets LD_LIBRARY_PATH so that uninstalled
glib-compile-resources can find libraries. This fixes the following
error during build on Darwin:

[651/1015] Generating plugin-resources.c with a custom command.
FAILED: gio/tests/plugin-resources.c
/Users/pbulk/pkgsrc/work/devel/glib2/work/glib-2.62.4/output/gio/glib-compile-resources --target=gio/tests/plugin-resources.c --sourcedir=/Users/pbulk/pkgsrc/work/devel/glib2/work/glib-2.62.4/gio/tests --generate-source --c-name _g_plugin ../gio/tests/test4.gresource.xml
    dyld: Library not loaded: @rpath/libgio-2.0.0.dylib
      Referenced from: /Users/pbulk/pkgsrc/work/devel/glib2/work/glib-2.62.4/output/gio/glib-compile-resources
      Reason: image not found

$NetBSD: patch-gio_tests_meson.build,v 1.4 2020/03/10 17:30:00 minskim Exp $

Darwin: Set LD_LIBRARY_PATH to run uninstalled executable with @rpath.

--- gio/tests/meson.build.orig	2019-12-19 16:33:15.000000000 +0000
+++ gio/tests/meson.build
@@ -470,7 +470,9 @@ if not meson.is_cross_build() or meson.h
   plugin_resources_c = custom_target('plugin-resources.c',
     input : 'test4.gresource.xml',
     output : 'plugin-resources.c',
-    command : [glib_compile_resources,
+    command : [env_program.path(),
+               'LD_LIBRARY_PATH=gio:glib:gmodule:gobject',
+    	       glib_compile_resources,
                '--target=@OUTPUT@',
                '--sourcedir=' + meson.current_source_dir(),
                '--generate-source',
@@ -494,7 +496,9 @@ if not meson.is_cross_build() or meson.h
   test_gresource = custom_target('test.gresource',
     input : 'test.gresource.xml',
     output : 'test.gresource',
-    command : [glib_compile_resources,
+    command : [env_program.path(),
+               'LD_LIBRARY_PATH=gio:glib:gmodule:gobject',
+    	       glib_compile_resources,
                '--target=@OUTPUT@',
                '--sourcedir=' + meson.current_source_dir(),
                '--sourcedir=' + meson.current_build_dir(),
@@ -505,7 +509,9 @@ if not meson.is_cross_build() or meson.h
   test_resources2_c = custom_target('test_resources2.c',
     input : 'test3.gresource.xml',
     output : 'test_resources2.c',
-    command : [glib_compile_resources,
+    command : [env_program.path(),
+               'LD_LIBRARY_PATH=gio:glib:gmodule:gobject',
+    	       glib_compile_resources,
                '--target=@OUTPUT@',
                '--sourcedir=' + meson.current_source_dir(),
                '--generate',
@@ -516,7 +522,9 @@ if not meson.is_cross_build() or meson.h
   test_resources2_h = custom_target('test_resources2.h',
     input : 'test3.gresource.xml',
     output : 'test_resources2.h',
-    command : [glib_compile_resources,
+    command : [env_program.path(),
+               'LD_LIBRARY_PATH=gio:glib:gmodule:gobject',
+    	       glib_compile_resources,
                '--target=@OUTPUT@',
                '--sourcedir=' + meson.current_source_dir(),
                '--generate',
@@ -528,7 +536,9 @@ if not meson.is_cross_build() or meson.h
     input : 'test2.gresource.xml',
     depends : big_test_resource,
     output : 'test_resources.c',
-    command : [glib_compile_resources,
+    command : [env_program.path(),
+               'LD_LIBRARY_PATH=gio:glib:gmodule:gobject',
+    	       glib_compile_resources,
                '--target=@OUTPUT@',
                '--sourcedir=' + meson.current_source_dir(),
                '--sourcedir=' + meson.current_build_dir(),
@@ -539,7 +549,9 @@ if not meson.is_cross_build() or meson.h
   digit_test_resources_c = custom_target('digit_test_resources.c',
     input : '111_digit_test.gresource.xml',
     output : 'digit_test_resources.c',
-    command : [glib_compile_resources,
+    command : [env_program.path(),
+               'LD_LIBRARY_PATH=gio:glib:gmodule:gobject',
+    	       glib_compile_resources,
                '--target=@OUTPUT@',
                '--sourcedir=' + meson.current_source_dir(),
                '--sourcedir=' + meson.current_build_dir(),
@@ -550,7 +562,9 @@ if not meson.is_cross_build() or meson.h
   digit_test_resources_h = custom_target('digit_test_resources.h',
     input : '111_digit_test.gresource.xml',
     output : 'digit_test_resources.h',
-    command : [glib_compile_resources,
+    command : [env_program.path(),
+               'LD_LIBRARY_PATH=gio:glib:gmodule:gobject',
+    	       glib_compile_resources,
                '--target=@OUTPUT@',
                '--sourcedir=' + meson.current_source_dir(),
                '--generate',