diff options
| author | Jack Nagel | 2013-11-12 11:50:44 -0600 |
|---|---|---|
| committer | Jack Nagel | 2013-11-12 11:59:31 -0600 |
| commit | efaba3846de1007ab71ed94e50346db7a2494d30 (patch) | |
| tree | 607cd1779b9e5393f6ef1a225d6760a011e88228 /Library/Formula | |
| parent | 3f09de8a6da72f33ab9994f67bf77d8cbb53982a (diff) | |
| download | homebrew-efaba3846de1007ab71ed94e50346db7a2494d30.tar.bz2 | |
luajit: fix debug build
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/luajit.rb | 26 |
1 files changed, 10 insertions, 16 deletions
diff --git a/Library/Formula/luajit.rb b/Library/Formula/luajit.rb index f128fde65..bead80ba3 100644 --- a/Library/Formula/luajit.rb +++ b/Library/Formula/luajit.rb @@ -11,27 +11,21 @@ class Luajit < Formula option "enable-debug", "Build with debugging symbols" def install - # 1 - Remove the '-O2' so we can set Og if needed. Leave the -fomit part. - # 2 - Override the hardcoded gcc. - # 3 - Remove the '-march=i686' so we can set the march in cflags. - # All three changes should persist and were discussed upstream. + # 1 - Override the hardcoded gcc. + # 2 - Remove the '-march=i686' so we can set the march in cflags. + # Both changes should persist and were discussed upstream. inreplace 'src/Makefile' do |f| - f.change_make_var! 'CCOPT', '-fomit-frame-pointer' f.change_make_var! 'CC', ENV.cc f.change_make_var! 'CCOPT_x86', '' end - ENV.O2 # Respect the developer's choice. - args = ["PREFIX=#{prefix}"] - if build.include? 'enable-debug' then - ENV.Og if ENV.compiler == :clang - args << 'CCDEBUG=-g' - end + ENV.O2 # Respect the developer's choice. + + args = %W[PREFIX=#{prefix}] + + # This doesn't yet work under superenv because it removes '-g' + args << 'CCDEBUG=-g' if build.include? 'enable-debug' - bldargs = args - bldargs << 'amalg' - system 'make', *bldargs - args << 'install' - system 'make', *args # Build requires args during install + system 'make', 'amalg', 'install', *args end end |
