SF.net SVN: gar:[22564] csw/mgar/pkg/dictd/trunk

pfelecan at users.sourceforge.net pfelecan at users.sourceforge.net
Thu Nov 21 15:01:58 CET 2013


Revision: 22564
          http://gar.svn.sourceforge.net/gar/?rev=22564&view=rev
Author:   pfelecan
Date:     2013-11-21 14:01:57 +0000 (Thu, 21 Nov 2013)
Log Message:
-----------
dictd/trunk:
- sub-packages fine tuning
- add documentation and examples
- add configuration files
- add configuration utility

Modified Paths:
--------------
    csw/mgar/pkg/dictd/trunk/Makefile

Added Paths:
-----------
    csw/mgar/pkg/dictd/trunk/files/0004-fix-hyphen-used-as-minus-sign.patch
    csw/mgar/pkg/dictd/trunk/files/0005-use-transliteration-with-iconv.patch
    csw/mgar/pkg/dictd/trunk/files/0006-fix-inexistent-groff-macro.patch
    csw/mgar/pkg/dictd/trunk/files/0007-close-all-files-except-standard-streams.patch
    csw/mgar/pkg/dictd/trunk/files/0008-fix-spelling-typos.patch
    csw/mgar/pkg/dictd/trunk/files/README.Index2suffix
    csw/mgar/pkg/dictd/trunk/files/README.Index2word
    csw/mgar/pkg/dictd/trunk/files/README.Unformat
    csw/mgar/pkg/dictd/trunk/files/README.Virtual_dictionaries
    csw/mgar/pkg/dictd/trunk/files/colorit.conf
    csw/mgar/pkg/dictd/trunk/files/dict.conf
    csw/mgar/pkg/dictd/trunk/files/dictd.conf
    csw/mgar/pkg/dictd/trunk/files/dictd.order
    csw/mgar/pkg/dictd/trunk/files/dictd_virtual2.conf
    csw/mgar/pkg/dictd/trunk/files/dictdconfig
    csw/mgar/pkg/dictd/trunk/files/dictdconfig.8
    csw/mgar/pkg/dictd/trunk/files/dictdconfig.alias
    csw/mgar/pkg/dictd/trunk/files/readme-dictd-locales

Modified: csw/mgar/pkg/dictd/trunk/Makefile
===================================================================
--- csw/mgar/pkg/dictd/trunk/Makefile	2013-11-20 22:39:44 UTC (rev 22563)
+++ csw/mgar/pkg/dictd/trunk/Makefile	2013-11-21 14:01:57 UTC (rev 22564)
@@ -15,9 +15,32 @@
 MASTER_SITES	=	$(SF_MIRRORS)
 SF_PROJECT		=	dict
 DISTFILES 		=	$(DISTNAME).tar.gz
+# documentation
+DISTFILES		+=	readme-dictd-locales
+DISTFILES		+=	README.Index2suffix
+DISTFILES		+=	README.Index2word
+DISTFILES		+=	README.Unformat
+DISTFILES		+=	README.Virtual_dictionaries
+# configuration:
+DISTFILES		+=	colorit.conf
+DISTFILES		+=	dict.conf
+DISTFILES		+=	dictd.conf
+DISTFILES		+=	dictd.order
+DISTFILES		+=	dictdconfig.alias
+# example:
+DISTFILES		+=	dictd_virtual2.conf
+# configurator:
+DISTFILES		+=	dictdconfig
+DISTFILES		+=	dictdconfig.8
+# patches:
 PATCHFILES		+=	0001-fix-and-enhance-documentation.patch
 PATCHFILES		+=	0002-test-drivers-use-bash.patch
 PATCHFILES		+=	0003-plugin-needs-limits.patch
+PATCHFILES		+=	0004-fix-hyphen-used-as-minus-sign.patch
+PATCHFILES		+=	0005-use-transliteration-with-iconv.patch
+PATCHFILES		+=	0006-fix-inexistent-groff-macro.patch
+PATCHFILES		+=	0007-close-all-files-except-standard-streams.patch
+PATCHFILES		+=	0008-fix-spelling-typos.patch
 
 BUILD_DEP_PKGS	+=	CSWlibmaa-dev
 BUILD_DEP_PKGS	+=	CSWlibz-dev
@@ -44,6 +67,8 @@
 PKGFILES_CSWdict			+=	$(bindir)/dict
 PKGFILES_CSWdict			+=	$(bindir)/dict_lookup
 PKGFILES_CSWdict			+=	$(bindir)/dictl
+PKGFILES_CSWdict			+=	$(sysconfdir)/$(NAME)/colorit.conf
+PKGFILES_CSWdict			+=	$(sysconfdir)/$(NAME)/dict.conf
 PKGFILES_CSWdict			+=	$(docdir)/$(CATALOGNAME_CSWdict)/ANNOUNCE
 PKGFILES_CSWdict			+=	$(docdir)/$(CATALOGNAME_CSWdict)/ChangeLog
 PKGFILES_CSWdict			+=	$(docdir)/$(CATALOGNAME_CSWdict)/NEWS
@@ -53,8 +78,6 @@
 PKGFILES_CSWdict			+=	$(mandir)/man1/dict_lookup.1
 PKGFILES_CSWdict			+=	$(mandir)/man1/dictl.1
 
-RUNTIME_DEP_PKGS_CSWdicd	+= CSWlibmaa3-0-0
-
 PACKAGES						+=	CSWdictfmt
 SPKG_DESC_CSWdictfmt			=	$(DESCRIPTION), converter
 CATALOGNAME_CSWdictfmt			=	dictfmt
@@ -82,6 +105,9 @@
 SPKG_DESC_CSWdictd			=	$(DESCRIPTION), server
 CATALOGNAME_CSWdictd		=	dictd
 PKGFILES_CSWdictd			+=	$(sbindir)/.*
+PKGFILES_CSWdictd			+=	$(sysconfdir)/$(NAME)/dictd.conf
+PKGFILES_CSWdictd			+=	$(sysconfdir)/$(NAME)/dictd.order
+PKGFILES_CSWdictd			+=	$(sysconfdir)/$(NAME)/dictdconfig.alias
 PKGFILES_CSWdictd			+=	$(mandir)/man8/.*
 
 PKGFILES_CSWdictd			+=	$(docdir)/$(NAME)/ANNOUNCE
@@ -95,9 +121,15 @@
 PKGFILES_CSWdictd			+=	$(docdir)/$(NAME)/.*[.]ps
 PKGFILES_CSWdictd			+=	$(docdir)/$(NAME)/security.doc
 PKGFILES_CSWdictd			+=	$(docdir)/$(NAME)/examples/dictd.*
+PKGFILES_CSWdictd			+=	$(docdir)/$(NAME)/readme-dictd-locales
+PKGFILES_CSWdictd			+=	$(docdir)/$(NAME)/README.Index2suffix
+PKGFILES_CSWdictd			+=	$(docdir)/$(NAME)/README.Index2word
+PKGFILES_CSWdictd			+=	$(docdir)/$(NAME)/README.Unformat
+PKGFILES_CSWdictd			+=	$(docdir)/$(NAME)/README.Virtual_dictionaries
 PKGFILES_CSWdictd			+=	$(libexecdir)/$(NAME)/.*
+PKGFILES_CSWdictd			+=	$(localstatedir)/lib/$(NAME)
 RUNTIME_DEP_PKGS_CSWdictd	+=	CSWlibgcc-s1
-RUNTIME_DEP_PKGS_CSWdicd	+=	CSWlibmaa3-0-0
+RUNTIME_DEP_PKGS_CSWdictd	+=	CSWlibmaa3-0-0
 RUNTIME_DEP_PKGS_CSWdictd	+=	CSWlibz1
 RUNTIME_DEP_PKGS_CSWdictd	+=	CSWlibdbi1
 RUNTIME_DEP_PKGS_CSWdictd	+=	CSWdictzip
@@ -106,6 +138,8 @@
 CHECKPKG_OVERRIDES_CSWdictd	+=	no-direct-binding|/opt/csw/libexec/dictd/dictdplugin_exit.so.0.0.0|is|not|directly|bound|to|soname|libmaa.so.3
 CHECKPKG_OVERRIDES_CSWdictd	+=	no-direct-binding|/opt/csw/libexec/dictd/dictdplugin_popen.so.0.0.0|is|not|directly|bound|to|soname|libgcc_s.so.1
 CHECKPKG_OVERRIDES_CSWdictd	+=	no-direct-binding|/opt/csw/libexec/dictd/dictdplugin_popen.so.0.0.0|is|not|directly|bound|to|soname|libmaa.so.3
