Gentoo Archives: gentoo-commits

From: Austin English <wizardedit@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-text/dictd/, app-text/dictd/files/1.10.11/
Date: Tue, 26 Apr 2016 22:27:17
Message-Id: 1461709592.72e2636133b7f3d6cef359940e72efcbaf359806.wizardedit@gentoo
1 commit: 72e2636133b7f3d6cef359940e72efcbaf359806
2 Author: Austin English <wizardedit <AT> gentoo <DOT> org>
3 AuthorDate: Tue Apr 26 20:32:21 2016 +0000
4 Commit: Austin English <wizardedit <AT> gentoo <DOT> org>
5 CommitDate: Tue Apr 26 22:26:32 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=72e26361
7
8 app-text/dictd: use #!/sbin/openrc-run instead of #!/sbin/runscript
9
10 Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=573846
11
12 Package-Manager: portage-2.2.26
13
14 app-text/dictd/dictd-1.12.1-r2.ebuild | 107 +++++++++++++++++++++++++++++++
15 app-text/dictd/files/1.10.11/dictd.initd | 4 +-
16 2 files changed, 109 insertions(+), 2 deletions(-)
17
18 diff --git a/app-text/dictd/dictd-1.12.1-r2.ebuild b/app-text/dictd/dictd-1.12.1-r2.ebuild
19 new file mode 100644
20 index 0000000..c15f084
21 --- /dev/null
22 +++ b/app-text/dictd/dictd-1.12.1-r2.ebuild
23 @@ -0,0 +1,107 @@
24 +# Copyright 1999-2016 Gentoo Foundation
25 +# Distributed under the terms of the GNU General Public License v2
26 +# $Id$
27 +
28 +EAPI=5
29 +inherit eutils readme.gentoo systemd user
30 +
31 +DESCRIPTION="Dictionary Client/Server for the DICT protocol"
32 +HOMEPAGE="http://www.dict.org/ http://sourceforge.net/projects/dict/"
33 +SRC_URI="mirror://sourceforge/dict/${P}.tar.gz"
34 +
35 +SLOT="0"
36 +# We install rfc so - ISOC-rfc
37 +LICENSE="GPL-2 ISOC-rfc"
38 +KEYWORDS="alpha amd64 ~arm ~hppa ia64 ~mips ppc ppc64 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc-solaris"
39 +IUSE="dbi judy minimal"
40 +
41 +# <gawk-3.1.6 makes tests fail.
42 +RDEPEND="
43 + sys-libs/zlib
44 + dev-libs/libmaa
45 + dbi? ( dev-db/libdbi )
46 + judy? ( dev-libs/judy )
47 + >=sys-apps/coreutils-6.10
48 +"
49 +DEPEND="${RDEPEND}
50 + >=sys-apps/gawk-3.1.6
51 + virtual/yacc
52 +"
53 +
54 +DOC_CONTENTS="
55 + To start and use ${PN} you need to emerge at least one dictionary from
56 + the app-dicts category with the package name starting with 'dictd-'.
57 + To install all available dictionaries, emerge app-dicts/dictd-dicts.
58 + ${PN} will NOT start without at least one dictionary.\n
59 + \nIf you are running systemd, you will need to review the instructions
60 + explained in /etc/dict/dictd.conf comments.
61 +"
62 +
63 +pkg_setup() {
64 + enewgroup dictd # used in src_test()
65 + enewuser dictd -1 -1 -1 dictd
66 +}
67 +
68 +src_prepare() {
69 + epatch "${FILESDIR}"/dictd-1.10.11-colorit-nopp-fix.patch
70 + epatch "${FILESDIR}"/dictd-1.12.0-build.patch
71 +
72 + [[ ${CHOST} == *-darwin* ]] && \
73 + sed -i -e 's:libtool:glibtool:g' Makefile.in
74 +}
75 +
76 +src_configure() {
77 + econf \
78 + $(use_with dbi plugin-dbi) \
79 + $(use_with judy plugin-judy) \
80 + --sysconfdir="${EPREFIX}"/etc/dict
81 +}
82 +
83 +src_compile() {
84 + if use minimal; then
85 + emake dictfmt dictzip dictzip
86 + else
87 + emake
88 + fi
89 +}
90 +
91 +src_test() {
92 + use minimal && return 0 # All tests are for dictd which we don't build...
93 + if [[ ${EUID} -eq 0 ]]; then
94 + # If dictd is run as root user (-userpriv) it drops its privileges to
95 + # dictd user and group. Give dictd group write access to test directory.
96 + chown :dictd "${WORKDIR}" "${S}/test"
97 + chmod 770 "${WORKDIR}" "${S}/test"
98 + fi
99 + emake test
100 +}
101 +
102 +src_install() {
103 + if use minimal; then
104 + emake DESTDIR="${D}" install.dictzip install.dict install.dictfmt
105 + else
106 + emake DESTDIR="${D}" install
107 +
108 + dodoc doc/{dicf.ms,rfc.ms,rfc.sh,rfc2229.txt}
109 + dodoc doc/{security.doc,toc.ms}
110 + newdoc examples/dictd1.conf dictd.conf.example
111 +
112 + # conf files. For dict.conf see below.
113 + insinto /etc/dict
114 + for f in dictd.conf site.info colorit.conf; do
115 + doins "${FILESDIR}/1.10.11/${f}"
116 + done
117 +
118 + # startups for dictd
119 + newinitd "${FILESDIR}/1.10.11/dictd.initd" dictd
120 + newconfd "${FILESDIR}/1.10.11/dictd.confd" dictd
121 + systemd_dounit "${FILESDIR}"/${PN}.service
122 + fi
123 +
124 + insinto /etc/dict
125 + doins "${FILESDIR}/1.10.11/dict.conf"
126 + # Install docs
127 + dodoc README TODO ChangeLog ANNOUNCE NEWS
128 +
129 + readme.gentoo_create_doc
130 +}
131
132 diff --git a/app-text/dictd/files/1.10.11/dictd.initd b/app-text/dictd/files/1.10.11/dictd.initd
133 index 07b77fd..ed5c4b1 100644
134 --- a/app-text/dictd/files/1.10.11/dictd.initd
135 +++ b/app-text/dictd/files/1.10.11/dictd.initd
136 @@ -1,5 +1,5 @@
137 -#!/sbin/runscript
138 -# Copyright 1999-2004 Gentoo Foundation
139 +#!/sbin/openrc-run
140 +# Copyright 1999-2016 Gentoo Foundation
141 # Distributed under the terms of the GNU General Public License v2
142 # $Id$