Skip to content

Commit

Permalink
include pre-built binaries
Browse files Browse the repository at this point in the history
  • Loading branch information
eliotjordan committed May 13, 2016
1 parent 5acb27a commit d5c3679
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 9 deletions.
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
Gemfile.lock
/pkg
*.gem
*.dylib
*.so
.bundle/
.byebug_history
coverage
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,17 @@ Simple ruby access to the Mapnik library using [ruby-ffi](https://github.com/ffi

## Prerequisites

SimpleMapnik requires that Mapnik 3.x or 2.x be installed at `/usr/local/lib/libmapnik.*`. In addition, a C++ compiler and build environment is needed for the c api extension.
SimpleMapnik requires that Mapnik 3.x or 2.x be installed at `/usr/local/lib/libmapnik.*`. The gem comes with a pre-built c api library compiled on OSX 10.10.5. For linux a C++ compiler and build environment is needed.

On Mac OS X:
If the OSX binary does not work, the library can be compiled (after installing a build environment) by running: ``` rake api:build ```.

Mac OSX:

- https://github.com/mapnik/mapnik/wiki/MacInstallation or ```brew install mapnik```
- Build environment: [Xcode](https://developer.apple.com/xcode/)

On Linux:
Linux:

- https://github.com/mapnik/mapnik/wiki/LinuxInstallation
- Build environment: [gcc](https://help.ubuntu.com/community/InstallingCompilers) or clang

Expand Down
17 changes: 13 additions & 4 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,19 @@ begin
rescue LoadError
end

require './lib/simple_mapnik/api.rb'
require 'simple_mapnik/api'
require 'ffi'

task :install do
SimpleMapnik::Api.new.install
namespace :api do
desc 'check for mapnik c api and install'
task :check_and_install do
SimpleMapnik::Api.new.check_and_install
end

desc 'build mapnik c api'
task :build do
SimpleMapnik::Api.new.install
end
end

task default: :install
task default: ['api:check_and_install']
Binary file added libmapnik_c.dylib
Binary file not shown.

0 comments on commit d5c3679

Please sign in to comment.