From a0173cf9d01bee0f76e98ae2952bf28f9cc1c80c Mon Sep 17 00:00:00 2001 From: Raed Rizqie Date: Wed, 20 Oct 2021 00:09:55 +0800 Subject: [PATCH] python-diff-match-patch 20200713 --- mingw-w64-python-diff-match-patch/PKGBUILD | 38 ++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 mingw-w64-python-diff-match-patch/PKGBUILD diff --git a/mingw-w64-python-diff-match-patch/PKGBUILD b/mingw-w64-python-diff-match-patch/PKGBUILD new file mode 100644 index 0000000000..e8eecdec35 --- /dev/null +++ b/mingw-w64-python-diff-match-patch/PKGBUILD @@ -0,0 +1,38 @@ +# Contributor: Raed Rizqie + +_realname=diff-match-patch +pkgbase=mingw-w64-python-${_realname} +pkgname=${MINGW_PACKAGE_PREFIX}-python-${_realname} +pkgver=20200713 +pkgrel=1 +pkgdesc='A high-performance library in multiple languages that manipulates plain text (mingw-w64)' +arch=('any') +mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32') +license=('Apache') +url='https://github.com//diff-match-patch-python/diff-match-patch' +makedepends=( + ${MINGW_PACKAGE_PREFIX}-python + ${MINGW_PACKAGE_PREFIX}-python-setuptools) +source=("https://github.com/diff-match-patch-python/${_realname}/archive/v${pkgver}.tar.gz") +sha256sums=('e82dfc36b44abc8e6142ecd81b09325347c913ab1dfbcbb06fca89f4147cee17') + +prepare() { + cd "${srcdir}" + rm -rf python-build-${CARCH} | true + cp -r "${_realname}-${pkgver}" "python-build-${CARCH}" +} + +build() { + msg "Python build for ${CARCH}" + cd "${srcdir}/python-build-${CARCH}" + ${MINGW_PREFIX}/bin/python setup.py build +} + +package() { + cd "${srcdir}/python-build-${CARCH}" + MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ + ${MINGW_PREFIX}/bin/python setup.py install --prefix=${MINGW_PREFIX} \ + --root="${pkgdir}" --optimize=1 --skip-build + + install -Dm644 LICENSE "${pkgdir}${MINGW_PREFIX}/share/licenses/python-${_realname}/LICENSE" +}