summaryrefslogtreecommitdiffstats
path: root/development/textadept
diff options
context:
space:
mode:
Diffstat (limited to 'development/textadept')
-rw-r--r--development/textadept/README16
-rw-r--r--development/textadept/doinst.sh6
-rw-r--r--development/textadept/textadept.SlackBuild76
-rw-r--r--development/textadept/textadept.info42
-rw-r--r--development/textadept/update_urls.sh30
5 files changed, 133 insertions, 37 deletions
diff --git a/development/textadept/README b/development/textadept/README
index b270b98051..14d4a0f3a9 100644
--- a/development/textadept/README
+++ b/development/textadept/README
@@ -6,14 +6,20 @@ speed and minimalism over the years, Textadept is an ideal editor for
programmers who want endless extensibility without sacrificing speed
or succumbing to code bloat and featuritis.
-The following executables are symlinked from /opt/ to /usr/bin/:
+The following executables are symlinked from /usr/share/textadept/
+to /usr/bin/:
-textadept
+ -textadept-gtk
-textadept-curses
- -textadeptjit
- -textadeptjit-curses
-tad
-tadc
+ -tadg
-Note that `tad` and `tadc` are just easier ways to type `textadept`
-and `textadept-curses`, respectively.
+Note that `tad`, `tadg` and `tadc` are just easier ways to type
+`textadept`, `textadept-gtk` and `textadept-curses`, respectively.
+
+python3-markdown-it-py is only required for building HTML
+documentation, and the scripts works fine without it.
+But since the local HTML pages are opened when using the menu/help,
+it is not marked as optional.
diff --git a/development/textadept/doinst.sh b/development/textadept/doinst.sh
index 9a8ded3c60..aea0f894eb 100644
--- a/development/textadept/doinst.sh
+++ b/development/textadept/doinst.sh
@@ -5,3 +5,9 @@ fi
if [ -x /usr/bin/update-mime-database ]; then
/usr/bin/update-mime-database usr/share/mime >/dev/null 2>&1
fi
+
+if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then
+ if [ -x /usr/bin/gtk-update-icon-cache ]; then
+ /usr/bin/gtk-update-icon-cache -f usr/share/icons/hicolor >/dev/null 2>&1
+ fi
+fi
diff --git a/development/textadept/textadept.SlackBuild b/development/textadept/textadept.SlackBuild
index 90bfcd616c..b834636e3a 100644
--- a/development/textadept/textadept.SlackBuild
+++ b/development/textadept/textadept.SlackBuild
@@ -1,6 +1,7 @@
#!/bin/bash
# Slackware build script for textadept
+# Copyright 2023 Yth | Pont-en-Royans, France | yth@ythogtha.org
# Ryan P.C. McQuen | Everett, WA | ryanpcmcquen@member.fsf.org
# Copyright 2018, 2019 Brenton Earl <brent@exitstatusone.com>
@@ -25,7 +26,7 @@
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=textadept
-VERSION=${VERSION:-10.8}
+VERSION=${VERSION:-12.3}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -53,19 +54,15 @@ OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i586" ]; then
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
- SRCARCH=i386
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
LIBDIRSUFFIX=""
- SRCARCH=i386
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
- SRCARCH=x86_64
else
SLKCFLAGS="-O2"
LIBDIRSUFFIX=""
- SRCARCH=i386
fi
DOCS="CHANGELOG.md FAQ.md LICENSE MEDIA.md README.md TECHNOLOGY.md THANKS.md"
@@ -75,9 +72,9 @@ set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-rm -rf $PRGNAM\_$VERSION.$SRCARCH
-tar xvf $CWD/$PRGNAM\_$VERSION.$SRCARCH.tgz
-cd $PRGNAM\_$VERSION.$SRCARCH/
+rm -rf $PRGNAM-$PRGNAM\_$VERSION
+tar xvf $CWD/$PRGNAM-$PRGNAM\_$VERSION.tar.gz
+cd $PRGNAM-$PRGNAM\_$VERSION/
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
@@ -85,29 +82,60 @@ 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 {} \;
-mkdir -p $PKG/opt/$PRGNAM/
-cp -a * $PKG/opt/$PRGNAM/
+mkdir -p build/_deps
+ln -s $CWD/*t20200923.tar.gz build/_deps/t20200923.tar.gz
+ln -s $CWD/*libiconv-1.17.tar.gz build/_deps/libiconv-1.17.tar.gz
+ln -s $CWD/*lexilla510.tgz build/_deps/lexilla510.tgz
+ln -s $CWD/*1_8_0.zip build/_deps/v1_8_0.zip
+ln -s $CWD/*lpeg-1.1.0.tar.gz build/_deps/lpeg-1.1.0.tar.gz
+ln -s $CWD/*lua-5.4.6.tar.gz build/_deps/lua-5.4.6.tar.gz
+ln -s $CWD/*PDCurses-3.9.zip build/_deps/PDCurses-3.9.zip
+ln -s $CWD/*1.0.zip build/_deps/1.0.zip
+ln -s $CWD/*scinterm_5.0.zip build/_deps/scinterm_5.0.zip
+ln -s $CWD/*scintilla541.tgz build/_deps/scintilla541.tgz
+ln -s $CWD/*48a6fc9511ec67993e43ac7f5a33efc616b7ea32.zip build/_deps/48a6fc9511ec67993e43ac7f5a33efc616b7ea32.zip
+ln -s $CWD/*3.4.0.zip build/_deps/v3.4.0.zip
+ln -s $CWD/*libtermkey-0.22.tar.gz build/_deps/libtermkey-0.22.tar.gz
+cmake -S . -B build -D CMAKE_BUILD_TYPE=Release \
+ -D CMAKE_INSTALL_PREFIX=$PKG/usr \
+ -D CMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
+ -D CMAKE_CXX_FLAGS:STRING="$SLKCFLAGS"
+cmake --build build -j
+cmake --install build
+
+# Generate HTML documentation if markdown-it is available.
+if [ -e /usr/bin/markdown-it ]; then
+ pushd build/_deps/lua-src; make; popd
+ LUA=$(pwd)/build/_deps/lua-src/src/lua
+ # Copied from textadept's github workflow, and adapted to our environment
+ FILL_LAYOUT=$(pwd)/scripts/fill_layout.lua
+ sed -i 's/markdown -f toc -T/markdown-it/;s/read\(..\)a/read\1*a/;s/:match.*ul.*//' $FILL_LAYOUT
+
+ pushd $PKG/usr/share/$PRGNAM/docs
+ for file in `ls *.md`; do
+ cat _layouts/default.html | $LUA $FILL_LAYOUT $file > `basename -s .md $file`.html
+ done
+ rm _layouts/default.html
+ rmdir _layouts
+ popd
+fi
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/bin/
-ln -sf /opt/$PRGNAM/"${PRGNAM}" $PKG/usr/bin/
-ln -sf /opt/$PRGNAM/"${PRGNAM}"-curses $PKG/usr/bin/
-ln -sf /opt/$PRGNAM/"${PRGNAM}"jit $PKG/usr/bin/
-ln -sf /opt/$PRGNAM/"${PRGNAM}"jit-curses $PKG/usr/bin/
-ln -sf /opt/$PRGNAM/"${PRGNAM}" $PKG/usr/bin/tad
-ln -sf /opt/$PRGNAM/"${PRGNAM}"-curses $PKG/usr/bin/tadc
-
-mkdir -p $PKG/usr/share/pixmaps/
-ln -sf /opt/$PRGNAM/core/images/${PRGNAM}.png $PKG/usr/share/pixmaps/
-ln -sf /opt/$PRGNAM/core/images/${PRGNAM}-curses.png $PKG/usr/share/pixmaps/
+# More compact binary names
+ln -sf ${PRGNAM} $PKG/usr/bin/tad
+ln -sf ${PRGNAM}-gtk $PKG/usr/bin/tadg
+ln -sf ${PRGNAM}-curses $PKG/usr/bin/tadc
-mkdir -p $PKG/usr/share/applications
-install -m644 src/$PRGNAM.desktop $PKG/usr/share/applications
-install -m644 src/$PRGNAM-curses.desktop $PKG/usr/share/applications
+# Better menu entry : differentiates between Qt and Gtk version
+sed -i 's/Name=Textadept/Name=Textadept (Qt)/' $PKG/usr/share/$PRGNAM/"${PRGNAM}".desktop
+sed -i 's/Name=Textadept/Name=Textadept (Gtk)/' $PKG/usr/share/$PRGNAM/"${PRGNAM}"-gtk.desktop
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION/
+cp -a README* LICENSE* $PKG/usr/doc/$PRGNAM-$VERSION/
+# Doc in /usr/share/$PRGNAM/docs is used for help inside program
+ln -sf /usr/share/$PRGNAM/docs $PKG/usr/doc/$PRGNAM-$VERSION/
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
diff --git a/development/textadept/textadept.info b/development/textadept/textadept.info
index a79c7db52d..904460a663 100644
--- a/development/textadept/textadept.info
+++ b/development/textadept/textadept.info
@@ -1,10 +1,36 @@
PRGNAM="textadept"
-VERSION="10.8"
+VERSION="12.3"
HOMEPAGE="https://foicica.com/textadept/"
-DOWNLOAD="https://foicica.com/textadept/download/textadept_10.8.i386.tgz"
-MD5SUM="47d24dd2416b8f4ee000fc945afbf80e"
-DOWNLOAD_x86_64="https://foicica.com/textadept/download/textadept_10.8.x86_64.tgz"
-MD5SUM_x86_64="69cccf0e9de7f005212ff5d7aa3c0e0e"
-REQUIRES=""
-MAINTAINER="Brenton Earl"
-EMAIL="brent@exitstatusone.com"
+DOWNLOAD="https://github.com/orbitalquark/textadept/archive/textadept_12.3/textadept-textadept_12.3.tar.gz \
+ https://github.com/ThomasDickey/cdk-snapshots/archive/refs/tags/t20200923.tar.gz \
+ https://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.17.tar.gz \
+ https://www.scintilla.org/lexilla510.tgz \
+ https://github.com/keplerproject/luafilesystem/archive/v1_8_0.zip \
+ https://www.inf.puc-rio.br/~roberto/lpeg/lpeg-1.1.0.tar.gz \
+ https://www.lua.org/ftp/lua-5.4.6.tar.gz \
+ https://prdownloads.sourceforge.net/pdcurses/PDCurses-3.9.zip \
+ https://github.com/orbitalquark/lua-std-regex/archive/1.0.zip \
+ https://github.com/orbitalquark/scinterm/archive/scinterm_5.0.zip \
+ https://www.scintilla.org/scintilla541.tgz \
+ https://github.com/orbitalquark/scintillua/archive/48a6fc9511ec67993e43ac7f5a33efc616b7ea32.zip \
+ https://github.com/itay-grudev/SingleApplication/archive/refs/tags/v3.4.0.zip \
+ https://www.leonerd.org.uk/code/libtermkey/libtermkey-0.22.tar.gz"
+MD5SUM="27020397bbe264b44e7fe96ba8177b7b \
+ 0908cb133f473506a40807c0204a960a \
+ d718cd5a59438be666d1575855be72c3 \
+ 210fab20f43c7d77af7249fd50c2cdc1 \
+ c44cc7dee6a38c273a8c373d4e768753 \
+ 842a538b403b5639510c9b6fffd2c75b \
+ 25a429319dff20dfbfb9956c2b5be911 \
+ 06d657aec0e655d5a335c5a5dc888ef3 \
+ c3314ca8c5be471888342efeee3a46d2 \
+ dd7c1f88dd42ae5f2113ba5fe0df2561 \
+ d0d5b7944907b7eae125f132b17a80e8 \
+ 88ebd6a8c79685c1d6339357faccc76e \
+ 93b78904c173f13b88ce1398f8d8e576 \
+ 08bf514d59660391c3a21b3977a16c8c"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES="python3-markdown-it-py"
+MAINTAINER="Yth - Arnaud"
+EMAIL="yth@ythogtha.org"
diff --git a/development/textadept/update_urls.sh b/development/textadept/update_urls.sh
new file mode 100644
index 0000000000..c7492a5b49
--- /dev/null
+++ b/development/textadept/update_urls.sh
@@ -0,0 +1,30 @@
+#!/bin/bash
+# Helper for maintainer when updating textadept.info, and textadept.SlackBuild
+# for third party sources files used when building.
+VERSION=$(grep VERSION textadept.info | cut -d\" -f2)
+url=$(grep DOWNLOAD textadept.info | cut -d\" -f2 | tr -d ' \\\"')
+md5_=$(curl -Ls $url | md5sum | cut -d\ -f1)
+echo -ne "DOWNLOAD=\"$url"
+curl -s https://raw.githubusercontent.com/orbitalquark/textadept/textadept_${VERSION}/CMakeLists.txt > CMakeLists.txt
+md5=()
+files=()
+for pkg in $(grep "_url " CMakeLists.txt | cut -d\( -f2| cut -d_ -f1 | sort -u); do
+ ext=tgz
+ file=$(grep "(${pkg}_${ext} " CMakeLists.txt | head -1 | sed "s#.*${pkg}_${ext} \(.*\)[)]#\1#")
+ [ -z "$file" ] && ext=zip && file=$(grep "(${pkg}_${ext} " CMakeLists.txt | head -1 | sed "s#.*${pkg}_${ext} \(.*\)[)]#\1#")
+ url=$(grep "(${pkg}_url https" CMakeLists.txt | sed "s#.*${pkg}_url \(.*\)..${pkg}_${ext}..#\1${file}#")
+ [ -z "$url" ] && url=$(grep -Pzo "(?s)\(${pkg}_url\s*https\N*" CMakeLists.txt | tr -d '\n' | sed "s#.*${pkg}_url.*\(https.*\)..${pkg}_${ext}.*#\1${file}#")
+ #echo "$pkg.$ext[$file]: $url"
+ md5=( "${md5[@]}" $(curl -Ls $url | md5sum | cut -d\ -f1))
+ files=( "${files[@]}" $file)
+ echo -ne " \\\\\\n $url"
+done
+echo '"'
+echo -ne "MD5SUM=\"$md5_"
+for m in ${md5[@]}; do
+ echo -ne " \\\\\\n $m"
+done
+echo '"'
+for f in ${files[@]}; do
+ echo "ln -s \$CWD/*${f#v*} build/_deps/$f"
+done