| # Maintainer: Alexey Pavlov <alexpux@gmail.com> |
| |
| _realname=tolua |
| pkgbase=mingw-w64-${_realname} |
| pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" |
| pkgver=5.2.4 |
| pkgrel=4 |
| pkgdesc="A tool that greatly simplifies the integration of C/C++ code with Lua (mingw-w64)" |
| arch=('any') |
| mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32') |
| url="https://www.tecgraf.puc-rio.br/~celes/tolua/" |
| license=('MIT') |
| depends=("${MINGW_PACKAGE_PREFIX}-lua") |
| makedepends=("${MINGW_PACKAGE_PREFIX}-gcc") |
| options=('staticlibs' 'strip' 'emptydirs') |
| source=(https://www.tecgraf.puc-rio.br/~celes/tolua/${_realname}-${pkgver}.tar.gz) |
| sha256sums=('c5a6b701b3ced9a66e7a9881c9d94430f8612040827650abe1aa3c5c3fc95bf2') |
| |
| build() { |
| [[ -d "${srcdir}/build-${CARCH}" ]] && rm -rf "${srcdir}/build-${CARCH}" |
| cp -rf "${srcdir}/${_realname}-${pkgver}" "${srcdir}/build-${CARCH}" |
| cd "${srcdir}/build-${CARCH}" |
| sed -i "s|LUA=/usr/local|LUA=${MINGW_PREFIX}|g" config |
| make -j1 \ |
| AR="ar rcu" \ |
| RANLIB="ranlib" \ |
| STRIP="strip" \ |
| CC="${MINGW_CHOST}-gcc" |
| } |
| |
| package(){ |
| cd "${srcdir}/build-${CARCH}" |
| mkdir -p ${pkgdir}${MINGW_PREFIX}/{bin,lib,include} |
| cp bin/*.exe ${pkgdir}${MINGW_PREFIX}/bin/ |
| cp lib/*.a ${pkgdir}${MINGW_PREFIX}/lib/ |
| cp include/*.h ${pkgdir}${MINGW_PREFIX}/include/ |
| } |