From ae6327d72dd4b379d91f63cabc05c0eed6f5171b Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Mon, 2 Nov 2020 13:31:55 -0500 Subject: accessibility/svkbd: Updated for version 0.2.1. Signed-off-by: B. Watson Signed-off-by: Willy Sudiarto Raharjo --- accessibility/svkbd/README | 18 ++-- accessibility/svkbd/old_fontconfig.diff | 29 ++++++ accessibility/svkbd/slack-desc | 6 +- accessibility/svkbd/svkbd.1 | 179 -------------------------------- accessibility/svkbd/svkbd.SlackBuild | 55 +++++++--- accessibility/svkbd/svkbd.info | 6 +- accessibility/svkbd/svkbd.pod | 58 ----------- 7 files changed, 85 insertions(+), 266 deletions(-) create mode 100644 accessibility/svkbd/old_fontconfig.diff delete mode 100644 accessibility/svkbd/svkbd.1 delete mode 100644 accessibility/svkbd/svkbd.pod (limited to 'accessibility') diff --git a/accessibility/svkbd/README b/accessibility/svkbd/README index 0f63196b8b..42c6b6af55 100644 --- a/accessibility/svkbd/README +++ b/accessibility/svkbd/README @@ -3,19 +3,23 @@ svkbd (simple virtual keyboard) This is a simple virtual keyboard, intended to be used in environments where no keyboard is available. -Configuration is done at build time. The font and colors can be set in -config.h (in the same directory as the SlackBuild). The key layouts -are set with the environment variable LAYOUTS, which can be set to -a space-separated list of one or more of: +The default font and other options can be set in config.h (in the same +directory as the SlackBuild). To do this, extract config.def.h from +the source, copy it to config.h, and edit. -en - English (QWERTY, the default) +The key layouts are set with the environment variable LAYOUTS, which +can be set to a space-separated list of one or more of: + +mobile-intl - Multilayer international (QWERTY) +mobule-plain - Non-layered international (QWERTY) arrows - Arrow keys only +en - English (QWERTY) de - German (QWERTZ) ru - Russian (Cyrillic) sh - Slavic (QWERTZ) -all - All of the above +all - All of the above -Default value for LAYOUTS is "en". +Default value for LAYOUTS is "en mobile-intl". The package will contain binaries for each layout (e.g. svkbd-en, svkbd-ru) in /usr/bin. The first layout listed in LAYOUTS (or svkbd-en diff --git a/accessibility/svkbd/old_fontconfig.diff b/accessibility/svkbd/old_fontconfig.diff new file mode 100644 index 0000000000..a076227512 --- /dev/null +++ b/accessibility/svkbd/old_fontconfig.diff @@ -0,0 +1,29 @@ +diff -Naur svkbd-0.2.1/drw.c svkbd-0.2.1.patched/drw.c +--- svkbd-0.2.1/drw.c 2020-09-18 07:02:35.000000000 -0400 ++++ svkbd-0.2.1.patched/drw.c 2020-11-02 12:45:36.377138299 -0500 +@@ -133,6 +133,7 @@ + die("no font specified."); + } + ++#ifdef FC_COLOR + /* Do not allow using color fonts. This is a workaround for a BadLength + * error from Xft with color glyphs. Modelled on the Xterm workaround. See + * https://bugzilla.redhat.com/show_bug.cgi?id=1498269 +@@ -145,6 +146,7 @@ + XftFontClose(drw->dpy, xfont); + return NULL; + } ++#endif + + font = ecalloc(1, sizeof(Fnt)); + font->xfont = xfont; +@@ -351,7 +353,9 @@ + fcpattern = FcPatternDuplicate(drw->fonts->pattern); + FcPatternAddCharSet(fcpattern, FC_CHARSET, fccharset); + FcPatternAddBool(fcpattern, FC_SCALABLE, FcTrue); ++#ifdef FC_COLOR + FcPatternAddBool(fcpattern, FC_COLOR, FcFalse); ++#endif + + FcConfigSubstitute(NULL, fcpattern, FcMatchPattern); + FcDefaultSubstitute(fcpattern); diff --git a/accessibility/svkbd/slack-desc b/accessibility/svkbd/slack-desc index b193e1625f..455bebd9bf 100644 --- a/accessibility/svkbd/slack-desc +++ b/accessibility/svkbd/slack-desc @@ -11,9 +11,9 @@ svkbd: svkbd: This is a simple virtual keyboard, intended to be used in environments svkbd: where no keyboard is available. svkbd: -svkbd: This package built with layouts: @LAYOUTS@ -svkbd: Default layout: @FIRST@ -svkbd: +svkbd: This package built with layouts: +svkbd: @LAYOUTS@ svkbd: +svkbd: Default layout: @FIRST@ svkbd: svkbd: diff --git a/accessibility/svkbd/svkbd.1 b/accessibility/svkbd/svkbd.1 deleted file mode 100644 index 1d52ab0855..0000000000 --- a/accessibility/svkbd/svkbd.1 +++ /dev/null @@ -1,179 +0,0 @@ -.\" Automatically generated by Pod::Man 2.27 (Pod::Simple 3.28) -.\" -.\" Standard preamble: -.\" ======================================================================== -.de Sp \" Vertical space (when we can't use .PP) -.if t .sp .5v -.if n .sp -.. -.de Vb \" Begin verbatim text -.ft CW -.nf -.ne \\$1 -.. -.de Ve \" End verbatim text -.ft R -.fi -.. -.\" Set up some character translations and predefined strings. \*(-- will -.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left -.\" double quote, and \*(R" will give a right double quote. \*(C+ will -.\" give a nicer C++. Capital omega is used to do unbreakable dashes and -.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, -.\" nothing in troff, for use with C<>. -.tr \(*W- -.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' -.ie n \{\ -. ds -- \(*W- -. ds PI pi -. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch -. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch -. ds L" "" -. ds R" "" -. ds C` "" -. ds C' "" -'br\} -.el\{\ -. ds -- \|\(em\| -. ds PI \(*p -. ds L" `` -. ds R" '' -. ds C` -. ds C' -'br\} -.\" -.\" Escape single quotes in literal strings from groff's Unicode transform. -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" -.\" If the F register is turned on, we'll generate index entries on stderr for -.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index -.\" entries marked with X<> in POD. Of course, you'll have to process the -.\" output yourself in some meaningful fashion. -.\" -.\" Avoid warning from groff about undefined register 'F'. -.de IX -.. -.nr rF 0 -.if \n(.g .if rF .nr rF 1 -.if (\n(rF:(\n(.g==0)) \{ -. if \nF \{ -. de IX -. tm Index:\\$1\t\\n%\t"\\$2" -.. -. if !\nF==2 \{ -. nr % 0 -. nr F 2 -. \} -. \} -.\} -.rr rF -.\" -.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). -.\" Fear. Run. Save yourself. No user-serviceable parts. -. \" fudge factors for nroff and troff -.if n \{\ -. ds #H 0 -. ds #V .8m -. ds #F .3m -. ds #[ \f1 -. ds #] \fP -.\} -.if t \{\ -. ds #H ((1u-(\\\\n(.fu%2u))*.13m) -. ds #V .6m -. ds #F 0 -. ds #[ \& -. ds #] \& -.\} -. \" simple accents for nroff and troff -.if n \{\ -. ds ' \& -. ds ` \& -. ds ^ \& -. ds , \& -. ds ~ ~ -. ds / -.\} -.if t \{\ -. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" -. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' -. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' -. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' -. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' -. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' -.\} -. \" troff and (daisy-wheel) nroff accents -.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' -.ds 8 \h'\*(#H'\(*b\h'-\*(#H' -.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] -.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' -.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' -.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] -.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] -.ds ae a\h'-(\w'a'u*4/10)'e -.ds Ae A\h'-(\w'A'u*4/10)'E -. \" corrections for vroff -.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' -.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' -. \" for low resolution devices (crt and lpr) -.if \n(.H>23 .if \n(.V>19 \ -\{\ -. ds : e -. ds 8 ss -. ds o a -. ds d- d\h'-1'\(ga -. ds D- D\h'-1'\(hy -. ds th \o'bp' -. ds Th \o'LP' -. ds ae ae -. ds Ae AE -.\} -.rm #[ #] #H #V #F C -.\" ======================================================================== -.\" -.IX Title "SVKBD 1" -.TH SVKBD 1 "2014-03-18" "20140130" "Suckless.org Tools" -.\" For nroff, turn off justification. Always turn off hyphenation; it makes -.\" way too many mistakes in technical documents. -.if n .ad l -.nh -.SH "NAME" -svkbd \- simple virtual keyboard -.SH "SYNOPSIS" -.IX Header "SYNOPSIS" -\&\fBsvkbd\fR\-\fIlayout\fR [\-d] [\-g geometry] -.PP -\&\fBsvkbd\fR\-\fIlayout\fR [\-v|\-h] -.SH "DESCRIPTION" -.IX Header "DESCRIPTION" -\&\fBsvkbd\fR is a simple mouse-operated virtual keyboard, intended to be -used in environments where no keyboard is available. -.SH "OPTIONS" -.IX Header "OPTIONS" -.IP "\fB\-d\fR" 4 -.IX Item "-d" -This tells \fBsvkbd\fR to announce itself being a dock window, which then -is managed differently between different window managers. If using dwm -and the dock patch, then this will make svkbd being managed by dwm and -some space of the screen being reserved for it. -.IP "\fB\-g geometry\fR" 4 -.IX Item "-g geometry" -Sets starting size and position. Standard X11 geometry specification, -WxH[+\-]X[+\-Y], such as used by \fIxterm\fR\|(1). -.IP "\fB\-v\fR" 4 -.IX Item "-v" -Prints the version number and exits. -.IP "\fB\-h\fR" 4 -.IX Item "-h" -Prints usage message and exits. -.SH "ENVIRONMENT" -.IX Header "ENVIRONMENT" -\&\fB\s-1DISPLAY\s0\fR \- used in the usual way. -.SH "AUTHORS" -.IX Header "AUTHORS" -\&\fBsvkbd\fR was written by Christoph Lohmann (20h@r\-36.net) -and Enno Boland (g # s01 ' de) -.PP -This man page written by B. Watson for the SlackBuilds.org project. It -may be used by anyone. diff --git a/accessibility/svkbd/svkbd.SlackBuild b/accessibility/svkbd/svkbd.SlackBuild index 3e751ad190..269cebf05a 100644 --- a/accessibility/svkbd/svkbd.SlackBuild +++ b/accessibility/svkbd/svkbd.SlackBuild @@ -6,10 +6,15 @@ # Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. -# VERSION is the date of the last git commit. +# 20201102 bkw: +# - updated for v0.2.1. +# - add mobile-intl to default LAYOUTS +# - get rid of my man page, upstream now ships one +# - compile fix: old_fontconfig.diff +# - actually support custom config.h in SlackBuild dir PRGNAM=svkbd -VERSION=${VERSION:-20140130} +VERSION=${VERSION:-0.2.1} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} @@ -49,35 +54,53 @@ rm -rf $PRGNAM-$VERSION tar xvf $CWD/$PRGNAM-$VERSION.tar.gz cd $PRGNAM-$VERSION chown -R root:root . -find -L . \ - \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ - -o -perm 511 \) -exec chmod 755 {} \; -o \ - \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ - -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; +find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \ + \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+ -sed -i -e "s,\,lib$LIBDIRSUFFIX," -e "s,-Os,$SLKCFLAGS," config.mk +# 20201102 bkw: newer fontconfigs support color fonts, but there is a +# bug that causes security issues when they're used. svkbd contains +# code to disable color fonts... which we don't need (and can't use) +# because our fontconfig in 14.2 is too old to support color anyway. +patch -p1 < $CWD/old_fontconfig.diff -LAYOUTS="${LAYOUTS:-en}" +[ -e $CWD/config.h ] && cat $CWD/config.h > config.def.h + +LAYOUTS="${LAYOUTS:-en mobile-intl}" if [ "$LAYOUTS" = "all" ]; then LAYOUTS="$( ls layout.*.h|cut -d. -f2 | xargs echo )" - FIRST="en" + FIRST=en else FIRST="$( echo $LAYOUTS | cut -d' ' -f1)" fi -mkdir -p $PKG/usr/man/man1 -gzip -9c < $CWD/$PRGNAM.1 > $PKG/usr/man/man1/$PRGNAM.1.gz - for i in ${LAYOUTS}; do if [ -e layout.$i.h ]; then - make install LAYOUT="$i" PREFIX=/usr DESTDIR=$PKG - ln -s $PRGNAM.1.gz $PKG/usr/man/man1/$PRGNAM-$i.1.gz + make clean + make install \ + CFLAGS="$SLKCFLAGS" \ + CPPFLAGS="$SLKCFLAGS" \ + LAYOUT="$i" \ + PREFIX=/usr \ + MANPREFIX=/usr/man \ + X11LIB=/usr/lib$LIBDIRSUFFIX \ + DESTDIR=$PKG else - echo "No such layout '$i', read the README." + echo "*** $0: No such layout '$i', read the README." 1>&2 exit 1 fi done +# 20201102 bkw: bit of paranoia here. +if [ "$(/bin/ls $PKG/usr/bin | wc -l)" == 0 ]; then + echo "*** $0: no valid layouts! LAYOUTS is \"$LAYOUTS\"" 1>&2 + exit 1 +fi + +gzip $PKG/usr/man/man1/$PRGNAM.1 +for i in ${LAYOUTS}; do + ln -s $PRGNAM.1.gz $PKG/usr/man/man1/$PRGNAM-$i.1.gz +done + strip $PKG/usr/bin/* ln -s $PRGNAM-$FIRST $PKG/usr/bin/$PRGNAM diff --git a/accessibility/svkbd/svkbd.info b/accessibility/svkbd/svkbd.info index d8f5d4ccc2..57d4ee3db7 100644 --- a/accessibility/svkbd/svkbd.info +++ b/accessibility/svkbd/svkbd.info @@ -1,8 +1,8 @@ PRGNAM="svkbd" -VERSION="20140130" +VERSION="0.2.1" HOMEPAGE="https://tools.suckless.org/x/svkbd" -DOWNLOAD="http://ponce.cc/slackware/sources/repo/svkbd-20140130.tar.gz" -MD5SUM="d1279213dbdac77dbb7b386c138d6e61" +DOWNLOAD="https://dl.suckless.org/tools/svkbd-0.2.1.tar.gz" +MD5SUM="5cf9aabd7ba98cc390073e9302d47157" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="" diff --git a/accessibility/svkbd/svkbd.pod b/accessibility/svkbd/svkbd.pod deleted file mode 100644 index dedcb9155d..0000000000 --- a/accessibility/svkbd/svkbd.pod +++ /dev/null @@ -1,58 +0,0 @@ -# POD source for svkbd man page. Convert with: -# pod2man --stderr -s1 -c"Suckless.org Tools" -r20140130 svkbd.pod > svkbd.1 - -=pod - -=head1 NAME - -B - simple virtual keyboard - -=head1 SYNOPSIS - -B-I [-d] [-g geometry] - -B-I [-v|-h] - -=head1 DESCRIPTION - -B is a simple mouse-operated virtual keyboard, intended to be -used in environments where no keyboard is available. - -=head1 OPTIONS - -=over - -=item B<-d> - -This tells B to announce itself being a dock window, which then -is managed differently between different window managers. If using dwm -and the dock patch, then this will make svkbd being managed by dwm and -some space of the screen being reserved for it. - -=item B<-g geometry> - -Sets starting size and position. Standard X11 geometry specification, -WxH[+-]X[+-Y], such as used by xterm(1). - -=item B<-v> - -Prints the version number and exits. - -=item B<-h> - -Prints usage message and exits. - -=back - -=head1 ENVIRONMENT - -B - used in the usual way. - -=head1 AUTHORS - -B was written by Christoph Lohmann (20h@r-36.net) -and Enno Boland (g # s01 ' de) - -This man page written by B. Watson for the SlackBuilds.org project. It -may be used by anyone. -=cut -- cgit v1.2.3