# Description: QR code generator
# URL: https://github.com/nayuki/QR-Code-generator
# Maintainer: Tim Biermann, tbier at posteo dot de

name=libqrcodegen
version=1.8.0
release=1
source=(https://github.com/nayuki/QR-Code-generator/archive/v$version/$name-$version.tar.gz
  cpp-makefile.patch c-makefile.patch)

build() {
  patch -Np1 -d QR-Code-generator-$version/c -i $SRC/c-makefile.patch
  patch -Np1 -d QR-Code-generator-$version/cpp -i $SRC/cpp-makefile.patch
  cp -R QR-Code-generator-$version{,-cpp}
  cd QR-Code-generator-$version
  make DESTDIR=$PKG PREFIX=/usr -C c install
  cd $SRC/QR-Code-generator-$version-cpp
  make DESTDIR=$PKG PREFIX=/usr -C cpp install
}
