1 # Copyright 1999-2018 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
5 inherit flag-o-matic eutils multilib toolchain-funcs
7 DESCRIPTION="Useful Apache tools - htdigest, htpasswd, ab, htdbm"
8 HOMEPAGE="https://httpd.apache.org/"
9 SRC_URI="mirror://apache/httpd/httpd-${PV}.tar.bz2"
13 KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc64-solaris ~x64-solaris"
17 RDEPEND=">=dev-libs/apr-1.5.0:1
21 kernel_linux? ( sys-apps/util-linux )
23 !libressl? ( dev-libs/openssl:0= )
24 libressl? ( dev-libs/libressl:0= )
30 S="${WORKDIR}/httpd-${PV}"
33 "${FILESDIR}/${PN}-2.4.7-Makefile.patch" #459446
39 # This package really should upgrade to using pcre's .pc file.
40 cat <<-\EOF >"${T}"/pcre-config
44 if [[ ${flag} == "--version" ]]; then
45 flags+=( --modversion )
50 exec ${PKG_CONFIG} libpcre "${flags[@]}"
52 chmod a+x "${T}"/pcre-config
57 tc-is-cross-compiler && export ap_cv_void_ptr_lt_long="no"
61 # Instead of filtering --as-needed (bug #128505), append --no-as-needed
62 #append-ldflags $(no-as-needed)
64 # econf overwrites the stuff from config.layout.
65 ac_cv_path_PKGCONFIG=${PKG_CONFIG} \
67 --libexecdir="${EPREFIX}"/usr/$(get_libdir)/apache2/modules \
68 --sbindir="${EPREFIX}"/usr/sbin \
69 --with-perl="${EPREFIX}"/usr/bin/perl \
70 --with-expat="${EPREFIX}"/usr \
71 --with-z="${EPREFIX}"/usr \
72 --with-apr="${SYSROOT}${EPREFIX}"/usr \
73 --with-apr-util="${SYSROOT}${EPREFIX}"/usr \
74 --with-pcre="${T}"/pcre-config \
76 $(usex ssl '--with-ssl="${EPREFIX}"/usr' '')
78 -e '/^LTFLAGS/s:--silent::' \
79 build/rules.mk build/config_vars.mk || die
87 emake -C support DESTDIR="${D}" install
89 doman docs/man/{dbmmanage,htdigest,htpasswd,htdbm,ab,logresolve}.1 \
90 docs/man/{htcacheclean,rotatelogs}.8
92 # Providing compatiblity symlinks for #177697 (which we'll stop to install
94 pushd "${ED}"/usr/sbin >/dev/null || die
97 dosym ${i} /usr/sbin/${i}2
99 popd >/dev/null || die
101 # Provide a symlink for ab-ssl
103 dosym ab /usr/bin/ab-ssl
104 dosym ab /usr/bin/ab2-ssl