about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/gdome2
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/gdome2')
-rw-r--r--nixpkgs/pkgs/development/libraries/gdome2/default.nix33
-rw-r--r--nixpkgs/pkgs/development/libraries/gdome2/fno-common.patch11
-rw-r--r--nixpkgs/pkgs/development/libraries/gdome2/xml-document.patch11
3 files changed, 55 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/gdome2/default.nix b/nixpkgs/pkgs/development/libraries/gdome2/default.nix
new file mode 100644
index 000000000000..5aa1c487b4f9
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gdome2/default.nix
@@ -0,0 +1,33 @@
+{lib, stdenv, fetchurl, pkg-config, glib, libxml2, gtk-doc}:
+
+let
+  pname = "gdome2";
+  version = "0.8.1";
+in
+
+stdenv.mkDerivation {
+  name = "${pname}-${version}";
+
+  src = fetchurl {
+    url = "http://gdome2.cs.unibo.it/tarball/${pname}-${version}.tar.gz";
+    sha256 = "0hyms5s3hziajp3qbwdwqjc2xcyhb783damqg8wxjpwfxyi81fzl";
+  };
+
+  hardeningDisable = [ "format" ];
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ glib libxml2 gtk-doc ];
+  propagatedBuildInputs = [glib libxml2];
+  patches = [
+    ./xml-document.patch
+    ./fno-common.patch
+  ];
+
+  meta = with lib; {
+    homepage = "http://gdome2.cs.unibo.it/";
+    description = "DOM C library developed for the Gnome project";
+    license = licenses.lgpl21Plus;
+    maintainers = with maintainers; [ prikhi roconnor ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/gdome2/fno-common.patch b/nixpkgs/pkgs/development/libraries/gdome2/fno-common.patch
new file mode 100644
index 000000000000..f9dc93c48fcf
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gdome2/fno-common.patch
@@ -0,0 +1,11 @@
+On gcc-10 -fno-common is the default which forbids miltiple definitions.
+--- a/libgdome/xpath/gdome-xpath-xpnsresolv.h
++++ b/libgdome/xpath/gdome-xpath-xpnsresolv.h
+@@ -42,6 +42,6 @@ void gdome_xpath_xpnsresolv_ref (GdomeXPathNSResolver *self, GdomeException *exc
+ void gdome_xpath_xpnsresolv_unref (GdomeXPathNSResolver *self, GdomeException *exc);
+ GdomeDOMString * gdome_xpath_xpnsresolv_lookupNamespaceURI( GdomeXPathNSResolver *self, GdomeDOMString *prefix, GdomeException *exc);
+ 
+-const GdomeXPathNSResolverVtab gdome_xpath_xpnsresolv_vtab;
++extern const GdomeXPathNSResolverVtab gdome_xpath_xpnsresolv_vtab;
+ 
+ #endif /* GDOME_XPNSRESOLV_FILE */
diff --git a/nixpkgs/pkgs/development/libraries/gdome2/xml-document.patch b/nixpkgs/pkgs/development/libraries/gdome2/xml-document.patch
new file mode 100644
index 000000000000..7567d1049fc0
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gdome2/xml-document.patch
@@ -0,0 +1,11 @@
+--- a/libgdome/gdomecore/gdome-xml-documentt.c	2003-07-13 14:47:54.000000000 +0400
++++ b/libgdome/gdomecore/gdome-xml-documentt.c	2013-07-02 14:09:18.304613703 +0400
+@@ -342,7 +342,7 @@
+ 	}
+ 	xmlNodeDumpOutput (out_buff, NULL, (xmlNode *)is, 0, 0, NULL);
+ 	xmlOutputBufferFlush(out_buff);
+-	ret = g_strndup (out_buff->buffer->content, out_buff->buffer->use);
++	ret = g_strndup (xmlBufContent(out_buff), xmlBufUse(out_buff));
+ 	(void)xmlOutputBufferClose(out_buff);
+
+ 	return gdome_xml_str_mkref_own (ret);