diff options
| author | Smenus | 2013-01-22 04:16:01 +0000 |
|---|---|---|
| committer | Adam Vandenberg | 2013-01-22 08:33:43 -0800 |
| commit | f2a4e5ee7c32daabee410f20912a9f3e6cbee72d (patch) | |
| tree | cf3e56471d971f9865c1bda8e3bf239ec4133f35 /Library | |
| parent | 36f4f28cd6dfd1482fb7cb97552556da167a82c8 (diff) | |
| download | homebrew-f2a4e5ee7c32daabee410f20912a9f3e6cbee72d.tar.bz2 | |
libpar2 subformula, gnutls to openssl - nzbget
As nzbget was the only formula using libpar2, have changed it into a subformula that gets installed to nzbget's libexec. Also added patches to libpar2 from nzbget, as libpar2 upstream hasn't had any activity in years. The patches are bugfixes and add the ability to cancel par2 repair. They are required for the latest nzbget.
Have moved from gnutls to openssl for nzbget, as gnutls was causing issues, and wasn't necessary when OS X provides openssl. Have tested with openssl, no issues found, and no errors that gnutls was exhibiting.
Closes #17251.
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Formula/libpar2.rb | 23 | ||||
| -rw-r--r-- | Library/Formula/nzbget.rb | 41 |
2 files changed, 36 insertions, 28 deletions
diff --git a/Library/Formula/libpar2.rb b/Library/Formula/libpar2.rb deleted file mode 100644 index 68fa94ec6..000000000 --- a/Library/Formula/libpar2.rb +++ /dev/null @@ -1,23 +0,0 @@ -require 'formula' - -class Libpar2 < Formula - url 'http://sourceforge.net/projects/parchive/files/libpar2/0.2/libpar2-0.2.tar.gz' - homepage 'http://parchive.sourceforge.net/' - sha1 '4b3da928ea6097a8299aadafa703fc6d59bdfb4b' - - depends_on 'pkg-config' => :build - depends_on 'libsigc++' - - fails_with :clang do - build 421 - cause <<-EOS.undent - ./par2fileformat.h:87:25: error: flexible array member 'entries' of non-POD element type 'FILEVERIFICATIONENTRY []' - EOS - end - - def install - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}" - system "make install" - end -end diff --git a/Library/Formula/nzbget.rb b/Library/Formula/nzbget.rb index 46f4f671e..ac01d39c2 100644 --- a/Library/Formula/nzbget.rb +++ b/Library/Formula/nzbget.rb @@ -1,17 +1,34 @@ require 'formula' +class Libpar2 < Formula + url 'http://sourceforge.net/projects/parchive/files/libpar2/0.2/libpar2-0.2.tar.gz' + homepage 'http://parchive.sourceforge.net/' + sha1 '4b3da928ea6097a8299aadafa703fc6d59bdfb4b' + + def initialize; super 'libpar2'; end + + fails_with :clang do + build 421 + cause <<-EOS.undent + ./par2fileformat.h:87:25: error: flexible array member 'entries' of non-POD element type 'FILEVERIFICATIONENTRY []' + EOS + end + + def patches + # Patch libpar2 - bugfixes and ability to cancel par2 repair + "https://gist.github.com/raw/4576230/e722f2113195ee9b8ee67c1c424aa3f2085b1066/libpar2-0.2-nzbget.patch" + end +end + class Nzbget < Formula homepage 'http://sourceforge.net/projects/nzbget/' url 'http://downloads.sourceforge.net/project/nzbget/nzbget-stable/9.1/nzbget-9.1.tar.gz' sha1 '779258e9349ebc1ea78ae1d7ba5d379af35d4040' head 'https://nzbget.svn.sourceforge.net/svnroot/nzbget/trunk', :using => :svn - # Also depends on libxml2 but the one in OS X is fine + # Also depends on libxml2 and openssl but the ones in OS X are fine depends_on 'pkg-config' => :build depends_on 'libsigc++' - depends_on 'libpar2' - depends_on 'libgcrypt' - depends_on 'gnutls' fails_with :clang do build 421 @@ -22,8 +39,22 @@ class Nzbget < Formula end def install + # Install libpar2 inside nzbget, nothing else uses it + libpar2_prefix = libexec/'libpar2' + Libpar2.new.brew do + system "./configure", "--disable-debug", "--disable-dependency-tracking", + "--prefix=#{libpar2_prefix}" + system "make install" + end + + # Need to add -lcrypto + ENV["LIBS"] = "-lssl -lcrypto" + + # Tell configure where libpar2 is, and tell it to use OpenSSL system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}" + "--with-libpar2-includes=#{libpar2_prefix}/include", + "--with-libpar2-libraries=#{libpar2_prefix}/lib", + "--with-tlslib=OpenSSL", "--prefix=#{prefix}" system "make install" system "make install-conf" end |
