blob: cd11b75b849d2682d462cdfadc2a5c90d9d469a0 (
plain)
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
  | 
require 'formula'
class PysideTools < Formula
  homepage 'http://www.pyside.org'
  url 'http://qt-project.org/uploads/pyside/pyside-tools-0.2.14.tar.bz2'
  sha1 'f654553bc9bfb35dbc5673da26830969393f9fe8'
  head 'git://gitorious.org/pyside/pyside-tools.git'
  depends_on 'cmake' => :build
  depends_on :python => :recommended
  depends_on :python3 => :optional
  depends_on 'pyside'
  def install
    python do
      args = std_cmake_args
      args << "-DSITE_PACKAGE=#{python.site_packages}"
      # The next two lines are because pyside needs this to switch Python
      # versions in HOMEBREW_PREFIX/lib/cmake/PySide-X.Y.Z/PySideConfig.cmake
      args << "-DPYTHON_BASENAME=-python2.7" if python2
      args << "-DPYTHON_BASENAME=.cpython-33m" if python3
      # And these two lines are because the ShibokenConfig.cmake needs this to
      # switch python versions. The price for supporting both versions:
      args << "-DPYTHON_SUFFIX='-python2.7'" if python2
      args << "-DPYTHON_SUFFIX='.cpython-33m'" if python3
      system "cmake", ".", *args
      system "make install"
    end
  end
  def caveats
    python.standard_caveats if python
  end
end
  |