summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO14
-rw-r--r--PKGBUILD38
-rw-r--r--python-fasttext-cstdint.patch11
3 files changed, 44 insertions, 19 deletions
diff --git a/.SRCINFO b/.SRCINFO
index fb224b4c8dec..2102d70f4fff 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,12 +1,11 @@
pkgbase = python-fasttext
pkgdesc = Library for fast text representation and classification – Python bindings
- pkgver = 0.2.0
- pkgrel = 1
+ pkgver = 0.9.2
+ pkgrel = 5
url = https://github.com/facebookresearch/fastText
- arch = any
+ arch = x86_64
license = BSD
makedepends = python-setuptools
- makedepends = python2-setuptools
depends = pybind11
depends = python-future
depends = python-numpy
@@ -14,8 +13,9 @@ pkgbase = python-fasttext
depends = python-pytorch
provides = python-fasttext
conflicts = python-fasttext
- source = https://github.com/facebookresearch/fastText/archive/v0.2.0.tar.gz
- sha256sums = 71d24ffec9fcc4364554ecac2b3308d834178c903d16d090aa6be9ea6b8e480c
+ source = python-fasttext-0.9.2.tar.gz::https://github.com/facebookresearch/fastText/archive/v0.9.2.tar.gz
+ source = python-fasttext-cstdint.patch
+ b2sums = ea3af92ce18d04241128cfb28773f0785a006e79c861d718c2c6ad788d776ad60b0543a42eb8be5a865cbc12283355521431fe2fba48544399e4a2b1520ff3f1
+ b2sums = 5d7c95b54ceb1998b4fd62ce11b6ac94f5c5f95f46488b8da79b04e2b7275bde6af105b120ef61ce81d16418a822b105cc84007f2398e6eb1982b916ff689281
pkgname = python-fasttext
-
diff --git a/PKGBUILD b/PKGBUILD
index 42dc44f54a38..f21b87bbf758 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,25 +1,37 @@
-# Maintainer: peippo <christoph.fink@gmail.com>
+# Maintainer: peippo <christoph+aur@christophfink.com>
-pkgname='python-fasttext'
+pkgname=python-fasttext
pkgdesc="Library for fast text representation and classification – Python bindings"
url="https://github.com/facebookresearch/fastText"
-provides=('python-fasttext')
-conflicts=('python-fasttext')
+provides=("python-fasttext")
+conflicts=("python-fasttext")
-pkgver=0.2.0
-pkgrel=1
+pkgver=0.9.2
+pkgrel=5
-arch=('any')
-license=('BSD')
+arch=("x86_64")
+license=("BSD")
-makedepends=('python-setuptools' 'python2-setuptools')
-depends=('pybind11' 'python-future' 'python-numpy' 'python-scipy' 'python-pytorch')
+makedepends=("python-setuptools")
+depends=("pybind11" "python-future" "python-numpy" "python-scipy" "python-pytorch")
-source=("https://github.com/facebookresearch/fastText/archive/v${pkgver}.tar.gz")
-sha256sums=('71d24ffec9fcc4364554ecac2b3308d834178c903d16d090aa6be9ea6b8e480c')
+source=(
+ "${pkgname}-${pkgver}.tar.gz::https://github.com/facebookresearch/fastText/archive/v${pkgver}.tar.gz"
+ "${pkgname}-cstdint.patch"
+)
+b2sums=(
+ "ea3af92ce18d04241128cfb28773f0785a006e79c861d718c2c6ad788d776ad60b0543a42eb8be5a865cbc12283355521431fe2fba48544399e4a2b1520ff3f1"
+ "5d7c95b54ceb1998b4fd62ce11b6ac94f5c5f95f46488b8da79b04e2b7275bde6af105b120ef61ce81d16418a822b105cc84007f2398e6eb1982b916ff689281"
+)
+
+prepare() {
+ cd "${srcdir}/fastText-${pkgver}"
+ patch --forward --strip=1 --input "${srcdir}/${pkgname}-cstdint.patch"
+}
build() {
+ export CXXFLAGS="${CXXFLAGS} -std=c++0x"
cd "${srcdir}/fastText-${pkgver}"
python setup.py build
}
@@ -27,4 +39,6 @@ build() {
package() {
cd "${srcdir}/fastText-${pkgver}"
python setup.py install --root=${pkgdir} --optimize=1
+
+ install -Dm0644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
diff --git a/python-fasttext-cstdint.patch b/python-fasttext-cstdint.patch
new file mode 100644
index 000000000000..c6462e0b6032
--- /dev/null
+++ b/python-fasttext-cstdint.patch
@@ -0,0 +1,11 @@
+diff --unified --recursive --text a/src/args.cc b/src/args.cc
+--- a/src/args.cc 2020-04-28 12:40:33.000000000 +0300
++++ b/src/args.cc 2023-05-16 11:48:14.001866135 +0300
+@@ -14,6 +14,7 @@
+ #include <stdexcept>
+ #include <string>
+ #include <unordered_map>
++#include <cstdint>
+
+ namespace fasttext {
+