-
Notifications
You must be signed in to change notification settings - Fork 42
/
libechonest.rb
43 lines (38 loc) · 1.53 KB
/
libechonest.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
class Libechonest < Formula
desc "Qt library for communicating with The Echo Nest"
homepage "https://projects.kde.org/projects/playground/libs/libechonest"
url "http://files.lfranchi.com/libechonest-2.3.1.tar.bz2"
sha256 "56756545fd1cb3d9067479f52215b6157c1ced2bc82b895e72fdcd9bebb47889"
revision 1
bottle do
root_url "https://homebrew.bintray.com/bottles"
sha256 cellar: :any, el_capitan: "51cae76dec59157c29e47d836d94044c75a4e69c05ded3d9fe5d16ed39029eae"
sha256 cellar: :any, yosemite: "155a7921bd0e807a5702d9cf2f85b0fa2636713c57ee2c355cf27b70bd567c79"
sha256 cellar: :any, mavericks: "0e774fa6901a1d8c7244e8fcbbaefdd2a1b4f1d69d9ab3061c9dd67d468ac57b"
sha256 cellar: :any, mountain_lion: "093d7b8f68f0ef72da44b8118d96a0e103f37788e91294006fb1fd09fbe04d82"
end
depends_on "cmake" => :build
depends_on "cartr/qt4/qt@4"
depends_on "qjson"
conflicts_with "doxygen", because: "cmake fails to configure build"
def install
system "cmake", ".", *std_cmake_args
system "make", "install"
end
test do
(testpath/"test.cpp").write <<~EOS
#include <echonest/Genre.h>
#include <echonest/Artist.h>
int main() {
Echonest::Genre test;
test.setName(QLatin1String("ambient trance"));
return 0;
}
EOS
qt = Formula["cartr/qt4/qt@4"]
system ENV.cxx, "test.cpp", "-L#{lib}", "-lechonest", "-F#{qt.opt_lib}",
"-framework", "QtCore", "-I#{qt.opt_include}/QtCore",
"-I#{qt.opt_include}/QtNetwork", "-o", "test"
system "./test"
end
end