Created
January 20, 2013 05:57
-
-
Save Smenus/4576894 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' | |
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 | |
"https://gist.github.com/raw/4576230/e722f2113195ee9b8ee67c1c424aa3f2085b1066/libpar2-0.2-nzbget.patch" | |
end | |
def install | |
system "./configure", "--disable-debug", "--disable-dependency-tracking", | |
"--prefix=#{prefix}" | |
system "make install" | |
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 | |
depends_on 'pkg-config' => :build | |
depends_on 'libsigc++' | |
# libpar2 is now a subformula | |
#depends_on 'libpar2' | |
depends_on 'libgcrypt' | |
depends_on 'gnutls' | |
fails_with :clang do | |
build 421 | |
cause <<-EOS.undent | |
Configure errors out when testing the libpar2 headers because | |
Clang does not support flexible arrays of non-POD types. | |
EOS | |
end | |
def install | |
libpar2_prefix = buildpath/'libpar2-0.2' | |
Libpar2.new.brew do |p| | |
system "./configure", "--disable-debug", "--disable-dependency-tracking", | |
"--prefix=#{libpar2_prefix}" | |
system "make install" | |
end | |
system "./configure", "--disable-debug", "--disable-dependency-tracking", | |
"--with-libpar2-libraries=#{libpar2_prefix}/lib", | |
"--with-libpar2-includes=#{libpar2_prefix}/include", | |
"--prefix=#{prefix}" | |
system "make install" | |
system "make install-conf" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment