-
Notifications
You must be signed in to change notification settings - Fork 79
Expand file tree
/
Copy pathasio@1.10.8.rb
More file actions
57 lines (48 loc) · 1.71 KB
/
asio@1.10.8.rb
File metadata and controls
57 lines (48 loc) · 1.71 KB
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
class AsioAT1108 < Formula
desc "Cross-platform C++ Library for asynchronous programming"
homepage "https://think-async.com/Asio"
url "https://downloads.sourceforge.net/project/asio/asio/1.10.8%20%28Stable%29/asio-1.10.8.tar.bz2"
sha256 "26deedaebbed062141786db8cfce54e77f06588374d08cccf11c02de1da1ed49"
license "BSL-1.0"
head "https://github.com/chriskohlhoff/asio.git"
keg_only :versioned_formula
depends_on "autoconf" => :build
depends_on "automake" => :build
depends_on "libtool" => :build
depends_on "pkg-config" => :build
depends_on "boost@1.85"
def install
ENV.cxx11
system "autoconf"
boost = Formula["boost@1.85"]
args = %W[
--disable-dependency-tracking
--disable-silent-rules
--prefix=#{prefix}
--with-boost=#{boost.opt_prefix}
]
if OS.mac?
sdk = Utils.popen_read("xcrun --sdk macosx --show-sdk-path").chomp
libcxx = "#{sdk}/usr/include/c++/v1"
# Old configure checks: make headers/libs & SDK unmissable
cppflags = "-I#{boost.opt_include} -I#{libcxx} -isysroot #{sdk}"
cxxflags = "-std=c++11 -I#{boost.opt_include} -I#{libcxx} -isysroot #{sdk}"
ldflags = "-L#{boost.opt_lib} -isysroot #{sdk} -stdlib=libc++"
system "./configure",
*args,
"CPPFLAGS=#{cppflags}",
"CXXFLAGS=#{cxxflags}",
"LDFLAGS=#{ldflags}",
# Preseed brittle header probe (safe on macOS; a no-op elsewhere)
"ac_cv_header_boost_noncopyable_hpp=yes"
else
system "./configure", *args
end
system "make", "install"
pkgshare.install "src/examples"
end
test do
# Smoke test: header presence
assert_path_exist include/"asio.hpp"
end
end