-
-
Save MaZderMind/2500156 to your computer and use it in GitHub Desktop.
require 'formula' | |
class Osmium < Formula | |
head 'https://github.com/joto/osmium.git' | |
homepage 'http://wiki.openstreetmap.org/wiki/Osmium' | |
md5 'dce9eb59d86caf1186fc93567b94feed' | |
depends_on 'boost' | |
depends_on 'lzlib' | |
depends_on 'shapelib' | |
depends_on 'expat' | |
depends_on 'geos' | |
depends_on 'protobuf' | |
depends_on 'v8' | |
depends_on 'icu4c' | |
depends_on 'google-sparsehash' | |
depends_on 'osm-pbf' | |
depends_on 'libgd' | |
depends_on 'doxygen' | |
depends_on 'gdal' | |
skip_clean :all | |
def install | |
cd 'osmjs' do | |
icu = Formula.factory("icu4c") | |
ENV['CPLUS_INCLUDE_PATH'] = icu.include | |
ENV['LIBRARY_PATH'] = icu.lib | |
system "make" | |
bin.install 'osmjs' | |
end | |
cd 'examples' do | |
system "make" | |
bin.install 'osmium_convert' | |
bin.install 'osmium_debug' | |
bin.install 'osmium_store_and_debug' | |
bin.install 'osmium_find_bbox' | |
bin.install 'osmium_progress' | |
bin.install 'osmium_range_from_history' | |
bin.install 'osmium_sizeof' | |
bin.install 'osmium_stats' | |
bin.install 'osmium_time' | |
bin.install 'osmium_toogr' | |
bin.install 'osmium_toogr2' | |
bin.install 'osmium_toshape' | |
bin.install 'nodedensity' | |
end | |
system "make doc" | |
include.install Dir['include/*'] | |
doc.install Dir['doc/*'] | |
end | |
end |
Oh, i didn't know there are more to install. Looks pretty good!
I already asked Jochen to tag a certain codebase with a version number, but he was very reluctant to do it. Maybe you can make him tag it 0.0.1 :)
You're right, it is. At least we got osmium up and running, so i can start playing with it :)
Does it really compile? I get an compile error now:
g++ -g -Wall -Wextra -Wredundant-decls -Wdisabled-optimization -pedantic -Wctor-dtor-privacy -Wnon-virtual-dtor -Woverloaded-virtual -Wsign-promo -Wno-long-long -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I../include -o nodedensity nodedensity.cpp -L/usr/local/lib -lexpat -lpthread -lz -lprotobuf-lite -losmpbf -lgd -lz -lm
nodedensity.cpp:25:16: error: gd.h: No such file or directory
In file included from /usr/local/Cellar/geos/3.3.3/include/geos/geom/GeometryFactory.h:26,
from ../include/osmium/geometry_factory.hpp:4,
from ../include/osmium.hpp:109,
from osmium_toshape.cpp:30:
/usr/local/Cellar/geos/3.3.3/include/geos/geom/MultiPoint.h: In copy constructor ‘geos::geom::MultiPoint::MultiPoint(const geos::geom::MultiPoint&)’:
/usr/local/Cellar/geos/3.3.3/include/geos/geom/MultiPoint.h:112: warning: base class ‘class geos::geom::Puntal’ should be explicitly initialized in the copy constructor
In file included from /usr/local/Cellar/geos/3.3.3/include/geos/geom/GeometryFactory.h:26,
from ../include/osmium/geometry_factory.hpp:4,
from ../include/osmium.hpp:109,
from osmium_toogr2.cpp:35:
/usr/local/Cellar/geos/3.3.3/include/geos/geom/MultiPoint.h: In copy constructor ‘geos::geom::MultiPoint::MultiPoint(const geos::geom::MultiPoint&)’:
/usr/local/Cellar/geos/3.3.3/include/geos/geom/MultiPoint.h:112: warning: base class ‘class geos::geom::Puntal’ should be explicitly initialized in the copy constructor
nodedensity.cpp: In member function ‘void NodeDensityHandler::after_nodes()’:
nodedensity.cpp:80: error: ‘gdImagePtr’ was not declared in this scope
nodedensity.cpp:80: error: expected `;' before ‘im’
nodedensity.cpp:83: error: ‘im’ was not declared in this scope
nodedensity.cpp:83: error: ‘gdImageColorAllocate’ was not declared in this scope
nodedensity.cpp:92: error: ‘im’ was not declared in this scope
nodedensity.cpp:92: error: ‘gdImageSetPixel’ was not declared in this scope
nodedensity.cpp:96: error: ‘im’ was not declared in this scope
nodedensity.cpp:96: error: ‘gdImagePng’ was not declared in this scope
nodedensity.cpp:97: error: ‘gdImageDestroy’ was not declared in this scope
make: *** [nodedensity] Error 1
Sweet: depends_on 'libgd' did the trick. Thx!
you can refer to https://github.com/MaZderMind/osmium/tarball/2012.04.27 as a versioned url. Because I'm not the repo-owner I won't introduce a versioning scheme but instead use the current date to specify a tag.
@MaZderMind Hey, my pull request to osm-pbf was accepted. Would you mind to create a new formula pull request for osmium?
This version looks pretty neat. Maybe i can change the osm-pbf formula to keg-only too and use the PATH variables the same way.