diff options
author | Patrick J Volkerding <volkerdi@slackware.com> | 2023-07-30 20:33:52 +0000 |
---|---|---|
committer | Eric Hameleers <alien@slackware.com> | 2023-07-30 22:59:22 +0200 |
commit | 349e00bb1775a444e4c1a1163e4157c2d3d63e60 (patch) | |
tree | a56b668d306940f39547118f2843df3fe0f6569f /source/d | |
parent | aef5ceee670256284ebeb2223fe28e77870f8fcd (diff) | |
download | current-349e00bb1775a444e4c1a1163e4157c2d3d63e60.tar.gz current-349e00bb1775a444e4c1a1163e4157c2d3d63e60.tar.xz |
Sun Jul 30 20:33:52 UTC 202320230730203352
d/binutils-2.41-x86_64-1.txz: Upgraded.
d/oprofile-1.4.0-x86_64-12.txz: Rebuilt.
Recompiled against binutils-2.41.
d/tree-sitter-0.20.8-x86_64-1.txz: Added.
This is a dependency for an interesting new feature of emacs-29.1.
e/emacs-29.1-x86_64-1.txz: Upgraded.
Compiled against tree-sitter-0.20.8. Grammar libraries for this can be
downloaded and installed from within Emacs - see the NEWS file for details.
l/gmp-6.3.0-x86_64-1.txz: Upgraded.
l/libarchive-3.7.1-x86_64-1.txz: Upgraded.
l/polkit-123-x86_64-1.txz: Upgraded.
Diffstat (limited to 'source/d')
-rwxr-xr-x | source/d/oprofile/oprofile.SlackBuild | 2 | ||||
-rw-r--r-- | source/d/tree-sitter/slack-desc | 19 | ||||
-rwxr-xr-x | source/d/tree-sitter/tree-sitter.SlackBuild | 131 | ||||
-rw-r--r-- | source/d/tree-sitter/tree-sitter.url | 1 |
4 files changed, 152 insertions, 1 deletions
diff --git a/source/d/oprofile/oprofile.SlackBuild b/source/d/oprofile/oprofile.SlackBuild index 6e5903306..e8e55b87b 100755 --- a/source/d/oprofile/oprofile.SlackBuild +++ b/source/d/oprofile/oprofile.SlackBuild @@ -24,7 +24,7 @@ cd $(dirname $0) ; CWD=$(pwd) PKGNAM=oprofile VERSION=${VERSION:-$(echo oprofile-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev)} -BUILD=${BUILD:-11} +BUILD=${BUILD:-12} NUMJOBS=${NUMJOBS:-" -j$(expr $(nproc) + 1) "} diff --git a/source/d/tree-sitter/slack-desc b/source/d/tree-sitter/slack-desc new file mode 100644 index 000000000..608f2b114 --- /dev/null +++ b/source/d/tree-sitter/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. Line +# up the first '|' above the ':' following the base package name, and the '|' +# on the right side marks the last column you can put a character in. You must +# make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':'. + + |-----handy-ruler------------------------------------------------------| +tree-sitter: tree-sitter (parser generator and library) +tree-sitter: +tree-sitter: Tree-sitter is a parser generator tool and an incremental parsing +tree-sitter: library. It can build a concrete syntax tree for a source file and +tree-sitter: efficiently update the syntax tree as the source file is edited. +tree-sitter: +tree-sitter: Homepage: https://tree-sitter.github.io +tree-sitter: +tree-sitter: +tree-sitter: +tree-sitter: diff --git a/source/d/tree-sitter/tree-sitter.SlackBuild b/source/d/tree-sitter/tree-sitter.SlackBuild new file mode 100755 index 000000000..83787db09 --- /dev/null +++ b/source/d/tree-sitter/tree-sitter.SlackBuild @@ -0,0 +1,131 @@ +#!/bin/bash + +# Copyright 2023 Patrick J. Volkerding, Sebeka, Minnesota, USA +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +cd $(dirname $0) ; CWD=$(pwd) + +PKGNAM=tree-sitter +VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev)} +BUILD=${BUILD:-1} + +# Automatically determine the architecture we're building on: +if [ -z "$ARCH" ]; then + case "$(uname -m)" in + i?86) ARCH=i586 ;; + arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;; + # Unless $ARCH is already set, use uname -m for all other archs: + *) ARCH=$(uname -m) ;; + esac + export ARCH +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 "$PKGNAM-$VERSION-$ARCH-$BUILD.txz" + exit 0 +fi + +NUMJOBS=${NUMJOBS:-" -j $(expr $(nproc) + 1) "} + +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "s390" ]; then + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +elif [ "$ARCH" = "armv7hl" ]; then + SLKCFLAGS="-O3 -march=armv7-a -mfpu=vfpv3-d16" + LIBDIRSUFFIX="" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +fi + +TMP=${TMP:-/tmp} +PKG=$TMP/package-$PKGNAM + +rm -rf $PKG +mkdir -p $TMP $PKG + +cd $TMP +rm -rf $PKGNAM-$VERSION +tar xvf $CWD/$PKGNAM-$VERSION.tar.?z || exit 1 +cd $PKGNAM-$VERSION || exit 1 + +chown -R root:root . +find . \ + \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ + -exec chmod 755 {} \+ -o \ + \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ + -exec chmod 644 {} \+ + +# prepare Rust bindings: +( cd lib + cargo fetch --locked --target "$ARCH-unknown-linux-gnu" +) + +# Build and install library: +make $NUMJOBS PREFIX=/usr LIBDIR=/usr/lib${LIBDIRSUFFIX} +make DESTDIR=$PKG PREFIX=/usr LIBDIR=/usr/lib${LIBDIRSUFFIX} install + +# Build and install cli: +( cd cli + cargo fetch --locked --target "$ARCH-unknown-linux-gnu" + cargo build --release --locked --offline --all-features +) +mkdir -p $PKG/usr/bin +cp -a target/release/tree-sitter $PKG/usr/bin + +# No static library: +rm -f $PKG/usr/lib${LIBDIRSUFFIX}/libtree-sitter.a + +# Strip binaries: +find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null + +# Compress manual pages: +find $PKG/usr/man -type f -exec gzip -9 {} \+ +for i in $( find $PKG/usr/man -type l ) ; do + ln -s $( readlink $i ).gz $i.gz + rm $i +done + +# Add a documentation directory: +mkdir -p $PKG/usr/doc/${PKGNAM}-$VERSION +cp -a \ + LICENSE* README* \ + $PKG/usr/doc/${PKGNAM}-$VERSION +cp -a cli/README.md $PKG/usr/doc/${PKGNAM}-$VERSION/README-cli.md +cp -a lib/README.md $PKG/usr/doc/${PKGNAM}-$VERSION/README-lib.md +cp -a docs/section-6-contributing.md $PKG/usr/doc/${PKGNAM}-$VERSION/CONTRIBUTING.md + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc + +cd $PKG +/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz diff --git a/source/d/tree-sitter/tree-sitter.url b/source/d/tree-sitter/tree-sitter.url new file mode 100644 index 000000000..b29297702 --- /dev/null +++ b/source/d/tree-sitter/tree-sitter.url @@ -0,0 +1 @@ +https://github.com/tree-sitter/tree-sitter |