diff options
author | Arn0 <yth@ythogtha.org> | 2023-09-19 08:53:40 +0200 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2023-09-23 11:33:40 +0700 |
commit | 198511c9cf393ad45521dff85b969d8474ad9c94 (patch) | |
tree | d773c4bcc627ba0cf5eee28773e1917f95d887c9 /development | |
parent | 0c8e3bdcdccc4ec71070f2c43b53788ed85c1e19 (diff) |
development/textadept: Update for version 12.1, new maint.
This now builds from source.
Signed-off-by: Andrew Clemons <andrew.clemons@gmail.com>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'development')
-rw-r--r-- | development/textadept/README | 16 | ||||
-rw-r--r-- | development/textadept/doinst.sh | 6 | ||||
-rw-r--r-- | development/textadept/textadept.SlackBuild | 81 | ||||
-rw-r--r-- | development/textadept/textadept.info | 40 | ||||
-rw-r--r-- | development/textadept/update_urls.sh | 29 |
5 files changed, 137 insertions, 35 deletions
diff --git a/development/textadept/README b/development/textadept/README index b270b98051106..14d4a0f3a942d 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 9a8ded3c60349..aea0f894eb32b 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 90bfcd616ca59..483cb5fa38833 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.1} 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,69 @@ 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/*scintilla536.tgz build/_deps/scintilla536.tgz +ln -s $CWD/*e88bbcfecae46b48b79d8156ea7129411b5c847d.zip build/_deps/e88bbcfecae46b48b79d8156ea7129411b5c847d.zip +ln -s $CWD/*libtermkey-0.22.tar.gz build/_deps/libtermkey-0.22.tar.gz +cd build + cmake \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \ + .. + make + make install/strip DESTDIR=$PKG +cd .. + +# 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/ +ln -sf /usr/share/$PRGNAM/"${PRGNAM}" $PKG/usr/bin/ +ln -sf /usr/share/$PRGNAM/"${PRGNAM}"-curses $PKG/usr/bin/ +ln -sf /usr/share/$PRGNAM/"${PRGNAM}"-gtk $PKG/usr/bin/ +ln -sf /usr/share/$PRGNAM/"${PRGNAM}" $PKG/usr/bin/tad +ln -sf /usr/share/$PRGNAM/"${PRGNAM}"-gtk $PKG/usr/bin/tadg +ln -sf /usr/share/$PRGNAM/"${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 +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 +ln -sf /usr/share/$PRGNAM/"${PRGNAM}".desktop $PKG/usr/share/applications +ln -sf /usr/share/$PRGNAM/"${PRGNAM}"-curses.desktop $PKG/usr/share/applications +ln -sf /usr/share/$PRGNAM/"${PRGNAM}"-gtk.desktop $PKG/usr/share/applications 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 a79c7db52d105..26c29d3a97356 100644 --- a/development/textadept/textadept.info +++ b/development/textadept/textadept.info @@ -1,10 +1,34 @@ PRGNAM="textadept" -VERSION="10.8" +VERSION="12.1" 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.1/textadept-textadept_12.1.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/scintilla536.tgz \ + https://github.com/orbitalquark/scintillua/archive/e88bbcfecae46b48b79d8156ea7129411b5c847d.zip \ + https://www.leonerd.org.uk/code/libtermkey/libtermkey-0.22.tar.gz" +MD5SUM="ae795366cf30c82c33c85598df329134 \ + 0908cb133f473506a40807c0204a960a \ + d718cd5a59438be666d1575855be72c3 \ + 210fab20f43c7d77af7249fd50c2cdc1 \ + c44cc7dee6a38c273a8c373d4e768753 \ + 842a538b403b5639510c9b6fffd2c75b \ + 25a429319dff20dfbfb9956c2b5be911 \ + 06d657aec0e655d5a335c5a5dc888ef3 \ + c3314ca8c5be471888342efeee3a46d2 \ + dd7c1f88dd42ae5f2113ba5fe0df2561 \ + 15a356949d7386827d8881c0cc2a30e9 \ + dc6ef03e04a76f4c765ee46c41978c34 \ + 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 0000000000000..123b10e0ead2d --- /dev/null +++ b/development/textadept/update_urls.sh @@ -0,0 +1,29 @@ +#!/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}#") + 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 |