1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
5 inherit eutils readme.gentoo systemd user
7 DESCRIPTION="Dictionary Client/Server for the DICT protocol"
8 HOMEPAGE="http://www.dict.org/ https://sourceforge.net/projects/dict/"
9 SRC_URI="mirror://sourceforge/dict/${P}.tar.gz"
12 # We install rfc so - ISOC-rfc
13 LICENSE="GPL-2 ISOC-rfc"
14 KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ia64 ~mips ppc ppc64 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc-solaris"
15 IUSE="dbi judy minimal"
17 # <gawk-3.1.6 makes tests fail.
21 dbi? ( dev-db/libdbi )
22 judy? ( dev-libs/judy )
23 >=sys-apps/coreutils-6.10
31 To start and use ${PN} you need to emerge at least one dictionary from
32 the app-dicts category with the package name starting with 'dictd-'.
33 To install all available dictionaries, emerge app-dicts/dictd-dicts.
34 ${PN} will NOT start without at least one dictionary.\n
35 \nIf you are running systemd, you will need to review the instructions
36 explained in /etc/dict/dictd.conf comments.
40 enewgroup dictd # used in src_test()
41 enewuser dictd -1 -1 -1 dictd
45 epatch "${FILESDIR}"/dictd-1.10.11-colorit-nopp-fix.patch
46 epatch "${FILESDIR}"/dictd-1.12.0-build.patch
48 [[ ${CHOST} == *-darwin* ]] && \
49 sed -i -e 's:libtool:glibtool:g' Makefile.in
54 $(use_with dbi plugin-dbi) \
55 $(use_with judy plugin-judy) \
56 --sysconfdir="${EPREFIX}"/etc/dict
61 emake dictfmt dictzip dictzip
68 use minimal && return 0 # All tests are for dictd which we don't build...
69 if [[ ${EUID} -eq 0 ]]; then
70 # If dictd is run as root user (-userpriv) it drops its privileges to
71 # dictd user and group. Give dictd group write access to test directory.
72 chown :dictd "${WORKDIR}" "${S}/test"
73 chmod 770 "${WORKDIR}" "${S}/test"
80 emake DESTDIR="${D}" install.dictzip install.dict install.dictfmt
82 emake DESTDIR="${D}" install
84 dodoc doc/{dicf.ms,rfc.ms,rfc.sh,rfc2229.txt}
85 dodoc doc/{security.doc,toc.ms}
86 newdoc examples/dictd1.conf dictd.conf.example
88 # conf files. For dict.conf see below.
90 for f in dictd.conf site.info colorit.conf; do
91 doins "${FILESDIR}/1.10.11/${f}"
95 newinitd "${FILESDIR}/1.10.11/dictd.initd" dictd
96 newconfd "${FILESDIR}/1.10.11/dictd.confd" dictd
97 systemd_dounit "${FILESDIR}"/${PN}.service
101 doins "${FILESDIR}/1.10.11/dict.conf"
103 dodoc README TODO ChangeLog ANNOUNCE NEWS
105 readme.gentoo_create_doc