Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 11 Apr 2023 23:04:19 GMT
From:      Robert Clausecker <fuz@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 915ae070bbd1 - main - textproc/htdig: fix build on armv7
Message-ID:  <202304112304.33BN4Jrg071865@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by fuz:

URL: https://cgit.FreeBSD.org/ports/commit/?id=915ae070bbd154fa69bab92785fe9fb5ee00e0a7

commit 915ae070bbd154fa69bab92785fe9fb5ee00e0a7
Author:     Robert Clausecker <fuz@FreeBSD.org>
AuthorDate: 2023-04-10 13:37:04 +0000
Commit:     Robert Clausecker <fuz@FreeBSD.org>
CommitDate: 2023-04-11 23:02:42 +0000

    textproc/htdig: fix build on armv7
    
    Work around a polymorphism error by using monomorphic fabs() instead
    of fabs().
---
 textproc/htdig/Makefile                        |  2 +-
 textproc/htdig/files/patch-htsearch_Display.cc | 20 ++++++++++++++++++++
 2 files changed, 21 insertions(+), 1 deletion(-)

diff --git a/textproc/htdig/Makefile b/textproc/htdig/Makefile
index 8533687aba91..dd9f401a1bf8 100644
--- a/textproc/htdig/Makefile
+++ b/textproc/htdig/Makefile
@@ -1,6 +1,6 @@
 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
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 <stdio.h>
+-#include <stdlib.h> // for abs
++#include <math.h> // for fabs
+ #include <ctype.h>
+ 
+ #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;
+         }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202304112304.33BN4Jrg071865>