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

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

webkit-gtk: Bump to 2.2.3

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