heimdal-7.1.0.ebuild 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. PYTHON_COMPAT=( python{2_7,3_4,3_5} )
  5. VIRTUALX_REQUIRED="manual"
  6. inherit autotools db-use eutils multilib multilib-minimal python-any-r1 virtualx flag-o-matic
  7. MY_P="${P}"
  8. DESCRIPTION="Kerberos 5 implementation from KTH"
  9. HOMEPAGE="http://www.h5l.org/"
  10. SRC_URI="https://github.com/${PN}/${PN}/releases/download/${P}/${P}.tar.gz"
  11. LICENSE="BSD"
  12. SLOT="0"
  13. KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd"
  14. IUSE="afs +berkdb caps hdb-ldap ipv6 otp +pkinit selinux ssl static-libs test X"
  15. CDEPEND="ssl? ( >=dev-libs/openssl-1.0.1h-r2[${MULTILIB_USEDEP}] )
  16. berkdb? ( >=sys-libs/db-4.8.30-r1:*[${MULTILIB_USEDEP}] )
  17. !berkdb? ( >=sys-libs/gdbm-1.10-r1[${MULTILIB_USEDEP}] )
  18. caps? ( sys-libs/libcap-ng )
  19. >=dev-db/sqlite-3.8.2[${MULTILIB_USEDEP}]
  20. >=sys-libs/e2fsprogs-libs-1.42.9[${MULTILIB_USEDEP}]
  21. sys-libs/ncurses:0=
  22. >=sys-libs/readline-6.2_p5-r1[${MULTILIB_USEDEP}]
  23. afs? ( net-fs/openafs )
  24. hdb-ldap? ( >=net-nds/openldap-2.3.0 )
  25. X? ( x11-libs/libX11
  26. x11-libs/libXau
  27. x11-libs/libXt )
  28. abi_x86_32? (
  29. !<=app-emulation/emul-linux-x86-baselibs-20140508-r1
  30. !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
  31. )
  32. !!app-crypt/mit-krb5
  33. !!app-crypt/mit-krb5-appl"
  34. DEPEND="${CDEPEND}
  35. ${PYTHON_DEPS}
  36. >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}]
  37. >=sys-devel/autoconf-2.62
  38. test? ( X? ( ${VIRTUALX_DEPEND} ) )"
  39. RDEPEND="${CDEPEND}
  40. selinux? ( sec-policy/selinux-kerberos )"
  41. MULTILIB_WRAPPED_HEADERS=(
  42. /usr/include/krb5-types.h
  43. /usr/include/cms_asn1.h
  44. /usr/include/digest_asn1.h
  45. /usr/include/hdb_asn1.h
  46. /usr/include/krb5_asn1.h
  47. /usr/include/pkcs12_asn1.h
  48. /usr/include/pkinit_asn1.h
  49. /usr/include/rfc2459_asn1.h
  50. )
  51. MULTILIB_CHOST_TOOLS=(
  52. /usr/bin/krb5-config
  53. )
  54. src_prepare() {
  55. eapply "${FILESDIR}/heimdal_disable-check-iprop.patch"
  56. eapply "${FILESDIR}/heimdal_tinfo.patch"
  57. eautoreconf
  58. eapply_user
  59. }
  60. src_configure() {
  61. # QA
  62. append-flags -fno-strict-aliasing
  63. multilib-minimal_src_configure
  64. }
  65. multilib_src_configure() {
  66. local myconf=()
  67. if use berkdb; then
  68. myconf+=(
  69. --with-berkeley-db
  70. --with-berkeley-db-include="$(db_includedir)"
  71. )
  72. else
  73. myconf+=(
  74. --without-berkeley-db
  75. )
  76. fi
  77. ECONF_SOURCE=${S} \
  78. econf \
  79. --enable-kcm \
  80. --disable-osfc2 \
  81. --enable-shared \
  82. --with-libintl=/usr \
  83. --with-readline=/usr \
  84. --with-sqlite3=/usr \
  85. --libexecdir=/usr/sbin \
  86. --enable-pthread-support \
  87. $(use_enable afs afs-support) \
  88. $(use_enable otp) \
  89. $(use_enable pkinit kx509) \
  90. $(use_enable pkinit pk-init) \
  91. $(use_enable static-libs static) \
  92. $(multilib_native_use_with caps capng) \
  93. $(multilib_native_use_with hdb-ldap openldap /usr) \
  94. $(use_with ipv6) \
  95. $(use_with ssl openssl /usr) \
  96. $(multilib_native_use_with X x) \
  97. "${myconf[@]}"
  98. }
  99. multilib_src_compile() {
  100. if multilib_is_native_abi; then
  101. emake -j1
  102. else
  103. emake -C include -j1
  104. emake -C lib -j1
  105. emake -C kdc -j1
  106. emake -C tools -j1
  107. emake -C tests/plugin -j1
  108. fi
  109. }
  110. multilib_src_test() {
  111. multilib_is_native_abi && emake -j1 check
  112. }
  113. multilib_src_install() {
  114. if multilib_is_native_abi; then
  115. INSTALL_CATPAGES="no" emake DESTDIR="${D}" install
  116. else
  117. emake -C include DESTDIR="${D}" install
  118. emake -C lib DESTDIR="${D}" install
  119. emake -C kdc DESTDIR="${D}" install
  120. emake -C tools DESTDIR="${D}" install
  121. emake -C tests/plugin DESTDIR="${D}" install
  122. fi
  123. }
  124. multilib_src_install_all() {
  125. dodoc ChangeLog* README NEWS TODO
  126. # client rename
  127. mv "${D}"/usr/share/man/man1/{,k}su.1
  128. mv "${D}"/usr/bin/{,k}su
  129. newinitd "${FILESDIR}"/heimdal-kdc.initd-r2 heimdal-kdc
  130. newinitd "${FILESDIR}"/heimdal-kadmind.initd-r2 heimdal-kadmind
  131. newinitd "${FILESDIR}"/heimdal-kpasswdd.initd-r2 heimdal-kpasswdd
  132. newinitd "${FILESDIR}"/heimdal-kcm.initd-r1 heimdal-kcm
  133. newconfd "${FILESDIR}"/heimdal-kdc.confd heimdal-kdc
  134. newconfd "${FILESDIR}"/heimdal-kadmind.confd heimdal-kadmind
  135. newconfd "${FILESDIR}"/heimdal-kpasswdd.confd heimdal-kpasswdd
  136. newconfd "${FILESDIR}"/heimdal-kcm.confd heimdal-kcm
  137. insinto /etc
  138. newins "${S}"/krb5.conf krb5.conf.example
  139. if use hdb-ldap; then
  140. insinto /etc/openldap/schema
  141. doins "${S}/lib/hdb/hdb.schema"
  142. fi
  143. prune_libtool_files
  144. # default database dir
  145. keepdir /var/heimdal
  146. }