Skip to content

Commit 85443db

Browse files
committed
revbump(main/w3m): switch to maintained fork
1 parent a6e952b commit 85443db

5 files changed

Lines changed: 28 additions & 73 deletions

File tree

packages/w3m/Makefile.in.patch

Lines changed: 0 additions & 14 deletions
This file was deleted.

packages/w3m/Str.h.patch

Lines changed: 0 additions & 11 deletions
This file was deleted.

packages/w3m/build.sh

Lines changed: 28 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,18 @@
1-
TERMUX_PKG_HOMEPAGE=https://w3m.sourceforge.net/
1+
TERMUX_PKG_HOMEPAGE=https://git.sr.ht/~rkta/w3m
22
TERMUX_PKG_DESCRIPTION="Text based Web browser and pager"
33
TERMUX_PKG_LICENSE="MIT"
44
TERMUX_PKG_MAINTAINER="@termux"
5-
_MAJOR_VERSION=0.5.3
6-
_MINOR_VERSION=20230121
75
TERMUX_PKG_VERSION="0.5.6"
8-
# The upstream w3m project is dead, but every linux distribution uses
9-
# this maintained fork in debian:
10-
TERMUX_PKG_SRCURL=https://github.com/tats/w3m/archive/refs/tags/v${_MAJOR_VERSION}+git${_MINOR_VERSION}.tar.gz
11-
TERMUX_PKG_SHA256=fdc7d55d3c0104db26aa9759db34f37e5eee03f44c868796e3bbfb8935c96e39
6+
TERMUX_PKG_REVISION=1
7+
# The upstream w3m project is dead, this is the fork shipped by e.g. Arch Linux.
8+
TERMUX_PKG_SRCURL="https://git.sr.ht/~rkta/w3m/archive/v$TERMUX_PKG_VERSION.tar.gz"
9+
TERMUX_PKG_SHA256=8dd652cd3f31817d68c7263c34eeffb50118c80be19e1159bf8cbf763037095e
1210
TERMUX_PKG_AUTO_UPDATE=true
13-
TERMUX_PKG_UPDATE_METHOD=repology
1411
TERMUX_PKG_BUILD_IN_SRC=true
12+
TERMUX_PKG_BUILD_DEPENDS="imlib2, libsixel"
1513
TERMUX_PKG_DEPENDS="libgc, ncurses, openssl, zlib"
16-
TERMUX_PKG_SUGGESTS="libsixel, perl"
14+
TERMUX_PKG_SUGGESTS="imlib2, libsixel, perl"
15+
TERMUX_PKG_HOSTBUILD=true
1716

1817
# ac_cv_func_bcopy=yes to avoid w3m defining it's own bcopy function, which
1918
# breaks 64-bit builds where NDK headers define bcopy as a macro:
@@ -27,5 +26,23 @@ TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" --with-editor=editor"
2726
# w3mimgdisplay is in w3m-img subpackage.
2827
TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" --enable-image=x11 --with-imagelib=imlib2"
2928

30-
# For Makefile.in.patch:
31-
export TERMUX_PKG_BUILDER_DIR
29+
termux_step_pre_configure() {
30+
# Remove this marker all the time, as this package is architecture-specific
31+
rm -rf "$TERMUX_HOSTBUILD_MARKER"
32+
}
33+
34+
termux_step_host_build() {
35+
if [[ "$TERMUX_ON_DEVICE_BUILD" == "true" ]]; then
36+
return
37+
fi
38+
39+
{ # mute the build for debugging.
40+
"$TERMUX_PKG_SRCDIR/configure"
41+
make -j "$TERMUX_PKG_MAKE_PROCESSES"
42+
} &>/dev/null
43+
44+
# stop make from recompiling mktable
45+
sed -i -e 's|mktable.*:.*|mktable:|' "$TERMUX_PKG_SRCDIR/Makefile.in"
46+
# use the host-built `mktable`
47+
ln -v -sft "$TERMUX_PKG_SRCDIR" "$PWD/mktable"
48+
}

packages/w3m/configure.patch

Lines changed: 0 additions & 28 deletions
This file was deleted.

packages/w3m/gc.h

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)