Skip to content

Commit d71b2b7

Browse files
committed
bump(x11/epiphany): 49.1
- Fixes #26272 - Partially reverts #26493 - Implement `termux_setup_bpc` and share it between `gnome-caluclator` and `epiphany`. In #26493, I suggested similar code, but unfortunately, at that time Biswa96 didn't like it and decided to edit `setup-ubuntu.sh`. However, unfortunately, that method did not work sufficiently for `epiphany`, so it is necessary to ensure that the `blueprint-compiler` version while cross-compiling matches the version while non-cross-compiling.
1 parent 0216fa4 commit d71b2b7

File tree

5 files changed

+66
-8
lines changed

5 files changed

+66
-8
lines changed

build-package.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,10 @@ source "$TERMUX_SCRIPTDIR/scripts/build/termux_download.sh"
7676
# shellcheck source=scripts/build/setup/termux_setup_proot.sh
7777
source "$TERMUX_SCRIPTDIR/scripts/build/setup/termux_setup_proot.sh"
7878

79+
# Utility function to setup blueprint-compiler (may be used by gnome-calculator and epiphany).
80+
# shellcheck source=scripts/build/setup/termux_setup_bpc.sh.
81+
source "$TERMUX_SCRIPTDIR/scripts/build/setup/termux_setup_bpc.sh"
82+
7983
# Installing packages if necessary for the full operation of CGCT.
8084
# shellcheck source=scripts/build/termux_step_setup_cgct_environment.sh
8185
source "$TERMUX_SCRIPTDIR/scripts/build/termux_step_setup_cgct_environment.sh"
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
termux_setup_bpc() {
2+
local _BPC_BUILD_SH="$TERMUX_SCRIPTDIR/packages/blueprint-compiler/build.sh"
3+
local _BPC_VERSION=$(bash -c ". $_BPC_BUILD_SH; echo \${TERMUX_PKG_VERSION#*:}")
4+
local _BPC_SRCURL=$(bash -c ". $_BPC_BUILD_SH; echo \${TERMUX_PKG_SRCURL}")
5+
local _BPC_SHA256=$(bash -c ". $_BPC_BUILD_SH; echo \${TERMUX_PKG_SHA256}")
6+
local _BPC_SRCARCHIVE="${TERMUX_PKG_TMPDIR}/bpc-${_BPC_VERSION}.tar.gz"
7+
local _BPC_SRCDIR="${TERMUX_PKG_TMPDIR}/bpc-${_BPC_VERSION}"
8+
local _BPC_FOLDER
9+
10+
if [[ "$TERMUX_ON_DEVICE_BUILD" == "true" ]]; then
11+
if ([ ! -e "$TERMUX_BUILT_PACKAGES_DIRECTORY/blueprint-compiler" ] ||
12+
[ "$(cat "$TERMUX_BUILT_PACKAGES_DIRECTORY/blueprint-compiler")" != "$_BPC_VERSION" ]) &&
13+
([[ "$TERMUX_APP_PACKAGE_MANAGER" = "apt" && "$(dpkg-query -W -f '${db:Status-Status}\n' blueprint-compiler 2>/dev/null)" != "installed" ]] ||
14+
[[ "$TERMUX_APP_PACKAGE_MANAGER" = "pacman" && ! "$(pacman -Q blueprint-compiler 2>/dev/null)" ]]); then
15+
echo "Package 'blueprint-compiler' is not installed."
16+
echo "You can install it with"
17+
echo
18+
echo " pkg install blueprint-compiler"
19+
echo
20+
echo " pacman -S blueprint-compiler"
21+
echo
22+
echo "or build it from source with"
23+
echo
24+
echo " ./build-package.sh blueprint-compiler"
25+
echo
26+
exit 1
27+
fi
28+
return
29+
fi
30+
31+
if [ "${TERMUX_PACKAGES_OFFLINE-false}" = "true" ]; then
32+
_BPC_FOLDER="${TERMUX_SCRIPTDIR}/build-tools/bpc-${_BPC_VERSION}"
33+
else
34+
_BPC_FOLDER="${TERMUX_COMMON_CACHEDIR}/bpc-${_BPC_VERSION}"
35+
fi
36+
37+
if [ ! -d "$_BPC_FOLDER" ]; then
38+
(
39+
termux_download "$_BPC_SRCURL" "$_BPC_SRCARCHIVE" "$_BPC_SHA256"
40+
41+
rm -Rf "$_BPC_SRCDIR"
42+
mkdir -p "$_BPC_SRCDIR/build"
43+
tar -xf "$_BPC_SRCARCHIVE" --strip-components=1 -C "$_BPC_SRCDIR"
44+
# termux_setup_meson for hostbuilds copied from glib package
45+
AR=;CC=;CFLAGS=;CPPFLAGS=;CXX=;CXXFLAGS=;LD=;LDFLAGS=;PKG_CONFIG=;STRIP=
46+
termux_setup_meson
47+
unset AR CC CFLAGS CPPFLAGS CXX CXXFLAGS LD LDFLAGS PKG_CONFIG STRIP
48+
${TERMUX_MESON} setup "$_BPC_SRCDIR" "$_BPC_SRCDIR/build" --prefix "$_BPC_FOLDER"
49+
ninja -C "$_BPC_SRCDIR/build" -j "$TERMUX_PKG_MAKE_PROCESSES"
50+
ninja -C "$_BPC_SRCDIR/build" install
51+
)
52+
fi
53+
54+
export PATH="$_BPC_FOLDER/bin:$PATH"
55+
export GI_TYPELIB_PATH="$TERMUX_PREFIX/lib/girepository-1.0"
56+
}

