Closed johndebia2022 closed 1 week ago
termux_setup_pkg_config_wrapper() {
local _PKG_CONFIG_LIBDIR=$1
local _WRAPPER_BIN="${TERMUX_PKG_BUILDDIR}/_wrapper/bin"
mkdir -p "${_WRAPPER_BIN}"
if [[ "${TERMUX_ON_DEVICE_BUILD}" == "false" ]]; then
sed "s|^export PKG_CONFIG_LIBDIR=|export PKG_CONFIG_LIBDIR=${_PKG_CONFIG_LIBDIR}:|" \
"${TERMUX_STANDALONE_TOOLCHAIN}/bin/pkg-config" \
> "${_WRAPPER_BIN}/pkg-config"
chmod +x "${_WRAPPER_BIN}/pkg-config"
export PKG_CONFIG="${_WRAPPER_BIN}/pkg-config"
fi
export PATH="${_WRAPPER_BIN}:${PATH}"
}
termux_setup_glib_cross_pkg_config_wrapper() {
termux_setup_pkg_config_wrapper "${TERMUX_PREFIX}/opt/glib/cross/lib/x86_64-linux-gnu/pkgconfig"
}
termux_setup_wayland_cross_pkg_config_wrapper() {
termux_setup_pkg_config_wrapper "${TERMUX_PREFIX}/opt/libwayland/cross/lib/x86_64-linux-gnu/pkgconfig"
}
Both of you are gonna need to elaborate. What's the issue here?
Same method is called causing recursion:
termux_setup_wayland_cross_pkg_config_wrapper() {
termux_setup_wayland_cross_pkg_config_wrapper
}
The termux_setup_wayland_cross_pkg_config_wrapper
function seems to call itself in the shell script.
Okay I see now. https://github.com/termux/termux-packages/blob/52bd744bcb9ea9901ccb68e10de181dc18e4e3ef/scripts/build/setup/termux_setup_pkg_config_wrapper.sh#L19-L21 That is gonna be a problem.
@twaik you'll want to fix that.
We both changed the title at same time :slightly_smiling_face:
Jinx
Don't be Push trigger happy
Currently I can not fix it. Can someone please switch lines between these 2 and commit? https://github.com/termux/termux-packages/blob/a338cd8a4f366a0eb4090ac3db915ef6d170527d/packages/vulkan-tools/build.sh#L25 and https://github.com/termux/termux-packages/blob/52bd744bcb9ea9901ccb68e10de181dc18e4e3ef/scripts/build/setup/termux_setup_pkg_config_wrapper.sh#L20
Seems like geany switched tab after replacing all occurrences of termux_setup_pkg_config_wrapper "${TERMUX_PREFIX}/opt/libwayland/cross/lib/x86_64-linux-gnu/pkgconfig
with termux_setup_wayland_cross_pkg_config_wrapper
and I replaced it back in wrong place.
Seems like geany switched tab after replacing all occurrences of
termux_setup_pkg_config_wrapper "${TERMUX_PREFIX}/opt/libwayland/cross/lib/x86_64-linux-gnu/pkgconfig
withtermux_setup_wayland_cross_pkg_config_wrapper
and I replaced it back in wrong place.
It happens.
A PR and review would have caught this before it ends up on master
, but we'll just fix it now.
Currently I can not fix it. Can someone please switch lines between these 2 and commit?
This one is also missing an ending "
.
https://github.com/termux/termux-packages/blob/52bd744bcb9ea9901ccb68e10de181dc18e4e3ef/scripts/build/setup/termux_setup_pkg_config_wrapper.sh#L20