1 | # -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4 |
---|
2 | # $Id: Portfile 105804 2013-05-06 04:22:14Z devans@macports.org $ |
---|
3 | |
---|
4 | PortSystem 1.0 |
---|
5 | PortGroup conflicts_build 1.0 |
---|
6 | PortGroup muniversal 1.0 |
---|
7 | PortGroup compiler_blacklist_versions 1.0 |
---|
8 | |
---|
9 | name webkit-gtk |
---|
10 | epoch 2 |
---|
11 | version 2.0.1 |
---|
12 | description Apple's WebKit HTML rendering library for GTK+ |
---|
13 | long_description ${description} |
---|
14 | maintainers jeremyhu devans |
---|
15 | categories www gnome |
---|
16 | platforms darwin freebsd |
---|
17 | license LGPL-2+ BSD |
---|
18 | homepage http://webkitgtk.org/ |
---|
19 | master_sites http://webkitgtk.org/releases/ |
---|
20 | |
---|
21 | use_xz yes |
---|
22 | distname webkitgtk-${version} |
---|
23 | |
---|
24 | checksums sha1 43323e8e79ba29f41bd2a93bb35c53cfd89b7741 \ |
---|
25 | rmd160 271b3a6a51f3ec10050d24b3de2bc5463534675a \ |
---|
26 | sha256 6303552a39d7912725d75bc55f530cdb99171fb873e299798d0bb932d6ea76cb |
---|
27 | |
---|
28 | depends_lib \ |
---|
29 | path:lib/pkgconfig/glib-2.0.pc:glib2 \ |
---|
30 | port:enchant \ |
---|
31 | port:geoclue \ |
---|
32 | port:gobject-introspection \ |
---|
33 | port:gtk2 \ |
---|
34 | port:harfbuzz-icu \ |
---|
35 | port:libxslt \ |
---|
36 | port:libpng \ |
---|
37 | port:libsecret \ |
---|
38 | port:libsoup \ |
---|
39 | port:mesa \ |
---|
40 | port:sqlite3 \ |
---|
41 | port:webp \ |
---|
42 | port:xorg-libXt |
---|
43 | |
---|
44 | depends_build \ |
---|
45 | port:gtk-doc \ |
---|
46 | port:pkgconfig |
---|
47 | |
---|
48 | # case-insensitive.patch: https://bugs.webkit.org/show_bug.cgi?id=65811 |
---|
49 | # our-icu.patch: No upstream bug report, probably not wanted |
---|
50 | # ruby-1.8.patch: http://trac.macports.org/ticket/37740 |
---|
51 | # ListableHandler.patch: https://trac.macports.org/ticket/37828 |
---|
52 | # execinfo.patch: https://trac.macports.org/ticket/37882 |
---|
53 | # ppc.patch: https://bugs.webkit.org/show_bug.cgi?id=96005 |
---|
54 | # tiger.patch: No upstream bug, http://trac.macports.org/ticket/35923 |
---|
55 | |
---|
56 | patchfiles \ |
---|
57 | clang-assertions.patch \ |
---|
58 | case-insensitive.patch \ |
---|
59 | our-icu.patch \ |
---|
60 | execinfo.patch \ |
---|
61 | ruby-1.8.patch \ |
---|
62 | ListableHandler.patch \ |
---|
63 | ppc.patch \ |
---|
64 | tiger.patch |
---|
65 | |
---|
66 | conflicts_build google-test |
---|
67 | |
---|
68 | # https://trac.macports.org/ticket/36329 |
---|
69 | configure.python /usr/bin/python |
---|
70 | |
---|
71 | configure.args \ |
---|
72 | --with-gtk=2.0 \ |
---|
73 | --disable-webkit2 \ |
---|
74 | --enable-introspection \ |
---|
75 | --disable-video \ |
---|
76 | --enable-svg \ |
---|
77 | --enable-geolocation \ |
---|
78 | --enable-media-stream \ |
---|
79 | --enable-webgl |
---|
80 | |
---|
81 | # https://bugs.webkit.org/show_bug.cgi?id=94488 |
---|
82 | configure.universal_args-delete --disable-dependency-tracking |
---|
83 | |
---|
84 | # gobject-introspection uses g-ir-scanner, which uses $CC from env |
---|
85 | if {[variant_isset universal]} { |
---|
86 | foreach arch ${configure.universal_archs} { |
---|
87 | lappend merger_build_args(${arch}) CC='${configure.cc} -arch ${arch}' |
---|
88 | lappend merger_destroot_args(${arch}) CC='${configure.cc} -arch ${arch}' |
---|
89 | } |
---|
90 | } else { |
---|
91 | build.args-append CC="${configure.cc} ${configure.cc_archflags}" |
---|
92 | destroot.args-append CC="${configure.cc} ${configure.cc_archflags}" |
---|
93 | } |
---|
94 | |
---|
95 | # In 1.10.1: |
---|
96 | # Source/WebCore/platform/audio/gstreamer/FFTFrameGStreamer.cpp: In constructor 'WebCore::FFTFrame::FFTFrame(unsigned int)': |
---|
97 | # Source/WebCore/platform/audio/gstreamer/FFTFrameGStreamer.cpp:48: error: 'm_complexData' was not declared in this scope |
---|
98 | # Source/WebCore/platform/audio/gstreamer/FFTFrameGStreamer.cpp:48: error: 'GstFFTF32Complex' was not declared in this scope |
---|
99 | # Source/WebCore/platform/audio/gstreamer/FFTFrameGStreamer.cpp:48: error: no matching function for call to 'fastNewArray(size_t)' |
---|
100 | # Source/WebCore/platform/audio/gstreamer/FFTFrameGStreamer.cpp:50: error: 'gst_fft_next_fast_length' was not declared in this scope |
---|
101 | # Source/WebCore/platform/audio/gstreamer/FFTFrameGStreamer.cpp:51: error: 'm_fft' was not declared in this scope |
---|
102 | # Source/WebCore/platform/audio/gstreamer/FFTFrameGStreamer.cpp:51: error: 'FALSE' was not declared in this scope |
---|
103 | # Source/WebCore/platform/audio/gstreamer/FFTFrameGStreamer.cpp:51: error: 'gst_fft_f32_new' was not declared in this scope |
---|
104 | # Source/WebCore/platform/audio/gstreamer/FFTFrameGStreamer.cpp:52: error: 'm_inverseFft' was not declared in this scope |
---|
105 | # Source/WebCore/platform/audio/gstreamer/FFTFrameGStreamer.cpp:52: error: 'TRUE' was not declared in this scope |
---|
106 | # --enable-web-audio \ |
---|
107 | |
---|
108 | # We don't want to use the headers from the installed WebKit |
---|
109 | configure.cppflags-delete -I${prefix}/include |
---|
110 | |
---|
111 | # google-test suite build fix |
---|
112 | configure.cppflags-append -DGTEST_USE_OWN_TR1_TUPLE=1 |
---|
113 | |
---|
114 | autoreconf.env-append ACLOCAL="aclocal -I Source/autotools" |
---|
115 | use_autoreconf yes |
---|
116 | autoreconf.args -fvi |
---|
117 | |
---|
118 | # configure checks that we're clang 3.0, gcc 4.7, or better |
---|
119 | compiler.blacklist-append gcc-3.3 gcc-4.0 apple-gcc-4.0 gcc-4.2 apple-gcc-4.2 llvm-gcc-4.2 macports-llvm-gcc-4.2 |
---|
120 | compiler.blacklist-append macports-gcc-4.2 macports-gcc-4.3 macports-gcc-4.4 macports-gcc-4.5 macports-gcc-4.6 |
---|
121 | compiler.blacklist-append {clang < 300} macports-clang-2.9 |
---|
122 | |
---|
123 | # TODO: Remove this block once 2.2 is released |
---|
124 | compiler.fallback-append macports-clang-3.2 |
---|
125 | if {[info exists portconfigure::compiler_name_map(${configure.compiler})]} { |
---|
126 | depends_build-append port:$portconfigure::compiler_name_map(${configure.compiler}) |
---|
127 | |
---|
128 | # base 2.1.x ignores the argument and just use ${configure.compiler} |
---|
129 | if {[portconfigure::arch_flag_supported ${configure.compiler}]} { |
---|
130 | depends_skip_archcheck-append $portconfigure::compiler_name_map(${configure.compiler}) |
---|
131 | } |
---|
132 | |
---|
133 | if {[string match macports-gcc* ${configure.compiler}]} { |
---|
134 | depends_lib-append port:$portconfigure::compiler_name_map(${configure.compiler}) |
---|
135 | } |
---|
136 | } |
---|
137 | |
---|
138 | if {[string match *clang* ${configure.compiler}]} { |
---|
139 | configure.cxxflags-append -Wno-c++11-extensions |
---|
140 | } |
---|
141 | |
---|
142 | lappend merger_dont_diff ${prefix}/include/webkitgtk-1.0/webkitdom/WebKitDOMNavigator.h |
---|
143 | |
---|
144 | post-patch { |
---|
145 | # https://bugs.webkit.org/show_bug.cgi?id=88407 |
---|
146 | reinplace "s:echo -n:/bin/echo -n:g" \ |
---|
147 | ${worksrcpath}/Source/WebCore/GNUmakefile.am |
---|
148 | |
---|
149 | # https://bugs.webkit.org/show_bug.cgi?id=99683 |
---|
150 | reinplace "s:PLATFORM(MAC):OS(DARWIN):g" \ |
---|
151 | ${worksrcpath}/Source/JavaScriptCore/heap/VTableSpectrum.cpp \ |
---|
152 | ${worksrcpath}/Source/JavaScriptCore/jit/ThunkGenerators.cpp \ |
---|
153 | ${worksrcpath}/Source/JavaScriptCore/tools/CodeProfile.cpp |
---|
154 | |
---|
155 | # https://bugs.webkit.org/show_bug.cgi?id=58737 |
---|
156 | reinplace "s:OS(MAC_OS_X):PLATFORM(MAC):" \ |
---|
157 | ${worksrcpath}/Source/WTF/wtf/ThreadingPthreads.cpp |
---|
158 | } |
---|
159 | |
---|
160 | # TODO: fix this for muniversal |
---|
161 | # keep it for debug |
---|
162 | #post-destroot { |
---|
163 | # file copy ${worksrcpath}/Programs/.libs/GtkLauncher ${destroot}${prefix}/bin |
---|
164 | #} |
---|
165 | |
---|
166 | build.args-append V=1 |
---|
167 | |
---|
168 | # see bug #24622 |
---|
169 | variant quartz { |
---|
170 | configure.args-append --with-target=quartz |
---|
171 | |
---|
172 | # TODO: See if this will build with OpenGL.framework |
---|
173 | configure.args-delete --enable-webgl |
---|
174 | depends_lib-delete \ |
---|
175 | port:mesa \ |
---|
176 | port:xorg-libXt |
---|
177 | |
---|
178 | # quartz-include-widgetbackingstorecairo.patch |
---|
179 | # https://trac.macports.org/ticket/38203 |
---|
180 | # https://bugs.webkit.org/show_bug.cgi?id=111598 |
---|
181 | patchfiles-append quartz-duplicate-symbols.patch \ |
---|
182 | quartz-include-widgetbackingstorecairo.patch |
---|
183 | } |
---|
184 | |
---|
185 | variant video description {Enable HTML5 video support using gstreamer} { |
---|
186 | depends_lib-append port:gstreamer1-gst-plugins-base |
---|
187 | configure.args-delete --disable-video |
---|
188 | configure.args-append --enable-video |
---|
189 | } |
---|
190 | |
---|
191 | default_variants +video |
---|
192 | |
---|
193 | platform darwin { |
---|
194 | if {${os.major} < 10} { |
---|
195 | depends_build-append port:python27 |
---|
196 | # https://trac.macports.org/ticket/35793 |
---|
197 | configure.python ${prefix}/bin/python2.7 |
---|
198 | } |
---|
199 | |
---|
200 | if {[string match "*10.5*" ${configure.sdkroot}] || |
---|
201 | (${os.major} == 9 && ${configure.sdkroot} == "")} { |
---|
202 | |
---|
203 | # https://trac.macports.org/ticket/37418 |
---|
204 | configure.cppflags-append -D__MAC_OS_X_VERSION_MAX_ALLOWED=1050 |
---|
205 | } |
---|
206 | |
---|
207 | if {[string match "*10.4*" ${configure.sdkroot}] || |
---|
208 | (${os.major} == 8 && ${configure.sdkroot} == "")} { |
---|
209 | |
---|
210 | # https://trac.macports.org/ticket/37828 |
---|
211 | configure.cppflags-append -D__MAC_OS_X_VERSION_MAX_ALLOWED=1040 |
---|
212 | } |
---|
213 | |
---|
214 | if {$macosx_deployment_target == "10.4" || |
---|
215 | (${os.major} == 8 && $macosx_deployment_target == "")} { |
---|
216 | |
---|
217 | # https://trac.macports.org/ticket/37828 |
---|
218 | configure.cppflags-append -D__MAC_OS_X_VERSION_MIN_REQUIRED=1040 |
---|
219 | } |
---|
220 | } |
---|
221 | |
---|
222 | platform powerpc { |
---|
223 | # https://trac.macports.org/ticket/37839 |
---|
224 | configure.optflags -Os |
---|
225 | } |
---|
226 | |
---|
227 | livecheck.type regex |
---|
228 | livecheck.url http://webkitgtk.org/?page=download |
---|
229 | livecheck.regex webkitgtk-(\[0-9\]+\\.\[0-9\]*\[02468\]\\.\[0-9\]+) |
---|