diff options
author | B. Watson <yalhcru@gmail.com> | 2018-08-08 18:06:28 +0100 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2018-08-11 07:23:06 +0700 |
commit | ffffbc85eda024ac83b910393f42c59563cd928b (patch) | |
tree | 0ba379333044f213c7e5c2a3f1a19145b37a615f /development/xvi | |
parent | dc346489b44f0ce7754c030e7f17609620e752a5 (diff) | |
download | slackbuilds-ffffbc85eda024ac83b910393f42c59563cd928b.tar.gz |
development/xvi: Added (tiny but full-featured vi clone).
Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
Diffstat (limited to 'development/xvi')
-rw-r--r-- | development/xvi/README | 17 | ||||
-rw-r--r-- | development/xvi/README_SBo.txt | 14 | ||||
-rw-r--r-- | development/xvi/doinst.sh | 6 | ||||
-rw-r--r-- | development/xvi/slack-desc | 19 | ||||
-rw-r--r-- | development/xvi/xvi.SlackBuild | 93 | ||||
-rw-r--r-- | development/xvi/xvi.info | 10 |
6 files changed, 159 insertions, 0 deletions
diff --git a/development/xvi/README b/development/xvi/README new file mode 100644 index 0000000000..5f9fc07d60 --- /dev/null +++ b/development/xvi/README @@ -0,0 +1,17 @@ +xvi (tiny but full-featured vi clone) + +Xvi is a portable multi-window version of the UNIX editor 'vi', derived +from "STEVIE" in the 1980s. The program was originally developed for the +Atari ST, but has been ported to many platforms. In spite of its name, +there is, as yet, no X-Windows-specific version of it. + +It uses text windows separated by horizontal status lines on character +mode displays and the windows may represent different files being edited, +or different views on to the same file. + +Two environment variables are supported: + + OPT=-O2 - Build with regular optimization level (default is -Os). + STATIC=yes - Build the xvi binary statically linked. + +See README_SBo.txt for more details. diff --git a/development/xvi/README_SBo.txt b/development/xvi/README_SBo.txt new file mode 100644 index 0000000000..d91edb4e0c --- /dev/null +++ b/development/xvi/README_SBo.txt @@ -0,0 +1,14 @@ +The xvi binary is 2/3 the size of Slackware's nano binary, or 1/4 the +size of elvis, or 1/20 the size of vim. It's also approximately 1/2 the +size of ex-vi. This isn't quite a fair comparison as xvi is built with +-Os (optimize for size) by default. If you want to use -O2 like other +SlackBuilds do, set OPT=-O2 in the environment. xvi will be 25% larger, +but it'll still be 15% smaller than nano. + +Since xvi is a standalone binary (doesn't rely on support files, like +vim's /usr/share/vim/*), it makes a good 'system rescue' editor. If +built statically, it makes an even better rescue editor. To do this, +set STATIC=yes in the environment. In this case, xvi will be installed +to /bin, since it might be needed to recover from a "can't mount /usr" +situation. Note that xvi's internal help will not be available, if /usr +isn't mounted. diff --git a/development/xvi/doinst.sh b/development/xvi/doinst.sh new file mode 100644 index 0000000000..39380353f2 --- /dev/null +++ b/development/xvi/doinst.sh @@ -0,0 +1,6 @@ +# based on Slackware's doinst.sh for vim. + +# If there's no vi link, take over: +if [ ! -r usr/bin/vi ]; then + ( cd usr/bin ; ln -sf xvi vi ) +fi diff --git a/development/xvi/slack-desc b/development/xvi/slack-desc new file mode 100644 index 0000000000..716119b75b --- /dev/null +++ b/development/xvi/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 ':' except on otherwise blank lines. + + |-----handy-ruler------------------------------------------------------| +xvi: xvi (tiny but full-featured vi clone) +xvi: +xvi: Xvi is a portable multi-window version of the UNIX editor 'vi', +xvi: derived from "STEVIE" in the 1980s. The program was originally +xvi: developed for the Atari ST, but has been ported to many platforms. In +xvi: spite of its name, there is, as yet, no X-Windows-specific version +xvi: of it. +xvi: +xvi: It uses text windows separated by horizontal status lines on character +xvi: mode displays and the windows may represent different files being +xvi: edited, or different views on to the same file. diff --git a/development/xvi/xvi.SlackBuild b/development/xvi/xvi.SlackBuild new file mode 100644 index 0000000000..92372a28af --- /dev/null +++ b/development/xvi/xvi.SlackBuild @@ -0,0 +1,93 @@ +#!/bin/sh + +# Slackware build script for xvi + +# Written by B. Watson (yalhcru@gmail.com) + +# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. + +PRGNAM=xvi +VERSION=${VERSION:-2.50.3} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i586 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +# Since the purpose of xvi is to be tiny, let's build a tiny binary +# with -Os by default (makes the binary ~25% smaller). Upstream also +# recommends using CC=clang for a smaller binary, but with Slack 14.2's +# older versions of gcc and clang, gcc -Os actually beats clang -Os by +# a few KB. +OPT="${OPT:--Os}" + +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="$OPT -march=i586 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="$OPT -march=i686 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="$OPT -fPIC" + LIBDIRSUFFIX="64" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +fi + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +cd $PRGNAM-$VERSION +chown -R root:root . +find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \ + \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+ + +# Fix man page slightly: "/usr/lib/xvi.helpDefault help file." should +# get a space before "Default". +sed -i 's/.Default help file\./\n&/' doc/$PRGNAM.1 + +if [ "$STATIC" = "yes" ]; then + SLKCFLAGS="$SLKCFLAGS -static" + BINDIR="$PKG/bin" +else + BINDIR="$PKG/usr/bin" +fi + +# too many \ here for comfortable reading, sorry. +SLKCFLAGS="$SLKCFLAGS -DHELPFILE=\\\"/usr/share/$PRGNAM/$PRGNAM.help\\\"" + +make -C src -f makefile.lnx DEBUGFLAG="" OPTFLAG="$SLKCFLAGS" + +# there's a 'make install' but it's incomplete and wrong, so: +install -D -s -m0755 -oroot -groot src/$PRGNAM $BINDIR/$PRGNAM +install -D -m0644 src/$PRGNAM.help $PKG/usr/share/$PRGNAM/$PRGNAM.help +mkdir -p $PKG/usr/man/man1 +gzip -9c doc/$PRGNAM.1 > $PKG/usr/man/man1/$PRGNAM.1.gz + +# top-level README just has pointers to the other docs, don't need it. +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a doc/README doc/COPYING RELEASE* BUGS issues \ + $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc +cat $CWD/doinst.sh > $PKG/install/doinst.sh + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/development/xvi/xvi.info b/development/xvi/xvi.info new file mode 100644 index 0000000000..80512ed6d3 --- /dev/null +++ b/development/xvi/xvi.info @@ -0,0 +1,10 @@ +PRGNAM="xvi" +VERSION="2.50.3" +HOMEPAGE="https://martinwguy.github.io/xvi/" +DOWNLOAD="https://martinwguy.github.io/xvi/download/xvi-2.50.3.tar.gz" +MD5SUM="7eb9cde3f587879cf5f4133895f4dae7" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="" +MAINTAINER="B. Watson" +EMAIL="yalhcru@gmail.com" |