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

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

webkit-gtk(3): update to version 2.4.6, depend on geoclue2 which will override geoclue if both are installed, update livecheck and restrict to 2.4 stable branch for now.

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