git: 082657659749 - main - devel/bear: Fix build on 11.4

Joseph Mingrone jrm at FreeBSD.org
Thu Jul 22 22:05:33 UTC 2021


The branch main has been updated by jrm:

URL: https://cgit.FreeBSD.org/ports/commit/?id=0826576597499645e573e70f6b79875bbff58214

commit 0826576597499645e573e70f6b79875bbff58214
Author:     Joseph Mingrone <jrm at FreeBSD.org>
AuthorDate: 2021-07-22 21:57:29 +0000
Commit:     Joseph Mingrone <jrm at FreeBSD.org>
CommitDate: 2021-07-22 21:57:29 +0000

    devel/bear: Fix build on 11.4
    
    To use dprintf from cstdio on FreeBSD versions prior to 12, #define
    _WITH_DPRINTF is required.
    
    Credit to ashish for discovering this.
---
 devel/bear/Makefile                                            |  6 ++++++
 ...xtra-patch-source_intercept_source_report_libexec_Logger.cc | 10 ++++++++++
 2 files changed, 16 insertions(+)

diff --git a/devel/bear/Makefile b/devel/bear/Makefile
index 5edb1ee62fe4..c2ddb7e9d80f 100644
--- a/devel/bear/Makefile
+++ b/devel/bear/Makefile
@@ -31,6 +31,12 @@ CMAKE_ARGS=	-DCMAKE_INSTALL_DOCDIR=${DOCSDIR} \
 
 OPTIONS_DEFINE=	DOCS
 
+# Patch 11.x, which requires #define _WITH_DPRINTF
+.if ${OPSYS} == FreeBSD && ${OSVERSION} < 1200000
+EXTRA_PATCHES=	${PATCHDIR}/extra-patch-source_intercept_source_report_libexec_Logger.cc
+.endif
+
+
 pre-install:
 	${MV} ${STAGEDIR}/${CONFIGURE_WRKSRC}/stage ${CONFIGURE_WRKSRC}/
 	${RM} -r ${STAGEDIR}/wrkdirs
diff --git a/devel/bear/files/extra-patch-source_intercept_source_report_libexec_Logger.cc b/devel/bear/files/extra-patch-source_intercept_source_report_libexec_Logger.cc
new file mode 100644
index 000000000000..91cdee1891a8
--- /dev/null
+++ b/devel/bear/files/extra-patch-source_intercept_source_report_libexec_Logger.cc
@@ -0,0 +1,10 @@
+--- source/intercept/source/report/libexec/Logger.cc.orig	2021-07-22 21:19:02 UTC
++++ source/intercept/source/report/libexec/Logger.cc
+@@ -20,6 +20,7 @@
+ #include "report/libexec/Logger.h"
+ 
+ #include <ctime>
++#define _WITH_DPRINTF
+ #include <cstdio>
+ #include <unistd.h>
+ 


More information about the dev-commits-ports-main mailing list