aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornibbles 2bits2012-10-16 14:52:07 -0700
committerAdam Vandenberg2012-10-16 20:23:41 -0700
commit7467ec47644e000090d4216ebc80ed88febf7879 (patch)
tree5db7d9134d551e212cc8dde184ac2db66e55b20c
parentd6a0a7108a724ff20b51a6eb7ae0f1a03ca58994 (diff)
downloadhomebrew-7467ec47644e000090d4216ebc80ed88febf7879.tar.bz2
upx: enable lzma compression
upx can compress 30% better using lzma. Per user request, add a subformula to extract the lzma sdk into the buildpath and unleash greatness. Fixes #15413 Closes #15496. Signed-off-by: Adam Vandenberg <flangy@gmail.com>
-rw-r--r--Library/Formula/upx.rb15
1 files changed, 12 insertions, 3 deletions
diff --git a/Library/Formula/upx.rb b/Library/Formula/upx.rb
index d4d8ef3ad..e3113b2b2 100644
--- a/Library/Formula/upx.rb
+++ b/Library/Formula/upx.rb
@@ -1,15 +1,24 @@
require 'formula'
+class Lzma < Formula
+ url 'http://sourceforge.net/projects/sevenzip/files/LZMA%20SDK/4.65/lzma465.tar.bz2'
+ sha1 '5ec1c4606fec88c770a9712073e83916f8aed173'
+end
+
class Upx < Formula
- url 'http://upx.sourceforge.net/download/upx-3.08-src.tar.bz2'
- head 'http://upx.hg.sourceforge.net:8000/hgroot/upx/upx', :using => :hg
homepage 'http://upx.sourceforge.net'
+ url 'http://upx.sourceforge.net/download/upx-3.08-src.tar.bz2'
sha1 '5ccbc0aacfd3aaee407eceab06ec5989bf1d153a'
+ head 'http://upx.hg.sourceforge.net:8000/hgroot/upx/upx', :using => :hg
depends_on 'ucl'
def install
+ Lzma.new.brew {(buildpath+'lzmasdk').install Dir['*']}
+ ENV['UPX_LZMADIR'] = (buildpath+'lzmasdk')
+ ENV['UPX_LZMA_VERSION'] = '0x465'
system "make all"
- bin.install "src/upx.out" => "upx"
+ bin.install 'src/upx.out' => 'upx'
+ man1.install 'doc/upx.1'
end
end