source: trunk/dports/www/webkit-gtk/Portfile @ 115480

Last change on this file since 115480 was 115480, checked in by jeremyhu@…, 4 years ago

webkit-gtk: Mention upstream webkit2 bug report

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 9.4 KB
Line 
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 115480 2014-01-03 04:46:17Z jeremyhu@macports.org $
3
4PortSystem  1.0
5PortGroup   conflicts_build 1.0
6PortGroup   muniversal 1.0
7PortGroup   compiler_blacklist_versions 1.0
8
9name        webkit-gtk
10epoch       2
11version     2.2.3
12revision    1
13description Apple's WebKit HTML rendering library for GTK+
14long_description ${description}
15maintainers jeremyhu devans
16categories  www gnome
17platforms   darwin freebsd
18license     LGPL-2+ BSD
19homepage    http://webkitgtk.org/
20master_sites    http://webkitgtk.org/releases/
21
22use_xz      yes
23distname    webkitgtk-${version}
24
25checksums           sha1    57fa31c489e7fd5d405e0753e6e6f15933b143f3 \
26                    rmd160  8e63661e2ac9e91d24588ac5377967190623c44c \
27                    sha256  94bcb3303aadce8454b572ab0e5d178eca3b7238f34bd3e7177b0daec04e4605
28
29depends_lib \
30        path:lib/pkgconfig/glib-2.0.pc:glib2 \
31        port:bison \
32        port:flex \
33        port:enchant \
34        port:geoclue \
35        port:gobject-introspection \
36        port:harfbuzz-icu \
37        port:libxslt \
38        port:libpng \
39        port:libsecret \
40        port:libsoup \
41        port:mesa \
42        port:sqlite3 \
43        port:webp \
44        port:xorg-libXt
45
46depends_build   \
47        port:gtk-doc \
48        port:pkgconfig
49
50# case-insensitive.patch: https://bugs.webkit.org/show_bug.cgi?id=65811
51# our-icu.patch: No upstream bug report, probably not wanted
52# execinfo.patch: https://trac.macports.org/ticket/37882
53# quartz-webcore.patch: https://bugs.webkit.org/show_bug.cgi?id=126326
54# clang-check.patch: https://bugs.webkit.org/show_bug.cgi?id=126324
55
56patchfiles \
57        clang-assertions.patch \
58        case-insensitive.patch \
59        our-icu.patch \
60        execinfo.patch \
61        quartz-webcore.patch \
62        clang-check.patch \
63        no-WebCoreLayer.a.patch
64
65conflicts_build     google-test
66
67# https://trac.macports.org/ticket/36329
68configure.python    /usr/bin/python
69
70# --disable-webkit2: https://bugs.webkit.org/show_bug.cgi?id=126416
71configure.args  \
72        --disable-webkit2 \
73        --enable-introspection \
74        --disable-video \
75        --enable-svg \
76        --enable-geolocation \
77        --enable-webgl
78
79# TODO: Check ${configure.cxx_stdlib} directly once MacPorts 2.3 is released
80platform darwin {
81    pre-configure {
82        set cxxstdlib {}
83
84        if {[info exists configure.cxx_stdlib] &&
85            ${configure.cxx_stdlib} ne {} &&
86            [string match *clang* ${configure.cxx}]} {
87            set cxxstdlib ${configure.cxx_stdlib}
88        } elseif {[string match *clang* ${configure.cxx}] &&
89                  ${os.major} >= 13} {
90            set cxxstdlib libc++
91        } else {
92            set cxxstdlib libstdc++
93        }
94
95        if {${cxxstdlib} eq "libstdc++"} {
96            ui_error "${subport} is not supported for this installation of MacPorts.  It requires libc++ be selected as your C++ runtime.  Please use ${subport}-2.0 instead"
97            error "unsupported configuration"
98        }
99    }
100}
101
102subport webkit-gtk3 {
103    conflicts   webkit-gtk3-2.0
104    depends_lib-append      port:gtk3
105    configure.args-append   --with-gtk=3.0
106
107#
108# move gtk-docs to allow parallel install with webkit-gtk
109#
110    if {[variant_isset universal]} {
111#
112# using diff to merge derived include files sometimes
113# results in a corrupted file due to nested /* */ blocks
114#
115        global merger_dont_diff
116        set merger_dont_diff    "${prefix}/include/webkitgtk-3.0/webkitdom/WebKitDOMNavigator.h"
117        merger-post-destroot {
118            foreach arch ${universal_archs_to_use} {
119                set docpath ${workpath}/destroot-${arch}${prefix}/share/gtk-doc/html
120                move ${docpath}/webkitgtk ${docpath}/webkitgtk3
121                move ${docpath}/webkitgtk3/webkitgtk.devhelp2 ${docpath}/webkitgtk3/webkitgtk3.devhelp2
122            }
123        }
124    } else {
125        post-destroot {
126           set docpath ${destroot}${prefix}/share/gtk-doc/html
127           move ${docpath}/webkitgtk ${docpath}/webkitgtk3
128           move ${docpath}/webkitgtk3/webkitgtk.devhelp2 ${docpath}/webkitgtk3/webkitgtk3.devhelp2
129        }
130    }
131}
132
133if {${name} eq ${subport}} {
134    conflicts   webkit-gtk-2.0
135    depends_lib-append      port:gtk2
136    configure.args-append   --with-gtk=2.0
137}
138
139# https://bugs.webkit.org/show_bug.cgi?id=94488
140configure.universal_args-delete --disable-dependency-tracking
141
142# configure checks that we're clang 3.2, gcc 4.7, or better
143compiler.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
144compiler.blacklist-append macports-gcc-4.2 macports-gcc-4.3 macports-gcc-4.4 macports-gcc-4.5 macports-gcc-4.6
145compiler.blacklist-append {clang < 425} macports-clang-2.9 macports-clang-3.0 macports-clang-3.1
146
147# gobject-introspection uses g-ir-scanner, which uses $CC from env
148if {[variant_isset universal]} {
149    foreach arch ${configure.universal_archs} {
150        lappend merger_build_args(${arch})     CC='${configure.cc} -arch ${arch}'
151        lappend merger_destroot_args(${arch})  CC='${configure.cc} -arch ${arch}'
152    }
153} else {
154    build.args-append       CC="${configure.cc} ${configure.cc_archflags}"
155    destroot.args-append    CC="${configure.cc} ${configure.cc_archflags}"
156}
157
158# In 1.10.1:
159# Source/WebCore/platform/audio/gstreamer/FFTFrameGStreamer.cpp: In constructor 'WebCore::FFTFrame::FFTFrame(unsigned int)':
160# Source/WebCore/platform/audio/gstreamer/FFTFrameGStreamer.cpp:48: error: 'm_complexData' was not declared in this scope
161# Source/WebCore/platform/audio/gstreamer/FFTFrameGStreamer.cpp:48: error: 'GstFFTF32Complex' was not declared in this scope
162# Source/WebCore/platform/audio/gstreamer/FFTFrameGStreamer.cpp:48: error: no matching function for call to 'fastNewArray(size_t)'
163# Source/WebCore/platform/audio/gstreamer/FFTFrameGStreamer.cpp:50: error: 'gst_fft_next_fast_length' was not declared in this scope
164# Source/WebCore/platform/audio/gstreamer/FFTFrameGStreamer.cpp:51: error: 'm_fft' was not declared in this scope
165# Source/WebCore/platform/audio/gstreamer/FFTFrameGStreamer.cpp:51: error: 'FALSE' was not declared in this scope
166# Source/WebCore/platform/audio/gstreamer/FFTFrameGStreamer.cpp:51: error: 'gst_fft_f32_new' was not declared in this scope
167# Source/WebCore/platform/audio/gstreamer/FFTFrameGStreamer.cpp:52: error: 'm_inverseFft' was not declared in this scope
168# Source/WebCore/platform/audio/gstreamer/FFTFrameGStreamer.cpp:52: error: 'TRUE' was not declared in this scope
169#        --enable-web-audio \
170
171# We don't want to use the headers from the installed WebKit
172configure.cppflags-delete -I${prefix}/include
173
174# google-test suite build fix
175configure.cppflags-append -DGTEST_USE_OWN_TR1_TUPLE=1
176
177# https://trac.macports.org/ticket/41560#comment:2
178configure.cflags-append -ftemplate-depth=256
179configure.cxxflags-append -ftemplate-depth=256
180
181autoreconf.env-append ACLOCAL="aclocal -I Source/autotools"
182use_autoreconf  yes
183autoreconf.args -fvi
184
185lappend merger_dont_diff ${prefix}/include/webkitgtk-1.0/webkitdom/WebKitDOMNavigator.h
186
187post-patch {
188    # https://bugs.webkit.org/show_bug.cgi?id=88407
189    reinplace "s:echo -n:/bin/echo -n:g" \
190        ${worksrcpath}/Source/WebCore/GNUmakefile.am
191
192    # https://bugs.webkit.org/show_bug.cgi?id=99683
193    reinplace "s:PLATFORM(MAC):OS(DARWIN):g" \
194        ${worksrcpath}/Source/JavaScriptCore/heap/VTableSpectrum.cpp \
195        ${worksrcpath}/Source/JavaScriptCore/jit/ThunkGenerators.cpp \
196        ${worksrcpath}/Source/JavaScriptCore/tools/CodeProfile.cpp
197
198    # https://bugs.webkit.org/show_bug.cgi?id=58737
199    reinplace "s:OS(MAC_OS_X):PLATFORM(MAC):" \
200        ${worksrcpath}/Source/WTF/wtf/ThreadingPthreads.cpp
201
202    # https://bugs.webkit.org/show_bug.cgi?id=126325
203    reinplace "s:-stdlib=libstdc\+\+::" \
204        ${worksrcpath}/Source/autotools/SetupCompilerFlags.m4
205
206    # https://bugs.webkit.org/show_bug.cgi?id=126329
207    # In file included from Source/JavaScriptCore/runtime/JSGlobalObject.cpp:83:
208    # ./Source/JavaScriptCore/API/ObjCCallbackFunction.h:32:9: fatal error: 'JavaScriptCore/JSCallbackFunction.h' file not found
209    # #import <JavaScriptCore/JSCallbackFunction.h>
210    #         ^
211    reinplace "/^#define JSC_OBJC_API_ENABLED/s/^.*$/#define JSC_OBJC_API_ENABLED 0/" \
212        ${worksrcpath}/Source/JavaScriptCore/API/JSBase.h
213}
214
215# TODO: fix this for muniversal
216# keep it for debug
217#post-destroot {
218#    file copy ${worksrcpath}/Programs/.libs/GtkLauncher ${destroot}${prefix}/bin
219#}
220
221build.args-append V=1
222
223# see bug #24622
224variant quartz {
225    configure.args-append --with-target=quartz
226
227    # TODO: See if this will build with OpenGL.framework
228    configure.args-delete --enable-webgl
229    depends_lib-delete \
230        port:mesa \
231        port:xorg-libXt
232
233    # quartz-include-widgetbackingstorecairo.patch
234    # https://trac.macports.org/ticket/38203
235    # https://bugs.webkit.org/show_bug.cgi?id=111598
236    patchfiles-append quartz-duplicate-symbols.patch \
237                      quartz-include-widgetbackingstorecairo.patch
238}
239
240variant video description {Enable HTML5 video support using gstreamer} {
241        depends_lib-append      port:gstreamer1-gst-plugins-base
242        configure.args-delete   --disable-video
243        configure.args-append   --enable-video
244}
245
246default_variants +video
247
248if {[string match *clang* ${configure.cxx}]} {
249    configure.cxxflags-append -Wno-c++11-extensions
250}
251
252livecheck.type  regex
253livecheck.url   http://webkitgtk.org/?page=download
254livecheck.regex webkitgtk-(\[0-9\]+\\.\[0-9\]*\[02468\]\\.\[0-9\]+)
Note: See TracBrowser for help on using the repository browser.