blob: 3a45503a87a8b573c94780b8f8fe7912bec92fb3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI="5"
inherit eutils autotools
MY_PV=${PV/_beta/b}
S=${WORKDIR}/${PN}-${MY_PV}
DESCRIPTION="HTTP/HTML indexing and searching system"
HOMEPAGE="http://www.htdig.org"
SRC_URI="http://www.htdig.org/files/${PN}-${MY_PV}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux"
IUSE="libressl ssl"
DEPEND=">=sys-libs/zlib-1.1.3
app-arch/unzip
ssl? (
!libressl? ( dev-libs/openssl:0 )
libressl? ( dev-libs/libressl )
)"
src_prepare() {
epatch "${FILESDIR}"/${P}-gcc4.patch
epatch "${FILESDIR}"/${P}-as-needed.patch
epatch "${FILESDIR}"/${P}-quoting.patch
epatch "${FILESDIR}"/${P}-gcc6.patch
sed -e "s/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/" -i configure.in db/configure.in || die
eautoreconf
}
src_configure() {
econf \
--with-config-dir="${EPREFIX}"/etc/${PN} \
--with-default-config-file="${EPREFIX}"/etc/${PN}/${PN}.conf \
--with-database-dir="${EPREFIX}"/var/lib/${PN}/db \
--with-cgi-bin-dir="${EPREFIX}"/var/www/localhost/cgi-bin \
--with-search-dir="${EPREFIX}"/var/www/localhost/htdocs/${PN} \
--with-image-dir="${EPREFIX}"/var/www/localhost/htdocs/${PN} \
$(use_with ssl)
# --with-image-url-prefix="file://${EPREFIX}/var/www/localhost/htdocs/${PN}" \
}
src_install () {
emake DESTDIR="${D}" install || die "make install failed"
dodoc ChangeLog README
dohtml -r htdoc
sed -i "s:${D}::g" \
"${ED}"/etc/${PN}/${PN}.conf \
"${ED}"/usr/bin/rundig \
|| die "sed failed (removing \${D} from installed files)"
# symlink htsearch so it can be easily found. see bug #62087
dosym ../../var/www/localhost/cgi-bin/htsearch /usr/bin/htsearch
}
|