Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

Commit

Permalink
upx: enable lzma compression
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
nibbles 2bits authored and adamv committed Oct 17, 2012
1 parent d6a0a71 commit 7467ec4
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions Library/Formula/upx.rb
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 7467ec4

Please sign in to comment.