summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--textproc/dict-server/Makefile82
-rw-r--r--textproc/dict-server/PLIST19
-rw-r--r--textproc/dict-server/distinfo18
-rw-r--r--textproc/dict-server/files/dictd.conf74
-rw-r--r--textproc/dict-server/files/dictd.sh31
-rw-r--r--textproc/dict-server/patches/patch-aa13
-rw-r--r--textproc/dict-server/patches/patch-ab15
-rw-r--r--textproc/dict-server/patches/patch-ad10
-rw-r--r--textproc/dict-server/patches/patch-ae13
-rw-r--r--textproc/dict-server/patches/patch-ag11
-rw-r--r--textproc/dict-server/patches/patch-ah13
-rw-r--r--textproc/dict-server/patches/patch-ai11
-rw-r--r--textproc/dict-server/patches/patch-aj11
-rw-r--r--textproc/dict-server/patches/patch-ak23
-rw-r--r--textproc/dict-server/patches/patch-al25
15 files changed, 178 insertions, 191 deletions
diff --git a/textproc/dict-server/Makefile b/textproc/dict-server/Makefile
index 53a9033c1c1..42a8538ff28 100644
--- a/textproc/dict-server/Makefile
+++ b/textproc/dict-server/Makefile
@@ -1,45 +1,71 @@
-# $NetBSD: Makefile,v 1.26 2009/12/15 22:13:40 joerg Exp $
+# $NetBSD: Makefile,v 1.27 2009/12/30 11:55:49 abs Exp $
-DISTNAME= dictd-1.9.15
-PKGNAME= dict-server-1.9.15
-PKGREVISION= 2
-CATEGORIES= textproc
-MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=dict/} \
- ftp://ftp.dict.org/pub/dict/
+.include "../../textproc/dict-server/Makefile.common"
-MAINTAINER= pkgsrc-users@NetBSD.org
-HOMEPAGE= http://www.dict.org/
+PKGNAME= ${DISTNAME:S/dictd/dict-server/}
+CATEGORIES= textproc
COMMENT= Dictionary Service Protocol server
-PKG_DESTDIR_SUPPORT= user-destdir
+#LICENSE= gnu-gpl-v2
+
+.include "../../mk/bsd.prefs.mk"
+
+USE_TOOLS+= gmake yacc lex m4:run
+USE_LIBTOOL= yes
-USE_TOOLS+= gmake lex yacc
GNU_CONFIGURE= yes
-CONFIGURE_ARGS+= --with-cflags=${CFLAGS:M*:Q}
-CONFIGURE_ARGS+= --with-etcdir=${PKG_SYSCONFDIR:Q}
+CONFIGURE_ARGS+= --disable-plugin
+CONFIGURE_ARGS+= --datadir=${PREFIX}/share/dictd
+
+BUILD_DEFS+= VARBASE
+MESSAGE_SUBST+= VARBASE="${VARBASE}"
+MESSAGE_SUBST+= PATH_TO_M4="${TOOLS_PATH.m4}"
+FILES_SUBST+= PATH_TO_M4="${TOOLS_PATH.m4}"
+
+DICTD_USER?= dictd
+.if ${OPSYS} == "Interix"
+DICTD_GROUP?= nogroup
+.else
+DICTD_GROUP?= dictd
+.endif
+
+PKG_GROUPS= ${DICTD_GROUP}
+PKG_USERS= ${DICTD_USER}:${DICTD_GROUP}
+PKG_GECOS.${DICTD_USER}= Dictionary\ protocol\ server\ user
+#PKG_HOME.${DICT_USER}= /nonexistent
+#PKG_SHELL.${DICT_USER}= ${NOLOGIN}
+
+RCD_SCRIPTS= dictd
+
+# for -L /var/log/dictd/<filename_or_pattern>
+OWN_DIRS_PERMS= ${VARBASE}/log/dictd dictd dictd 0750
+
+BUILD_TARGET= dictd dictzip dictfmt
-BUILD_TARGET= dictd dictzip
INSTALL_TARGET= install.dictd install.dictzip install.dictfmt
-INSTALLATION_DIRS= ${EGDIR} share/dictd
-EGDIR= ${PREFIX}/share/examples/dict-server
+EGDIR= ${PREFIX}/share/examples/${PKGBASE}
+PKGDOCDIR= ${PREFIX}/share/doc/${PKGBASE}
+AUTO_MKDIRS= yes
+
CONF_FILES= ${EGDIR}/dictd.conf \
${PKG_SYSCONFDIR}/dictd.conf
-# A symbol T_USER is defined in trap.h so...
-post-patch:
- ${GREP} -lr T_USER ${WRKSRC} | \
- while read f; do \
- ${MV} $$f $${f}.orig; \
- ${SED} -e 's/T_USER/T_XUSER/g' \
- -e 's/DICT_XUSER/DICT_USER/g' $${f}.orig >$$f; \
- done
+EXTRA_DOC_FILES= COPYING NEWS README INSTALL
+EXTRA_EXAMPLES_FILES= dictd1.conf dictd2.conf \
+ dictd3.conf dictd4.conf dictd_complex.conf \
+ dictd_mime.conf dictd_plugin_dbi.conf \
+ dictd_site.txt dictd_virtual.conf
post-install:
- ${SED} "s#/usr/lib/dict#${PREFIX}/share/dictd#" \
- ${WRKSRC}/dictd.conf >${DESTDIR}${EGDIR}/dictd.conf
+ ${INSTALL_DATA} ${.CURDIR}/files/dictd.conf ${DESTDIR}${EGDIR}/
+.for i in ${EXTRA_DOC_FILES}
+ ${INSTALL_DATA} ${WRKSRC}/${i} ${DESTDIR}${PKGDOCDIR}
+.endfor
+.for i in ${EXTRA_EXAMPLES_FILES}
+ ${INSTALL_DATA} ${WRKSRC}/examples/${i} ${DESTDIR}${EGDIR}
+.endfor
-.include "../../devel/libltdl/buildlink3.mk"
.include "../../devel/zlib/buildlink3.mk"
-
+.include "../../devel/libmaa/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/textproc/dict-server/PLIST b/textproc/dict-server/PLIST
index 359f9d36f31..890b8e6fb95 100644
--- a/textproc/dict-server/PLIST
+++ b/textproc/dict-server/PLIST
@@ -1,9 +1,7 @@
-@comment $NetBSD: PLIST,v 1.7 2009/06/14 21:36:30 joerg Exp $
+@comment $NetBSD: PLIST,v 1.8 2009/12/30 11:55:49 abs Exp $
bin/dictfmt
bin/dictfmt_index2suffix
bin/dictfmt_index2word
-bin/dictfmt_plugin
-bin/dictfmt_virtual
bin/dictunformat
bin/dictzip
man/man1/dictfmt.1
@@ -13,5 +11,18 @@ man/man1/dictunformat.1
man/man1/dictzip.1
man/man8/dictd.8
sbin/dictd
+share/doc/dict-server/COPYING
+share/doc/dict-server/INSTALL
+share/doc/dict-server/NEWS
+share/doc/dict-server/README
share/examples/dict-server/dictd.conf
-@pkgdir share/dictd
+share/examples/dict-server/dictd1.conf
+share/examples/dict-server/dictd2.conf
+share/examples/dict-server/dictd3.conf
+share/examples/dict-server/dictd4.conf
+share/examples/dict-server/dictd_complex.conf
+share/examples/dict-server/dictd_mime.conf
+share/examples/dict-server/dictd_plugin_dbi.conf
+share/examples/dict-server/dictd_site.txt
+share/examples/dict-server/dictd_virtual.conf
+share/examples/rc.d/dictd
diff --git a/textproc/dict-server/distinfo b/textproc/dict-server/distinfo
index 9b0c8a63e65..be2e262b35e 100644
--- a/textproc/dict-server/distinfo
+++ b/textproc/dict-server/distinfo
@@ -1,15 +1,5 @@
-$NetBSD: distinfo,v 1.17 2007/05/19 14:12:05 wiz Exp $
+$NetBSD: distinfo,v 1.18 2009/12/30 11:55:49 abs Exp $
-SHA1 (dictd-1.9.15.tar.gz) = 081ea97a4a6a936855af30d9c2a31f5733985822
-RMD160 (dictd-1.9.15.tar.gz) = 4cdef7132855d4ef949ba7ceacbea16881e3ef5d
-Size (dictd-1.9.15.tar.gz) = 741597 bytes
-SHA1 (patch-aa) = 2d5bd58779a1b5de577dad4c5aa523888c26098a
-SHA1 (patch-ab) = a3c387c393cdf192dffc1d95280cfc3ebf238b4a
-SHA1 (patch-ad) = 75d08ce1778898edcd52b4b94c974aba54f769a7
-SHA1 (patch-ae) = 1b161f8c52a6029f0af2ddb824fc23ee5f867cff
-SHA1 (patch-ag) = 4473d472bddc34c5d5be2d6be6a0cee015717a79
-SHA1 (patch-ah) = d3453553e15858054bce4943a0316d485938806a
-SHA1 (patch-ai) = 21b2c9ace814e005139c64c4b6890e8b7e249f29
-SHA1 (patch-aj) = 76527be1d4ff89aeec72606d9575a99e6a8e2d3b
-SHA1 (patch-ak) = ab11363903da1f173add59a132b347db9241345f
-SHA1 (patch-al) = bb4e4757b17825fdc06534c7a70426e3c47fd945
+SHA1 (dictd-1.11.2.tar.gz) = 11087cfeffed4e19991e54561d2a6eca1b18d651
+RMD160 (dictd-1.11.2.tar.gz) = f93e8a7a0bbb4e1812288d2ed16889a60e8973ba
+Size (dictd-1.11.2.tar.gz) = 418649 bytes
diff --git a/textproc/dict-server/files/dictd.conf b/textproc/dict-server/files/dictd.conf
new file mode 100644
index 00000000000..7cb02c9e75f
--- /dev/null
+++ b/textproc/dict-server/files/dictd.conf
@@ -0,0 +1,74 @@
+# dictionary server (site) description
+#site /usr/pkg/etc/dictd_site.txt
+
+# global settings
+global {
+ port 2628
+# delay 600
+# depth 10
+# limit 20
+# timestamp 10
+
+ log_option "found"
+ log_option "notfound"
+ log_option "stats"
+ log_option "client"
+
+ debug_option "init"
+
+ listen_to 127.0.0.1 # available for localhost only
+
+ syslog
+ syslog_facility daemon
+# log_file "/var/log/dictd/dictd.log"
+}
+
+# macros to specify databases easier
+m4_define(new_db, `
+database $1 {
+ data "/usr/pkg/share/dictd/$1.dict.dz"
+ `index' "/usr/pkg/share/dictd/$1.`index'"
+')
+
+# English monolingual dictionaries
+new_db(web1913)
+ # add additional options here
+}
+new_db(wn)
+}
+new_db(gazetteer)
+}
+new_db(jargon)
+}
+new_db(foldoc)
+}
+new_db(elements)
+}
+new_db(easton)
+}
+new_db(hitchcock)
+}
+new_db(world95)
+}
+
+# English-Russian dictionary
+new_db(mueller7)
+}
+
+# stop the default search here
+database_exit
+
+# a few virtual dictionaries
+database_virtual en-en {
+ name "English monolingual dictionaries"
+ info "--English monolingual dictionaries--"
+
+ database_list "web1913,wn,gazetter,jargon,foldoc,elements,easton,hitchcock,world95"
+}
+
+database_virtual en-ru {
+ name "English-Russian dictionaries"
+ info "--English-Russian dictionaries--"
+
+ database_list "mueller7"
+}
diff --git a/textproc/dict-server/files/dictd.sh b/textproc/dict-server/files/dictd.sh
new file mode 100644
index 00000000000..2cf0daf7a5d
--- /dev/null
+++ b/textproc/dict-server/files/dictd.sh
@@ -0,0 +1,31 @@
+#!@RCD_SCRIPTS_SHELL@
+#
+# $NetBSD: dictd.sh,v 1.1 2009/12/30 11:55:49 abs Exp $
+#
+# PROVIDE: dictd
+# REQUIRE: LOGIN
+
+. /etc/rc.subr
+
+name="dictd"
+unload_cmd="dictd_unload"
+load_cmd="dictd_load"
+dictd_flags=${dictd_flags-"--pp '@PATH_TO_M4@ -P'"}
+rcvar=$name
+command="@PREFIX@/sbin/${name}"
+pidfile="/var/run/${name}.pid"
+required_files="@PKG_SYSCONFDIR@/dictd.conf"
+extra_commands="reload unload load"
+
+dictd_load (){
+ echo "Loading dictd databases."
+ kill -HUP $(check_pidfile $pidfile $name)
+}
+
+dictd_unload (){
+ echo "Unloading dictd databases."
+ kill -USR1 $(check_pidfile $pidfile $name)
+}
+
+load_rc_config $name
+run_rc_command "$1"
diff --git a/textproc/dict-server/patches/patch-aa b/textproc/dict-server/patches/patch-aa
deleted file mode 100644
index 383931a813d..00000000000
--- a/textproc/dict-server/patches/patch-aa
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-aa,v 1.5 2006/07/16 22:37:49 seb Exp $
-
---- dictP.h.orig 2006-01-02 10:35:42.000000000 +0000
-+++ dictP.h
-@@ -68,7 +68,7 @@
- # pragma alloca
- # else
- # ifndef alloca /* predefined by HP cc +Olibcalls */
--# if !defined(__svr4__) && !defined(__sgi__) /* not on IRIX */
-+# if !defined(__svr4__) && !defined(__sgi__) && !defined(__DragonFly__) && !defined(__FreeBSD__) && !defined(__NetBSD__) /* not on IRIX */
- char *alloca ();
- # endif
- # endif
diff --git a/textproc/dict-server/patches/patch-ab b/textproc/dict-server/patches/patch-ab
deleted file mode 100644
index 14c1ef4ef40..00000000000
--- a/textproc/dict-server/patches/patch-ab
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD: patch-ab,v 1.6 2006/07/16 22:37:49 seb Exp $
-
---- libmaa/maaP.h.orig 2006-01-02 10:42:04.000000000 +0000
-+++ libmaa/maaP.h
-@@ -41,8 +41,10 @@
- # pragma alloca
- # else
- # ifndef alloca /* predefined by HP cc +Olibcalls */
-+# if !defined(__DragonFly__) && !defined(__FreeBSD__) && !defined(__NetBSD__)
- char *alloca ();
- # endif
-+# endif
- # endif
- #endif
-
diff --git a/textproc/dict-server/patches/patch-ad b/textproc/dict-server/patches/patch-ad
deleted file mode 100644
index 3357ab349ef..00000000000
--- a/textproc/dict-server/patches/patch-ad
+++ /dev/null
@@ -1,10 +0,0 @@
-$NetBSD: patch-ad,v 1.1.1.1 1999/07/28 16:17:20 tron Exp $
-
---- dictd.conf.orig Sun Feb 22 19:53:29 1998
-+++ dictd.conf Wed Jul 28 17:57:42 1999
-@@ -14,3 +14,5 @@
- index "/usr/lib/dict/easton.index" }
- database hitchcock { data "/usr/lib/dict/hitchcock.dict.dz"
- index "/usr/lib/dict/hitchcock.index" }
-+database world95 { data "/usr/lib/dict/world95.dict.dz"
-+ index "/usr/lib/dict/world95.index" }
diff --git a/textproc/dict-server/patches/patch-ae b/textproc/dict-server/patches/patch-ae
deleted file mode 100644
index 8645958ab9d..00000000000
--- a/textproc/dict-server/patches/patch-ae
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-ae,v 1.2 2001/10/12 10:51:52 simonb Exp $
-
---- decl.h.orig Mon Jan 1 08:14:18 2001
-+++ decl.h Wed Oct 10 15:45:31 2001
-@@ -28,7 +28,7 @@
- declarations for standard library calls. We provide them here for
- situations that we know about. */
-
--#if defined(__sparc__) && !defined(__linux__)
-+#if defined(__sparc__) && !defined(__linux__) && !defined(__NetBSD__)
- /* Both SunOS and Solaris */
- extern int getrusage( int who, struct rusage * );
- extern void bcopy( const void *, void *, int );
diff --git a/textproc/dict-server/patches/patch-ag b/textproc/dict-server/patches/patch-ag
deleted file mode 100644
index 74633fdcc48..00000000000
--- a/textproc/dict-server/patches/patch-ag
+++ /dev/null
@@ -1,11 +0,0 @@
-$NetBSD: patch-ag,v 1.1 2000/06/26 21:02:06 dmcmahill Exp $
-
---- libmaa/getopt.c.orig Thu Sep 28 20:54:55 1995
-+++ libmaa/getopt.c Mon Jun 26 16:23:08 2000
-@@ -45,5 +45,5 @@
- #include <stdio.h>
-
--#ifdef __sparc__
-+#if defined(__sparc__) && !defined(__NetBSD__)
- extern int fprintf( FILE *, const char *, ... );
- extern int strncmp( const char *, const char *, int n );
diff --git a/textproc/dict-server/patches/patch-ah b/textproc/dict-server/patches/patch-ah
deleted file mode 100644
index 0e1ee0c3ad0..00000000000
--- a/textproc/dict-server/patches/patch-ah
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-ah,v 1.2 2001/10/12 10:51:52 simonb Exp $
-
---- libmaa/decl.h.orig Mon Jan 1 08:14:19 2001
-+++ libmaa/decl.h Wed Oct 10 15:46:45 2001
-@@ -28,7 +28,7 @@
- declarations for standard library calls. We provide them here for
- situations that we know about. */
-
--#if defined(__sparc__) && !defined(linux)
-+#if defined(__sparc__) && !defined(linux) && !defined(__NetBSD__)
- #include <sys/resource.h>
- /* Both SunOS and Solaris */
- extern int getrusage( int who, struct rusage * );
diff --git a/textproc/dict-server/patches/patch-ai b/textproc/dict-server/patches/patch-ai
deleted file mode 100644
index 4f74dd90740..00000000000
--- a/textproc/dict-server/patches/patch-ai
+++ /dev/null
@@ -1,11 +0,0 @@
-$NetBSD: patch-ai,v 1.1 2000/06/26 21:02:08 dmcmahill Exp $
-
---- libmaa/strtol.c.orig Fri Aug 25 00:59:08 1995
-+++ libmaa/strtol.c Mon Jun 26 16:27:57 2000
-@@ -26,5 +26,5 @@
- #include <errno.h>
-
--#ifdef __sparc__
-+#if defined(__sparc__) && !defined(__NetBSD__)
- extern int errno;
- extern int toupper(int);
diff --git a/textproc/dict-server/patches/patch-aj b/textproc/dict-server/patches/patch-aj
deleted file mode 100644
index f0bc368cea0..00000000000
--- a/textproc/dict-server/patches/patch-aj
+++ /dev/null
@@ -1,11 +0,0 @@
-$NetBSD: patch-aj,v 1.1 2000/06/26 21:02:09 dmcmahill Exp $
-
---- libmaa/memtest.c.orig Fri Aug 25 01:20:51 1995
-+++ libmaa/memtest.c Mon Jun 26 16:29:26 2000
-@@ -25,5 +25,5 @@
- #include <stdlib.h>
-
--#ifdef __sparc__
-+#if defined(__sparc__) && !defined(__NetBSD__)
- extern int printf( const char *, ... );
- #endif
diff --git a/textproc/dict-server/patches/patch-ak b/textproc/dict-server/patches/patch-ak
deleted file mode 100644
index f19280b03d7..00000000000
--- a/textproc/dict-server/patches/patch-ak
+++ /dev/null
@@ -1,23 +0,0 @@
-$NetBSD: patch-ak,v 1.3 2005/03/29 12:16:22 adam Exp $
-
---- libmaa/configure.orig 2004-12-23 19:23:25.000000000 +0000
-+++ libmaa/configure
-@@ -1320,6 +1320,8 @@ echo Configuring for libmaa $MAA_MAJOR.$
- echo .
-
-
-+LIBS=`echo $LIBS | sed -e 's|-lmaa||' -e 's|-lz||' -e 's|-lregex||'`
-+
- # Check whether --with-cc or --without-cc was given.
- if test "${with_cc+set}" = set; then
- withval="$with_cc"
-@@ -2523,9 +2525,7 @@ esac
- if test "${with_cflags+set}" = set; then
- withval="$with_cflags"
-
--if test "x${withval}" = xyes; then
- CFLAGS="$withval"
--fi
-
- fi;
-
diff --git a/textproc/dict-server/patches/patch-al b/textproc/dict-server/patches/patch-al
deleted file mode 100644
index 3a1ebeb101e..00000000000
--- a/textproc/dict-server/patches/patch-al
+++ /dev/null
@@ -1,25 +0,0 @@
-$NetBSD: patch-al,v 1.7 2007/05/19 14:12:05 wiz Exp $
-
-Self-written configure tests are generally not of high quality. This one
-fails to work on NetBSD 3.0.
-
---- configure.orig 2004-12-23 19:23:26.000000000 +0000
-+++ configure
-@@ -3166,7 +3166,7 @@ fi
- done
- test -n "$YACC" || YACC="yacc"
-
--if ! which `echo $YACC | cut -f 1 -d ' '` >/dev/null 2>&1; then
-+if false && ! which `echo $YACC | cut -f 1 -d ' '` >/dev/null 2>&1; then
- { { echo "$as_me:$LINENO: error: 'yacc' is missing on your system.
- You can get \`bison' from any GNU archive site." >&5
- echo "$as_me: error: 'yacc' is missing on your system.
-@@ -3445,7 +3445,7 @@ _ACEOF
- fi
-
- fi
--if ! which `echo $LEX | cut -f 1 -d ' '` >/dev/null 2>&1; then
-+if false && ! which `echo $LEX | cut -f 1 -d ' '` >/dev/null 2>&1; then
- { { echo "$as_me:$LINENO: error: 'lex' is missing on your system.
- You can get \`flex' from any GNU archive site." >&5
- echo "$as_me: error: 'lex' is missing on your system.