From 2d331284449f0e081845838021ab7e10e849326a Mon Sep 17 00:00:00 2001 From: Michaƫl Ball Date: Wed, 10 Jun 2020 22:02:51 +0100 Subject: Synth midnight colours --- PKGBUILD | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) (limited to 'PKGBUILD') diff --git a/PKGBUILD b/PKGBUILD index ce8e249..7cc7b37 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -6,6 +6,8 @@ pkgname=st pkgver=0.8.3 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=(939ae3da237e7c9489694853c205c7cbd5f2a2f0c17fe41a07477f1df8e28552 _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 } -- cgit v1.2.3