Skip to content

Instantly share code, notes, and snippets.

@nvcken
Forked from jsundram/README.md
Created March 30, 2016 10:05
Show Gist options
  • Select an option

  • Save nvcken/a5555d2ae21b88b93d7726914e4e9842 to your computer and use it in GitHub Desktop.

Select an option

Save nvcken/a5555d2ae21b88b93d7726914e4e9842 to your computer and use it in GitHub Desktop.
Install AggDraw for OSX 10.7+.
#!/bin/bash
cd /tmp
svn co http://svn.effbot.org/public/tags/aggdraw-1.2a3-20060212
cd aggdraw-1.2a3-20060212
patch -p0 <<EOF
Index: agg2/include/agg_array.h
===================================================================
--- agg2/include/agg_array.h (revision 532)
+++ agg2/include/agg_array.h (working copy)
@@ -520,7 +520,7 @@
int8u* ptr = m_buf_ptr;
if(alignment > 1)
{
- unsigned align = (alignment - unsigned(ptr) % alignment) % alignment;
+ unsigned align = (alignment - (unsigned long)(ptr) % alignment) % alignment;
size += align;
ptr += align;
if(size <= m_rest)
EOF
python setup.py build_ext -i
python selftest.py
sudo python setup.py install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment