forked from tomahawk-player/homebrew-tomahawk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
snorenotify.rb
33 lines (27 loc) · 1.19 KB
/
snorenotify.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
require 'formula'
class Snorenotify < Formula
head 'git://github.com/Snorenotify/Snorenotify.git'
url 'https://github.com/Snorenotify/Snorenotify/archive/v0.5.1.tar.gz'
sha1 'eb83e0b7bccfc1c307a8457265dc4a5607a8b877'
depends_on 'cmake' => :build
depends_on 'qt'
depends_on 'snoregrowl'
def install
if MacOS.version >= 10.9
sdk = "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk"
cfl = "CFLAGS=\"-mmacosx-version-min=10.9\""
cxxfl = "CXXFLAGS=\"-mmacosx-version-min=10.9\""
elsif MacOS.version >= 10.8
sdk = "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk"
cfl = "CFLAGS=\"-mmacosx-version-min=10.8\""
cxxfl = "CXXFLAGS=\"-mmacosx-version-min=10.8\""
else
sdk = "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk"
cfl = "CFLAGS=\"-mmacosx-version-min=10.7\""
cxxfl = "CXXFLAGS=\"-mmacosx-version-min=10.7\""
end
exp = "export #{cfl}; export #{cxxfl}; export SDKROOT=#{sdk}"
system "#{exp}; cmake . #{std_cmake_parameters}"
system "#{exp}; make install"
end
end