2009-10-15 08:07:12 +00:00
|
|
|
require 'formula'
|
2009-09-19 09:37:39 +00:00
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Automoc4 < Formula
|
2010-04-07 05:58:35 +00:00
|
|
|
homepage 'http://techbase.kde.org/Development/Tools/Automoc4'
|
2012-02-22 05:12:27 +00:00
|
|
|
url 'ftp://ftp.kde.org/pub/kde/stable/automoc4/0.9.88/automoc4-0.9.88.tar.bz2'
|
2010-04-07 05:58:35 +00:00
|
|
|
md5 '91bf517cb940109180ecd07bc90c69ec'
|
2009-09-19 09:37:39 +00:00
|
|
|
|
2010-09-19 17:21:57 +00:00
|
|
|
depends_on 'cmake' => :build
|
2010-02-25 10:16:41 +00:00
|
|
|
depends_on 'qt'
|
2009-09-19 09:37:39 +00:00
|
|
|
|
2010-03-15 23:44:33 +00:00
|
|
|
def patches
|
2012-02-09 20:44:44 +00:00
|
|
|
# Patch needed to find Qt in Homebrew upstreamed but upstream version
|
|
|
|
# does not apply. Won't be needed for next version.
|
|
|
|
# https://projects.kde.org/projects/kdesupport/automoc/repository/revisions/6b9597ff
|
2010-03-15 23:44:33 +00:00
|
|
|
{ :p0 => DATA }
|
|
|
|
end
|
2012-02-22 05:12:27 +00:00
|
|
|
|
|
|
|
def install
|
|
|
|
system "cmake #{std_cmake_parameters} ."
|
|
|
|
system "make install"
|
|
|
|
end
|
2009-09-19 09:37:39 +00:00
|
|
|
end
|
2012-02-22 05:12:27 +00:00
|
|
|
|
2010-03-15 23:44:33 +00:00
|
|
|
__END__
|
|
|
|
--- kde4automoc.cpp.old 2009-01-22 18:50:09.000000000 +0000
|
|
|
|
+++ kde4automoc.cpp 2010-03-15 22:26:03.000000000 +0000
|
|
|
|
@@ -175,16 +175,22 @@
|
|
|
|
dotFilesCheck(line == "MOC_INCLUDES:\n");
|
|
|
|
line = dotFiles.readLine().trimmed();
|
|
|
|
const QStringList &incPaths = QString::fromUtf8(line).split(';', QString::SkipEmptyParts);
|
|
|
|
+ QSet<QString> frameworkPaths;
|
|
|
|
foreach (const QString &path, incPaths) {
|
|
|
|
Q_ASSERT(!path.isEmpty());
|
|
|
|
mocIncludes << "-I" + path;
|
|
|
|
+ if (path.endsWith(".framework/Headers")) {
|
|
|
|
+ QDir framework(path);
|
|
|
|
+ // Go up twice to get to the framework root
|
|
|
|
+ framework.cdUp();
|
|
|
|
+ framework.cdUp();
|
|
|
|
+ frameworkPaths << framework.path();
|
|
|
|
+ }
|
|
|
|
}
|
|
|
|
|
|
|
|
- // on the Mac, add -F always, otherwise headers in the frameworks won't be found
|
|
|
|
- // is it necessary to do this only optionally ? Alex
|
|
|
|
-#ifdef Q_OS_MAC
|
|
|
|
- mocIncludes << "-F/Library/Frameworks";
|
|
|
|
-#endif
|
|
|
|
+ foreach (const QString &path, frameworkPaths) {
|
|
|
|
+ mocIncludes << "-F" << path;
|
|
|
|
+ }
|
|
|
|
|
|
|
|
line = dotFiles.readLine();
|
|
|
|
dotFilesCheck(line == "CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE:\n");
|