| # Maintainer: Alexey Pavlov <alexpux@gmail.com> |
| |
| _realname=libmodplug |
| pkgbase=mingw-w64-${_realname} |
| pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" |
| pkgver=0.8.9.0 |
| pkgrel=4 |
| pkgdesc="A MOD playing library (mingw-w64)" |
| arch=('any') |
| mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32') |
| url="https://modplug-xmms.sourceforge.io/" |
| license=("custom") |
| makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config") |
| depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs") |
| conflicts=("${MINGW_PACKAGE_PREFIX}-libopenmpt-modplug") |
| options=('strip' 'staticlibs') |
| source=("https://downloads.sourceforge.net/modplug-xmms/${_realname}-${pkgver}.tar.gz" |
| '010-mingw.patch') |
| sha256sums=('457ca5a6c179656d66c01505c0d95fafaead4329b9dbaa0f997d00a3508ad9de' |
| 'bfb4f76dbe4abf618c3352baf4fc316d42f0237f7ffbaaa8b346abff0594c834') |
| |
| prepare() { |
| cd "${srcdir}/${_realname}-${pkgver}" |
| |
| patch -Np1 -i "${srcdir}/010-mingw.patch" |
| # autoreconf to get updated libtool files, for clang support |
| autoreconf -fiv |
| } |
| |
| build() { |
| [[ -d "build-${MINGW_CHOST}" ]] && rm -rf "build-${MINGW_CHOST}" |
| mkdir -p "${srcdir}/build-${MINGW_CHOST}" |
| cd "${srcdir}/build-${MINGW_CHOST}" |
| ../${_realname}-${pkgver}/configure \ |
| --prefix=${MINGW_PREFIX} \ |
| --build=${MINGW_CHOST} \ |
| --host=${MINGW_CHOST} \ |
| --target=${MINGW_CHOST} \ |
| --enable-shared \ |
| --enable-static |
| |
| make |
| } |
| |
| package() { |
| cd "${srcdir}/build-${MINGW_CHOST}" |
| make DESTDIR="${pkgdir}" install |
| |
| # Install license |
| install -Dm644 ${srcdir}/${_realname}-${pkgver}/COPYING ${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE |
| } |