Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gobject-introspection: Improvements to the run-wrapper #324

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions bootstrap.d/dev-libs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ tools:
- host-pkg-config
- virtual: pkgconfig-for-host
program_name: host-pkg-config
revision: 2
revision: 3
configure:
- args:
- 'meson'
Expand Down Expand Up @@ -441,7 +441,7 @@ packages:
- cairo
- pcre2
- python
revision: 2
revision: 3
configure:
- args:
- 'meson'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
From 4e30153d4e58f67d3cb040a75afa37cdc57cba33 Mon Sep 17 00:00:00 2001
From 1ab8ee07642cef80eecff3c546163e3190340468 Mon Sep 17 00:00:00 2001
From: Dennis Bonke <[email protected]>
Date: Fri, 4 Feb 2022 02:24:50 +0100
Subject: [PATCH] Disable tests as they are broken
Subject: [PATCH 1/3] Disable tests as they are broken

Signed-off-by: Dennis Bonke <[email protected]>
---
meson.build | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/meson.build b/meson.build
index bb4873e0..83931a4a 100644
index d6c2301..036877b 100644
--- a/meson.build
+++ b/meson.build
@@ -234,9 +234,9 @@ subdir('docs')
@@ -239,9 +239,9 @@ subdir('docs')

# The tests will also run, which is not possible if they
# were built for a different architecture.
Expand All @@ -26,5 +26,5 @@ index bb4873e0..83931a4a 100644
install_data('Makefile.introspection', install_dir: join_paths(get_option('datadir'), 'gobject-introspection-1.0'))
install_data('m4/introspection.m4', install_dir: join_paths(get_option('datadir'), 'aclocal'))
--
2.34.1
2.43.0

Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
From 32cf1a4dcc4147b5c08c894814d383fecf69eded Mon Sep 17 00:00:00 2001
From 7f53238a916b6c7e559801f7b79618b4b9094554 Mon Sep 17 00:00:00 2001
From: 48cf <[email protected]>
Date: Tue, 23 Jan 2024 23:03:49 +0100
Subject: [PATCH] Add support for GI_LDD_WRAPPER environment variable
Subject: [PATCH 2/3] Add support for GI_LDD_WRAPPER environment variable

Signed-off-by: Dennis Bonke <[email protected]>
---
giscanner/shlibs.py | 3 +++
1 file changed, 3 insertions(+)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
From 27714a44d2addfaaf0787fc9d3236978a11aa567 Mon Sep 17 00:00:00 2001
From: Dennis Bonke <[email protected]>
Date: Tue, 2 Apr 2024 22:44:30 +0200
Subject: [PATCH 3/3] m4: Take the scanner, compiler and generator from the
environment

Signed-off-by: Dennis Bonke <[email protected]>
---
m4/introspection.m4 | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/m4/introspection.m4 b/m4/introspection.m4
index b0ccd68..400121b 100644
--- a/m4/introspection.m4
+++ b/m4/introspection.m4
@@ -102,9 +102,9 @@ m4_define([_GOBJECT_INTROSPECTION_CHECK_INTERNAL],
INTROSPECTION_GIRDIR=
INTROSPECTION_TYPELIBDIR=
if test "x$found_introspection" = "xyes"; then
- INTROSPECTION_SCANNER=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0`
- INTROSPECTION_COMPILER=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0`
- INTROSPECTION_GENERATE=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0`
+ INTROSPECTION_SCANNER=$INTROSPECTION_SCANNER_ENV
+ INTROSPECTION_COMPILER=$INTROSPECTION_COMPILER_ENV
+ INTROSPECTION_GENERATE=$INTROSPECTION_GENERATE_ENV
INTROSPECTION_GIRDIR=`$PKG_CONFIG --define-variable=datadir="${_GI_EXP_DATADIR}" --variable=girdir gobject-introspection-1.0`
INTROSPECTION_TYPELIBDIR="$($PKG_CONFIG --define-variable=libdir="${_GI_EXP_LIBDIR}" --variable=typelibdir gobject-introspection-1.0)"
INTROSPECTION_CFLAGS=`$PKG_CONFIG --cflags gobject-introspection-1.0`
--
2.43.0

19 changes: 13 additions & 6 deletions scripts/run-wrapper
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,21 @@
unset LD_LIBRARY_PATH

_path="$1"
_runwrapper="$(realpath "$0")"
shift 1

if patchelf --print-interpreter "${_path}" | grep managarm 2>&1 >/dev/null; then
_temp=$(mktemp)
cp -p "${_path}" "${_temp}"
patchelf --set-interpreter "${RUN_WRAPPER_INTERP}" "${_temp}"
export LD_LIBRARY_PATH="${RUN_WRAPPER_LD_LIBRARY_PATH}"
_path="${_temp}"
if file $_path | grep ELF >/dev/null; then
if patchelf --print-interpreter "${_path}" | grep managarm 2>&1 >/dev/null; then
_temp=$(mktemp)
cp -p "${_path}" "${_temp}"
patchelf --set-interpreter "${RUN_WRAPPER_INTERP}" "${_temp}"
export LD_LIBRARY_PATH="${RUN_WRAPPER_LD_LIBRARY_PATH}"
_path="${_temp}"
fi
else
sed -i "/exec /s|exec |exec ${_runwrapper} |" "${_path}"
bash "${_path}" "$@"
exit 0
fi

"${_path}" "$@"
Loading