+CHECKPKG_OVERRIDES_CSWdictd	+=	file-with-bad-content|/usr/share|root/opt/csw/sbin/dictdconfig
+CHECKPKG_OVERRIDES_CSWdictd	+=	file-with-bad-content|/usr/share|root/etc/opt/csw/dictd/dictdconfig.alias
 
 PACKAGES						+=	CSWdictd-dev
 CATALOGNAME_CSWdictd-dev		=	dictd_dev
@@ -134,6 +168,7 @@
 post-install: pkgcdocdir	=	$(docdir)/$(CATALOGNAME_CSWdict)
 post-install: pkgsexdir		=	$(docdir)/$(NAME)/examples
 post-install: pkgcexdir		=	$(docdir)/$(CATALOGNAME_CSWdict)/examples
+post-install: pkgconfdir	=	$(sysconfdir)/$(NAME)
 post-install:
 	cd $(WORKSRC) && \
 	/usr/bin/env -i $(INSTALL_ENV) && $(MAKE) DESTDIR=$(DESTDIR) -C $(OBJDIR) install.samples
@@ -145,6 +180,11 @@
 	ginstall --preserve-timestamps --mode=u=rwx,go=r $(WORKSRC)/NEWS $(DESTDIR)/$(pkgsdocdir)
 	ginstall --preserve-timestamps --mode=u=rwx,go=r $(WORKSRC)/README $(DESTDIR)/$(pkgsdocdir)
 	ginstall --preserve-timestamps --mode=u=rwx,go=r $(WORKSRC)/TODO $(DESTDIR)/$(pkgsdocdir)
+	ginstall --preserve-timestamps --mode=u=rwx,go=r $(WORKDIR)/readme-dictd-locales $(DESTDIR)/$(pkgsdocdir)
+	ginstall --preserve-timestamps --mode=u=rwx,go=r $(WORKDIR)/README.Index2suffix $(DESTDIR)/$(pkgsdocdir)
+	ginstall --preserve-timestamps --mode=u=rwx,go=r $(WORKDIR)/README.Index2word $(DESTDIR)/$(pkgsdocdir)
+	ginstall --preserve-timestamps --mode=u=rwx,go=r $(WORKDIR)/README.Unformat $(DESTDIR)/$(pkgsdocdir)
+	ginstall --preserve-timestamps --mode=u=rwx,go=r $(WORKDIR)/README.Virtual_dictionaries $(DESTDIR)/$(pkgsdocdir)
 	cd $(WORKSRC)/doc && \
 	ginstall --preserve-timestamps --mode=u=rwx,go=r dicf.txt dicf.ps rfc.txt rfc.ps security.doc $(DESTDIR)/$(pkgsdocdir)
 	ginstall --directory --mode=u=rwx,go=rx $(DESTDIR)/$(pkgcdocdir)
@@ -154,6 +194,16 @@
 	ginstall --directory --mode=u=rwx,go=rx $(DESTDIR)/$(pkgsexdir)
 	cd $(WORKSRC)/examples && \
 	ginstall --preserve-timestamps --mode=u=rwx,go=r dictd* $(DESTDIR)/$(pkgsexdir)
+	ginstall --preserve-timestamps --mode=u=rwx,go=r $(WORKDIR)/dictd_virtual2.conf $(DESTDIR)/$(pkgsexdir)
 	ginstall --directory --mode=u=rwx,go=rx $(DESTDIR)/$(pkgcexdir)
 	ginstall --preserve-timestamps --mode=u=rwx,go=r $(WORKSRC)/examples/dict1.conf $(DESTDIR)/$(pkgcexdir)
+	ginstall --directory --mode=u=rwx,go=rx $(DESTDIR)/$(pkgconfdir)
+	ginstall --preserve-timestamps --mode=u=rwx,go=r $(WORKDIR)/colorit.conf $(DESTDIR)/$(pkgconfdir)
+	ginstall --preserve-timestamps --mode=u=rwx,go=r $(WORKDIR)/dict.conf $(DESTDIR)/$(pkgconfdir)
+	ginstall --preserve-timestamps --mode=u=rwx,go=r $(WORKDIR)/dictd.conf $(DESTDIR)/$(pkgconfdir)
+	ginstall --preserve-timestamps --mode=u=rwx,go=r $(WORKDIR)/dictd.order $(DESTDIR)/$(pkgconfdir)
+	ginstall --preserve-timestamps --mode=u=rwx,go=r $(WORKDIR)/dictdconfig.alias $(DESTDIR)/$(pkgconfdir)
+	ginstall --preserve-timestamps --mode=u=rwx,go=r $(WORKDIR)/dictdconfig $(DESTDIR)/$(sbindir)
+	ginstall --preserve-timestamps --mode=u=rwx,go=r $(WORKDIR)/dictdconfig.8 $(DESTDIR)/$(mandir)/man8
+	ginstall --directory --mode=u=rwx,go=rx $(DESTDIR)/$(localstatedir)/lib/$(NAME)
 	$(MAKECOOKIE)

