-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbasset_ios.rb
50 lines (40 loc) · 1.67 KB
/
basset_ios.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
48
49
50
class BassetIos < Formula
desc "Converts vector images to PNG and puts them in xcassets"
homepage "https://github.com/Polidea/basset-ios"
url "https://github.com/Polidea/basset-ios/archive/1.4.2.tar.gz"
sha256 "aca128ce7679103a46f8a3c26024365ed378fe4dc818f4fe0c149fb1e4764dfe"
depends_on :python if MacOS.version <= :snow_leopard
depends_on "imagemagick" => "--with-librsvg"
depends_on "ghostscript"
resource "coloredlogs" do
url "https://pypi.python.org/packages/source/c/coloredlogs/coloredlogs-1.0.tar.gz"
sha256 "35e1e8a422b27d8c8e66eaa30d5dfff80d9c233bd52543e10b79688781b0510b"
end
resource "Wand" do
url "https://github.com/rameshdharan/wand/archive/154e1d2ae42722efe17c4824562b4c40a36e87aa.zip"
sha256 "fcc340145634644c784565a8feba7a02b24ae903aee633383d9df96313a438ff"
end
resource "PyYAML" do
url "https://pypi.python.org/packages/source/P/PyYAML/PyYAML-3.11.tar.gz"
sha256 "c36c938a872e5ff494938b33b14aaa156cb439ec67548fcab3535bb78b0846e8"
end
resource "humanfriendly" do
url "https://pypi.python.org/packages/source/h/humanfriendly/humanfriendly-1.26.tar.gz"
sha256 "0908b90298364e3335a03abcbb88ec571f95c7e4bc6728de0551806f636ef219"
end
def install
ENV.prepend_create_path "PYTHONPATH", libexec/"vendor/lib/python2.7/site-packages"
resources.each do |r|
r.stage do
system "python", *Language::Python.setup_install_args(libexec/"vendor")
end
end
ENV.prepend_create_path "PYTHONPATH", libexec
libexec.install "basset"
bin.install "basset_ios"
bin.env_script_all_files(libexec/"bin", :PYTHONPATH => ENV["PYTHONPATH"])
end
test do
system "#{bin}/basset_ios", "-h"
end
end