apache-tools-2.2.31.ebuild 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. # Copyright 1999-2015 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI="4"
  4. inherit flag-o-matic eutils
  5. DESCRIPTION="Useful Apache tools - htdigest, htpasswd, ab, htdbm"
  6. HOMEPAGE="https://httpd.apache.org/"
  7. SRC_URI="mirror://apache/httpd/httpd-${PV}.tar.bz2"
  8. LICENSE="Apache-2.0"
  9. SLOT="0"
  10. KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
  11. IUSE="ssl"
  12. RESTRICT="test"
  13. RDEPEND="=dev-libs/apr-1*
  14. =dev-libs/apr-util-1*
  15. dev-libs/expat
  16. dev-libs/libpcre
  17. kernel_linux? ( sys-apps/util-linux )
  18. ssl? ( dev-libs/openssl )
  19. !<www-servers/apache-2.2.4"
  20. DEPEND="${RDEPEND}
  21. sys-devel/libtool"
  22. S="${WORKDIR}/httpd-${PV}"
  23. src_prepare() {
  24. # Apply these patches:
  25. # (1) apache-tools-2.2.20-Makefile.patch:
  26. # - fix up the `make install' for support/
  27. # - remove envvars from `make install'
  28. epatch "${FILESDIR}"/${PN}-2.2.20-Makefile.patch
  29. }
  30. src_configure() {
  31. # Brain dead check.
  32. tc-is-cross-compiler && export ap_cv_void_ptr_lt_long="no"
  33. # Instead of filtering --as-needed (bug #128505), append --no-as-needed
  34. append-ldflags $(no-as-needed)
  35. # econf overwrites the stuff from config.layout.
  36. econf \
  37. --sbindir=/usr/sbin \
  38. --with-z=/usr \
  39. --with-apr=/usr \
  40. --with-apr-util=/usr \
  41. --with-pcre=/usr \
  42. $(use_enable ssl) \
  43. $(usex ssl '--with-ssl=/usr' '')
  44. }
  45. src_compile() {
  46. cd support || die
  47. emake
  48. }
  49. src_install () {
  50. cd support || die
  51. make DESTDIR="${D}" install || die
  52. # install manpages
  53. doman "${S}"/docs/man/{dbmmanage,htdigest,htpasswd,htdbm}.1 \
  54. "${S}"/docs/man/{htcacheclean,rotatelogs,ab,logresolve}.8
  55. # Providing compatiblity symlinks for #177697 (which we'll stop to install
  56. # at some point).
  57. pushd "${D}"/usr/sbin/ >/dev/null || die
  58. for i in *; do
  59. dosym /usr/sbin/${i} /usr/sbin/${i}2
  60. done
  61. popd >/dev/null || die
  62. # Provide a symlink for ab-ssl
  63. if use ssl; then
  64. dosym /usr/sbin/ab /usr/sbin/ab-ssl
  65. dosym /usr/sbin/ab /usr/sbin/ab2-ssl
  66. fi
  67. # make htpasswd accessible for non-root users
  68. dosym /usr/sbin/htpasswd /usr/bin/htpasswd
  69. dosym /usr/sbin/htdigest /usr/bin/htdigest
  70. dodoc "${S}"/CHANGES
  71. }