git » aalib.git » main » tree

[main] / PKGBUILD

# Maintainer: Balló György <ballogyor+arch at gmail dot com>
# Contributor: Eric Bélanger <eric@archlinux.org>

pkgname=aalib
pkgver=1.4rc5
_pkgver=1.4.0
pkgrel=18
pkgdesc='ASCII art graphic library'
arch=('armv7h')
url='https://aa-project.sourceforge.net/aalib/'
license=('LGPL-2.0-or-later')
depends=('glibc'  'libx11' 'ncurses' 'slang')
optdepends=('xorg-fonts-misc: x11 driver'
            'xorg-mkfontscale: x11 driver')
source=("https://downloads.sourceforge.net/aa-project/$pkgname-$pkgver.tar.gz"
        'aclocal-fixes.patch'
        'aalib-m4.patch'
        'aalib-c99.patch'
        'aalib-free-offset-pointer.patch'
        'aalib-aalinuxkbd-return.patch'
        'aalib-key-down-OOB.patch'
        'aalib-opaque-ncurses-fix.patch'
        'aalib-fix-aarender.patch'
        'aalib-mouse.patch')
sha256sums=('fbddda9230cf6ee2a4f5706b4b11e2190ae45f5eda1f0409dc4f99b35e0a70ee'
            'f40742677a3e0d58c99a09da7574635411156586acd22867e71dd46c88088bce'
            '0202545881ec34bd637c04b5896b9b3093609530cc4f85e1d5ffe9a3136d9483'
            'a1b61cfc717a23bd4976f03c80b87a1de641f44c26c8133e248006bcbf6c87ea'
            'f6c63a145f9844d6b9e2dc96fa35616ef86278e8888b1f2fe5ce1d2c6f93f128'
            '28f2e4148b6987974631e2a2d628422ef9de5ba9ff011a84b79255ccbf8d023a'
            '1fbba4b022e2d14981e6595d2eecc8f97f979b25acee4e6871bb415a5bf5da89'
            'da45bd012e0a966ab57158808642441c9c328c9e01a2780e5429f60621f685b5'
            '6695a057a21da1c7a5d0a578be76a0d0f052a33bef77e7767ccba76427dc3ea5'
            '24be60c5faa3629983d42c979b3bc6f8c2896823417dbf510388683974199a49')

prepare() {
  cd $pkgname-$_pkgver

  # Fix warning about underquoted definition of AM_PATH_AALIB
  # https://sourceforge.net/p/aa-project/patches/5/
  # https://bugs.archlinux.org/task/78787
  patch -Np0 -i ../aclocal-fixes.patch

  # Fix --with-aalib-prefix argument
  # https://sourceforge.net/p/aa-project/patches/9/
  # https://bugs.archlinux.org/task/53482
  patch -Np0 -i ../aalib-m4.patch

  # Fix builtin-declaration-mismatch compiler warnings
  # https://sourceforge.net/p/aa-project/bugs/10/
  patch -Np1 -i ../aalib-c99.patch

  # Fix free-nonheap-object compiler warning
  patch -Np1 -i ../aalib-free-offset-pointer.patch

  # Fix aggressive-loop-optimizations compiler warning
  patch -Np1 -i ../aalib-key-down-OOB.patch

  # Fix 'return' with no value compiler warning
  patch -Np1 -i ../aalib-aalinuxkbd-return.patch

  # Fix build for ncurses built with opaque-curses option
  patch -Np1 -i ../aalib-opaque-ncurses-fix.patch

  # Fix rendering with custom aspect ratio
  patch -Np1 -i ../aalib-fix-aarender.patch

  # Fix typo for KEY_MOUSE condition
  patch -Np1 -i ../aalib-mouse.patch

  autoreconf -fi
}

build() {
  cd $pkgname-$_pkgver
  ./configure --prefix=/usr --with-curses-driver
  make
}

package() {
  cd $pkgname-$_pkgver
  make DESTDIR="$pkgdir" install
}