Gentoo Archives: gentoo-commits

From: Julian Ospald <hasufell@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-crypt/mit-krb5/
Date: Sun, 04 Oct 2015 19:37:00
Message-Id: 1443985547.810a6ede7ec592798728e47ea38a6ebd37a8cb31.hasufell@gentoo
1 commit: 810a6ede7ec592798728e47ea38a6ebd37a8cb31
2 Author: Julian Ospald <hasufell <AT> gentoo <DOT> org>
3 AuthorDate: Sun Oct 4 19:05:47 2015 +0000
4 Commit: Julian Ospald <hasufell <AT> gentoo <DOT> org>
5 CommitDate: Sun Oct 4 19:05:47 2015 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=810a6ede
7
8 app-crypt/mit-krb5: add libressl support
9
10 app-crypt/mit-krb5/mit-krb5-1.13.2-r1.ebuild | 154 +++++++++++++++++++++++++++
11 1 file changed, 154 insertions(+)
12
13 diff --git a/app-crypt/mit-krb5/mit-krb5-1.13.2-r1.ebuild b/app-crypt/mit-krb5/mit-krb5-1.13.2-r1.ebuild
14 new file mode 100644
15 index 0000000..3b425e7
16 --- /dev/null
17 +++ b/app-crypt/mit-krb5/mit-krb5-1.13.2-r1.ebuild
18 @@ -0,0 +1,154 @@
19 +# Copyright 1999-2015 Gentoo Foundation
20 +# Distributed under the terms of the GNU General Public License v2
21 +# $Id$
22 +
23 +EAPI=5
24 +
25 +PYTHON_COMPAT=( python2_7 )
26 +
27 +inherit autotools eutils flag-o-matic multilib-minimal python-any-r1 versionator
28 +
29 +MY_P="${P/mit-}"
30 +P_DIR=$(get_version_component_range 1-2)
31 +DESCRIPTION="MIT Kerberos V"
32 +HOMEPAGE="http://web.mit.edu/kerberos/www/"
33 +SRC_URI="http://web.mit.edu/kerberos/dist/krb5/${P_DIR}/${MY_P}-signed.tar"
34 +
35 +LICENSE="openafs-krb5-a BSD MIT OPENLDAP BSD-2 HPND BSD-4 ISC RSA CC-BY-SA-3.0 || ( BSD-2 GPL-2+ )"
36 +SLOT="0"
37 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
38 +IUSE="doc +keyutils libressl openldap +pkinit selinux +threads test xinetd"
39 +
40 +CDEPEND="
41 + !!app-crypt/heimdal
42 + >=sys-libs/e2fsprogs-libs-1.42.9[${MULTILIB_USEDEP}]
43 + || (
44 + >=dev-libs/libverto-0.2.5[libev,${MULTILIB_USEDEP}]
45 + >=dev-libs/libverto-0.2.5[libevent,${MULTILIB_USEDEP}]
46 + >=dev-libs/libverto-0.2.5[tevent,${MULTILIB_USEDEP}]
47 + )
48 + keyutils? ( >=sys-apps/keyutils-1.5.8[${MULTILIB_USEDEP}] )
49 + openldap? ( >=net-nds/openldap-2.4.38-r1[${MULTILIB_USEDEP}] )
50 + pkinit? (
51 + !libressl? ( >=dev-libs/openssl-1.0.1h-r2:0[${MULTILIB_USEDEP}] )
52 + libressl? ( dev-libs/libressl[${MULTILIB_USEDEP}] )
53 + )
54 + xinetd? ( sys-apps/xinetd )
55 + abi_x86_32? (
56 + !<=app-emulation/emul-linux-x86-baselibs-20140508-r1
57 + !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
58 + )"
59 +DEPEND="${CDEPEND}
60 + ${PYTHON_DEPS}
61 + virtual/yacc
62 + doc? ( virtual/latex-base )
63 + test? (
64 + ${PYTHON_DEPS}
65 + dev-lang/tcl:0
66 + dev-util/dejagnu
67 + )"
68 +RDEPEND="${CDEPEND}
69 + selinux? ( sec-policy/selinux-kerberos )"
70 +
71 +S=${WORKDIR}/${MY_P}/src
72 +
73 +MULTILIB_CHOST_TOOLS=(
74 + /usr/bin/krb5-config
75 +)
76 +
77 +src_unpack() {
78 + unpack ${A}
79 + unpack ./"${MY_P}".tar.gz
80 +}
81 +
82 +src_prepare() {
83 + epatch "${FILESDIR}/${PN}-1.12_warn_cflags.patch"
84 + epatch "${FILESDIR}/${PN}-config_LDFLAGS.patch"
85 +
86 + eautoreconf
87 +}
88 +
89 +src_configure() {
90 + append-cppflags "-I${EPREFIX}/usr/include/et"
91 + # QA
92 + append-flags -fno-strict-aliasing
93 + append-flags -fno-strict-overflow
94 +
95 + multilib-minimal_src_configure
96 +}
97 +
98 +multilib_src_configure() {
99 + use keyutils || export ac_cv_header_keyutils_h=no
100 + ECONF_SOURCE=${S} \
101 + WARN_CFLAGS="set" \
102 + econf \
103 + $(use_with openldap ldap) \
104 + "$(multilib_native_use_with test tcl "${EPREFIX}/usr")" \
105 + $(use_enable pkinit) \
106 + $(use_enable threads thread-support) \
107 + --without-hesiod \
108 + --enable-shared \
109 + --with-system-et \
110 + --with-system-ss \
111 + --enable-dns-for-realm \
112 + --enable-kdc-lookaside-cache \
113 + --with-system-verto \
114 + --disable-rpath
115 +}
116 +
117 +multilib_src_compile() {
118 + emake -j1
119 +}
120 +
121 +multilib_src_test() {
122 + multilib_is_native_abi && emake -j1 check
123 +}
124 +
125 +multilib_src_install() {
126 + emake \
127 + DESTDIR="${D}" \
128 + EXAMPLEDIR="${EPREFIX}/usr/share/doc/${PF}/examples" \
129 + install
130 +}
131 +
132 +multilib_src_install_all() {
133 + # default database dir
134 + keepdir /var/lib/krb5kdc
135 +
136 + cd ..
137 + dodoc README
138 +
139 + if use doc; then
140 + dohtml -r doc/html/*
141 + docinto pdf
142 + dodoc doc/pdf/*.pdf
143 + fi
144 +
145 + newinitd "${FILESDIR}"/mit-krb5kadmind.initd-r1 mit-krb5kadmind
146 + newinitd "${FILESDIR}"/mit-krb5kdc.initd-r1 mit-krb5kdc
147 + newinitd "${FILESDIR}"/mit-krb5kpropd.initd-r1 mit-krb5kpropd
148 +
149 + insinto /etc
150 + newins "${ED}/usr/share/doc/${PF}/examples/krb5.conf" krb5.conf.example
151 + insinto /var/lib/krb5kdc
152 + newins "${ED}/usr/share/doc/${PF}/examples/kdc.conf" kdc.conf.example
153 +
154 + if use openldap ; then
155 + insinto /etc/openldap/schema
156 + doins "${S}/plugins/kdb/ldap/libkdb_ldap/kerberos.schema"
157 + fi
158 +
159 + if use xinetd ; then
160 + insinto /etc/xinetd.d
161 + newins "${FILESDIR}/kpropd.xinetd" kpropd
162 + fi
163 +}
164 +
165 +pkg_preinst() {
166 + if has_version "<${CATEGORY}/${PN}-1.8.0" ; then
167 + elog "MIT split the Kerberos applications from the base Kerberos"
168 + elog "distribution. Kerberized versions of telnet, rlogin, rsh, rcp,"
169 + elog "ftp clients and telnet, ftp deamons now live in"
170 + elog "\"app-crypt/mit-krb5-appl\" package."
171 + fi
172 +}