diff options
| author | Dane Springmeyer | 2012-04-10 11:04:32 -0700 |
|---|---|---|
| committer | Adam Vandenberg | 2012-04-28 10:19:13 -0700 |
| commit | a78e14f70f6def269de2d1431de66f4f40950923 (patch) | |
| tree | fa2f04a0ab793c14ce23763eafae6aa882b5f90f | |
| parent | 67584d45264bd6e03dab798d6e26d5b12354f40c (diff) | |
| download | homebrew-a78e14f70f6def269de2d1431de66f4f40950923.tar.bz2 | |
mapnik: limit concurrent make jobs
mapnik compiles can take ~1.5 GB per job for some .cpp files
so lets be cautious by limiting to CPUS/2
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
| -rw-r--r-- | Library/Formula/mapnik.rb | 9 |
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}", |
