Skip to content

Instantly share code, notes, and snippets.

View springmeyer's full-sized avatar

Dane Springmeyer springmeyer

View GitHub Profile
@springmeyer
springmeyer / homebrew boost patch
Created November 4, 2010 23:12
homebrew fix to boost formula to support mapnik2
diff --git a/Library/Formula/boost.rb b/Library/Formula/boost.rb
index 3633158..cf405c4 100644
--- a/Library/Formula/boost.rb
+++ b/Library/Formula/boost.rb
@@ -5,6 +5,8 @@ class Boost <Formula
url 'http://downloads.sourceforge.net/project/boost/boost/1.44.0/boost_1_44_0.tar.bz2'
md5 'f02578f5218f217a9f20e9c30e119c6a'
+ depends_on 'icu4c'
+
* Configuration:
*
* By default all macros generate "production code" (i.e non-debug). If
* DEBUG_ASSERT_PRODUCTION_CODE is defined to zero or DEBUG is defined to non-zero
* while this header is included, the macros will generated debug code.
*
* If DEBUG_ASSERT_COMPONENT_NAME_STRING is defined, all debug messages will
* be prefixed with it.
*
* By default, all messages write to stderr. If you would like to write a custom
#include <CoreFoundation/CoreFoundation.h>
#include <Cocoa/Cocoa.h>
#ifdef check
#undef check
#endif
#ifdef verify
#undef verify
#endif
Index: plugins/input/ogr/ogr_datasource.cpp
===================================================================
--- plugins/input/ogr/ogr_datasource.cpp (revision 2378)
+++ plugins/input/ogr/ogr_datasource.cpp (working copy)
@@ -59,21 +59,30 @@
: datasource(params),
extent_(),
type_(datasource::Vector),
- desc_(*params.get<std::string>("type"), *params.get<std::string>("encoding","utf-8")),
+ desc_(*params.get<std::string>("type"), *params_.get<std::string>("encoding","utf-8")),
diff --git a/src/image_util.cpp b/src/image_util.cpp
index ae36062..5e6aac3 100644
--- a/src/image_util.cpp
+++ b/src/image_util.cpp
@@ -69,6 +69,7 @@ extern "C"
#include "agg_span_image_filter_rgba.h"
#include "agg_span_interpolator_linear.h"
#include "agg_trans_affine.h"
+#include "agg_blur.h"
@springmeyer
springmeyer / gist:705987
Created November 19, 2010 01:22
agg blur
diff --git a/src/image_util.cpp b/src/image_util.cpp
index ae36062..f1cace0 100644
--- a/src/image_util.cpp
+++ b/src/image_util.cpp
@@ -69,6 +69,7 @@ extern "C"
#include "agg_span_image_filter_rgba.h"
#include "agg_span_interpolator_linear.h"
#include "agg_trans_affine.h"
+#include "agg_blur.h"
diff --git a/src/image_util.cpp b/src/image_util.cpp
index 1718d79..0e8ed06 100644
--- a/src/image_util.cpp
+++ b/src/image_util.cpp
@@ -329,7 +329,7 @@ scaling_method_e get_scaling_method_by_name (std::string name)
}
template <typename Image>
-void scale_image_bilinear8 (Image& target,const Image& source, double x_off_f=0, double y_off_f=0)
+void scale_image_bilinear8 (Image& target,const Image& source, double x_off_f, double y_off_f)
@springmeyer
springmeyer / gdb backtrace from boost python
Created November 30, 2010 21:11
solaris amd64 boost python exception translation failing
(gdb) bt
#0 0x000000000005fb0e in ?? ()
#1 0xfffffd7fff2ec5d1 in _Unwind_RaiseException_Body () from /usr/lib/amd64/libc.so.1
#2 0xfffffd7fff2ec855 in _Unwind_RaiseException () from /usr/lib/amd64/libc.so.1
#3 0xfffffd7ffa98bb39 in __cxa_throw (obj=<value optimized out>, tinfo=0x1, dest=0x474e5543432b2b00)
at ../../../../.././libstdc++-v3/libsupc++/eh_throw.cc:78
#4 0xfffffd7ff6313272 in boost::python::throw_error_already_set () from /usr/local/lib/libboost_python.so.1.45.0
#5 0xfffffd7ff5199a95 in boost::python::objects::caller_py_function_impl<boost::python::detail::caller<boost::python::objects::iterator_range<boost::python::return_value_policy<boost::python::return_by_value, boost::python::default_call_policies>, std::_Rb_tree_iterator<std::pair<std::string const, mapnik::value> > >::next, boost::python::return_value_policy<boost::python::return_by_value, boost::python::default_call_policies>, boost::mpl::vector2<std::pair<std::string const, mapnik::value>&, boost::python::objects::iterator_rang
@springmeyer
springmeyer / boost 1.45, clang trunk, pch error
Created January 4, 2011 20:36
compile error when compiling boost_python app using precompiled headers that include boost
clang -cc1 version 2.9 based upon llvm 2.9svn hosted on x86_64-apple-darwin10
ignoring duplicate directory "/usr/local/include"
as it is a non-system directory that duplicates a system directory
ignoring duplicate directory "/usr/include"
as it is a non-system directory that duplicates a system directory
#include "..." search starts here:
#include <...> search starts here:
agg/include
.
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Application Specific Information:
abort() called
Thread 0 Crashed: Dispatch queue: com.apple.main-thread
0 libSystem.B.dylib 0x00007fff8062f616 __kill + 10
1 libSystem.B.dylib 0x00007fff806cfcca abort + 83