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.

Revisions

  1. @jsundram jsundram revised this gist Jul 22, 2013. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,5 @@
    Install AggDraw. From [natevw's post on stack overflow][1].

    Includes a patch I discovered was necessary for freetype, mentioned [here][2].

    [1]: http://stackoverflow.com/questions/3486187/how-can-i-install-aggdraw-after-this-error
  2. @jsundram jsundram revised this gist Jul 22, 2013. 1 changed file with 5 additions and 0 deletions.
    5 changes: 5 additions & 0 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,5 @@
    Install AggDraw. From [natevw's post on stack overflow][1].
    Includes a patch I discovered was necessary for freetype, mentioned [here][2].

    [1]: http://stackoverflow.com/questions/3486187/how-can-i-install-aggdraw-after-this-error
    [2]: http://stackoverflow.com/questions/17770413/aggdraw-cannot-load-font-no-text-renderer/
  3. @jsundram jsundram revised this gist Jul 22, 2013. 1 changed file with 16 additions and 0 deletions.
    16 changes: 16 additions & 0 deletions install_aggdraw.sh
    Original file line number Diff line number Diff line change
    @@ -18,6 +18,22 @@ Index: agg2/include/agg_array.h
    if(size <= m_rest)
    EOF

    patch -p0 <<EOF
    Index: setup.py
    ===================================================================
    --- setup.py (revision 532)
    +++ setup.py (working copy)
    @@ -29,7 +29,7 @@
    """
    # pointer to freetype build directory (tweak as necessary)
    -FREETYPE_ROOT = "../../kits/freetype-2.1.10"
    +FREETYPE_ROOT = "/usr/local"
    if not os.path.isdir(FREETYPE_ROOT):
    print "===", "freetype not available (edit setup.py to enable)"
    EOF

    python setup.py build_ext -i
    python selftest.py
    sudo python setup.py install
  4. @jsundram jsundram created this gist Jul 17, 2013.
    23 changes: 23 additions & 0 deletions install_aggdraw.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,23 @@
    #!/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