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

Base glib's introspection data on TERMUX_FORCE_BUILD_DEPENDENCIES #20081

Closed
wants to merge 2 commits into from
Closed
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
21 changes: 15 additions & 6 deletions packages/glib/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ TERMUX_PKG_BREAKS="glib-dev"
TERMUX_PKG_REPLACES="glib-dev"
TERMUX_PKG_DISABLE_GIR=false
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
-Dintrospection=enabled
-Druntime_dir=$TERMUX_PREFIX/var/run
-Dlibmount=disabled
-Dman-pages=enabled
Expand Down Expand Up @@ -69,8 +68,14 @@ termux_step_pre_configure() {

TERMUX_PKG_VERSION=. termux_setup_gir

# Workaround: Remove cyclic dependency between gir and glib
sed -i "/Requires:/d" "${TERMUX_PREFIX}/lib/pkgconfig/gobject-introspection-1.0.pc"
if [ "${TERMUX_FORCE_BUILD_DEPENDENCIES}" = "true" ]; then
TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" -Dintrospection=disabled"
else
TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" -Dintrospection=enabled"

# Workaround: Remove cyclic dependency between gir and glib
sed -i "/Requires:/d" "${TERMUX_PREFIX}/lib/pkgconfig/gobject-introspection-1.0.pc"
fi
}

termux_step_post_make_install() {
Expand All @@ -82,12 +87,16 @@ termux_step_post_make_install() {
> "${TERMUX_PREFIX}/opt/glib/cross/lib/x86_64-linux-gnu/pkgconfig/${pc}"
done

# Workaround: Restore deleted line in pre-configure step
echo "Requires: glib-2.0 gobject-2.0" >> "${TERMUX_PREFIX}/lib/pkgconfig/gobject-introspection-1.0.pc"
if [ "${TERMUX_FORCE_BUILD_DEPENDENCIES}" = "false" ]; then
# Workaround: Restore deleted line in pre-configure step
echo "Requires: glib-2.0 gobject-2.0" >> "${TERMUX_PREFIX}/lib/pkgconfig/gobject-introspection-1.0.pc"
fi
}

termux_step_post_massage() {
rm -v lib/pkgconfig/gobject-introspection-1.0.pc
if [ "${TERMUX_FORCE_BUILD_DEPENDENCIES}" = "false" ]; then
rm -v lib/pkgconfig/gobject-introspection-1.0.pc
fi
}

termux_step_create_debscripts() {
Expand Down