diff options
Diffstat (limited to 'community/w3m/APKBUILD')
-rw-r--r-- | community/w3m/APKBUILD | 88 |
1 files changed, 70 insertions, 18 deletions
diff --git a/community/w3m/APKBUILD b/community/w3m/APKBUILD index be6f06a939f..a5b3f733e0f 100644 --- a/community/w3m/APKBUILD +++ b/community/w3m/APKBUILD @@ -1,19 +1,35 @@ # Contributor: ScrumpyJack <scrumpyjack@st.ilet.to> -# Maintainer: ScrumpyJack <scrumpyjack@st.ilet.to> +# Maintainer: Celeste <cielesti@protonmail.com> pkgname=w3m -_pkgver=0.5.3+git20210102 +_pkgver=0.5.3+git20230718 pkgver=${_pkgver/+git/.} -pkgrel=0 +_gitrev=ee66aabc3987000c2851bce6ade4dcbb0b037d81 +pkgrel=1 pkgdesc="text-based web & gopher browser, as well as pager" url="https://github.com/tats/w3m" license="MIT" arch="all" -makedepends="imlib2-dev openssl-dev gc-dev ncurses-dev linux-headers" -subpackages="$pkgname-doc" -source="$pkgname-$pkgver.tar.gz::https://github.com/tats/w3m/archive/v$_pkgver.tar.gz" -builddir="$srcdir/$pkgname-${_pkgver/+/-}" +makedepends=" + gc-dev + imlib2-dev + linux-headers + ncurses-dev + openssl-dev>3 + " +subpackages=" + $pkgname-doc + $pkgname-perl::noarch + $pkgname-image + " +source="$pkgname-$pkgver.tar.gz::https://github.com/tats/w3m/archive/$_gitrev.tar.gz" +builddir="$srcdir/$pkgname-$_gitrev" # secfixes: +# 0.5.3.20230718-r0: +# - CVE-2023-38252 +# - CVE-2023-38253 +# 0.5.3.20230121-r0: +# - CVE-2022-38223 # 0.5.3.20180125-r0: # - CVE-2018-6196 # - CVE-2018-6197 @@ -30,9 +46,10 @@ build() { --disable-help-cgi \ --with-imagelib=imlib2 \ --with-termlib=ncurses \ - --disable-w3mmailer \ - --disable-mouse - make -j1 + --with-editor="/usr/bin/vi" \ + --with-browser="/usr/bin/xdg-open" \ + --disable-w3mmailer + make } check() { @@ -42,14 +59,49 @@ check() { package() { make DESTDIR="$pkgdir" install + # when ./configure has --disable-help-cgi passed, the (H)elp key + # is hardcoded to open "w3mhelp-w3m_en.html", instead of the + # w3mhelp.cgi script. 'make install' has install-scripts as a + # target, but not install-helpfile, probably ./configure doesn't + # get tested with --disable-help-cgi very often. anyway, we have + # to make install-helpfile or else the (H)elp key won't work. + # additionally, the _en & _ja help files have hyperlinks to each + # other, so install both, unless we want to patch the help file + make DESTDIR="$pkgdir" \ + HELP_ALLFILES="w3mhelp-w3m_en.html w3mhelp-w3m_ja.html" \ + install-helpfile - install -d "$pkgdir"/usr/share/doc/"$pkgname" - install -d "$pkgdir"/usr/share/licenses/"$pkgname" - local i; for i in doc/*; do - install -m644 "$i" "$pkgdir"/usr/share/doc/"$pkgname" - done - ln -s /usr/share/doc/"$pkgname"/README \ - "$pkgdir"/usr/share/licenses/"$pkgname" + # the following 3 Perl scripts have dependencies not found in Alpine + # xface2xpm needs uncompface, w3mdict.cgi needs dictionary client + # multipart.cgi needs NKF (Network Kanji code conversion Filter) + rm "$pkgdir"/usr/lib/w3m/xface2xpm + rm "$pkgdir"/usr/lib/w3m/cgi-bin/w3mdict.cgi + rm "$pkgdir"/usr/lib/w3m/cgi-bin/multipart.cgi + # w3mmail.cgi needs cmd:sendmail (which Alpine has pkgs for), but + # removing it because --disable-w3mmailer causes w3m to use an + # external program (default: /usr/bin/mail) to handle mailto: links + rm "$pkgdir"/usr/lib/w3m/cgi-bin/w3mmail.cgi + + install -Dm644 doc/* -t "$pkgdir"/usr/share/doc/$pkgname + install -d "$pkgdir"/usr/share/licenses/$pkgname + ln -s /usr/share/doc/$pkgname/README \ + "$pkgdir"/usr/share/licenses/$pkgname +} + +perl() { + pkgdesc="$pkgdesc (perl helper scripts)" + depends="perl cmd:man" # w3mman needs cmd:man + amove usr/bin/w3mman + amove usr/lib/w3m/cgi-bin/*.cgi + amove usr/share/w3m/*.pl +} + +image() { + pkgdesc="$pkgdesc (inline image support)" + install_if="$pkgname=$pkgver-r$pkgrel imlib2" + amove usr/lib/w3m/w3mimgdisplay } -sha512sums="357eeecf0f63bfd5174c9670533882323879657bdecefd0758d853ca645e368331bfdf91e99c0917f19829e184ce892ecdc99bd865851707d93baccfb4b97632 w3m-0.5.3.20210102.tar.gz" +sha512sums=" +cb023fe0b7ac4f009b7ecdee0134d4bf727b9f58e61b23b832979c27d90dbf7104bafd13d2aea5ecd1190262b103bcc30a1945a7845beb6aeee48751666778d3 w3m-0.5.3.20230718.tar.gz +" |