summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--misc/ydpdict/README6
-rw-r--r--misc/ydpdict/doinst.sh14
-rw-r--r--misc/ydpdict/slack-desc19
-rw-r--r--misc/ydpdict/ydpdict.SlackBuild92
-rw-r--r--misc/ydpdict/ydpdict.conf38
-rw-r--r--misc/ydpdict/ydpdict.info10
-rw-r--r--misc/ydpdict/ydpdict.patch151
7 files changed, 330 insertions, 0 deletions
diff --git a/misc/ydpdict/README b/misc/ydpdict/README
new file mode 100644
index 0000000000..8cf4135c89
--- /dev/null
+++ b/misc/ydpdict/README
@@ -0,0 +1,6 @@
+ydpdict is a console and terminal shell for multimedia Collins
+English-Polish and Polish-English dictionary as well as Langenscheidt
+German-Polish and Polish-German dictionary provided by Young Digital
+Planet S.A.
+
+ydpdict works with libydpdict library.
diff --git a/misc/ydpdict/doinst.sh b/misc/ydpdict/doinst.sh
new file mode 100644
index 0000000000..e962b6439a
--- /dev/null
+++ b/misc/ydpdict/doinst.sh
@@ -0,0 +1,14 @@
+config() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
+ # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+
+config etc/ydpdict.conf.new
diff --git a/misc/ydpdict/slack-desc b/misc/ydpdict/slack-desc
new file mode 100644
index 0000000000..925158db98
--- /dev/null
+++ b/misc/ydpdict/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 ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+ydpdict: ydpdict (shell for Collins and Langenscheidt dictionaries)
+ydpdict:
+ydpdict: ydpdict is a console and terminal shell for multimedia Collins
+ydpdict: English-Polish and Polish-English dictionary as well as Langenscheidt
+ydpdict: German-Polish and Polish-German dictionary provided by Young Digital
+ydpdict: Planet S.A. (see: http://www.ydp.com.pl/słowniki-multimedialne).
+ydpdict:
+ydpdict: ydpdict works with libydpdict library.
+ydpdict:
+ydpdict:
+ydpdict:
diff --git a/misc/ydpdict/ydpdict.SlackBuild b/misc/ydpdict/ydpdict.SlackBuild
new file mode 100644
index 0000000000..091768ac73
--- /dev/null
+++ b/misc/ydpdict/ydpdict.SlackBuild
@@ -0,0 +1,92 @@
+#!/bin/sh
+
+# Slackware build script for ydpdict
+# Written by Cezary M. Kruk (c.kruk@bigfoot.com)
+
+# Modified by the SlackBuilds.org project
+
+PRGNAM=ydpdict
+VERSION=${VERSION:-1.0.2}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i486 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -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 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 {} \;
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --bindir=/usr/bin \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --disable-static \
+ --build=$ARCH-slackware-linux
+
+patch -p0 < $CWD/ydpdict.patch
+
+make
+make install DESTDIR=$PKG
+
+cp -p contrib/[wz]* $PKG/usr/share/ydpdict
+
+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
+
+find $PKG/usr/man -type f -exec gzip -9 {} \;
+for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+
+mv $PKG/etc/ydpdict.conf $PKG/etc/ydpdict.conf.new
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a COPYING README $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/misc/ydpdict/ydpdict.conf b/misc/ydpdict/ydpdict.conf
new file mode 100644
index 0000000000..5550ec6dc9
--- /dev/null
+++ b/misc/ydpdict/ydpdict.conf
@@ -0,0 +1,38 @@
+# Path to dictionary files (*.dat and *.idx). Filenames within the directory
+# MUST be written using lowercase letters.
+
+Path /usr/share/ydpdict/database
+
+# Path to pronuciation samples.
+
+CDPath /usr/share/ydpdict
+
+# Path to external sound player. If unset, internal playback routines are
+# used.
+
+#Player /usr/bin/play
+Player /usr/bin/mpg321
+#Player /usr/bin/ogg123
+
+# Default dictionary (0 - English-Polish, 1 - Polish-English,
+# 2 - German-Polish, 3 - Polish-German)
+
+DefaultDictionary 0
+
+# Color support is autodetected, but color display can be forced with this
+# option.
+
+UseColor On
+
+# Terminal transparency
+
+UseTransparent On
+
+# Colors used to display definitions can be set to one of the following:
+# Black, Red, Green, Brown, Blue, Magenta, Cyan, White, Gray, Yellow,
+# LightRed, LightGreen, LightBlue, LightMagenta, LightCyan, LightWhite.
+# Note: for colors with "Light" prefix, emphasis will be invisible.
+
+Color Blue
+DefinitionColor LightCyan
+InformationColor LightGreen
diff --git a/misc/ydpdict/ydpdict.info b/misc/ydpdict/ydpdict.info
new file mode 100644
index 0000000000..38d6266e12
--- /dev/null
+++ b/misc/ydpdict/ydpdict.info
@@ -0,0 +1,10 @@
+PRGNAM="ydpdict"
+VERSION="1.0.2"
+HOMEPAGE="http://toxygen.net/ydpdict/"
+DOWNLOAD="http://toxygen.net/ydpdict/ydpdict-1.0.2.tar.gz"
+MD5SUM="339be2191e94f0af5abcd037c3ef368a"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES="libydpdict"
+MAINTAINER="Cezary M. Kruk"
+EMAIL="c.kruk@bigfoot.com"
diff --git a/misc/ydpdict/ydpdict.patch b/misc/ydpdict/ydpdict.patch
new file mode 100644
index 0000000000..59d184415f
--- /dev/null
+++ b/misc/ydpdict/ydpdict.patch
@@ -0,0 +1,151 @@
+--- src/ydpdict.c 2013-01-08 00:14:03.000000000 +0100
++++ src/ydpdict.c 2015-04-02 04:17:47.722162971 +0200
+@@ -118,71 +118,71 @@
+
+ const char *qualifiers[][2] =
+ {
+- { "abbr", N_("abbreviation") },
+- { "acc", N_("accusative") },
+- { "adj", N_("adjective") },
+- { "adv", N_("adverb") },
+- { "art", N_("article") },
+- { "attr", N_("attribute") },
+- { "aux", N_("auxiliary") },
+- { "comp", N_("comparative degree") },
+- { "compl.", N_("complement") },
+- { "conj", N_("conjunction") },
+- { "cpd", N_("compound") },
+- { "dat", N_("dative") },
+- { "def", N_("definite") },
+- { "decl", N_("declined") },
+- { "dimin", N_("diminutive") },
+- { "excl", N_("exclamation") },
+- { "f", N_("feminine") },
+- { "fig", N_("figurative") },
+- { "fml", N_("formal") },
+- { "fus", N_("fused") },
+- { "gen", N_("genitive") },
+- { "imp", N_("imperfective") },
+- { "imperf", N_("imperfective") },
+- { "impers", N_("impersonal") },
+- { "indef", N_("indefinite") },
+- { "inf", N_("informal") },
+- { "infin", N_("infinitive") },
+- { "instr", N_("instrumental") },
+- { "inv", N_("invariable") },
+- { "irreg", N_("irregular") },
+- { "ksi", N_("literary") },
+- { "liter.", N_("literary") },
+- { "loc", N_("locative") },
+- { "m", N_("masculine") },
+- { "modal", N_("modal") },
+- { "n", N_("noun") },
+- { "nom", N_("nominative") },
+- { "npl", N_("noun plural") },
+- { "nt", N_("neuter") },
+- { "num", N_("numeral") },
+- { "nvir", N_("non-virile gender") },
+- { "old", N_("old") },
+- { "part", N_("particle") },
+- { "pej", N_("pejorative") },
+- { "perf", N_("perfective") },
+- { "pl", N_("plural") },
+- { "polite", N_("polite") },
+- { "poss.", N_("possesive") },
+- { "post", N_("postposition") },
+- { "pot", N_("informal") },
+- { "pp", N_("past participle") },
+- { "pref", N_("prefix") },
+- { "pred", N_("predicate") },
+- { "prep", N_("preposition") },
+- { "pron", N_("pronoun") },
+- { "pt", N_("past simple") },
+- { "sg", N_("singular") },
+- { "suff", N_("suffix") },
+- { "superl", N_("superlative degree") },
+- { "vb", N_("verb") },
+- { "vi", N_("intransitive verb") },
+- { "vir", N_("virile gender") },
+- { "voc", N_("vocative") },
+- { "vr", N_("reflexive verb") },
+- { "vt", N_("transitive verb") },
++ { "abbr", N_(" abbreviation (skrót)") },
++ { "acc", N_(" accusative (biernik)") },
++ { "adj", N_(" adjective (przymiotnik)") },
++ { "adv", N_(" adverb (przysłówek)") },
++ { "art", N_(" article (przedimek)") },
++ { "attr", N_(" attribute (przydawka)") },
++ { "aux", N_(" auxiliary (posiłkowy)") },
++ { "comp", N_(" comparative degree (stopień wyższy)") },
++ { "compl.", N_("complement (dopełnienie)") },
++ { "conj", N_(" conjunction (spójnik)") },
++ { "cpd", N_(" compound (złożony)") },
++ { "dat", N_(" dative (celownik)") },
++ { "def", N_(" definite (określony)") },
++ { "decl", N_(" declined (odmieniany)") },
++ { "dimin", N_(" diminutive (zdrobnienie)") },
++ { "excl", N_(" exclamation (wykrzyknik)") },
++ { "f", N_(" feminine (rodzaj żeński)") },
++ { "fig", N_(" figurative (przenośny)") },
++ { "fml", N_(" formal (oficjalny)") },
++ { "fus", N_(" fused (złożony)") },
++ { "gen", N_(" genitive (dopełniacz)") },
++ { "imp", N_(" imperfective (niedokonany)") },
++ { "imperf", N_("imperfective (niedokonany)") },
++ { "impers", N_("impersonal (bezosobowy)") },
++ { "indef", N_(" indefinite (nieokreślony)") },
++ { "inf", N_(" informal (potoczny)") },
++ { "infin", N_(" infinitive (bezokolicznik)") },
++ { "instr", N_(" instrumental (narzędnik)") },
++ { "inv", N_(" invariable (nieodmienny)") },
++ { "irreg", N_(" irregular (nieregularny)") },
++ { "ksi", N_(" literary (książkowy)") },
++ { "liter.", N_("literary (książkowy)") },
++ { "loc", N_(" locative (miejscownik)") },
++ { "m", N_(" masculine (rodzaj męski)") },
++ { "modal", N_(" modal (modalny)") },
++ { "n", N_(" noun (rzeczownik)") },
++ { "nom", N_(" nominative (mianownik)") },
++ { "npl", N_(" noun plural (rzeczownik mnogi)") },
++ { "nt", N_(" neuter (rodzaj nijaki)") },
++ { "num", N_(" numeral (liczebnik)") },
++ { "nvir", N_(" non-virile gender (rodzaj niemęskoosobowy)") },
++ { "old", N_(" old (dawny)") },
++ { "part", N_(" particle (partykuła)") },
++ { "pej", N_(" pejorative (pejoratywny)") },
++ { "perf", N_(" perfective (dokonany)") },
++ { "pl", N_(" plural (liczba mnoga)") },
++ { "polite", N_("polite (uprzejmy)") },
++ { "poss.", N_(" possessive (dzierżawczy)") },
++ { "post", N_(" postposition (postpozycja)") },
++ { "pot", N_(" informal (potoczny)") },
++ { "pp", N_(" past participle (imiesłów bierny)") },
++ { "pref", N_(" prefix (przedrostek)") },
++ { "pred", N_(" predicate (orzeczenie)") },
++ { "prep", N_(" preposition (przyimek)") },
++ { "pron", N_(" pronoun (zaimek)") },
++ { "pt", N_(" past simple (czas przeszły prosty)") },
++ { "sg", N_(" singular (liczba pojedyncza)") },
++ { "suff", N_(" suffix (przyrostek)") },
++ { "superl", N_("superlative degree (stopień najwyższy)") },
++ { "vb", N_(" verb (czasownik)") },
++ { "vi", N_(" intransitive verb (czsownik nieprzechodni)") },
++ { "vir", N_(" virile gender (rodzaj męskoosobowy)") },
++ { "voc", N_(" vocative (wołacz)") },
++ { "vr", N_(" reflexive verb (czasownik zwrotny)") },
++ { "vt", N_(" transitive verb (czasownik przechodni)") },
+ };
+
+ const char *qualifiers_format = "{\\line{\\cf2 %s} {%s}}";
+@@ -986,9 +986,9 @@
+
+ case 27: /* ESC */
+ if (focus == 2) {
+- focus = saved_focus;
++ focus = 0;
+ def_update = 1;
+- def_index = def_saved_index;
++ def_index = 0;
+ } else if (focus == 1) {
+ focus = 0;
+ } else {