python-jellyfish
This commit is contained in:
39
mingw-w64-python-jellyfish/001-fix-indent.patch
Normal file
39
mingw-w64-python-jellyfish/001-fix-indent.patch
Normal file
@@ -0,0 +1,39 @@
|
||||
--- jellyfish-0.8.8/cjellyfish/porter.c.orig 2021-10-14 23:41:51 +0800
|
||||
+++ jellyfish-0.8.8/cjellyfish/porter.c 2021-10-14 23:15:29 +0800
|
||||
@@ -124,7 +124,8 @@
|
||||
int j = z->j;
|
||||
while(TRUE)
|
||||
{ if (i > j) return n;
|
||||
- if (! cons(z, i)) break; i++;
|
||||
+ if (! cons(z, i)) break;
|
||||
+ i++;
|
||||
}
|
||||
i++;
|
||||
while(TRUE)
|
||||
@@ -336,21 +337,21 @@
|
||||
{ switch (z->b[z->k-1])
|
||||
{ case 'a': if (ends(z, 2, "al")) break; return;
|
||||
case 'c': if (ends(z, 4, "ance")) break;
|
||||
- if (ends(z, 4, "ence")) break; return;
|
||||
+ if (ends(z, 4, "ence")) {break;} return;
|
||||
case 'e': if (ends(z, 2, "er")) break; return;
|
||||
case 'i': if (ends(z, 2, "ic")) break; return;
|
||||
case 'l': if (ends(z, 4, "able")) break;
|
||||
- if (ends(z, 4, "ible")) break; return;
|
||||
+ if (ends(z, 4, "ible")) {break;} return;
|
||||
case 'n': if (ends(z, 3, "ant")) break;
|
||||
if (ends(z, 5, "ement")) break;
|
||||
if (ends(z, 4, "ment")) break;
|
||||
- if (ends(z, 3, "ent")) break; return;
|
||||
+ if (ends(z, 3, "ent")) {break;} return;
|
||||
case 'o': if (ends(z, 3, "ion") && (z->b[z->j] == 's' || z->b[z->j] == 't')) break;
|
||||
- if (ends(z, 2, "ou")) break; return;
|
||||
+ if (ends(z, 2, "ou")) {break;} return;
|
||||
/* takes care of -ous */
|
||||
case 's': if (ends(z, 3, "ism")) break; return;
|
||||
case 't': if (ends(z, 3, "ate")) break;
|
||||
- if (ends(z, 3, "iti")) break; return;
|
||||
+ if (ends(z, 3, "iti")) {break;} return;
|
||||
case 'u': if (ends(z, 3, "ous")) break; return;
|
||||
case 'v': if (ends(z, 3, "ive")) break; return;
|
||||
case 'z': if (ends(z, 3, "ize")) break; return;
|
||||
39
mingw-w64-python-jellyfish/PKGBUILD
Normal file
39
mingw-w64-python-jellyfish/PKGBUILD
Normal file
@@ -0,0 +1,39 @@
|
||||
# Contributor: Raed Rizqie <raed.rizqie@gmail.com>
|
||||
|
||||
_realname='jellyfish'
|
||||
pkgbase=mingw-w64-python-${_realname}
|
||||
pkgname=${MINGW_PACKAGE_PREFIX}-python-${_realname}
|
||||
pkgver=0.8.8
|
||||
pkgrel=1
|
||||
pkgdesc='A python library for doing approximate and phonetic matching of strings (mingw-w64)'
|
||||
arch=('any')
|
||||
mingw_arch=('mingw32' 'mingw64' 'ucrt64')
|
||||
license=('BSD 2-Clause')
|
||||
url='https://github.com/jamesturk/jellyfish'
|
||||
makedepends=(
|
||||
${MINGW_PACKAGE_PREFIX}-python
|
||||
${MINGW_PACKAGE_PREFIX}-python-setuptools)
|
||||
source=("https://files.pythonhosted.org/packages/76/88/e6eba0ebd8a11eb0a03392d827f0a605ad45fbb24234f7db98ca1ecb41b2/${_realname}-${pkgver}.tar.gz"
|
||||
001-fix-indent.patch)
|
||||
sha256sums=('0506089cacf9b5897442134417b04b3c6610c19f280ae535eace390dc6325a5c'
|
||||
'6ef8738b86cc7e8fc79a0d5501a1878c2221728c68064503509377fb23ec3a53')
|
||||
|
||||
prepare() {
|
||||
cd "${srcdir}/${_realname}-${pkgver}"
|
||||
patch -p1 < ${srcdir}/001-fix-indent.patch
|
||||
}
|
||||
|
||||
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"
|
||||
}
|
||||
Reference in New Issue
Block a user