about summary refs log tree commit diff
diff options
context:
space:
mode:
authorZane van Iperen <zane@zanevaniperen.com>2022-04-25 00:29:17 +1000
committerZane van Iperen <zane@zanevaniperen.com>2022-04-25 00:29:17 +1000
commit1b44874d7248bb24870d2adbd04dad82742bb1a0 (patch)
tree74884b51c096414a23008501b8ceee1a296f2042
parent858b460f3ca0efaadab65d2fdad39905a14b3607 (diff)
htmlcxx: 0.86 -> 0.87
Also fix build with C++17, thoughtfully stolen from [1].

[1]: https://gitweb.gentoo.org/repo/gentoo.git/plain/dev-cpp/htmlcxx/files/htmlcxx-0.87-c++17.patch
-rw-r--r--pkgs/development/libraries/htmlcxx/c++17.patch24
-rw-r--r--pkgs/development/libraries/htmlcxx/default.nix11
2 files changed, 31 insertions, 4 deletions
diff --git a/pkgs/development/libraries/htmlcxx/c++17.patch b/pkgs/development/libraries/htmlcxx/c++17.patch
new file mode 100644
index 0000000000000..53fa9fbfc8c1c
--- /dev/null
+++ b/pkgs/development/libraries/htmlcxx/c++17.patch
@@ -0,0 +1,24 @@
+diff --color -Naur a/html/CharsetConverter.cc b/html/CharsetConverter.cc
+--- a/html/CharsetConverter.cc	2018-12-29 03:13:56.000000000 +0000
++++ b/html/CharsetConverter.cc	2021-05-31 23:03:10.705334580 +0100
+@@ -7,7 +7,7 @@
+ using namespace std;
+ using namespace htmlcxx;
+ 
+-CharsetConverter::CharsetConverter(const string &from, const string &to) throw (Exception)
++CharsetConverter::CharsetConverter(const string &from, const string &to)
+ {
+ 	mIconvDescriptor = iconv_open(to.c_str(), from.c_str());
+ 	if (mIconvDescriptor == (iconv_t)(-1))
+diff --color -Naur a/html/CharsetConverter.h b/html/CharsetConverter.h
+--- a/html/CharsetConverter.h	2018-12-29 03:13:56.000000000 +0000
++++ b/html/CharsetConverter.h	2021-05-31 23:03:19.042574598 +0100
+@@ -17,7 +17,7 @@
+ 						: std::runtime_error(arg) {}
+ 			};
+ 			
+-			CharsetConverter(const std::string &from, const std::string &to) throw (Exception);
++			CharsetConverter(const std::string &from, const std::string &to);
+ 			~CharsetConverter();
+ 			
+ 			std::string convert(const std::string &input);
diff --git a/pkgs/development/libraries/htmlcxx/default.nix b/pkgs/development/libraries/htmlcxx/default.nix
index d9072e46e4070..221ec7622ff4a 100644
--- a/pkgs/development/libraries/htmlcxx/default.nix
+++ b/pkgs/development/libraries/htmlcxx/default.nix
@@ -2,15 +2,18 @@
 
 stdenv.mkDerivation rec {
   pname = "htmlcxx";
-  version = "0.86";
+  version = "0.87";
 
   src = fetchurl {
-    url = "mirror://sourceforge/htmlcxx/htmlcxx/${version}/${pname}-${version}.tar.gz";
-    sha256 = "1hgmyiad3qgbpf2dvv2jygzj6jpz4dl3n8ds4nql68a4l9g2nm07";
+    url = "mirror://sourceforge/htmlcxx/v${version}/${pname}-${version}.tar.gz";
+    sha256 = "sha256-XTj5OM9N+aKYpTRq8nGV//q/759GD8KgIjPLz6j8dcg=";
   };
 
   buildInputs = [ libiconv ];
-  patches = [ ./ptrdiff.patch ];
+  patches = [
+    ./ptrdiff.patch
+    ./c++17.patch
+  ];
 
   meta = with lib; {
     homepage = "http://htmlcxx.sourceforge.net/";