Added: csw/mgar/pkg/dictd/trunk/files/0004-fix-hyphen-used-as-minus-sign.patch
===================================================================
--- csw/mgar/pkg/dictd/trunk/files/0004-fix-hyphen-used-as-minus-sign.patch	                        (rev 0)
+++ csw/mgar/pkg/dictd/trunk/files/0004-fix-hyphen-used-as-minus-sign.patch	2013-11-21 14:01:57 UTC (rev 22564)
@@ -0,0 +1,342 @@
+From c2ac92b06093ef9a957de5be3102c2149e500874 Mon Sep 17 00:00:00 2001
+From: Peter Felecan <pfelecan at opencsw.org>
+Date: Wed, 20 Nov 2013 18:32:51 +0100
+Subject: [PATCH] fix hyphen used as minus sign
+
+Inspired from Debian's 02 man hyphens patch
+---
+ colorit.1.in      |  6 +++---
+ dict.1.in         |  4 ++--
+ dictd.8.in        | 24 ++++++++++++------------
+ dictfmt.1.in      | 56 +++++++++++++++++++++++++++----------------------------
+ dictl.1.in        |  2 +-
+ dictunformat.1.in |  8 ++++----
+ 6 files changed, 50 insertions(+), 50 deletions(-)
+
+diff --git a/colorit.1.in b/colorit.1.in
+index 4b27ee2..307a6ea 100644
+--- a/colorit.1.in
++++ b/colorit.1.in
+@@ -4,7 +4,7 @@
+ 
+ .TH COLORIT 1 "28 Oct 2003" "" ""
+ .SH "NAME"
+-colorit - a script for markuping the text input
++colorit \- a script for markuping the text input
+ .SH "SYNOPSIS"
+ .nf
+ .BI colorit " [OPTIONS] [files...]"
+@@ -12,14 +12,14 @@ colorit - a script for markuping the text input
+ .SH "DESCRIPTION"
+ .B colorit
+ is a script for markuping text input and sending a result to pager (
+-.I less -r
++.I less \-r
+ by default) or stdout.
+ Markuping rules are described in a configuration file
+ which is filtered by preprocessor (the default is
+ .I m4
+ ).
+ The define HOME equal to your home directory is set for the preprocessor
+-using -D option supported by both
++using \-D option supported by both
+ .I m4
+ and
+ .I cpp.
+diff --git a/dict.1.in b/dict.1.in
+index 6705cff..5edaab1 100644
+--- a/dict.1.in
++++ b/dict.1.in
+@@ -55,7 +55,7 @@ be specified in the configuration file.  If no servers are specified
+ in the configuration file or or on the command line, 
+ .B dict 
+ will fail.  (This is a compile-time option, ./configure
+---enable-dictorg, which is disabled by default.)  If IP lookup for a
++\-\-enable-dictorg, which is disabled by default.)  If IP lookup for a
+ server expands to a list of IP addresses (as dict.org does currently),
+ then each IP will be tried in the order listed.
+ .TP
+@@ -252,7 +252,7 @@ authentication to this particular server.
+ .P
+ Servers are tried in the order listed until a connection is made.  If none
+ of the specified servers are available, and the compile-time option
+-(./configure --enable-dictorg) is enabled, then an attempt will be made to
++(./configure \-\-enable-dictorg) is enabled, then an attempt will be made to
+ connect on
+ .B localhost
+ and on
+diff --git a/dictd.8.in b/dictd.8.in
+index 5007440..5091834 100644
+--- a/dictd.8.in
++++ b/dictd.8.in
+@@ -662,7 +662,7 @@ multiple invocations of this option may be made in configuration file
+ or dictd command
+ line.  For instance:
+ .br
+-dictd -s --log stats --log found --log notfound
++dictd \-s \-\-log stats \-\-log found \-\-log notfound
+ .br
+ is a valid command line, and sets three logging options.
+ .RS
+@@ -818,7 +818,7 @@ then the dictd server will not be compliant to RFC 2229.
+ .P
+ .BI NOTE 
+ If utf-8 or 8-bit dictionaries are included in the configuration file,
+-and the appropriate --locale has not been specified,
++and the appropriate \-\-locale has not been specified,
+ .B dictd
+ will fail to start.  This implies that
+ .B dictd 
+@@ -922,7 +922,7 @@ The database specification describes the database:
+ Specifies the filename for the flat text database.
+ If the filename does not begin with '.' or '/', it is prepended with
+ $datadir/. It is a compile time option. You can change this behaviour
+-by editing Makefile or running ./configure --datadir=...
++by editing Makefile or running ./configure \-\-datadir=...
+ .TP
+ .BI index " string"
+ Specifies the filename for the index file.
+@@ -931,14 +931,14 @@ Path matter is similar to that described above in "data" option .
+ .BI index_suffix " string"
+ This is optional index file to make 'suffix'
+ search strategy faster (binary search).
+-It is generated by 'dictfmt_index2suffix'. Run "dictfmt_index2suffix --help"
++It is generated by 'dictfmt_index2suffix'. Run "dictfmt_index2suffix \-\-help"
+ for more information.
+ Path matter is similar to that described above in "data" option .
+ .TP
+ .BI index_word " string"
+ This is optional index file to make 'word'
+ search strategy faster (binary search).
+-It is generated by 'dictfmt_index2word'. Run "dictfmt_index2word --help"
++It is generated by 'dictfmt_index2word'. Run "dictfmt_index2word \-\-help"
+ for more information.
+ Path matter is similar to that described above in "data" option .
+ .TP
+@@ -1329,33 +1329,33 @@ Some headwords are used by
+ .I dictd
+ especially
+ .P
+-.BI 00-database-info
++.BI 00\-database\-info
+ Containts the information about database
+ which is 
+ returned by SHOW INFO command,
+ unless it is specified in the configuration file.
+ .P
+-.BI 00-database-short
++.BI 00\-database\-short
+ Containts the short name of the database
+ which is
+ returned by SHOW DB command,
+ unless it is specified in the configuration file.
+-See dictfmt -s.
++See dictfmt \-s.
+ .P
+-.BI 00-database-url
++.BI 00\-database\-url
+ URL where original dictionary sources were obtained from.
+ See dictfmt -u.
+ This headword is not used by
+ .I dictd
+ .P
+-.BI 00-database-utf8
++.BI 00\-database\-utf8
+ Presents if dictionary is encoded using UTF-8.
+ See dictfmt --utf8
+ .P
+-.BI 00-database-8bit-new
++.BI 00\-database\-8bit\-new
+ Presents if dictionary is encoded using 8-BIT character set
+ (not ASCII and not UTF8).
+-See dictfmt --locale.
++See dictfmt \-\-locale.
+ .P
+ The flat text file may be compressed using
+ .BR gzip (1)
+diff --git a/dictfmt.1.in b/dictfmt.1.in
+index a3b457b..0fadca8 100644
+--- a/dictfmt.1.in
++++ b/dictfmt.1.in
+@@ -41,7 +41,7 @@ that conforms to the DICT protocol.  It also creates an index file named
+ By default, the index is sorted according to the
+ C locale, and only alphanumeric characters and spaces are used in
+ sorting, however this may be changed with the
+---locale and --allchars
++\-\-locale and \-\-allchars
+ options.  (
+ .IR basename  " is commonly chosen to correspond to the basename of"
+ .I FILE
+@@ -66,11 +66,11 @@ these options must be given.
+ 
+ .B dictfmt
+ prepends several headers are to the .dict file.  The 00-database-url
+-header gives the value of the -u option as the URL of the site from
++header gives the value of the \-u option as the URL of the site from
+ which the original database was obtained.  The 00-database-short
+-header gives the value of the -s option as the short name of the
++header gives the value of the \-s option as the short name of the
+ dictionary.  (This "short name" is the identifying name given by the
+-"dict- D" option.)  If the -u and/or -s options are omitted, these
++"dict- D" option.)  If the \-u and/or \-s options are omitted, these
+ values will be shown as "unknown", which is undesirable for a publicly
+ distributed database.
+ 
+@@ -233,46 +233,46 @@ display version information
+ .BI \-D 
+ output debugging information
+ .TP
+-.BI \--help
++.BI \-\-help
+ display a help message
+ .TP
+-.BI \--locale " locale"
++.BI \-\-locale " locale"
+ Specifies the locale used for sorting.  If no locale is specified, the
+ "C" locale is used. For using UTF-8 mode, --utf8 is needed.
+ .TP
+-.BI \--8bit
++.BI \-\-8bit
+ generates database in 8-bit mode, see
+-.I \--locale
++.I \-\-locale
+ option also.
+ .RS
+ .B Note:
+ This option is deprecated.
+ Use it for creating 8-bit (non-UTF8) dictionaries only.
+ In order to create UTF-8 dictionary, use
+-.I \--utf8
++.I \-\-utf8
+ option instead.
+ .RE
+ .TP
+-.BI \--utf8
++.BI \-\-utf8
+ If specified, UTF-8 database is created.
+ .TP
+-.BI \--allchars
++.BI \-\-allchars
+ Specifies that all characters should be used for the search,
+ by default only alphabetic, numeric
+ characters and spaces are put to .index file and therefore
+ are used in search. Creates the special entry 00-database-allchars.
+ .TP
+-.BI \--case-sensitive
++.BI \-\-case\-sensitive
+ makes the search case sensitive.
+ Creates the special entry 00-database-case-sensitive.
+ .TP
+-.BI \--headword-separator " sep"
++.BI \-\-headword\-separator " sep"
+ sets the headword separator, which allows several words to have the same
+ definition.  For example, if \'--headword-separator %%%' is given,
+ and the input file contains \'autumn%%%fall', both 'autumn' and 'fall'
+ will be indexed as  headwords, with the same definition.
+ .TP
+-.BI \--index-data-separator " sep"
++.BI \-\-index\-data\-separator " sep"
+ sets the index/data separator, which allows to set the first and fourth
+ columns of .index file independently. That is
+ the first column can be treated as an index column
+@@ -281,43 +281,43 @@ the first column can be treated as an index column
+ and they (1-st and 4-th columns) are completely independant of each other.
+ The default value for this separator is ASCII symbol " \\034".
+ .TP
+-.BI \--break-headwords
++.BI \-\-break\-headwords
+ multiple headwords will be written on separate lines in the .dict
+-file.  For use with '--headword-separator.
++file.  For use with '\-\-headword\-separator.
+ .TP
+-.BI \--index-keep-orig
+-When \--utf-8 is specified headwords are lowercased and
++.BI \-\-index\-keep\-orig
++When \-\-utf\-8 is specified headwords are lowercased and
+ non-alphanumeric characters are removed from it
+ before saving to .index file
+ in order to simplify the search.
+-When \--index-keep-orig option is used
++When \-\-index-keep-orig option is used
+ fourth column is created (if necessary) in .index file,
+ and contains an original headword which is returned by MATCH command.
+ This option may be useful to prevent converting " AT&T" to " ATT"
+ or to keep proper nouns with uppercased first letter.
+ .TP
+-.BI \--without-headword
++.BI \-\-without\-headword
+ headwords will not be included in .dict file
+ .TP
+-.BI \--without-header
++.BI \-\-without\-header
+ header will not be copied to DB info entry
+ .TP
+-.BI \--without-url
++.BI \-\-without\-url
+ URL will not be copied to DB info entry
+ .TP
+-.BI \--without-time
++.BI \-\-without\-time
+ time of creation will not be copied to DB info entry
+ .TP
+-.BI \--without-ver
++.BI \-\-without\-ver
+ By default
+ .B dictfmt
+-creates a special entry 00-database-dictfmt-X.Y.Z that contains
++creates a special entry 00\-database\-dictfmt\-X.Y.Z that contains
+ (in .dict file)
+-dictfmt version in format dictfmt-X.Y.Z. This option suppresses this.
++dictfmt version in format dictfmt\-X.Y.Z. This option suppresses this.
+ .TP
+-.BI \--without-info
++.BI \-\-without\-info
+ DB info entry will not be created.
+-This may be useful if 00-database-info headword
++This may be useful if 00\-database\-info headword
+ is expected from stdin (dictunformat outputs it).
+ .TP
+ .BI \-\-columns " columns"
+diff --git a/dictl.1.in b/dictl.1.in
+index b6e4761..c0bf5d0 100644
+--- a/dictl.1.in
++++ b/dictl.1.in
+@@ -46,7 +46,7 @@ iconv
+ omits characters from output that are invalid,
+ .br
+ .B
+-recode -f
++recode \-f
+ is used for character set conversions by default.
+ If you prefer
+ .B iconv,
+diff --git a/dictunformat.1.in b/dictunformat.1.in
+index 3306af6..74e93ff 100644
+--- a/dictunformat.1.in
++++ b/dictunformat.1.in
+@@ -12,18 +12,18 @@ takes a dictionary index file as a parameter and a dictionary database
+ file on stdin and outputs a raw database that may be used to create a 
+ .B DICT
+ database by 
+-.B dictfmt -t.
++.B dictfmt \-t.
+ This may be useful if it is desired to create a dictionary for a
+ locale other than that for which the original was created, or if it is
+ desired to correct or supplement a pre-existing dictionary. 
+ .SH OPTIONS
+ .TP
+-.B --help
++.B \-\-help
+ displays a usage message and exits.
+ .TP
+-.BI --headword-separator " sep"
++.BI \-\-headword\-separator " sep"
+ sep is the headword separator used when creating the origianl
+-dictionary.  (See --headword-separator in
++dictionary.  (See \-\-headword-separator in
+ .BR "dictfmt (1)").
+ .TP
+ .B index_filename
+-- 
+1.8.4.1
+

Added: csw/mgar/pkg/dictd/trunk/files/0005-use-transliteration-with-iconv.patch
===================================================================
--- csw/mgar/pkg/dictd/trunk/files/0005-use-transliteration-with-iconv.patch	                        (rev 0)
+++ csw/mgar/pkg/dictd/trunk/files/0005-use-transliteration-with-iconv.patch	2013-11-21 14:01:57 UTC (rev 22564)
@@ -0,0 +1,26 @@
+From 3be0de3de3a97aff1eedb6018b6d74f85b8a1c50 Mon Sep 17 00:00:00 2001
+From: Peter Felecan <pfelecan at opencsw.org>
+Date: Wed, 20 Nov 2013 18:40:06 +0100
+Subject: [PATCH] use transliteration with iconv
+
+Inspired by Debian's 04 dictl translit patch
+---
+ dictl.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/dictl.in b/dictl.in
+index 913c7ef..9edde07 100755
+--- a/dictl.in
++++ b/dictl.in
+@@ -20,7 +20,7 @@ if test -z "$DICTL_CHARSET"; then
+ fi
+ 
+ internal_iconv (){
+-    iconv -c -f $1 -t $2
++    iconv -c -f $1 -t $2//TRANSLIT
+ }
+ 
+ internal_recode (){
+-- 
+1.8.4.1
+

Added: csw/mgar/pkg/dictd/trunk/files/0006-fix-inexistent-groff-macro.patch
===================================================================
--- csw/mgar/pkg/dictd/trunk/files/0006-fix-inexistent-groff-macro.patch	                        (rev 0)
+++ csw/mgar/pkg/dictd/trunk/files/0006-fix-inexistent-groff-macro.patch	2013-11-21 14:01:57 UTC (rev 22564)
@@ -0,0 +1,26 @@
+From 1bfb105514e655ea8a7801e9caa38d8c22a796ff Mon Sep 17 00:00:00 2001
+From: Peter Felecan <pfelecan at opencsw.org>
+Date: Wed, 20 Nov 2013 18:43:26 +0100
+Subject: [PATCH] fix inexistent groff macro
+
+Inspired by Debian's 07 dictfmt.1-man patch
+---
+ dictfmt.1.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/dictfmt.1.in b/dictfmt.1.in
+index 0fadca8..1ded30b 100644
+--- a/dictfmt.1.in
++++ b/dictfmt.1.in
+@@ -196,7 +196,7 @@ definition starts on the following line.  The first line beginning
+ file, and '%h ' is stripped from in front of the headword.  All
+ text before the first headword is included in the headers.
+ .B The second line beginning '%h' is taken as the first headword.  
+-..br
++.br
+ This option was written to format Jay Kominek's elements database.  
+ .TP
+ .BI \-i \  \-I
+-- 
+1.8.4.1
+

Added: csw/mgar/pkg/dictd/trunk/files/0007-close-all-files-except-standard-streams.patch
===================================================================
--- csw/mgar/pkg/dictd/trunk/files/0007-close-all-files-except-standard-streams.patch	                        (rev 0)
+++ csw/mgar/pkg/dictd/trunk/files/0007-close-all-files-except-standard-streams.patch	2013-11-21 14:01:57 UTC (rev 22564)
@@ -0,0 +1,38 @@
+From cdb6de797b44ac66577ccf62abdabddc5e5dec18 Mon Sep 17 00:00:00 2001
+From: Peter Felecan <pfelecan at opencsw.org>
+Date: Wed, 20 Nov 2013 18:52:57 +0100
+Subject: [PATCH] close all files except standard streams
+
+Adapted from Debian's 08 dictd close-fds patch
+---
+ dictd.c | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/dictd.c b/dictd.c
+index 74597e3..9b83774 100644
+--- a/dictd.c
++++ b/dictd.c
+@@ -37,6 +37,7 @@
+ #include <ctype.h>
+ #include <sys/stat.h>
+ #include <fcntl.h>
++#include <unistd.h>
+ 
+ #define MAXPROCTITLE 2048       /* Maximum amount of proc title we'll use. */
+ #undef MIN
+@@ -1529,6 +1530,12 @@ int main (int argc, char **argv, char **envp)
+       { 0,                  0, 0, 0  }
+    };
+ 
++   /* close all file descriptors except for the standard ones */
++   for (i=getdtablesize()-1; i > 2; --i)
++   {
++	   close(i);
++   }
++
+    set_umask ();
+    init (argv[0]);
+ 
+-- 
+1.8.4.1
+

Added: csw/mgar/pkg/dictd/trunk/files/0008-fix-spelling-typos.patch
===================================================================
--- csw/mgar/pkg/dictd/trunk/files/0008-fix-spelling-typos.patch	                        (rev 0)
+++ csw/mgar/pkg/dictd/trunk/files/0008-fix-spelling-typos.patch	2013-11-21 14:01:57 UTC (rev 22564)
@@ -0,0 +1,99 @@
+From 2e601b33394ad8b8690a277cdb77d5ddcc953372 Mon Sep 17 00:00:00 2001
+From: Peter Felecan <pfelecan at opencsw.org>
+Date: Wed, 20 Nov 2013 19:05:44 +0100
+Subject: [PATCH] fix spelling typos
+
+Inspired from Debian's 09 spelling typos patch
+---
+ daemon.c     | 2 +-
+ dictd.8.in   | 8 ++++----
+ dictfmt.1.in | 4 ++--
+ dictfmt.c    | 2 +-
+ 4 files changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/daemon.c b/daemon.c
+index 7154a50..5d9af85 100644
+--- a/daemon.c
++++ b/daemon.c
+@@ -253,7 +253,7 @@ static int daemon_check_range(const char *spec, const char *ip)
+       return DICT_DENY;
+    }
+    if (!*pt) {
+-      log_info( ":E: Misformed range %s, denying access to %s\n", spec, ip);
++      log_info( ":E: Malformed range %s, denying access to %s\n", spec, ip);
+       return DICT_DENY;
+    }
+    
+diff --git a/dictd.8.in b/dictd.8.in
+index 5091834..497adff 100644
+--- a/dictd.8.in
++++ b/dictd.8.in
+@@ -410,7 +410,7 @@ differently depending on whether
+ .I OPTION MIME
+ command was received from client or was not,
+ i.e. the database created by this section
+-allows to return to the client either a plain text or
++allows one to return to the client either a plain text or
+ specially formatted content depending on whether DICT client supports
+ (or wants to receive) MIMEized content or doesn't.
+ The
+@@ -1218,7 +1218,7 @@ you can get only 100 ones skipping the first 800 matches.
+ This is made by specified these limits in a query like this:
+ 800#100#app, where 800 is skip count, 100 is a number of matches
+ you want to get and "app" is your query.
+-This strategy allows to implement DICT client with fast autocompletion
++This strategy allows one to implement DICT client with fast autocompletion
+ (although it is not trivial)
+ just like many standalone dictionary programs do.
+ .P
+@@ -1330,13 +1330,13 @@ Some headwords are used by
+ especially
+ .P
+ .BI 00\-database\-info
+-Containts the information about database
++Contains the information about database
+ which is 
+ returned by SHOW INFO command,
+ unless it is specified in the configuration file.
+ .P
+ .BI 00\-database\-short
+-Containts the short name of the database
++Contains the short name of the database
+ which is
+ returned by SHOW DB command,
+ unless it is specified in the configuration file.
+diff --git a/dictfmt.1.in b/dictfmt.1.in
+index 1ded30b..fa33800 100644
+--- a/dictfmt.1.in
++++ b/dictfmt.1.in
+@@ -273,12 +273,12 @@ and the input file contains \'autumn%%%fall', both 'autumn' and 'fall'
+ will be indexed as  headwords, with the same definition.
+ .TP
+ .BI \-\-index\-data\-separator " sep"
+-sets the index/data separator, which allows to set the first and fourth
++sets the index/data separator, which allows one to set the first and fourth
+ columns of .index file independently. That is
+ the first column can be treated as an index column
+ (where the MATCH command searches) and the fourth column as a result column
+ (where the MATCH gets things to be returned),
+-and they (1-st and 4-th columns) are completely independant of each other.
++and they (1-st and 4-th columns) are completely independent of each other.
+ The default value for this separator is ASCII symbol " \\034".
+ .TP
+ .BI \-\-break\-headwords
+diff --git a/dictfmt.c b/dictfmt.c
+index 4c348fa..f8e80dd 100644
+--- a/dictfmt.c
++++ b/dictfmt.c
+@@ -840,7 +840,7 @@ static void help( FILE *out_stream )
+                      Example: autumn%%%fall can be used\n\
+                      if '--headword-separator %%%' is supplied",
+ "--index-data-separator <sep> sets index/data separator which allows\n\
+-                     to explicitely set fourth column in .index file,\n\
++                     to explicitly set fourth column in .index file,\n\
+                      the default is \"\\034\"",
+ "--break-headwords    multiple headwords will be written on separate lines\n\
+                      in the .dict file.  For use with '--headword-separator.",
+-- 
+1.8.4.1
+

Added: csw/mgar/pkg/dictd/trunk/files/README.Index2suffix
===================================================================
--- csw/mgar/pkg/dictd/trunk/files/README.Index2suffix	                        (rev 0)
+++ csw/mgar/pkg/dictd/trunk/files/README.Index2suffix	2013-11-21 14:01:57 UTC (rev 22564)
@@ -0,0 +1,24 @@
+     The "suffix" search strategy matches the last portion of the
+headword.  Since it must search the whole index file, it is not as
+fast as the default "exact" strategy.
+
+     If an optional index_suffix file is provided, a suffix search is
+much faster.  The dictfmt_index2suffix.1 script (provided in the
+dictfmt package) will produce this index_suffix file (see the manual
+page dictfmt_index2suffix(1)).
+
+     An index_suffix file is included in the dictd.conf file as
+follows:
+
+database gcide
+ {
+  data  /opt/csw/share/dictd/gcide.dict.dz
+  index /opt/csw/share/dictd/gcide.index
+  index_suffix /opt/csw/share/dictd/gcide.suffix
+}
+
+    Versions 1.2 and higher of dictdconfig handle .suffix files
+automatically.
+
+Robert D. Hilliard <hilliard at debian.org> 20 April 2003
+Adapted for Open CSW by Peter Felecan

