Last active
August 29, 2015 14:23
-
-
Save mistydemeo/4226555e2d4990fc19bc to your computer and use it in GitHub Desktop.
This file contains 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
class Uniconverter < Formula | |
desc "command line universal vector graphics translator" | |
homepage "http://sk1project.org/modules.php?name=Products&product=uniconvertor" | |
head "https://github.com/sk1project/sk1-wx", :using => :git | |
resource "Pillow" do | |
url "https://pypi.python.org/packages/source/P/Pillow/Pillow-2.9.0.zip" | |
sha256 "d1db8dfed77547076037d589b598e04f2cbc1a7835d3d3f137bf20c8994854d5" | |
end | |
resource "reportlab" do | |
url "https://pypi.python.org/packages/source/r/reportlab/reportlab-3.2.0.tar.gz" | |
sha256 "72e687662bd854776407b9108483561831b45546d935df8b0477708199086293" | |
end | |
resource "Wand" do | |
url "https://pypi.python.org/packages/source/W/Wand/Wand-0.4.0.tar.gz" | |
sha256 "3ef8cbadb122808c123b33d34a9cc833a91eebb700ebea1d5d610fa807f55a89" | |
end | |
depends_on "freetype" # likely to be phased out | |
depends_on "cairo" | |
depends_on "little-cms" | |
depends_on "libpng" | |
depends_on :python | |
depends_on "py2cairo" | |
def install | |
ENV.append_to_cflags "-I#{Formula["freetype"].opt_include}/freetype2 -I#{Formula["py2cairo"].opt_include}/pycairo -I#{Formula["cairo"].opt_include}/cairo" | |
ENV["PYTHONPATH"] = libexec/"vendor/lib/python2.7/site-packages" | |
ENV.prepend_create_path "PYTHONPATH", libexec/"vendor/lib/python2.7/site-packages/PIL" | |
ENV.prepend_create_path "PYTHONPATH", libexec/"lib/python2.7/site-packages" | |
resources.each do |r| | |
r.stage do | |
system "python", *Language::Python.setup_install_args(libexec/"vendor") | |
end | |
end | |
%w[setup.cfg_sk1 setup.cfg_uc2].each do |f| | |
rm f | |
touch f | |
end | |
inreplace %w[setup-sk1.py setup-uc2.py], "/usr", prefix | |
system "python", "setup-sk1.py", "build" | |
system "python", "setup-sk1.py", "install", "--prefix=#{prefix}" | |
system "python", "setup-uc2.py", "build" | |
system "python", "setup-uc2.py", "install", "--prefix=#{prefix}" | |
bin.env_script_all_files(libexec/"bin", :PYTHONPATH => ENV["PYTHONPATH"]) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment