-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathvolk.rb
47 lines (38 loc) · 1.56 KB
/
volk.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
41
42
43
44
45
46
47
class Volk < Formula
include Language::Python::Virtualenv
desc "The Vector Optimized Library of Math Kernels"
homepage "http://libvolk.org/"
url "https://github.com/gnuradio/volk/archive/v1.4.tar.gz"
head "https://github.com/gnuradio/volk.git"
sha256 "32131ba17846850c07270bc5897dd2de7130ec02ca029875a36966335120e7bf"
depends_on "cmake" => :build
depends_on "ninja" => :build
depends_on "python" => :build
resource "Mako" do
url "https://files.pythonhosted.org/packages/eb/69/6137c60cae2ab8c911bff510bb6d1d23a0189f75d114bb277606c6486b5f/Mako-1.0.8.tar.gz"
sha256 "04092940c0df49b01f43daea4f5adcecd0e50ef6a4b222be5ac003d5d84b2843"
end
resource "MarkupSafe" do
url "https://files.pythonhosted.org/packages/b9/2e/64db92e53b86efccfaea71321f597fa2e1b2bd3853d8ce658568f7a13094/MarkupSafe-1.1.1.tar.gz"
sha256 "29872e92839765e546828bb7754a68c418d927cd064fd4708fab9fe9c8bb116b"
end
def install
ENV.prepend_create_path "PYTHONPATH", libexec/"vendor/lib/python3.7/site-packages"
pyver = "python3.7"
python = Formulary.factory 'python'
resource("MarkupSafe").stage do
system "#{python.bin}/#{pyver}", *Language::Python.setup_install_args(libexec/"vendor")
end
resource("Mako").stage do
system "#{python.bin}/#{pyver}", *Language::Python.setup_install_args(libexec/"vendor")
end
mktemp do
args = %W[
-DPYTHON_EXECUTABLE=#{python.bin}/python3
]
system "cmake", "-G", "Ninja", buildpath, *(std_cmake_args + args)
system "ninja"
system "ninja", "install"
end
end
end