Added: csw/mgar/pkg/dictd/trunk/files/README.Index2word
===================================================================
--- csw/mgar/pkg/dictd/trunk/files/README.Index2word	                        (rev 0)
+++ csw/mgar/pkg/dictd/trunk/files/README.Index2word	2013-11-21 14:01:57 UTC (rev 22564)
@@ -0,0 +1,24 @@
+     The "word" search strategy matches any single word, even if part
+of a longer headword or a multi-word entry.  Since it must search the
+whole index file, it is not as fast as the default "exact" strategy.
+
+     If an optional index_word file is provided, a word search is
+much faster.  The dictfmt_index2word.1 script (provided in the
+dictfmt package) will produce this index_word file (see the manual
+page dictfmt_index2word(1)).
+
+     An index_word file is included in the dictd.conf file as
+follows:
+
+database gcide
+ {
+  data  /opt/csw/share/dictd/gcide.dict.dz
+  index /opt/csw/share/dictd/gcide.index
+  index_word /opt/csw/share/dictd/gcide.word
+}
+
+    Versions 1.2 and higher of dictdconfig handle .word files
+automatically.
+
+Robert D. Hilliard <hilliard at debian.org> 20 April 2003
+Adapted for Open CSW by Peter Felecan

Added: csw/mgar/pkg/dictd/trunk/files/README.Unformat
===================================================================
--- csw/mgar/pkg/dictd/trunk/files/README.Unformat	                        (rev 0)
+++ csw/mgar/pkg/dictd/trunk/files/README.Unformat	2013-11-21 14:01:57 UTC (rev 22564)
@@ -0,0 +1,17 @@
+     The script dictunformat (provided with in the dictfmt package)
+takes a dictionary index file as the parameter and a dictionary
+database file on stdin and outputs a raw dictionary database on
+stdout.  The raw database is formatted to use the -c5 option of
+dictfmt. 
+
+     This may be useful for making corrections or other changes to a
+dictionary, or to convert a dictionary from one character encoding to
+another. 
+
+     dictunformat requires an uncompressed file as input.  However,
+most dictionaries are distributed as compressed (.dict.dz) files. One
+convenient way to use dictunformat is:
+
+dictzcat dictname.dict.dz | dictunformat dictname.index > dictname
+
+Robert D. Hilliard <hilliard at debian.org>, 15 March, 2003

Added: csw/mgar/pkg/dictd/trunk/files/README.Virtual_dictionaries
===================================================================
--- csw/mgar/pkg/dictd/trunk/files/README.Virtual_dictionaries	                        (rev 0)
+++ csw/mgar/pkg/dictd/trunk/files/README.Virtual_dictionaries	2013-11-21 14:01:57 UTC (rev 22564)
@@ -0,0 +1,45 @@
+     By default, dictd searches all dictionaries listed in the
+configuration file, and returns all definitions found.  This is
+usually satisfactory, but sometimes a user may want to search over
+some but not all of the available databases.
+
+     One solution is for the server to provide "virtual" databases
+which merge several of the regular databases into one.  For example a
+virtual database may be provided which includes all of the translating
+dictionaries, or all of the computer-related dictionaries.
+
+
+     The dictdconfig script will insert virtual dictionaries and the
+"database_exit" directive in /var/opt/csw/lib/dictd/db.list as specified in
+/etc/opt/csw/dictd/dictd.order.
+
+     Alternatively, a virtual dictionary may defined in the
+configuration file ) see "Virtual Database Specification" in dictd(8).
+In this case, the virtual definition must be manually inserted into
+the database section of dictd.conf on a line following the "include
+/var/opt/csw/lib/dictd/db.list" line.  dictdconfig may still be used
+to incorporate all other dictionaries into the configuration file.
+
+     There are two general ways to use virtual dictionaries.  In one
+approach, one or more virtual dictionaries are treated as the default.
+This is illustrated by
+/opt/csw/share/doc/dictd/examples/example_virtual.conf.
+
+     Another approach is to leave all available dictionaries as the
+default set, and several virtual dictionaries, that are omitted from
+the default set may be used when restricted searches are desired.
+This is illustrated by
+/opt/csw/share/doc/dictd/examples/example_virtual2.conf. 
+
+     Various combinations of the above approaches may be used.  The
+important thing to remember is that all dictionaries (real and
+virtual) before the database_exit directive are searched by default.  
+
+     The database_exit directive may also be used without virtual
+dictionaries.  For instance, all general dictionaries may be listed
+first, followed by database_exit, with the other dictionaries
+following.  These other dictionaries may be accessed with the -d
+option to dict.
+
+Robert D. Hilliard <hilliard at debian.org>, 15 March, 2003
+Adapted for Open CSW by Peter Felecan

