source: trunk/dports/www/webkit-gtk-2.0/Portfile @ 125959

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

webkit-gtk-2.0: Workaround #43987 for now

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 9.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 122055 2014-07-13 20:27:09Z 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-2.0
10version     2.0.4
11revision    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
24dist_subdir webkit-gtk
25
26checksums           sha1    3b9ddbdc61e38b5c8fdd108e891b7db5fb12d55a \
27                    rmd160  19643cac3f53928757a7c3fe8ea33f144a581456 \
28                    sha256  bd1550b7f6e1a55f803efe7d64438163ff6c04f02186002cb81d0c090aac734f
29
30depends_lib \
31        path:lib/pkgconfig/glib-2.0.pc:glib2 \
32        port:bison \
33        port:flex \
34        port:enchant \
35        port:geoclue \
36        port:gobject-introspection \
37        port:harfbuzz-icu \
38        port:libxslt \
39        port:libpng \
40        port:libsecret \
41        port:libsoup \
42        port:mesa \
43        port:sqlite3 \
44        port:webp \
45        port:xorg-libXt
46
47depends_build   \
48        port:gtk-doc \
49        port:pkgconfig
50
51# case-insensitive.patch: https://bugs.webkit.org/show_bug.cgi?id=65811
52# our-icu.patch: No upstream bug report, probably not wanted
53# ruby-1.8.patch: https://bugs.webkit.org/show_bug.cgi?id=126327
54# ListableHandler.patch: https://trac.macports.org/ticket/37828
55# execinfo.patch: https://trac.macports.org/ticket/37882
56# ppc.patch: https://bugs.webkit.org/show_bug.cgi?id=96005
57# tiger.patch: No upstream bug, http://trac.macports.org/ticket/35923
58# quartz-webcore.patch: https://bugs.webkit.org/show_bug.cgi?id=126326
59
60patchfiles \
61        clang-assertions.patch \
62        case-insensitive.patch \
63        our-icu.patch \
64        execinfo.patch \
65        ruby-1.8.patch \
66        ListableHandler.patch \
67        ppc.patch \
68        tiger.patch \
69        quartz-webcore.patch \
70        patch-freetype-includes.diff
71
72conflicts_build     google-test
73
74# https://trac.macports.org/ticket/36329
75configure.python    /usr/bin/python
76
77configure.args  \
78        --disable-webkit2 \
79        --enable-introspection \
80        --disable-video \
81        --enable-svg \
82        --enable-geolocation \
83        --enable-webgl
84
85platform darwin {
86    pre-configure {
87        if {${configure.cxx_stdlib} eq "libc++"} {
88            ui_error "${name} is provided for configurations that are unable to use webkit-gtk.  Since you are on Mavericks or later (or have configured MacPorts to use libc++), please use webkit-gtk or webkit-gtk-devel instead."
89            error "unsupported configuration"
90        }
91    }
92}
93
94subport webkit-gtk3-2.0 {
95    conflicts   webkit-gtk3 webkit-gtk3-devel
96
97    depends_lib-append      port:gtk3
98    configure.args-append   --with-gtk=3.0
99
100#
101# move gtk-docs to allow parallel install with webkit-gtk
102#
103    if {[variant_isset universal]} {
104#
105# using diff to merge derived include files sometimes
106# results in a corrupted file due to nested /* */ blocks
107#
108        global merger_dont_diff
109        set merger_dont_diff    "${prefix}/include/webkitgtk-3.0/webkitdom/WebKitDOMNavigator.h"
110        merger-post-destroot {
111            foreach arch ${universal_archs_to_use} {
112                set docpath ${workpath}/destroot-${arch}${prefix}/share/gtk-doc/html
113                move ${docpath}/webkitgtk ${docpath}/webkitgtk3
114                move ${docpath}/webkitgtk3/webkitgtk.devhelp2 ${docpath}/webkitgtk3/webkitgtk3.devhelp2
115            }
116        }
117    } else {
118        post-destroot {
119           set docpath ${destroot}${prefix}/share/gtk-doc/html
120           move ${docpath}/webkitgtk ${docpath}/webkitgtk3
121           move ${docpath}/webkitgtk3/webkitgtk.devhelp2 ${docpath}/webkitgtk3/webkitgtk3.devhelp2
122        }
123    }
124}
125
126if {${name} eq ${subport}} {
127    conflicts   webkit-gtk webkit-gtk-devel
128
129    depends_lib-append      port:gtk2
130    configure.args-append   --with-gtk=2.0
131}
132
133# https://bugs.webkit.org/show_bug.cgi?id=94488
134configure.universal_args-delete --disable-dependency-tracking
135
136# configure checks that we're clang 3.0, gcc 4.7, or better
137compiler.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
138compiler.blacklist-append macports-gcc-4.2 macports-gcc-4.3 macports-gcc-4.4 macports-gcc-4.5 macports-gcc-4.6
139compiler.blacklist-append {clang < 300} macports-clang-2.9
140
141# error: no template named 'allocateCell'; did you mean 'validateCell' (https://trac.macports.org/ticket/43987)
142compiler.blacklist-append macports-clang-3.4 macports-clang-3.5 {clang > 503}
143
144# gobject-introspection uses g-ir-scanner, which uses $CC from env
145if {[variant_isset universal]} {
146    foreach arch ${configure.universal_archs} {
147        lappend merger_build_args(${arch})     CC='${configure.cc} -arch ${arch}'
148        lappend merger_destroot_args(${arch})  CC='${configure.cc} -arch ${arch}'
149    }
150} else {
151    build.args-append       CC="${configure.cc} ${configure.cc_archflags}"
152    destroot.args-append    CC="${configure.cc} ${configure.cc_archflags}"
153}
154
155# In 1.10.1:
156# Source/WebCore/platform/audio/gstreamer/FFTFrameGStreamer.cpp: In constructor 'WebCore::FFTFrame::FFTFrame(unsigned int)':
157# Source/WebCore/platform/audio/gstreamer/FFTFrameGStreamer.cpp:48: error: 'm_complexData' was not declared in this scope
158# Source/WebCore/platform/audio/gstreamer/FFTFrameGStreamer.cpp:48: error: 'GstFFTF32Complex' was not declared in this scope
159# Source/WebCore/platform/audio/gstreamer/FFTFrameGStreamer.cpp:48: error: no matching function for call to 'fastNewArray(size_t)'
160# Source/WebCore/platform/audio/gstreamer/FFTFrameGStreamer.cpp:50: error: 'gst_fft_next_fast_length' was not declared in this scope
161# Source/WebCore/platform/audio/gstreamer/FFTFrameGStreamer.cpp:51: error: 'm_fft' was not declared in this scope
162# Source/WebCore/platform/audio/gstreamer/FFTFrameGStreamer.cpp:51: error: 'FALSE' was not declared in this scope
163# Source/WebCore/platform/audio/gstreamer/FFTFrameGStreamer.cpp:51: error: 'gst_fft_f32_new' was not declared in this scope
164# Source/WebCore/platform/audio/gstreamer/FFTFrameGStreamer.cpp:52: error: 'm_inverseFft' was not declared in this scope
165# Source/WebCore/platform/audio/gstreamer/FFTFrameGStreamer.cpp:52: error: 'TRUE' was not declared in this scope
166#        --enable-web-audio \
167
168# We don't want to use the headers from the installed WebKit
169configure.cppflags-delete -I${prefix}/include
170
171# google-test suite build fix
172configure.cppflags-append -DGTEST_USE_OWN_TR1_TUPLE=1
173
174autoreconf.env-append ACLOCAL="aclocal -I Source/autotools"
175use_autoreconf  yes
176autoreconf.args -fvi
177
178lappend merger_dont_diff ${prefix}/include/webkitgtk-1.0/webkitdom/WebKitDOMNavigator.h
179
180post-patch {
181    # https://bugs.webkit.org/show_bug.cgi?id=88407
182    reinplace "s:echo -n:/bin/echo -n:g" \
183        ${worksrcpath}/Source/WebCore/GNUmakefile.am
184
185    # https://bugs.webkit.org/show_bug.cgi?id=99683
186    reinplace "s:PLATFORM(MAC):OS(DARWIN):g" \
187        ${worksrcpath}/Source/JavaScriptCore/heap/VTableSpectrum.cpp \
188        ${worksrcpath}/Source/JavaScriptCore/jit/ThunkGenerators.cpp \
189        ${worksrcpath}/Source/JavaScriptCore/tools/CodeProfile.cpp
190
191    # https://bugs.webkit.org/show_bug.cgi?id=58737
192    reinplace "s:OS(MAC_OS_X):PLATFORM(MAC):" \
193        ${worksrcpath}/Source/WTF/wtf/ThreadingPthreads.cpp
194}
195
196# TODO: fix this for muniversal
197# keep it for debug
198#post-destroot {
199#    file copy ${worksrcpath}/Programs/.libs/GtkLauncher ${destroot}${prefix}/bin
200#}
201
202build.args-append V=1
203
204# see bug #24622
205variant quartz {
206    configure.args-append --with-target=quartz
207
208    # TODO: See if this will build with OpenGL.framework
209    configure.args-delete --enable-webgl
210    depends_lib-delete \
211        port:mesa \
212        port:xorg-libXt
213
214    # quartz-include-widgetbackingstorecairo.patch
215    # https://trac.macports.org/ticket/38203
216    # https://bugs.webkit.org/show_bug.cgi?id=111598
217    patchfiles-append quartz-duplicate-symbols.patch \
218                      quartz-include-widgetbackingstorecairo.patch
219}
220
221variant video description {Enable HTML5 video support using gstreamer} {
222        depends_lib-append      port:gstreamer1-gst-plugins-base
223        configure.args-delete   --disable-video
224        configure.args-append   --enable-video
225}
226
227default_variants +video
228
229platform darwin {
230    if {${os.major} < 10} {
231        depends_build-append      port:python27
232        # https://trac.macports.org/ticket/35793
233        configure.python          ${prefix}/bin/python2.7
234
235        # https://trac.macports.org/ticket/38682
236        configure.optflags-append -fno-blocks
237    }
238
239    if {[string match "*10.5*" ${configure.sdkroot}] ||
240        (${os.major} == 9 && ${configure.sdkroot} eq "")} {
241
242        # https://trac.macports.org/ticket/37418
243        configure.cppflags-append -D__MAC_OS_X_VERSION_MAX_ALLOWED=1050
244    }
245
246    if {[string match "*10.4*" ${configure.sdkroot}] ||
247        (${os.major} == 8 && ${configure.sdkroot} eq "")} {
248
249        # https://trac.macports.org/ticket/37828
250        configure.cppflags-append -D__MAC_OS_X_VERSION_MAX_ALLOWED=1040
251    }
252
253    if {$macosx_deployment_target eq "10.4" ||
254        (${os.major} == 8 && $macosx_deployment_target eq "")} {
255
256        # https://trac.macports.org/ticket/37828
257        configure.cppflags-append -D__MAC_OS_X_VERSION_MIN_REQUIRED=1040
258    }
259}
260
261platform powerpc {
262    # https://trac.macports.org/ticket/37839
263    configure.optflags-replace -O2 -Os
264}
265
266if {[string match *clang* ${configure.compiler}]} {
267    configure.cxxflags-append -Wno-c++11-extensions
268}
269
270livecheck.type  none
Note: See TracBrowser for help on using the repository browser.