Skip to content

Instantly share code, notes, and snippets.

View mcs07's full-sized avatar

Matt Swain mcs07

View GitHub Profile
@mcs07
mcs07 / lilly.diff
Created May 18, 2014 18:08
Patch for Lilly MedChem Rules to compile on OS X Mavericks with clang.
diff --git a/include/iwaray.h b/include/iwaray.h
index 1b58e95..213f25a 100644
--- a/include/iwaray.h
+++ b/include/iwaray.h
@@ -341,7 +341,7 @@ resizable_array_p<T>::resizable_array_p (int n)
template <typename T>
resizable_array_p<T>::resizable_array_p (T * item)
{
- add (item);
+ this->add (item);
@mcs07
mcs07 / subset.diff
Created August 14, 2014 12:13
Patch for subset makefile to skip tests
diff --git a/makefile b/makefile
index 7afcae0..533b228 100644
--- a/makefile
+++ b/makefile
@@ -2,13 +2,3 @@ OBJECTS =main.o SCA.o bitvector.o argv.o error.o mem_2.o label_vector.o linkedli
CFLAGS = -O
subset: $(OBJECTS)
$(CC) $(OBJECTS) -o subset -lm
- subset < Test/label_vector.tab
- subset -sim 0.5 < Test/label_vector.tab
@mcs07
mcs07 / open-babel-mavericks.diff
Last active August 29, 2015 14:07
Patch to backport upstream commit so Open Babel 2.3.2 can support libc++ on OS X 10.9+
From c3abbddae78e654df9322ad1020ff79dd6332946 Mon Sep 17 00:00:00 2001
From: Matt Swain <m.swain@me.com>
Date: Thu, 31 Oct 2013 15:25:53 +0000
Subject: [PATCH] Detect libc++ as this is now the default in OS X Mavericks
---
include/openbabel/obmolecformat.h | 7 ++++++-
include/openbabel/shared_ptr.h | 12 ++++++++++--
src/ops/unique.cpp | 8 ++++++--
3 files changed, 22 insertions(+), 5 deletions(-)
@mcs07
mcs07 / keybase.md
Created January 12, 2015 23:15
keybase.md

Keybase proof

I hereby claim:

  • I am mcs07 on github.
  • I am mcs07 (https://keybase.io/mcs07) on keybase.
  • I have a public key whose fingerprint is 9329 8D08 E4D2 F2B6 85FB 56B0 3872 03B9 4DFC 10FD

To claim this, I am signing this object:

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mcs07
mcs07 / gocr-libs.diff
Created August 14, 2013 09:02
A patch for the gocr makefile so `make libs` works properly.
diff --git a/src/Makefile.in b/src/Makefile.in
index bf4181f..883fec2
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -10,7 +10,7 @@ PROGRAM = gocr$(EXEEXT)
PGMASCLIB = Pgm2asc
#LIBPGMASCLIB = lib$(PGMASCLIB).a
# ToDo: need a better pgm2asc.h for lib users
-#INCLUDEFILES = gocr.h
+INCLUDEFILES = pgm2asc.h output.h list.h unicode.h gocr.h pnm.h
@mcs07
mcs07 / openbabel-parsmart.diff
Created November 1, 2013 11:51
A patch to prevent segmentation faults in Open Babel.
diff --git a/src/parsmart.cpp b/src/parsmart.cpp
index 120963e..22fe56e 100644
--- a/src/parsmart.cpp
+++ b/src/parsmart.cpp
@@ -1181,7 +1181,6 @@ namespace OpenBabel
FreeAtomExpr(expr1);
return (AtomExpr*)0;
}
- delete expr1;
expr1 = BuildAtomBin(AE_ANDLO,expr1,expr2);
@mcs07
mcs07 / rdkit-mavericks.diff
Created November 6, 2013 11:52
A patch for RDKit 2013.09.1 to compile with libc++ which is now the default in Mavericks.
diff --git a/Code/RDGeneral/Dict.h b/Code/RDGeneral/Dict.h
index 6d368a4..6f586a8 100644
--- a/Code/RDGeneral/Dict.h
+++ b/Code/RDGeneral/Dict.h
@@ -32,14 +32,12 @@
//!
class Dict {
public:
- typedef std::map<const std::string, boost::any> DataType;
+ typedef std::map<std::string, boost::any> DataType;
@mcs07
mcs07 / ocrad-mavericks.diff
Last active December 30, 2015 00:39
A patch for ocrad 0.22 to compile with libc++ which is now the default in OS X Mavericks.
diff --git a/character_r11.cc b/character_r11.cc
index 9b054e1..794e9c0 100644
--- a/character_r11.cc
+++ b/character_r11.cc
@@ -18,6 +18,7 @@
#include <algorithm>
#include <cstdio>
+#include <cstdlib>
#include <vector>
@mcs07
mcs07 / indigo-el-capitan.diff
Created January 2, 2016 16:39
Allow Indigo to compile under OS X 10.11
diff --git a/common/cmake/GetSystemVersion.cmake b/common/cmake/GetSystemVersion.cmake
index 17615ab..794babd 100644
--- a/common/cmake/GetSystemVersion.cmake
+++ b/common/cmake/GetSystemVersion.cmake
@@ -27,6 +27,8 @@ elseif(APPLE)
set(SUBSYSTEM_NAME "10.9")
elseif(DARWIN_VERSION MATCHES 14)
set(SUBSYSTEM_NAME "10.10")
+ elseif(DARWIN_VERSION MATCHES 15)
+ set(SUBSYSTEM_NAME "10.11")