73 lines
2.3 KiB
Bash
73 lines
2.3 KiB
Bash
# Maintainer: Alexey Pavlov <alexpux@gmail.com>
|
|
# include patches from Archlinux AUR mingw-w64 stuff
|
|
|
|
_realname=popt
|
|
pkgbase=mingw-w64-${_realname}
|
|
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
|
|
pkgver=1.19
|
|
pkgrel=2
|
|
pkgdesc="C library for parsing command line parameters (mingw-w64)"
|
|
arch=('any')
|
|
mingw_arch=('mingw64' 'ucrt64' 'clang64' 'clangarm64')
|
|
url="https://github.com/rpm-software-management/popt"
|
|
license=("spdx:MIT")
|
|
depends=("${MINGW_PACKAGE_PREFIX}-gettext-runtime")
|
|
makedepends=("${MINGW_PACKAGE_PREFIX}-cc"
|
|
"${MINGW_PACKAGE_PREFIX}-gettext-tools"
|
|
"${MINGW_PACKAGE_PREFIX}-autotools")
|
|
source=(http://ftp.rpm.org/popt/releases/popt-1.x/${_realname}-${pkgver}.tar.gz
|
|
"0001-nl_langinfo.mingw32.patch"
|
|
"197416.all.patch"
|
|
"217602.all.patch"
|
|
"get-w32-console-maxcols.mingw32.patch"
|
|
"no-uid-stuff-on.mingw32.patch")
|
|
sha256sums=('c25a4838fc8e4c1c8aacb8bd620edb3084a3d63bf8987fdad3ca2758c63240f9'
|
|
'33ecd8c6b99597256954763c81d90e7e65a2ddaaab3ae17c8a7769c77be0b22b'
|
|
'309d083fba6c7ae9b6088755cc36373481b355806142485d3c9f356dd6355bce'
|
|
'e4f9383cb4821976f513f64fc8c64e0dfadcc7c031e5cdce2bbe89fb6d9a40c4'
|
|
'9ad9dcff285cc34abca6c5b2f1f27e050134392562cdc41706d919adeb516dd4'
|
|
'0a202a7e53348138c4c9c22e8a6aa089fc66ea105b64ec4251c3cb2ebf11ffae')
|
|
|
|
_apply_patch_with_msg() {
|
|
for _patch in "$@"
|
|
do
|
|
msg2 "Applying ${_patch}"
|
|
patch -p1 -i "${srcdir}/${_patch}"
|
|
done
|
|
}
|
|
|
|
prepare() {
|
|
cd "$srcdir/${_realname}-$pkgver"
|
|
rm -rf po/ca.po || true
|
|
|
|
_apply_patch_with_msg \
|
|
0001-nl_langinfo.mingw32.patch \
|
|
197416.all.patch \
|
|
217602.all.patch \
|
|
get-w32-console-maxcols.mingw32.patch \
|
|
no-uid-stuff-on.mingw32.patch
|
|
|
|
autoreconf -fiv
|
|
}
|
|
|
|
build() {
|
|
mkdir -p "${srcdir}/build-${MSYSTEM}"
|
|
|
|
cd "${srcdir}/build-${MSYSTEM}"
|
|
../${_realname}-${pkgver}/configure \
|
|
--prefix=${MINGW_PREFIX} \
|
|
--build=${MINGW_CHOST} \
|
|
--host=${MINGW_CHOST} \
|
|
--enable-shared \
|
|
--enable-static
|
|
|
|
make
|
|
}
|
|
|
|
package() {
|
|
cd "${srcdir}/build-${MSYSTEM}"
|
|
make DESTDIR="${pkgdir}" install
|
|
install -D -m644 "${srcdir}/${_realname}-${pkgver}/COPYING" "$pkgdir${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE"
|
|
find "${pkgdir}${MINGW_PREFIX}" -name '*.def' -o -name '*.exp' | xargs -rtl1 rm
|
|
}
|