aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/mapnik.rb9
1 files changed, 8 insertions, 1 deletions
diff --git a/Library/Formula/mapnik.rb b/Library/Formula/mapnik.rb
index 1c3ee0c35..bc64b69c0 100644
--- a/Library/Formula/mapnik.rb
+++ b/Library/Formula/mapnik.rb
@@ -18,12 +18,19 @@ class Mapnik < Formula
ENV.x11 # for freetype-config
icu = Formula.factory("icu4c")
+ # mapnik compiles can take ~1.5 GB per job for some .cpp files
+ # so lets be cautious by limiting to CPUS/2
+ jobs = ENV.make_jobs
+ if jobs > 2
+ jobs = Integer(jobs/2)
+ end
+
system "python",
"scons/scons.py",
"configure",
"CC=\"#{ENV.cc}\"",
"CXX=\"#{ENV.cxx}\"",
- "JOBS=#{ENV.make_jobs}",
+ "JOBS=#{jobs}",
"PREFIX=#{prefix}",
"ICU_INCLUDES=#{icu.include}",
"ICU_LIBS=#{icu.lib}",