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

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

webkit-gtk, webkit-gtk-devel: increment revision and rebuild to remove references to libicu*.51.dylib.

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