Gentoo Archives: gentoo-commits

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