Added: csw/mgar/pkg/dictd/trunk/files/colorit.conf
===================================================================
--- csw/mgar/pkg/dictd/trunk/files/colorit.conf	                        (rev 0)
+++ csw/mgar/pkg/dictd/trunk/files/colorit.conf	2013-11-21 14:01:57 UTC (rev 22564)
@@ -0,0 +1,32 @@
+dnl /etc/opt/csw/dictd/colorit.conf   vim:ft=m4
+dnl
+dnl Sample configuration file for colorit(1) program
+dnl
+divert(-1)
+dnl
+dnl Define some useful color variables
+dnl
+define(`black',   `0')
+define(`red', 	  `1')
+define(`green',   `2')
+define(`brown',   `3')
+define(`blue', 	  `4')
+define(`magenta', `5')
+define(`cyan',    `6')
+define(`white',   `7')
+dnl
+dnl Mark macro arguments: regexp foreground-color [background-color]
+dnl
+define(`mark', ``mark "$1"''  `ifelse(`$#', `3', ``"\033[3$2;4$3m"'', ``"\033[3$2m"'')' `"\033[m"')
+dnl
+divert
+mark(`^From.*$',red,cyan)
+mark(`^  [^ ]+',green)
+mark(`^ *Note:',red)
+mark(`{[^{]+}',green)
+mark(`^ *\[[^\[]+\]', cyan)
+mark(`^[ 	]*(adj|n|v|adv)? *[0-9]+[\.:]',cyan)  
+mark(`^ *\([a-z]+\)',cyan)  
+mark(`(Syn|Ant|syn|ant):', blue, white)  
+mark(` (t|i|a|adj|adv|n|v)\. ',cyan)  
+mark(` (t|i|a|adj|adv|n|v)\.$',cyan)  

Added: csw/mgar/pkg/dictd/trunk/files/dict.conf
===================================================================
--- csw/mgar/pkg/dictd/trunk/files/dict.conf	                        (rev 0)
+++ csw/mgar/pkg/dictd/trunk/files/dict.conf	2013-11-21 14:01:57 UTC (rev 22564)
@@ -0,0 +1,21 @@
+#  /etc/opt/csw/dictd/dict.conf 
+
+#  Written by Bob Hilliard <hilliard at debian.org>
+#  1998/03/20.  Last revised Sun, 22 Nov 1998 18:10:04 -0500 This is
+#  the configuration file for /usr/bin/dict.  In most cases only the
+#  server keyword need be specified.  
+
+#  This default configuration will try to access a dictd server on the
+#  local host, failing that, it will try the public server.  In many
+#  cases this will be slow, so you should comment out the line for the
+#  server that you don't want to use. To use any other server, enter
+#  its IP address in place of "dict.org".  
+
+#  Refer to the dict manpage (man dict) for other options that could
+#  be inserted in here.
+
+server localhost 
+server dict.org
+server dict0.us.dict.org
+server alt0.dict.org
+

Added: csw/mgar/pkg/dictd/trunk/files/dictd.conf
===================================================================
--- csw/mgar/pkg/dictd/trunk/files/dictd.conf	                        (rev 0)
+++ csw/mgar/pkg/dictd/trunk/files/dictd.conf	2013-11-21 14:01:57 UTC (rev 22564)
@@ -0,0 +1,36 @@
+# /etc/opt/csw/dictd/dictd.conf
+
+# This is the configuration file for /opt/csw/sbin/dictd.  The access
+# specification included in this file allows access only from the
+# localhost.  If this machine is acting as a server for a network you
+# will probably want to add additional access specifications in this
+# file.  See the dictd manpage - man dictd.
+
+# A sample database section is generated automatically upon
+# installation or removal of the dictd package or any dictionary
+# database package.  Replace the ``include /var/opt/csw/lib/dictd/db.list''
+# line below if you wish to provide a custom database section.
+# Customization may also be achieved via the optional dictdconfig
+# order override file /etc/opt/csw/dictd/dictd.order.  See the dictdconfig
+# manpage - man dictdconfig.
+
+# Site section here:
+
+global {
+listen_to 127.0.0.1
+# bind to local interfacea only
+}
+
+# Access section here:
+
+access {
+allow localhost
+allow 127.0.0.1
+# this allows access only from local host
+}
+
+# Database section here:
+
+include /var/opt/csw/lib/dictd/db.list
+
+# User section here:

Added: csw/mgar/pkg/dictd/trunk/files/dictd.order
===================================================================
--- csw/mgar/pkg/dictd/trunk/files/dictd.order	                        (rev 0)
+++ csw/mgar/pkg/dictd/trunk/files/dictd.order	2013-11-21 14:01:57 UTC (rev 22564)
@@ -0,0 +1,9 @@
+# This file defines the order in which dictdconfig lists dictionaries
+# in /var/opt/csw/lib/dictd/db.list.  The entry
+# "/opt/csw/share/dictd/" brings in any dictionaries in that directory
+# that aren't specifically listed in this file.  You should enter the
+# names of the dictionaries you have installed, in the order you would
+# prefer to have them searched.
+
+web1913 gcide wn foldoc jargon vera devil elements easton hitchcock gazetteer
+/opt/csw/share/dictd/

Added: csw/mgar/pkg/dictd/trunk/files/dictd_virtual2.conf
===================================================================
--- csw/mgar/pkg/dictd/trunk/files/dictd_virtual2.conf	                        (rev 0)
+++ csw/mgar/pkg/dictd/trunk/files/dictd_virtual2.conf	2013-11-21 14:01:57 UTC (rev 22564)
@@ -0,0 +1,94 @@
+# This is an example database section of a dictd.conf file,
+# illustrating on method of using virtual databases as non-default
+# dictionaries. 
+
+database gcide
+ {
+  data  /usr/share/dictd/gcide.dict.dz
+  index /usr/share/dictd/gcide.index
+}
+database wn
+ {
+  data  /usr/share/dictd/wn.dict.dz
+  index /usr/share/dictd/wn.index
+}
+database foldoc
+ {
+  data  /usr/share/dictd/foldoc.dict.dz
+  index /usr/share/dictd/foldoc.index
+}
+database jargon
+ {
+  data  /usr/share/dictd/jargon.dict.dz
+  index /usr/share/dictd/jargon.index
+}
+database vera
+ {
+  data  /usr/share/dictd/vera.dict.dz
+  index /usr/share/dictd/vera.index
+}
+database devil
+ {
+  data  /usr/share/dictd/devil.dict.dz
+  index /usr/share/dictd/devil.index
+}
+database elements
+ {
+  data  /usr/share/dictd/elements.dict.dz
+  index /usr/share/dictd/elements.index
+}
+database easton
+ {
+  data  /usr/share/dictd/easton.dict.dz
+  index /usr/share/dictd/easton.index
+}
+database hitchcock
+ {
+  data  /usr/share/dictd/hitchcock.dict.dz
+  index /usr/share/dictd/hitchcock.index
+}
+database gazetteer
+ {
+  data  /usr/share/dictd/gazetteer.dict.dz
+  index /usr/share/dictd/gazetteer.index
+}
+database gaz2k-counties
+ {
+  data  /usr/share/dictd/gazetteer2k-counties.dict.dz
+  index /usr/share/dictd/gazetteer2k-counties.index
+}
+database gaz2k-places
+ {
+  data  /usr/share/dictd/gazetteer2k-places.dict.dz
+  index /usr/share/dictd/gazetteer2k-places.index
+}
+database gaz2k-zips
+ {
+  data  /usr/share/dictd/gazetteer2k-zips.dict.dz
+  index /usr/share/dictd/gazetteer2k-zips.index
+}
+database_exit
+# veng consists of gcide, wn, elemnts, and devil
+database veng
+ {
+  data  /usr/share/dictd/veng.dict
+  index /usr/share/dictd/veng.index
+}
+# vcomp consists of foldo, jargon, and vera
+database vcomp
+ {
+  data  /usr/share/dictd/vcomp.dict
+  index /usr/share/dictd/vcomp.index
+}
+# vbible consists of easton and hitchcock
+database vbible
+ {
+  data  /usr/share/dictd/vbible.dict
+  index /usr/share/dictd/vbible.index
+}
+# vgaz consists of gazetteer and all of the gazetteer2k dictionaries
+database vgaz
+ {
+  data  /usr/share/dictd/vgaz.dict
+  index /usr/share/dictd/vgaz.index
+}

Added: csw/mgar/pkg/dictd/trunk/files/dictdconfig
===================================================================
--- csw/mgar/pkg/dictd/trunk/files/dictdconfig	                        (rev 0)
+++ csw/mgar/pkg/dictd/trunk/files/dictdconfig	2013-11-21 14:01:57 UTC (rev 22564)
@@ -0,0 +1,233 @@
+#!/usr/bin/perl
+
+# dictdconfig -- generate dictd configuration database section
+# Copyright (C) 1999-2000 Kirk Hilliard <kirk at debian.org>
+#
+# This is free software, published under version 2 or (at your option)
+# any later version of the GNU General Public License.  You should
+# have received a copy of the GNU General Public License with your
+# Debian GNU/Linux system as /usr/share/common-licenses/GPL.
+# For Open CSW, the license is in /opt/csw/share/doc/dictd/license
+
+# 4/20/03 - version updated to 1.2.  Support for index_suffix and 
+# index_word files added.  (Additional dictionaries were included in 
+# my @db_order and support for dictdconfig.alias and the database_exit 
+# directive was added earlier, without changing the version nmber.)
+
+my @db_order = qw( web1913 gcide wn foldoc jargon vera devil elements easton hitchcock gazetteer );
+my $db_dir      = "/opt/csw/share/dictd";
+push @db_order, "$db_dir/";
+my %token;
+$token{'database_exit'} = "database_exit\n";
+my $dblist_file = "/var/opt/csw/lib/dictd/db.list";
+my $prog_dir    = "/opt/csw/sbin";
+my $prog_name   = "dictdconfig";
+my $conf_file   = "/etc/opt/csw/dictd/dictd.conf";
+my $order_file  = "/etc/opt/csw/dictd/dictd.order";
+my $alias_script = "/etc/opt/csw/dictd/dictdconfig.alias";
+my %db_entered;
+my ( $opt_write, $opt_list,  $opt_order, $opt_help, $opt_version);
+my %opt_matrix = ( '-w' => \$opt_write,   '--write'   => \$opt_write,
+                   '-l' => \$opt_list,    '--list'    => \$opt_list,
+                   '-o' => \$opt_order,   '--order'   => \$opt_order,
+                   '-h' => \$opt_help,    '--help'    => \$opt_help,
+                   '-v' => \$opt_version, '--version' => \$opt_version );
+my $help = <<EOT;
+Usage: $prog_name [OPTIONS]
+Generate dictd configuration database section for available dictionary
+databases found in $db_dir/.
+
+  -w, --write    write database section to $dblist_file
+  -l, --list     list database section to standard out
+  -o, --order    display dictionary database order information
+  -h, --help     display this help and exit
+  -v, --version  display version information and exit
+EOT
+my $version = "$prog_name 1.1\n";
+my $output = <<EOT;
+# Automatically generated file -- do not edit.
+#
+# This file was automatically generated by $prog_name.  Any changes
+# made directly to this file will be lost when $prog_name is run upon
+# installation, removal, or upgrade of a dictionary database package.
+#
+# This file provides a complete database section which may be
+# included from the dictd configuration file $conf_file
+# with an ``include $dblist_file'' line.  The order and
+# presence of the dictionary database entries here may be modified
+# via the optional $prog_name order override file $order_file.
+# See $prog_name(8) for details.
+#
+# Older dictionary database packages did not automatically invoke
+# $prog_dir/$prog_name upon installation and removal, so you may
+# need to do so manually (after which, you should restart dictd).
+
+EOT
+my $order_file_found_comment = <<EOT;
+# Optional order override file $order_file found.
+# Ignoring default order.
+
+EOT
+my $order_file_not_found_comment = <<EOT;
+# Optional order override file $order_file not found.
+# Using default order.
+
+EOT
+my $none_found = <<EOT;
+# No dictionary databases were found.
+# This dummy entry allows dictd to start.
+
+EOT
+my $order_header = <<EOT;
+Dictionary Database Order Summary  [See also $prog_name(8).]
+
+Dictionary database entries will be generated only for those databases
+found via basename and directory entries in the default order (or the
+order override file, if present), and they will be generated in the
+order in which these entries appear.  No more than one dictionary
+database entry of any given name will be generated.
+
+  Entries without a leading / are relative to $db_dir/.
+  Entries without a trailing / are basenames.
+    A dictionary database entry is generated if <basename>.index
+    and <basename>.dict.dz or <basename>.dict are present.
+  Entries with a trailing / are directories.
+    A dictionary database entry is generated for each <name> where
+    <directory>/<name>.index and <directory>/<name>.dict.dz or
+    <directory>/<name>.dict are present.
+
+Default Order:
+EOT
+my $order_file_found = <<EOT;
+Optional order override file $order_file found.
+Ignoring default order.
+
+New Order:
+EOT
+my $order_file_not_found = <<EOT;
+Optional order override file $order_file not found.
+Using default order.
+
+EOT
+
+ParseCommandLine(@ARGV);
+print $version if $opt_version;
+print $help    if $opt_help;
+exit if $opt_help || $opt_version;
+if ( ! $opt_write && ! $opt_list && ! $opt_order ) {
+    print "No action taken.\n";
+    exit;
+}
+if ( $opt_order) {
+    print $order_header;
+    for (@db_order) { print "  $_\n"; }
+    print "\n";
+}
+
+if ( -f $order_file ) {
+    $output .= $order_file_found_comment;
+    if ( $opt_order ) { print $order_file_found }
+    open ORDER, "$order_file"
+        or die "Can't open existing file `$order_file' for read: $!\n";
+    undef @db_order;
+    while (<ORDER>) {
+        chomp;
+        s/#.*//;
+        push @db_order, split;
+    }
+    if ( $opt_order ) {
+        for (@db_order) { print "  $_\n"; }
+        print "\n";
+    }
+} else {
+    $output .= $order_file_not_found_comment;
+    if ( $opt_order) { print $order_file_not_found }
+}
+
+for (@db_order) {
+    if ( $token{$_} ) { $output .= $token{$_} }
+    elsif ( m#/$# ) { CheckDirectory( $_ ) }
+    else { CheckDatabase( $_ ) }
+}
+
+if ( ! keys %db_entered ) {
+    $output .= $none_found;
+    AddEntry( "dummy", "/dev/null", "/dev/null" );
+}
+
+if ( $opt_list ) { print $output }
+
+if ( $opt_write ) {
+    open  DBLIST, ">$dblist_file"
+        or die "Can't write to file $dblist_file: $!\n";
+    print DBLIST $output;
+    close DBLIST;
+}
+
+exit 0;
+
+sub AddEntry {
+    my ( $name, $datafile, $indexfile, $suffixfile, $wordfile ) = @_;
+    $output .= "database $name {\n" .
+               "  data  $datafile\n" .
+               "  index $indexfile\n" .
+               ( $suffixfile ? "  index_suffix $suffixfile\n" : "" ) .
+               ( $wordfile ? "  index_word $wordfile\n" : "" ) .
+               "}\n";
+    ++$db_entered{ $name };
+}
+
+sub AliasName {
+    my ( $name ) = @_;
+    if ( -x $alias_script ) { $name = `echo $name | $alias_script` }
+    return $name;
+}
+
+sub CheckDatabase {
+    my ( $base_name ) = @_;
+    my $name;
+    my $datafile;
+    my $indexfile;
+    my $suffixfile;
+    my $wordfile;
+    if ( $base_name =~ m#.*/(.*)# ) { $name = $1 }
+    else { $name = $base_name }
+    $name = AliasName( $name );
+    $base_name = "$db_dir/$base_name" unless $base_name =~ m#^/#;
+    $datafile = "$base_name.dict.dz";
+    $datafile =~ s/\.dz$// unless -f $datafile;
+    $indexfile = "$base_name.index";
+    $suffixfile = "$base_name.suffix";
+    $wordfile = "$base_name.word";
+    if ( ! $db_entered{ $name } && -f $datafile && -f $indexfile ) {
+        undef $suffixfile unless -f $suffixfile;
+        undef $wordfile unless -f $wordfile;
+        AddEntry( $name, $datafile, $indexfile, $suffixfile, $wordfile );
+    }
+}
+
+sub CheckDirectory {
+    my ( $dir ) = @_;
+    $dir = "$db_dir/$dir" unless $dir =~ m#^/#;
+    opendir DIR, $dir;
+    for (readdir DIR) {
+        if ( /(^.*)\.index$/ ) { CheckDatabase( "$dir$1" ) }
+    }
+    closedir DIR;
+}
+
+sub ParseCommandLine {
+    my $ref;
+    for (@_) {
+        if ( $ref = $opt_matrix{$_} ) { ++$$ref; }
+        elsif ( /^-([^-].*)/ ) {
+            for ( split //, $1 ) {
+                if ( $ref = $opt_matrix{"-$_"} ) { ++$$ref; }
+                else { die "$prog_name: unrecognized option `-$_'.\n" .
+                           "Try `$0 --help' for more information.\n"; }
+            }
+        }
+        else { die "$prog_name: unrecognized option `$_'.\n" .
+                   "Try `$0 --help' for more information.\n"; }
+    }
+}

Added: csw/mgar/pkg/dictd/trunk/files/dictdconfig.8
===================================================================
--- csw/mgar/pkg/dictd/trunk/files/dictdconfig.8	                        (rev 0)
+++ csw/mgar/pkg/dictd/trunk/files/dictdconfig.8	2013-11-21 14:01:57 UTC (rev 22564)
@@ -0,0 +1,176 @@
+.\" This manpage is copyright (C) 1999-2000 Kirk Hilliard <kirk at debian.org>.
+.\" This is free software, published under version 2 or (at your option)
+.\" any later version of the GNU General Public License.  You should
+.\" have received a copy of the GNU General Public License with your
+.\" Debian GNU/Linux system as /usr/share/common-licenses/GPL.
+.\" For Open CSW, the license is in /opt/csw/share/doc/dictd/license
+.\" $Id: dictdconfig.8 25 2008-01-20 10:57:18Z robert $
+.\"
+.TH DICTDCONFIG 8 "January 20, 2008" "DEBIAN" "Debian User's Manual"
+.SH NAME
+dictdconfig \- write dictd database configuration section
+.SH SYNOPSIS
+.B dictdconfig
+[\-hlovw]
+[\-\-help]
+[\-\-list]
+[\-\-order]
+[\-\-version]
+[\-\-write]
+.SH DESCRIPTION
+.B dictdconfig
+generates a complete
+.B dictd
+database configuration section for
+available dictionary databases found in
+.I /opt/csw/share/dictd/
+(or possibly elsewhere if an optional order override file is present).
+If a dictionary database contains a <basename>.suffix and/or a
+<basename>.word file, appropriate index_suffix and index_word entries
+are created.
+.PP
+Its output file
+.I /var/opt/csw/lib/dictd/db.list
+may then be included from the
+.B dictd
+configuration file
+.I /etc/opt/csw/dictd/dictd.conf
+with an
+``include /var/opt/csw/lib/dictd/db.list''
+line.
+See
+.BR dictd (8)
+for an explanation of
+.B dictd
+configuration.
+.PP
+In Debian, 
+.B dictdconfig
+is automatically invoked upon installation or removal of
+dictionary database packages,
+so most users will never need to invoke it by hand.
+.SS DATABASE ORDER
+The default order in which database entries are written is hard coded
+into
+.BR dictdconfig ,
+but it may be overridden via the optional order override file
+.IR /etc/opt/csw/dictd/dictd.order .
+This may be desired because
+.B dictd
+returns definitions from dictionary databases in the order in which
+they are listed in its configuration file.
+The order override file may also be used to include local dictionary
+databases which may not necessarily reside in
+.IR /opt/csw/share/dictd/ .
+.PP
+.IR /etc/opt/csw/dictd/dictd.order ,
+if present, should be a whitespace separated list of basenames and
+directories.  It may also include comments starting with # and
+extending to the end of the line.  Virtual dictionaries and the directive 
+.B database_exit 
+may be included in the order override file.  (If virtual dictionaries
+are used, it is necessary to use this directive after the default set
+of dictionaries to avoid returning duplicate entries.  See 
+.IR dictd(8) .)
+.PP
+Dictionary database entries will be generated only for those databases
+found via basename and directory entries in the default order (or the
+order override file, if present), and they will be generated in the
+order in which these entries appear.  No more than one dictionary
+database entry of any given name will be generated.
+.PP
+Entries without a leading / are relative to
+.IR /opt/csw/share/dictd/ .
+.PP
+Entries without a trailing / are basenames.
+A dictionary database entry is generated if
+.I <basename>.index
+and
+.I <basename>.dict.dz
+or
+.I <basename>.dict
+are present.
+.PP
+Entries with a trailing / are directories.
+A dictionary database entry is generated for each <name> where
+.I <directory>/<name>.index
+and
+.I <directory>/<name>.dict.dz
+or
+.I <directory>/<name>.dict
+are present.
+.PP
+The default order includes the directory
+.I /opt/csw/share/dictd/
+as its final entry so that if a previously unknown dictionary database
+(one not explicitly mentioned in the default order)
+is installed, its dictionary database entry will still be generated.
+An order override file should also use this technique, both for
+.I /opt/csw/share/dictd/
+and for any other directory where local dictionary database might be
+installed.
+.PP
+The \-o option may be used to make
+.B dictdconfig
+display the default order information along with the order override
+information if
+.I /etc/opt/cswdictd/dictd.order
+is present.
+.SS DUMMY ENTRY
+If no dictionary databases are found (via basename or directory
+entries in the default order or the order override file), a dummy
+dictionary database entry will be generated with
+.I /dev/null
+for both data and index.  This allows dictd to start without error.
+.SS DATABASE ALIASES
+If an executable script named 
+.I /etc/opt/csw/dictd/dictdconfig.alias 
+exists, dictdconfig will filter database names through it.  The script
+can be bash, sed, perl, or whatever.  Although 
+.I dict \-D 
+will display database names of any length, names longer than 16
+characters are displayed in a ragged format.  Appropriate entries in
+this alias file can be used to cause 
+.I dict \-D 
+to display the database names in a reasonable format.
+.SH OPTIONS
+.TP
+.I \-w, \-\-write
+Write database section to
+.IR /var/opt/csw/lib/dictd/db.list .
+.TP
+.I \-l, \-\-list
+List database section to standard out.
+.TP
+.I \-o, \-\-order
+Display database order information.
+.TP
+.I \-h, \-\-help
+Display a usage message and exit.
+.TP
+.I \-v, \-\-version
+Display version information and exit.
+.SH FILES
+.TP
+.I /var/opt/csw/lib/dictd/db.list
+Output of
+.BR dictdconfig .
+.TP
+.I /etc/opt/csw/dictd/dictd.config
+.B dictd
+configuration file which "includes"
+.IR /var/opt/csw/lib/dictd/db.list .
+.TP
+.I /etc/opt/csw/dictd/dictd.order
+Optional
+.B dictdconfig
+order override file.
+.SH SEE ALSO
+dictd(8)
+.SH BUGS
+Older dictionary database packages did not automatically invoke
+.B dictdconfig
+upon installation and removal, so you may need to do so
+manually (after which, you should restart dictd).
+.SH AUTHOR
+Kirk Hilliard <kirk at debian.org>.

Added: csw/mgar/pkg/dictd/trunk/files/dictdconfig.alias
===================================================================
--- csw/mgar/pkg/dictd/trunk/files/dictdconfig.alias	                        (rev 0)
+++ csw/mgar/pkg/dictd/trunk/files/dictdconfig.alias	2013-11-21 14:01:57 UTC (rev 22564)
@@ -0,0 +1,16 @@
+#!/usr/bin/perl -lp
+
+# By default, dictdconfig uses the basename of the file in
+# /usr/share/dictd as the name of the database.  This file is an
+# executable filter that substitutes a preferred name for a dictionary
+# in /var/lib/dictd/db.list.  This name is displayed by the dict -D
+# command and is used with the -d option of dict to request
+# definitions from a specific dictionary instead of the default of all
+# installed dictionaries.
+
+# The format of each line is:
+#          s/^<basename-of dictionary-file>/<preferred nickname>/;
+# Lines preceded by a hash character (#) are ignored.
+ 
+s/^freedict/fd/;
+s/^gazetteer/gaz/;

Added: csw/mgar/pkg/dictd/trunk/files/readme-dictd-locales
===================================================================
--- csw/mgar/pkg/dictd/trunk/files/readme-dictd-locales	                        (rev 0)
+++ csw/mgar/pkg/dictd/trunk/files/readme-dictd-locales	2013-11-21 14:01:57 UTC (rev 22564)
@@ -0,0 +1,55 @@
+     RFC2229 specifies the Dict Protocol, which is used by dictd.  To
+be compliant with the RFC, all dictionary databases must be encoded in
+utf-8.  However, dictd supports non-compliant dictionaries encoded in
+an 8-bit character set, if the appropriate locale settings are made.
+Since 7-bit ASCII is a subset of utf-8, plain ASCII dictionaries are
+compliant.  However, when "utf-8" is used in the following discussion,
+it refers to character sets that include characters greater than 0x7F.
+
+     NOTE: dictd is documented to support dictionaries using 8-bit
+encodings, however, that support is broken at this time.  8-bit
+support is not expected to be working properly until sometime after
+the release of dictd 1.9.11.
+
+     dictd and dict are utf-8 capable, but do not convert character
+encodings from utf-8 to the user's locale encoding.  If your system is
+not configured to display utf-8 characters by default, you may use the
+script /opt/csw/bin/dictl (distributed with the dict package) to convert
+the input to and output from utf-8 dictionaries to your preferred
+character set.  See dictl(1) for information on using dictl.
+
+     Since the 7-bit ASCII encoding used in the English language
+dictionaries is a subset of utf-8, many users can use dictl routinely
+in place of dict.  Such users might consider aliasing dict to dictl.
+
+     In order to deal with dictionary databases encoded in various
+encodings, dictd uses a number of library functions that are
+locale-dependent, including strcoll, is*, isw*, tolower and twlower.
+Searching the .index file is also locale-dependent.  ( The command
+line options given to dictfmt when databases are formatted control the
+sorting sequence and which characters are included in the index.)
+
+     The locale used by dictd is determined by the --locale command
+line option, and is independent of the system locale.  (However, the
+specified locale must exist on the system.)
+
+     dictd will fail on startup if any of databases listed in
+/etc/opt/csw/dictd/dictd.conf are incompatible with dictd's locale.
+If no --locale is given in the command line, dictd defaults to the "C"
+locale, which is compatible only with 7-bit ASCII databases.  One
+unfortunate effect of this is that it is impossible to use utf-8 and
+8-bit encoded dictionaries in the same dictd server.
+
+     dictd(8)says "The locale used for the server should be the same
+as that used for dictfmt when the database was built."  In practice,
+any utf-8 or 7-bit ASCII dictionary may be used with any locale that
+includes .utf-8.  In general, if the character set and collating order
+of a dictionary's locale is the same as that of dictd's locale, there
+should be no compatibility problem.  If a dictionary's locale uses the
+latin1 character set, any latin1 locale may be used for dictd.  Since
+7-bit ASCII is a subset of both ISO-8859-1 (latin1) and utf-8 , an
+ASCII dictionary may be used with any ISO-8859 or utf-8 locale.
+
+     When databases are formatted with modern versions of dictfmt, a
+header "00-database-utf8" or "00-database-8bit" is inserted at the top
+of the .dict file.

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the devel mailing list