forked from cartr/homebrew-qt4
-
Notifications
You must be signed in to change notification settings - Fork 0
84 lines (70 loc) · 3.08 KB
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
class QtWebkitAT23 < Formula
desc "Qt port of WebKit (insecure, don't use for Web browsing)"
homepage "https://trac.webkit.org/wiki/QtWebKit"
url "https://download.kde.org/stable/qtwebkit-2.3/2.3.4/src/qtwebkit-2.3.4.tar.gz"
sha256 "c6cfa9d068f7eb024fee3f6c24f5b8b726997f669007587f35ed4a97d40097ca"
revision 1
depends_on "cartr/qt4/qt@4"
# Put data and import files into this formula's cellar instead of installing them globally.
patch :DATA
def install
ENV["QTDIR"] = Formula["cartr/qt4/qt@4"].opt_prefix
ENV["INSTALL_DATA"] = "#{prefix}/etc/qt4"
ENV["INSTALL_LIBS"] = lib
system "Tools/Scripts/build-webkit", "--qt", "--no-webkit2", "--no-video", "--install-headers=#{include}", "--install-libs=#{lib}", "--minimal"
system "make", "-C", "WebKitBuild/Release", "install"
end
def caveats; <<-EOS.undent
This is years old and really insecure. You shouldn't
use it if you don't absolutely trust the HTML files
you're using it to browse. Definely avoid using it
in a general-purpose Web browser.
Also, video doesn't work.
EOS
end
bottle do
root_url "https://dl.bintray.com/cartr/autobottle-qt4"
sha256 "e01b4ee5cc9abc69bebf01f104ea9d74f3af840160d977e6d81f80d5b8bf5e4f" => :sierra
sha256 "fd1d1b30bb87d94e140dcdfee41ac69383b590c6166deee4056c06fa638dc8ff" => :el_capitan
sha256 "3b88371ffd6fb1a671e47867a9cc3561bcb4af65cc9c6dde644d9cb4aac6311d" => :yosemite
end
end
__END__
diff --git a/Source/WebKit/qt/declarative/experimental/experimental.pri b/Source/WebKit/qt/declarative/experimental/experimental.pri
index 8e8d528..97075f5 100644
--- a/Source/WebKit/qt/declarative/experimental/experimental.pri
+++ b/Source/WebKit/qt/declarative/experimental/experimental.pri
@@ -38,10 +38,7 @@ DEFINES += HAVE_WEBKIT2
WEBKIT += wtf javascriptcore webkit2
-# The fallback to QT_INSTALL_IMPORTS can be removed once we
-# depend on Qt 5 RC1.
-importPath = $$[QT_INSTALL_QML]
-isEmpty(importPath): importPath = $$[QT_INSTALL_IMPORTS]
+importPath = $$(INSTALL_LIBS)/qt4/imports
target.path = $${importPath}/$${TARGET.module_name}
diff --git a/Source/WebKit/qt/declarative/public.pri b/Source/WebKit/qt/declarative/public.pri
index 7cb3bbf..77e80d0 100644
--- a/Source/WebKit/qt/declarative/public.pri
+++ b/Source/WebKit/qt/declarative/public.pri
@@ -46,10 +46,7 @@ SOURCES += plugin.cpp
QT += network
}
-# The fallback to QT_INSTALL_IMPORTS can be removed once we
-# depend on Qt 5 RC1.
-importPath = $$[QT_INSTALL_QML]
-isEmpty(importPath): importPath = $$[QT_INSTALL_IMPORTS]
+importPath = $$(INSTALL_LIBS)/qt4/imports
target.path = $${importPath}/$${TARGET.module_name}
diff --git a/Source/api.pri b/Source/api.pri
index f9d6fbc..413eb9b 100644
--- a/Source/api.pri
+++ b/Source/api.pri
@@ -118,7 +118,7 @@ haveQt(5) {
} else {
# For Qt4 we have to set up install rules manually
modulefile.files = $${ROOT_WEBKIT_DIR}/Tools/qmake/qt_webkit.pri
- mkspecs = $$[QMAKE_MKSPECS]
+ mkspecs = $$(INSTALL_DATA)/mkspecs
mkspecs = $$split(mkspecs, :)
modulefile.path = $$last(mkspecs)/modules
INSTALLS += modulefile