diff options
| author | Max Howell | 2009-06-18 08:15:07 +0100 |
|---|---|---|
| committer | Max Howell | 2009-06-18 08:20:47 +0100 |
| commit | 76259fcfbb32becc42236dd0298165a8a13f0b5f (patch) | |
| tree | 5565ebe1314fb7d88660de47d7de13f8221b7db4 /Library/Formula | |
| parent | 6fc68c05f660c73f61eb0848bf3d39c584c4458d (diff) | |
| download | homebrew-76259fcfbb32becc42236dd0298165a8a13f0b5f.tar.bz2 | |
Unrar formula
Very optimised, inspired by KDE's --enable-final
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/unrar.rb | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/Library/Formula/unrar.rb b/Library/Formula/unrar.rb new file mode 100644 index 000000000..3a28b0487 --- /dev/null +++ b/Library/Formula/unrar.rb @@ -0,0 +1,64 @@ +require 'brewkit' + +ALL_CPP=<<-EOS +#include "errhnd.cpp" +ErrorHandler ErrHandler; +#include "rar.cpp" +#include "strlist.cpp" +#include "strfn.cpp" +#include "pathfn.cpp" +#include "savepos.cpp" +#include "smallfn.cpp" +#include "global.cpp" +#include "file.cpp" +#include "filefn.cpp" +#include "filcreat.cpp" +#include "archive.cpp" +#include "arcread.cpp" +#include "unicode.cpp" +#include "system.cpp" +#include "isnt.cpp" +#include "crypt.cpp" +#include "crc.cpp" +#include "rawread.cpp" +#include "encname.cpp" +#include "resource.cpp" +#include "match.cpp" +#include "timefn.cpp" +#include "rdwrfn.cpp" +#include "consio.cpp" +#include "options.cpp" +#include "ulinks.cpp" +#include "rarvm.cpp" +#include "rijndael.cpp" +#include "getbits.cpp" +#undef rol +#include "sha1.cpp" +#include "extinfo.cpp" +#include "extract.cpp" +#include "volume.cpp" +#include "list.cpp" +#include "find.cpp" +#include "unpack.cpp" +#include "cmddata.cpp" +#include "filestr.cpp" +#include "recvol.cpp" +#include "rs.cpp" +#include "scantree.cpp" +EOS + +class Unrar <Formula + @url='http://www.rarlab.com/rar/unrarsrc-3.9.4.tar.gz' + @md5='1800a2242911fc118f6a2b084d0c22c1' + @homepage='http://www.rarlab.com' + + def install + # by compiling all in one unit, g++ optimises slightly better + File.open('all.cpp', 'w') {|f| f.write ALL_CPP} + system "g++ #{ENV['CXXFLAGS']} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE all.cpp -o unrar" + bin.install 'unrar' + + FileUtils.mv 'license.txt', 'COPYING' + FileUtils.mv 'readme.txt', 'README' + end +end
\ No newline at end of file |
