diff options
Diffstat (limited to 'python/jellyfish')
-rw-r--r-- | python/jellyfish/Cargo-toml.patch | 12 | ||||
-rw-r--r-- | python/jellyfish/jellyfish.SlackBuild | 45 | ||||
-rw-r--r-- | python/jellyfish/jellyfish.info | 10 | ||||
-rw-r--r-- | python/jellyfish/mkvendored.sh | 17 |
4 files changed, 71 insertions, 13 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/jellyfish.SlackBuild b/python/jellyfish/jellyfish.SlackBuild index 1af429bb8c..7946abf87d 100644 --- a/python/jellyfish/jellyfish.SlackBuild +++ b/python/jellyfish/jellyfish.SlackBuild @@ -2,7 +2,7 @@ # Slackware build script for jellyfish -# Copyright 2022 fourtysixandtwo <fourtysixandtwo@sliderr.net> +# Copyright 2022-2024 fourtysixandtwo <fourtysixandtwo@sliderr.net> # Copyright 2015-2018 Dimitris Zlatanidis Orestiada, Greece # All rights reserved. # @@ -23,13 +23,17 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# 20230916 46and2: Updated version, changed build process. +# 20240102 46and2: Use VSBUILD for vendored sources + cd $(dirname $0) ; CWD=$(pwd) PRGNAM=jellyfish -VERSION=${VERSION:-0.9.0} +VERSION=${VERSION:-1.0.3} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} +VSBUILD=${VSBUILD:-1} if [ -z "$ARCH" ]; then case "$( uname -m )" in @@ -39,9 +43,6 @@ if [ -z "$ARCH" ]; then esac fi -# If the variable PRINT_PACKAGE_NAME is set, then this script will report what -# the name of the created package would be, and then exit. This information -# could be useful to other scripts. if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" exit 0 @@ -60,6 +61,9 @@ elif [ "$ARCH" = "i686" ]; then elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2 -fPIC" LIBDIRSUFFIX="64" +elif [ "$ARCH" = "aarch64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" else SLKCFLAGS="-O2" LIBDIRSUFFIX="" @@ -72,21 +76,44 @@ mkdir -p $TMP $PKG $OUTPUT cd $TMP rm -rf $PRGNAM-$VERSION tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +tar xvf $CWD/$PRGNAM-vendored-sources-$VERSION-$VSBUILD.tar.?z cd $PRGNAM-$VERSION chown -R root:root . find -L . \ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ - -o -perm 511 \) -exec chmod 755 {} \; -o \ + -o -perm 511 \) -exec chmod 755 {} \+ -o \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ - -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \+ + +# 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 +# everything cargo would have downloaded. +export CARGO_NET_OFFLINE=true + +# prevent cargo from writing outside of $TMP +export CARGO_HOME=$(pwd)/.cargo + +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 + +PYVER=$(python3 -c 'import sys; print("%d.%d" % sys.version_info[:2])') +export PYTHONPATH=/opt/python$PYVER/site-packages/ -python3 setup.py install --root=$PKG +python3 -m build --no-isolation +python3 -m installer -d "$PKG" dist/*.whl find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a README.md PKG-INFO LICENSE $PKG/usr/doc/$PRGNAM-$VERSION +cp -a README.md PKG-INFO LICENSE docs/* $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild mkdir -p $PKG/install diff --git a/python/jellyfish/jellyfish.info b/python/jellyfish/jellyfish.info index bbfe29248d..b739c73c80 100644 --- a/python/jellyfish/jellyfish.info +++ b/python/jellyfish/jellyfish.info @@ -1,10 +1,12 @@ PRGNAM="jellyfish" -VERSION="0.9.0" +VERSION="1.0.3" HOMEPAGE="https://github.com/sunlightlabs/jellyfish" -DOWNLOAD="https://files.pythonhosted.org/packages/26/18/cd485f3661c8e8c0ab864c2e54033371dcc1f7e75767318a4044b2808ed4/jellyfish-0.9.0.tar.gz" -MD5SUM="3c2a9d07102372dc673b1f74970d25b6" +DOWNLOAD="https://files.pythonhosted.org/packages/source/j/jellyfish/jellyfish-1.0.3.tar.gz \ + https://slackware.uk/~fourtysixandtwo/src/jellyfish-vendored-sources-1.0.3-1.tar.xz" +MD5SUM="badb0546de65d66a07f7f7bf7ae3eabf \ + a738e2f93dbd44deb8fa54c1b184fa9b" DOWNLOAD_x86_64="" MD5SUM_x86_64="" -REQUIRES="" +REQUIRES="python3-maturin" MAINTAINER="fourtysixandtwo" EMAIL="fourtysixandtwo@sliderr.net" diff --git a/python/jellyfish/mkvendored.sh b/python/jellyfish/mkvendored.sh new file mode 100644 index 0000000000..c52093378e --- /dev/null +++ b/python/jellyfish/mkvendored.sh @@ -0,0 +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-$VSBUILD.tar.xz +# requires network access, but does not require root privilege. +# requires that $PRGNAM's REQUIRES need to be installed first + +if [ -f /usr/bin/cargo-mkvendored.sh ]; then + /usr/bin/cargo-mkvendored.sh +else + echo " ERROR: cargo-mkvendored.sh script is not available!! + ERROR: Install the cargo-vendor-filterer slackbuild." +fi |