[emacs] embed some tree-sitter thingies

Signed-off-by: Gwenhael Le Moine <gwenhael.le.moine@gmail.com>
This commit is contained in:
Gwenhael Le Moine 2022-12-07 10:08:01 +01:00
parent 789737cbbb
commit 2bd989df82
No known key found for this signature in database
GPG key ID: FDFE3669426707A7

View file

@ -118,6 +118,7 @@ CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
$SRCDIR/configure \
--prefix=/usr \
--libdir=/usr/lib$(uname -m | grep -o 64 ) \
--sysconfdir=/etc \
--localstatedir=/var \
--program-prefix="" \
@ -179,6 +180,20 @@ elif [ -r $PKG/usr/man/man1/ctags.1.gz ]; then
mv $PKG/usr/man/man1/ctags.1.gz $PKG/usr/man/man1/ctags-emacs.1.gz
fi
# gwh: 2022-12-06
# tree-sitter grammars
git clone https://github.com/casouri/tree-sitter-module
cd tree-sitter-module
sed -i 's|cc -c -I. parser.c|cc -fPIC -c -I. parser.c|' build.sh
bash ./batch.sh
cp dist/*.so "$PKG/usr/lib$(uname -m | grep -o 64)/"
cd ..
# /tree-sitter grammars
find $PKG | xargs file | grep -e "executable" -e "shared object" \
| grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null