commit:     e4cd88b4c016eb7cbf610ffe1d3a67d2dc332975
Author:     Felix Janda <felix.janda <AT> posteo <DOT> de>
AuthorDate: Tue Jun 13 19:29:45 2017 +0000
Commit:     Patrice Clement <monsieurp <AT> gentoo <DOT> org>
CommitDate: Tue Jun 13 19:31:07 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e4cd88b4

www-misc/htdig: add patch for musl. EAPI 6 bump.

Gentoo-Bug: https://bugs.gentoo.org/529384

Package-Manager: Portage-2.3.5, Repoman-2.3.1

 .../htdig/files/htdig-3.2.0_beta6-as-needed.patch  |  4 +-
 www-misc/htdig/files/htdig-3.2.0_beta6-gcc4.patch  |  4 +-
 www-misc/htdig/files/htdig-3.2.0_beta6-musl.patch  | 33 ++++++++++++
 www-misc/htdig/htdig-3.2.0_beta6-r5.ebuild         | 63 ++++++++++++++++++++++
 4 files changed, 100 insertions(+), 4 deletions(-)

diff --git a/www-misc/htdig/files/htdig-3.2.0_beta6-as-needed.patch 
b/www-misc/htdig/files/htdig-3.2.0_beta6-as-needed.patch
index bf455ea8b63..6cc9efc121d 100644
--- a/www-misc/htdig/files/htdig-3.2.0_beta6-as-needed.patch
+++ b/www-misc/htdig/files/htdig-3.2.0_beta6-as-needed.patch
@@ -1,5 +1,5 @@
---- htdig-3.2.0b6/Makefile.config.orig 2006-11-19 08:49:57.000000000 -0800
-+++ htdig-3.2.0b6/Makefile.config      2006-11-19 08:51:19.000000000 -0800
+--- a/Makefile.config  2006-11-19 08:49:57.000000000 -0800
++++ b/Makefile.config  2006-11-19 08:51:19.000000000 -0800
 @@ -22,10 +22,7 @@
                $(LOCAL_DEFINES) $(PROFILING)
  

diff --git a/www-misc/htdig/files/htdig-3.2.0_beta6-gcc4.patch 
b/www-misc/htdig/files/htdig-3.2.0_beta6-gcc4.patch
index 58dec13957e..6054df50d54 100644
--- a/www-misc/htdig/files/htdig-3.2.0_beta6-gcc4.patch
+++ b/www-misc/htdig/files/htdig-3.2.0_beta6-gcc4.patch
@@ -1,6 +1,6 @@
 diff -Naurp htdig-3.2.0b6.orig/htsearch/Collection.h 
htdig-3.2.0b6/htsearch/Collection.h
---- htdig-3.2.0b6.orig/htsearch/Collection.h   2004-05-28 06:15:24.000000000 
-0700
-+++ htdig-3.2.0b6/htsearch/Collection.h        2006-03-22 11:35:40.000000000 
-0800
+--- a/htsearch/Collection.h    2004-05-28 06:15:24.000000000 -0700
++++ b/htsearch/Collection.h    2006-03-22 11:35:40.000000000 -0800
 @@ -36,9 +36,9 @@ public:
                 const char *docExcerpt);
      ~Collection();

diff --git a/www-misc/htdig/files/htdig-3.2.0_beta6-musl.patch 
b/www-misc/htdig/files/htdig-3.2.0_beta6-musl.patch
new file mode 100644
index 00000000000..5b405993a79
--- /dev/null
+++ b/www-misc/htdig/files/htdig-3.2.0_beta6-musl.patch
@@ -0,0 +1,33 @@
+--- a/configure.in
++++ b/configure.in
+@@ -176,7 +176,7 @@
+ AC_FUNC_STRFTIME
+ AC_FUNC_STRPTIME
+ AC_FUNC_VPRINTF
+-AC_CHECK_FUNCS([alarm btowc bzero ftime getcwd gettimeofday localtime_r 
memcmp memcpy memmove memset mkstemp munmap pstat_getdynamic raise re_comp 
regcomp select setlocale strchr strcspn strdup strerror strrchr strstr strtol 
strtoul timegm])
++AC_CHECK_FUNCS([alarm btowc bzero ftime getcwd gettimeofday localtime_r 
memcmp memcpy memmove memset mkstemp munmap pstat_getdynamic raise re_comp 
regcomp rresvport select setlocale strchr strcspn strdup strerror strrchr 
strstr strtol strtoul timegm])
+ AC_REPLACE_FUNCS(snprintf vsnprintf)
+ 
+ # More header checks--here use C++
+diff -ur a/htdig-3.2.0b6/htnet/Connection.cc 
b/htdig-3.2.0b6/htnet/Connection.cc
+--- a/htnet/Connection.cc
++++ b/htnet/Connection.cc
+@@ -64,7 +64,7 @@
+ 
+ typedef void (*SIGNAL_HANDLER) (...);
+ 
+-#ifndef _MSC_VER /* _WIN32 */
++#ifdef HAVE_RRESVPORT
+ extern "C" {
+     int rresvport(int *);
+ }
+@@ -161,8 +161,7 @@
+     {
+       int     aport = IPPORT_RESERVED - 1;
+ 
+-//  Native Windows (MSVC) has no rresvport
+-#ifndef _MSC_VER /* _WIN32 */
++#ifdef HAVE_RRESVPORT
+       sock = rresvport(&aport);
+ #else
+       return NOTOK;

diff --git a/www-misc/htdig/htdig-3.2.0_beta6-r5.ebuild 
b/www-misc/htdig/htdig-3.2.0_beta6-r5.ebuild
new file mode 100644
index 00000000000..7bbba8ccf4d
--- /dev/null
+++ b/www-misc/htdig/htdig-3.2.0_beta6-r5.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit 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 )
+       )"
+
+PATCHES=(
+       "${FILESDIR}"/${P}-gcc4.patch
+       "${FILESDIR}"/${P}-as-needed.patch
+       "${FILESDIR}"/${P}-quoting.patch
+       "${FILESDIR}"/${P}-gcc6.patch
+       "${FILESDIR}"/${P}-musl.patch
+)
+
+HTML_DOCS=( htdoc )
+
+src_prepare() {
+       default
+       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)
+}
+
+src_install () {
+       default
+       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
+}

Reply via email to