diff --git a/textproc/htdig/Makefile b/textproc/htdig/Makefile index 8533687aba91..dd9f401a1bf8 100644 --- a/textproc/htdig/Makefile +++ b/textproc/htdig/Makefile @@ -1,55 +1,55 @@ PORTNAME= htdig PORTVERSION= 3.2.0.b6 -PORTREVISION= 6 +PORTREVISION= 7 CATEGORIES= textproc www MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/3.2.0b6 DISTNAME= htdig-3.2.0b6 MAINTAINER= ports@FreeBSD.org COMMENT= WWW indexing and searching system WWW= https://sourceforge.net/projects/htdig/ LICENSE= LGPL20+ LICENSE_FILE= ${WRKSRC}/COPYING GNU_CONFIGURE= yes CONFIGURE_ARGS= --with-config-dir=${PREFIX}/etc/htdig \ --with-default-config-file=${PREFIX}/etc/htdig/htdig.conf \ --with-common-dir=${PREFIX}/share/htdig/common \ --with-database-dir=${PREFIX}/share/htdig/database \ --with-cgi-bin-dir=${PREFIX}/www/cgi-bin \ --with-search-dir=${PREFIX}/www/data \ --with-image-dir=${PREFIX}/www/icons/htdig \ --with-image-url-prefix=/icons/htdig \ --with-ssl USES= alias cpe libtool ssl CPE_VENDOR= ${PORTNAME}_project USE_CXXSTD= c++98 USE_LDCONFIG= yes INSTALL_TARGET= install-strip LDFLAGS+= -L${OPENSSLLIB} CFLAGS+= -I${OPENSSLINC} CONFLICTS_INSTALL= htdump mifluz # bin/htdb_dump bin/htdb_load bin/htdb_stat bin/htdump OPTIONS_DEFINE= APACHE DOCS OPTIONS_DEFAULT= APACHE APACHE_USES= apache APACHE_CONFIGURE_ON= --with-apache=${LOCALBASE}/sbin PORTDOCS= * post-install: @${MV} ${STAGEDIR}${PREFIX}/etc/htdig/htdig.conf ${STAGEDIR}${PREFIX}/etc/htdig/htdig.conf.sample post-install-DOCS-on: @${MKDIR} ${STAGEDIR}${DOCSDIR}/html .for f in ChangeLog ChangeLog.0 README STATUS ${INSTALL_DATA} ${WRKSRC}/${f} ${STAGEDIR}${DOCSDIR} .endfor .for f in *.html *.gif ${INSTALL_DATA} ${WRKSRC}/htdoc/${f} ${STAGEDIR}${DOCSDIR}/html .endfor .include diff --git a/textproc/htdig/files/patch-htsearch_Display.cc b/textproc/htdig/files/patch-htsearch_Display.cc new file mode 100644 index 000000000000..4ecb7c6fdd02 --- /dev/null +++ b/textproc/htdig/files/patch-htsearch_Display.cc @@ -0,0 +1,20 @@ +--- htsearch/Display.cc.orig 2023-04-10 13:24:24 UTC ++++ htsearch/Display.cc +@@ -42,7 +42,7 @@ using namespace std; + #endif /* HAVE_STD */ + + #include +-#include // for abs ++#include // for fabs + #include + + #ifndef _MSC_VER /* _WIN32 */ +@@ -1541,7 +1541,7 @@ Display::buildMatchList() + // seconds in a 365 days year). The formula gives less weight + // as the distance between the date document and the current time + // increases (the absolute value is for documents with future date) +-#define DATE_FACTOR(df, n, dd) ((df) * 100 / (1+(double)(abs((n) - (dd)) / 31536000))) ++#define DATE_FACTOR(df, n, dd) ((df) * 100 / (1+(double)(fabs((n) - (dd)) / 31536000))) + date_score = DATE_FACTOR(date_factor, now, thisRef->DocTime()); + score += date_score; + }