1- TERMUX_PKG_HOMEPAGE=https://w3m.sourceforge.net/
1+ TERMUX_PKG_HOMEPAGE=https://git.sr.ht/~rkta/w3m
22TERMUX_PKG_DESCRIPTION=" Text based Web browser and pager"
33TERMUX_PKG_LICENSE=" MIT"
44TERMUX_PKG_MAINTAINER=" @termux"
5- _MAJOR_VERSION=0.5.3
6- _MINOR_VERSION=20230121
75TERMUX_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
1210TERMUX_PKG_AUTO_UPDATE=true
13- TERMUX_PKG_UPDATE_METHOD=repology
1411TERMUX_PKG_BUILD_IN_SRC=true
12+ TERMUX_PKG_BUILD_DEPENDS=" imlib2, libsixel"
1513TERMUX_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.
2827TERMUX_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+ }
0 commit comments