scripts/setup-ubuntu.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,6 @@ PACKAGES+=" libunistring-dev"
208208

209209
# Needed by packages in X11 repository.
210210
PACKAGES+=" alex"
211-
PACKAGES+=" blueprint-compiler"
212211
PACKAGES+=" docbook-xsl-ns"
213212
PACKAGES+=" gnome-common"
214213
PACKAGES+=" gobject-introspection"

x11-packages/epiphany/build.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@ TERMUX_PKG_HOMEPAGE=https://wiki.gnome.org/Apps/Web
22
TERMUX_PKG_DESCRIPTION="A GNOME web browser based on the WebKit rendering engine"
33
TERMUX_PKG_LICENSE="GPL-3.0"
44
TERMUX_PKG_MAINTAINER="@termux"
5-
TERMUX_PKG_VERSION="48.5"
6-
TERMUX_PKG_REVISION=1
5+
TERMUX_PKG_VERSION="49.1"
76
TERMUX_PKG_SRCURL=https://download.gnome.org/sources/epiphany/${TERMUX_PKG_VERSION%%.*}/epiphany-${TERMUX_PKG_VERSION}.tar.xz
8-
TERMUX_PKG_SHA256=0f66552ad6593c7952a3ddee5bf515656c8c434871076d9f1a91a7af9346b1b4
7+
TERMUX_PKG_SHA256=d767c5cbb9e2566bc9903d411b6896161e343f712aa33305365739d8dedac521
98
TERMUX_PKG_AUTO_UPDATE=true
109
TERMUX_PKG_DEPENDS="adwaita-icon-theme, gcr4, gdk-pixbuf, glib, graphene, gsettings-desktop-schemas, gstreamer, gtk4, iso-codes, json-glib, libadwaita, libarchive, libcairo, libgmp, libnettle, libportal-gtk4, libsecret, libsoup3, libsqlite, libxml2, pango, webkitgtk-6.0"
11-
TERMUX_PKG_BUILD_DEPENDS="glib-cross"
10+
TERMUX_PKG_BUILD_DEPENDS="blueprint-compiler, glib-cross"
1211
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
1312
-Dunit_tests=disabled
1413
"
1514

1615
termux_step_pre_configure() {
1716
termux_setup_glib_cross_pkg_config_wrapper
17+
termux_setup_bpc
1818
}

x11-packages/gnome-calculator/build.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ TERMUX_PKG_DESCRIPTION="GNOME Scientific calculator"
33
TERMUX_PKG_LICENSE="GPL-3.0"
44
TERMUX_PKG_MAINTAINER="@termux"
55
TERMUX_PKG_VERSION="49.1"
6+
TERMUX_PKG_REVISION=1
67
TERMUX_PKG_SRCURL=https://download.gnome.org/sources/gnome-calculator/${TERMUX_PKG_VERSION%%.*}/gnome-calculator-${TERMUX_PKG_VERSION}.tar.xz
78
TERMUX_PKG_SHA256=5da02b87d913c3d72cb606afbbfb308479cde48dc4e1a1d54c049a1e86ca607e
89
TERMUX_PKG_DISABLE_GIR=false
@@ -14,7 +15,5 @@ TERMUX_PKG_RECOMMENDS="gnome-calculator-help"
1415
termux_step_pre_configure() {
1516
termux_setup_gir
1617
termux_setup_glib_cross_pkg_config_wrapper
17-
18-
# for blueprint-compiler
19-
export GI_TYPELIB_PATH="$TERMUX_PREFIX"/lib/girepository-1.0
18+
termux_setup_bpc
2019
}

0 commit comments

Comments
 (0)