pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

dillo-devel: Add patch for C++98



Module Name:	pkgsrc-wip
Committed By:	Michael Baeuerle <micha%NetBSD.org@localhost>
Pushed By:	micha
Date:		Mon Oct 21 11:57:56 2024 +0200
Changeset:	ca287f602a92bb1ca5e1b14bc8d3884984a6388d

Modified Files:
	dillo-devel/distinfo
Added Files:
	dillo-devel/patches/patch-src_html.cc

Log Message:
dillo-devel: Add patch for C++98

static_assert requires C++11.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=ca287f602a92bb1ca5e1b14bc8d3884984a6388d

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 dillo-devel/distinfo                  |  1 +
 dillo-devel/patches/patch-src_html.cc | 20 ++++++++++++++++++++
 2 files changed, 21 insertions(+)

diffs:
diff --git a/dillo-devel/distinfo b/dillo-devel/distinfo
index 69c0f75756..afe0cff2a8 100644
--- a/dillo-devel/distinfo
+++ b/dillo-devel/distinfo
@@ -6,3 +6,4 @@ Size (dillo-3.1.1.tar.gz) = 1516060 bytes
 SHA1 (patch-configure.ac) = 3a4f7a9ea5638704819b793b30e3688c141d87d9
 SHA1 (patch-dillo-install-hyphenation) = 27f3a481da421a691c4c39093f010c01abee2515
 SHA1 (patch-doc_Makefile.am) = ca7a9529aeafef944695347024d05adaac7ae2b7
+SHA1 (patch-src_html.cc) = b298991b0f26b05e2c150cecd7324f2c50a222c5
diff --git a/dillo-devel/patches/patch-src_html.cc b/dillo-devel/patches/patch-src_html.cc
new file mode 100644
index 0000000000..76df52bdb3
--- /dev/null
+++ b/dillo-devel/patches/patch-src_html.cc
@@ -0,0 +1,20 @@
+$NetBSD$
+
+Use static_assert only with compilers that support at least C++11.
+
+--- src/html.cc.orig	2024-06-07 23:32:23.000000000 +0000
++++ src/html.cc
+@@ -3555,8 +3555,13 @@ static const TagInfo Tags[] = {
+ };
+ #define NTAGS (sizeof(Tags)/sizeof(Tags[0]))
+ 
++#if (__cplusplus >= 201103L)
++// Requires C++11
+ static_assert(NTAGS == HTML_NTAGS,
+    "Mismatch between number of tags in Tags and HTML_NTAGS");
++#else
++# warning static_assert disabled (requires at least C++11)
++#endif
+ 
+ /*
+  * Compares tag from buffer ('/' or '>' or space-ended string) [p1]


Home | Main Index | Thread Index | Old Index