diff options
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 31 |
1 files changed, 28 insertions, 3 deletions
@@ -6,6 +6,8 @@ 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') @@ -20,6 +22,15 @@ sha256sums=('d42d3ceceb4d6a65e32e90a5336e3d446db612c3fbd9ebc1780bc6c9a03346a6' _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 @@ -39,9 +50,15 @@ prepare() { # file will be copied to $srcdir and used during # build. # - # After this test, config.def.h is copied from $srcdir to $BUILDDIR to - # provide an up to date template for the user. - if [ -e "$BUILDDIR/config.h" ] + # 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" ] @@ -56,6 +73,14 @@ prepare() { } build() { + if [ ${#_patch_list_url[@]} -ne 0 ]; + then + for i in "${_patch_list_url[@]}"; + do + # Filter URL to get base name of patch + patch --directory="$_sourcedir" -p1 -i $startdir/${i##*/}; + done + fi make $_makeopts X11INC=/usr/include/X11 X11LIB=/usr/lib/X11 } |