# Maintainer: Jose Riha <jose1711 gmail com>
# Maintainer: Sebastian J. Bronner <waschtl@sbronner.com>
# Contributor: Patrick Jackson <PatrickSJackson gmail com>
# Contributor: Christoph Vigano <mail@cvigano.de>
pkgname=st
pkgver=0.8.4
pkgrel=1
_patch_list_url=(https://st.suckless.org/patches/boxdraw/st-boxdraw_v2-0.8.3.diff
https://st.suckless.org/patches/ligatures/0.8.3/st-ligatures-boxdraw-20200430-0.8.3.diff)
pkgdesc='A simple virtual terminal emulator for X.'
arch=('i686' 'x86_64' 'armv7h')
license=('MIT')
depends=(libxft)
url=https://st.suckless.org
source=(https://dl.suckless.org/$pkgname/$pkgname-$pkgver.tar.gz
terminfo.patch
README.terminfo.rst)
sha256sums=('d42d3ceceb4d6a65e32e90a5336e3d446db612c3fbd9ebc1780bc6c9a03346a6'
'f9deea445a5c6203a0e8e699f3c3b55e27275f17fb408562c4dd5d649edeea23'
'0ebcbba881832adf9c98ce9fe7667c851d3cc3345077cb8ebe32702698665be2')
_sourcedir=$pkgname-$pkgver
_makeopts="--directory=$_sourcedir"
if [ ${#_patch_list_url[@]} -ne 0 ];
then
# Add content of _patch_list_url to source array
for i in "${_patch_list_url[@]}";
do
source+=("$i");
sha256sums+=("SKIP");
done
fi
prepare() {
patch --directory="$_sourcedir" --strip=0 < terminfo.patch
# This package provides a mechanism to provide a custom config.h. Multiple
# configuration states are determined by the presence of two files in
# $BUILDDIR:
#
# config.h config.def.h state
# ======== ============ =====
# absent absent Initial state. The user receives a message on how
# to configure this package.
# absent present The user was previously made aware of the
# configuration options and has not made any
# configuration changes. The package is built using
# default values.
# present The user has supplied his or her configuration. The
# file will be copied to $srcdir and used during
# build.
#
# After this test, config.def.h is copied from $srcdir to provide an up to
# date template for the user. If neither file was present initially, further
# build steps are aborted at this point. Even if no config.h is provided,
# future runs will proceed with default values due to the presence of
# config.def.h.
if [ -e "config.h" ]
then
cp "config.h" "$_makedir"
elif [ -e "$BUILDDIR/config.h" ]
then
cp "$BUILDDIR/config.h" "$_sourcedir"
elif [ ! -e "$BUILDDIR/config.def.h" ]
then
msg='This package can be configured in config.h. Copy the config.def.h '
msg+='that was just placed into the package directory to config.h and '
msg+='modify it to change the configuration. Or just leave it alone to '
msg+='continue to use default values.'
warning "$msg"
fi
cp "$_sourcedir/config.def.h" "$BUILDDIR"
}
build() {
if [ ${#_patch_list_url[@]} -ne