summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author fourtysixandtwo2023-09-25 23:58:08 +0200
committer Willy Sudiarto Raharjo2023-09-30 06:16:32 +0200
commit34e9c8dc271a3bbfbaf9aeb7fd69d64a4c840a56 (patch)
tree1c49fb8544ac67f5d133b61b40013fa874608135
parent297766e678826aaf48fd2d892fcf0686f9618422 (diff)
downloadslackbuilds-34e9c8dc271a3bbfbaf9aeb7fd69d64a4c840a56.tar.gz
python/jellyfish: Updated for version 1.0.1, with fixes.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r--python/jellyfish/Cargo-toml.patch12
-rw-r--r--python/jellyfish/Cargo.toml.patch14
-rw-r--r--python/jellyfish/jellyfish.SlackBuild9
-rw-r--r--python/jellyfish/jellyfish.info10
-rw-r--r--python/jellyfish/mkvendored.sh99
-rw-r--r--python/jellyfish/pyproject.toml.patch11
6 files changed, 29 insertions, 126 deletions
diff --git a/python/jellyfish/Cargo-toml.patch b/python/jellyfish/Cargo-toml.patch
new file mode 100644
index 0000000000..be934640c8
--- /dev/null
+++ b/python/jellyfish/Cargo-toml.patch
@@ -0,0 +1,12 @@
+diff --git a/Cargo.toml b/Cargo.toml
+index 6f9bf52..2deead4 100644
+--- a/Cargo.toml
++++ b/Cargo.toml
+@@ -20,6 +20,7 @@ unicode-segmentation = "^1.6.0"
+ unicode-normalization = "^0.1"
+ smallvec = "1.10.0"
+ ahash = "0.8.3"
++syn = "2.0.37"
+
+ [dev-dependencies]
+ csv = "1.1"
diff --git a/python/jellyfish/Cargo.toml.patch b/python/jellyfish/Cargo.toml.patch
deleted file mode 100644
index f6573bb968..0000000000
--- a/python/jellyfish/Cargo.toml.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-diff --git a/Cargo.toml b/Cargo.toml
-index d9ff039..f7f04ef 100644
---- a/Cargo.toml
-+++ b/Cargo.toml
-@@ -3,6 +3,9 @@ name = "jellyfish"
- version = "1.0.0"
- edition = "2021"
- description = "Approximate and phonetic matching of strings."
-+exclude = [
-+ "dist/*",
-+]
- authors = ["James Turk <dev@jamesturk.net>"]
- repository = "https://github.com/jamesturk/jellyfish/"
- license = "MIT"
diff --git a/python/jellyfish/jellyfish.SlackBuild b/python/jellyfish/jellyfish.SlackBuild
index 7fd0e39272..1de13269bb 100644
--- a/python/jellyfish/jellyfish.SlackBuild
+++ b/python/jellyfish/jellyfish.SlackBuild
@@ -28,7 +28,7 @@
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=jellyfish
-VERSION=${VERSION:-1.0.0}
+VERSION=${VERSION:-1.0.1}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -83,11 +83,8 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \+
-# patch pyproject.toml to allow maturin 1.x.x version
-patch -Np1 < $CWD/pyproject.toml.patch
-
-# patch Cargo.toml to exclude dist dir and get rid of build warning
-patch -Np1 < $CWD/Cargo.toml.patch
+# patch Cargo.toml to include missing dep when using filtered sources
+patch --no-backup-if-mismatch -Np1 < $CWD/Cargo-toml.patch
# prevent cargo from using the network.
# this only works because we have a vendored sources tarball with
diff --git a/python/jellyfish/jellyfish.info b/python/jellyfish/jellyfish.info
index 7941ba1003..889e7412d2 100644
--- a/python/jellyfish/jellyfish.info
+++ b/python/jellyfish/jellyfish.info
@@ -1,10 +1,10 @@
PRGNAM="jellyfish"
-VERSION="1.0.0"
+VERSION="1.0.1"
HOMEPAGE="https://github.com/sunlightlabs/jellyfish"
-DOWNLOAD="https://files.pythonhosted.org/packages/source/j/jellyfish/jellyfish-1.0.0.tar.gz \
- https://slackware.uk/~fourtysixandtwo/src/jellyfish-vendored-sources-1.0.0-1.tar.xz"
-MD5SUM="9caeaa06e52abc7c570f893d3d7e87ee \
- e7067208cb400ba12964e6a2d627571a"
+DOWNLOAD="https://files.pythonhosted.org/packages/source/j/jellyfish/jellyfish-1.0.1.tar.gz \
+ https://slackware.uk/~fourtysixandtwo/src/jellyfish-vendored-sources-1.0.1-1.tar.xz"
+MD5SUM="b79ce60a510237d2ded08caee184a757 \
+ 558631e39833ff7892dc6a2da1295761"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="python3-maturin"
diff --git a/python/jellyfish/mkvendored.sh b/python/jellyfish/mkvendored.sh
index 054f3e64db..252d469ea9 100644
--- a/python/jellyfish/mkvendored.sh
+++ b/python/jellyfish/mkvendored.sh
@@ -1,98 +1,17 @@
#!/bin/bash
+# This is a wrapper script for cargo-mkvendored.sh which is
+# included in the cargo-vendor-filterer slackbuild and needs to be
+# installed. It is only needed if you are upgrading the version and
+# need new vendored rust libs.
+#
# create $PRGNAM-vendored-sources-$VERSION-$BUILD.tar.xz
# requires network access, but does not require root privilege.
# requires that $PRGNAM's REQUIRES need to be installed first
-# and cargo-vendor-filterer if you want just the linux ones
-CWD=$(pwd)
-PRGNAM=${CWD##*/} #basename $CWD equivalent
-source ./$PRGNAM.info
-
-set -e
-WORKDIR=$( mktemp -d )
-cd $WORKDIR
-
-# don't depend on user's ~/.cargo
-mkdir -p cargohome
-export CARGO_HOME=$(pwd)/cargohome
-
-egrep "^BUILD=|^PRGNAM=" $CWD/$PRGNAM.SlackBuild > 1
-source ./1
-
-if [ -z $SRCNAM ]; then
- echo "no SRCNAM"
- SRCNAM=$PRGNAM
-fi
-
-tar xvf $CWD/$SRCNAM-$VERSION.tar.gz
-cd $SRCNAM-$VERSION
-
-if [ -z "$ARCH" ]; then
- case "$( uname -m )" in
- i?86) ARCH=i586 ;;
- arm*) ARCH=arm ;;
- *) ARCH=$( uname -m ) ;;
- esac
-fi
-
-if [ "$ARCH" = "i586" ]; then
- SLKCFLAGS="-O2 -march=i586 -mtune=i686"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "i686" ]; then
- SLKCFLAGS="-O2 -march=i686 -mtune=i686"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "x86_64" ]; then
- SLKCFLAGS="-O2 -fPIC"
- LIBDIRSUFFIX="64"
-else
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
-fi
-
-# check if rust16 is installed
-if [ ! -d /opt/rust16/bin ]; then
- echo "ERROR: The rust16 slackbuild is required to be installed"
- exit 1
-else
- export PATH="/opt/rust16/bin:$PATH"
- if [ -z "$LD_LIBRARY_PATH" ]; then
- export LD_LIBRARY_PATH="/opt/rust16/lib$LIBDIRSUFFIX"
- else
- export LD_LIBRARY_PATH="/opt/rust16/lib$LIBDIRSUFFIX:$LD_LIBRARY_PATH"
- fi
-fi
-
-# Configure cargo-vendor-filterer
- cat << EOF >> Cargo.toml
-[package.metadata.vendor-filter]
-platforms = ["x86_64-unknown-linux-gnu", "i686-unknown-linux-gnu"]
-all-features = true
-EOF
-
-if [ -f ~/.cargo/bin/cargo-vendor-filterer ] || [ -f /usr/bin/cargo-vendor-filterer ]; then
- echo "INFO: Creating filtered vendor libs tarball..."
- ~/.cargo/bin/cargo-vendor-filterer
+if [ -f /usr/bin/cargo-mkvendored.sh ]; then
+ /usr/bin/cargo-mkvendored.sh
else
- echo "WARNING: Creating unfiltered vendor libs tarball!"
- cargo vendor
+ echo " ERROR: cargo-mkvendored.sh script is not available!!
+ ERROR: Install the cargo-vendor-filterer slackbuild."
fi
-
-# build would fail if the .a files were removed
-#find vendor -type f -a -name \*.a -print0 | xargs -0 rm -f
-
-mkdir -p .cargo
- cat <<EOF >.cargo/config.toml
-[source.crates-io]
-replace-with = "vendored-sources"
-
-[source.vendored-sources]
-directory = "vendor"
-EOF
-cd -
-
-cd $WORKDIR
-tar cvfJ $CWD/$SRCNAM-vendored-sources-$VERSION-$BUILD.tar.xz \
- $SRCNAM-$VERSION/{vendor,.cargo}
-cd $CWD
-rm -rf $WORKDIR
diff --git a/python/jellyfish/pyproject.toml.patch b/python/jellyfish/pyproject.toml.patch
deleted file mode 100644
index 848fee8fea..0000000000
--- a/python/jellyfish/pyproject.toml.patch
+++ /dev/null
@@ -1,11 +0,0 @@
-diff --git a/pyproject.toml b/pyproject.toml
-index 7723cd8..5efd6ef 100644
---- a/pyproject.toml
-+++ b/pyproject.toml
-@@ -1,5 +1,5 @@
- [build-system]
--requires = ["maturin>=0.14,<0.15"]
-+requires = ["maturin>=0.14,<2"]
- build-backend = "maturin"
-
- [project]