about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/coin3d
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2019-01-07 02:18:36 +0000
committerAlyssa Ross <hi@alyssa.is>2019-01-07 02:18:47 +0000
commit36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2 (patch)
treeb3faaf573407b32aa645237a4d16b82778a39a92 /nixpkgs/pkgs/development/libraries/coin3d
parent4e31070265257dc67d120c27e0f75c2344fdfa9a (diff)
parentabf060725d7614bd3b9f96764262dfbc2f9c2199 (diff)
downloadnixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.gz
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.bz2
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.lz
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.xz
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.zst
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.zip
Add 'nixpkgs/' from commit 'abf060725d7614bd3b9f96764262dfbc2f9c2199'
git-subtree-dir: nixpkgs
git-subtree-mainline: 4e31070265257dc67d120c27e0f75c2344fdfa9a
git-subtree-split: abf060725d7614bd3b9f96764262dfbc2f9c2199
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/coin3d')
-rw-r--r--nixpkgs/pkgs/development/libraries/coin3d/default.nix33
-rw-r--r--nixpkgs/pkgs/development/libraries/coin3d/gcc-4.8.patch38
-rw-r--r--nixpkgs/pkgs/development/libraries/coin3d/sbhashentry.patch25
3 files changed, 96 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/coin3d/default.nix b/nixpkgs/pkgs/development/libraries/coin3d/default.nix
new file mode 100644
index 000000000000..442ed2a4b9a5
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/coin3d/default.nix
@@ -0,0 +1,33 @@
+{ fetchurl, stdenv, libGLU_combined }:
+
+stdenv.mkDerivation rec {
+  name = "coin3d-${version}";
+  version = "3.1.3";
+
+  src = fetchurl {
+    url = "https://bitbucket.org/Coin3D/coin/downloads/Coin-${version}.tar.gz";
+    sha256 = "05ylhrcglm81dajbk132l1w892634z2i97x10fm64y1ih72phd2q";
+  };
+
+  patches = [
+    (fetchurl {
+      url = http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/media-libs/coin/files/coin-3.1.3-gcc-4.7.patch;
+      name = "gcc-4.7.patch";
+      sha256 = "076dyc52swk8qc7ylps53fg6iqmd52x8s7m18i80x49dd109yw20";
+    })
+    ./gcc-4.8.patch # taken from FC-17 source rpm
+    # see https://bitbucket.org/Coin3D/coin/issues/128/crash-in-cc_memalloc_deallocate
+    # patch adapted from https://bitbucket.org/Coin3D/coin/pull-requests/75/added-fix-for-issue-128-provided-by-fedora/diff
+    ./sbhashentry.patch
+  ];
+
+  buildInputs = [ libGLU_combined ];
+
+  meta = {
+    homepage = http://www.coin3d.org/;
+    license = stdenv.lib.licenses.gpl2Plus;
+    description = "High-level, retained-mode toolkit for effective 3D graphics development";
+    maintainers = [ stdenv.lib.maintainers.viric ];
+    platforms = stdenv.lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/coin3d/gcc-4.8.patch b/nixpkgs/pkgs/development/libraries/coin3d/gcc-4.8.patch
new file mode 100644
index 000000000000..be5b8b03b638
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/coin3d/gcc-4.8.patch
@@ -0,0 +1,38 @@
+From 9f5d96a2b9a71ab539237d2dab4c54fc46fc5c5b Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ralf=20Cors=C3=A9pius?= <corsepiu@corsepiu.home>
+Date: Thu, 18 Apr 2013 19:17:06 +0200
+Subject: [PATCH 10/10] GCC-4.8.0 fixes
+
+---
+ src/fonts/freetype.cpp | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/fonts/freetype.cpp b/src/fonts/freetype.cpp
+index 760b88b..e705d3a 100644
+--- a/src/fonts/freetype.cpp
++++ b/src/fonts/freetype.cpp
+@@ -32,18 +32,18 @@
+ 
+    20050613 mortene. */
+ 
+-#include "fonts/freetype.h"
+-
+ #ifdef HAVE_CONFIG_H
+ #include "config.h"
+ #endif /* HAVE_CONFIG_H */
+ 
+-#include <stdlib.h>
++#include <cstdlib>
+ #include <assert.h>
+ 
+ #include "glue/freetype.h"
+ #include "glue/GLUWrapper.h"
+ 
++#include "fonts/freetype.h"
++
+ /* ************************************************************************* */
+ 
+ #ifdef __cplusplus
+-- 
+1.8.1.4
+
diff --git a/nixpkgs/pkgs/development/libraries/coin3d/sbhashentry.patch b/nixpkgs/pkgs/development/libraries/coin3d/sbhashentry.patch
new file mode 100644
index 000000000000..88c9a5f02a25
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/coin3d/sbhashentry.patch
@@ -0,0 +1,25 @@
+diff -u --label /tmp/Coin-3.1.3/src/misc/SbHash.h --label \#\<buffer\ SbHash.h\> /tmp/Coin-3.1.3/src/misc/SbHash.h /tmp/buffer-content-21756V0
+--- a/src/misc/SbHash.h
++++ b/src/misc/SbHash.h
+@@ -88,8 +88,8 @@
+     SbHashEntry<Type, Key> * entry = static_cast<SbHashEntry<Type, Key> *>( ptr);
+     cc_memalloc_deallocate(entry->memhandler, ptr);
+   }
+-  SbHashEntry(const Key & key, const Type & obj) : key(key), obj(obj) {}
+-
++  SbHashEntry(const Key & key, const Type & obj, cc_memalloc *memhandler)
++		: key(key), obj(obj), memhandler(memhandler) {}
+   Key key;
+   Type obj;
+   SbHashEntry<Type, Key> * next;
+@@ -218,7 +218,7 @@
+     /* Key not already in the hash table; insert a new
+      * entry as the first element in the bucket
+      */
+-    entry = new (this->memhandler) SbHashEntry<Type, Key>(key, obj);
++    entry = new (this->memhandler) SbHashEntry<Type, Key>(key, obj, this->memhandler);
+     entry->next = this->buckets[i];
+     this->buckets[i] = entry;
+
+
+Diff finished.  Sat Sep  9 19:50:32 2017