Skip to content

Instantly share code, notes, and snippets.

View ntmoe's full-sized avatar

Nicholas Moe ntmoe

View GitHub Profile
@ntmoe
ntmoe / freesteam-2.1.patch
Last active December 11, 2015 21:18
Patch for freesteam-2.1 on OS X 10.8.2 with Homebrew Python
Binary files freesteam-2.1/.DS_Store and freesteam-2.1-new/.DS_Store differ
Binary files freesteam-2.1/.svn/.DS_Store and freesteam-2.1-new/.svn/.DS_Store differ
Binary files freesteam-2.1/.svn/wc.db and freesteam-2.1-new/.svn/wc.db differ
diff -rupN freesteam-2.1/SConstruct freesteam-2.1-new/SConstruct
--- freesteam-2.1/SConstruct 2013-01-28 17:39:39.000000000 -0600
+++ freesteam-2.1-new/SConstruct 2013-01-28 17:40:10.000000000 -0600
@@ -168,7 +168,8 @@ if platform.system()=="Windows":
)
else:
env = Environment(
@ntmoe
ntmoe / failed_freesteam_build.txt
Created January 28, 2013 04:41
freesteam-2.1 (SVN 677) build failure on OS X 10.8.2 with Python bindings enabled
$ scons
scons: Reading SConscript files ...
Checking for ASCEND... found (ASCEND_CPPPATH = ['/Applications/ASCEND.app/Contents/Headers'])
GSL_STATIC = 0
GSL_LIBS = ['gsl', 'gslcblas']
GSL_LIBPATH = ['/usr/local/Cellar/gsl/1.15/lib']
GSL_CPPPATH = ['/usr/local/Cellar/gsl/1.15/include']
GSL_STATICLIBS = None
Checking for C function fprintf()... (cached) yes
Checking for C header file /usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/include/python2.7/Python.h... (cached) yes
@ntmoe
ntmoe / freesteam_build_without_Python_bindings.txt
Created January 28, 2013 04:36
Output of scons for freesteam-2.1 with build of Python bindings disabled in the SConstruct file on OS X 10.8.2
$ scons
scons: Reading SConscript files ...
Checking for ASCEND... found (ASCEND_CPPPATH = ['/Applications/ASCEND.app/Contents/Headers'])
GSL_STATIC = 0
GSL_LIBS = ['gsl', 'gslcblas']
GSL_LIBPATH = ['/usr/local/Cellar/gsl/1.15/lib']
GSL_CPPPATH = ['/usr/local/Cellar/gsl/1.15/include']
GSL_STATICLIBS = None
Checking for C function fprintf()... (cached) yes
Checking for C header file /usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/include/python2.7/Python.h... (cached) yes
@ntmoe
ntmoe / main.c
Created January 28, 2013 04:16
Minimal example to get warnings about gsl_vector_get and gsl_vector_set when building freesteam-2.1 on OS X 10.8.2
#include <stdio.h>
#include <gsl/gsl_vector.h>
static int region1_f(const gsl_vector *x);
int main (void)
{
gsl_vector * x = gsl_vector_alloc (3);
int i;
@ntmoe
ntmoe / SConstruct.patch
Created January 28, 2013 03:06
Patch for ASCEND 0.9.8 so that the LaTeX documentation builds
--- SConstruct 2013-01-27 20:58:04.000000000 -0600
+++ SConstruct_fixed 2013-01-27 21:03:18.000000000 -0600
@@ -1990,7 +1990,7 @@
def CheckLModern(context):
context.Message("Checking for lmodern...")
- b = context.env.get("DVI")
+ b = context.env.DVI
if not b:
context.Result(False)
@ntmoe
ntmoe / brew_list_config.txt
Created January 28, 2013 01:24
`brew list && brew --config` for tk build failure issue on OS X 10.8.2
$ brew list
atk freesteam glib ipopt lynx pkg-config rlwrap sundials
autoconf freetype gmp jasper macvim py2cairo scipy swig
automake fuse4x gnu-sed jpeg mercurial pygobject scons tbb
cairo fuse4x-kext gnu-typist libffi mpfr pygtk serf vim
calc gdbm gnu-units libmodbus neon pyqt sip wget
coreutils gdk-pixbuf graphviz libmpc numpy python sqlite xz
cunit gettext gsl libpng pango qt sshfs zeromq
doxygen gfortran gtk+ libtiff pcre r subversion
fontconfig git hub libtool pixman readline suite-sparse
@ntmoe
ntmoe / failed_Tk_build.txt
Created January 27, 2013 19:39
Tk fails to build on 10.8.2
$ HOMEBREW_MAKE_JOBS=1 VERBOSE=1 brew install tk
==> Downloading http://sourceforge.net/projects/tcl/files/Tcl/8.5.13/tk8.5.13-src.tar.gz
Already downloaded: /Users/ntmoe/Library/Caches/Homebrew/tk-8.5.13.tar.gz
/usr/bin/tar xf /Users/ntmoe/Library/Caches/Homebrew/tk-8.5.13.tar.gz
==> Patching
/usr/bin/patch -f -p1 -i 000-homebrew.diff
patching file macosx/tkMacOSXClipboard.c
patching file macosx/tkMacOSXDraw.c
==> ./configure --prefix=/usr/local/Cellar/tk/8.5.13 --mandir=/usr/local/Cellar/tk/8.5.13/share/man --with-tcl=/usr/local/lib --enable-64bit
./configure --prefix=/usr/local/Cellar/tk/8.5.13 --mandir=/usr/local/Cellar/tk/8.5.13/share/man --with-tcl=/usr/local/lib --enable-64bit
@ntmoe
ntmoe / SConstruct.patch
Created January 26, 2013 20:20
Patch for freesteam-2.1 (from SVN trunk) to run on OS X 10.8.2 so that it skips installing Python bindings, which do not work at the moment on this OS. For SVN revision 677.
--- SConstruct_old 2012-09-25 19:57:24.000000000 -0500
+++ SConstruct 2013-01-26 14:13:48.000000000 -0600
@@ -166,6 +166,15 @@
, toolpath = ['scons']
, tools = ['mingw']+tools
)
+if platform.system()=="Darwin":
+ os.environ['PATH'] += ':/Applications/ASCEND.app/Contents'
+ env = Environment(
+ ENV={"PATH":os.environ['PATH'],
@ntmoe
ntmoe / freesteam-2.x_failed_build.txt
Created January 26, 2013 17:25
Output of failed build of freesteam-2.x (from SVN trunk) on OS X 10.8.2
$ scons -Q INSTALL_PREFIX=/usr/local/Cellar/freesteam/2.1
Checking for ASCEND... found (ASCEND_CPPPATH = ['/Applications/ASCEND.app/Contents/Headers'])
GSL_STATIC = 0
GSL_LIBS = ['gsl', 'gslcblas']
GSL_LIBPATH = ['/usr/local/Cellar/gsl/1.15/lib']
GSL_CPPPATH = ['/usr/local/Cellar/gsl/1.15/include']
GSL_STATICLIBS = None
Package xcb-shm was not found in the pkg-config search path.
Perhaps you should add the directory containing `xcb-shm.pc'
to the PKG_CONFIG_PATH environment variable
@ntmoe
ntmoe / mailscript.py
Created January 27, 2012 17:34 — forked from ymirpl/gist:1052094
Python unicode e-mail sending
#!/usr/bin/env python
#coding=utf8
from cStringIO import StringIO
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
from email.header import Header
from email import Charset
from email.generator import Generator
from email.utils import formataddr
import smtplib