forked from BlinkyStitt/homebrew-bitcoin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
czmqpp-gcc48.rb
40 lines (32 loc) · 1.09 KB
/
czmqpp-gcc48.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
require 'formula'
class CzmqppGcc48 < Formula
homepage 'https://github.com/zeromq/czmqpp'
url 'https://github.com/zeromq/czmqpp.git', :branch => 'master'
version '2.2'
depends_on 'autoconf' => :build
depends_on 'automake' => :build
depends_on 'homebrew/versions/gcc48' => :build
depends_on 'libtool' => :build
depends_on 'pkg-config' => :build
depends_on 'Nevtep/bitcoin/zeromq2-gcc48'
depends_on 'Nevtep/bitcoin/czmq-gcc48'
def install
ENV.prepend_path 'PATH', "#{HOMEBREW_PREFIX}/opt/gcc48/bin"
ENV['CC'] = "gcc-4.8"
ENV['CXX'] = ENV['LD'] = "g++-4.8"
ENV.cxx11
# I thought depends_on zermoq-gcc48 would be enough, but I guess not...
czmqgcc48 = Formula['Nevtep/bitcoin/czmq-gcc48']
ENV.append 'CPPFLAGS', "-I#{czmqgcc48.include}"
ENV.append 'LDFLAGS', "-L#{czmqgcc48.lib}"
system "autoreconf", "-i"
system "./configure", "--prefix=#{prefix}",
"--disable-dependency-tracking",
"--sysconfdir=#{etc}"
system "make"
system "make", "install"
end
test do
system "false"
end
end