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

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

webkit-gtk: Fix Leopard/ppc build (#37839)

  • 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 102318 2013-01-31 08:45:23Z jeremyhu@macports.org $
3
4PortSystem      1.0
5PortGroup       conflicts_build 1.0
6PortGroup       muniversal 1.0
7
8name            webkit-gtk
9epoch           1
10version         1.10.2
11description     Apple's WebKit HTML rendering library for GTK+
12long_description ${description}
13maintainers     jeremyhu devans
14categories      www gnome
15platforms       darwin freebsd
16license         LGPL-2+ BSD
17homepage        http://webkitgtk.org/
18master_sites    http://webkitgtk.org/releases/
19
20use_xz          yes
21distname        webkitgtk-${version}
22
23checksums       sha1    733ca23157eb8dd072d57becf325799c00bde630 \
24                rmd160  91e6b8bcd4bb8234271dd6c6ebdba63dd1c0840e \
25                sha256  19234f8e4edfaefe91ed06471a2aa8c71d26dd55d33787eede1dcfc9a3a96d9c
26
27depends_lib     \
28        port:gtk2 \
29        port:libsoup \
30        port:icu \
31        port:libxslt \
32        port:libpng \
33        port:sqlite3 \
34        port:enchant \
35        port:xorg-libXt \
36        port:geoclue \
37        port:mesa
38       
39depends_build   \
40        port:pkgconfig \
41        port:gtk-doc
42
43# case-insensitive.patch: https://bugs.webkit.org/show_bug.cgi?id=65811
44# our-icu.patch: No upstream bug report, probably not wanted
45# xrender-check.patch: https://bugs.webkit.org/show_bug.cgi?id=84095
46# bison-2.6.patch: No upstream bug (?)
47# optflags.patch: https://trac.macports.org/ticket/37839
48# ppc.patch: https://bugs.webkit.org/show_bug.cgi?id=96005
49# tiger.patch: No upstream bug, http://trac.macports.org/ticket/35923
50
51#        bison-2.6.patch \
52
53patchfiles \
54        case-insensitive.patch \
55        our-icu.patch \
56        xrender-check.patch \
57        ruby-1.8.patch \
58        optflags.patch \
59        ppc.patch \
60        tiger.patch
61
62conflicts_build     google-test
63
64# https://trac.macports.org/ticket/36329
65configure.python    /usr/bin/python
66
67configure.args  \
68        --with-gtk=2.0 \
69        --disable-webkit2 \
70        --disable-introspection \
71        --enable-link-prefetch \
72        --enable-image-resizer \
73        --disable-video \
74        --enable-media-statistics \
75        --enable-media-stream \
76        --enable-svg \
77        --enable-geolocation \
78        --enable-webgl \
79        --enable-page-visibility-api \
80        --enable-datagrid \
81        --enable-mathml \
82        --enable-web-timing \
83        --enable-mhtml \
84        --enable-microdata \
85        --enable-mutation-observers
86
87# https://bugs.webkit.org/show_bug.cgi?id=94488
88configure.universal_args-delete --disable-dependency-tracking
89
90# Not enabled because marked as expirimental
91#        --with-accelerated-compositing \
92#        --enable-animation-api \
93#        --enable-register-protocol-handler \
94
95# In 1.10.1:
96# https://bugs.webkit.org/show_bug.cgi?id=99732
97configure.args-append --disable-jit
98
99# In 1.8.2:
100# ./Source/WebCore/workers/WorkerContext.h:225: error: 'IDBFactoryBackendInterface' was not declared in this scope
101# https://bugs.webkit.org/show_bug.cgi?id=94495
102#        --enable-indexed-database \
103
104# In 1.8.2:
105# Source/WebCore/platform/gtk/ClipboardGtk.h:46: error: cannot allocate an object of abstract type 'WebCore::ClipboardGtk'
106# https://bugs.webkit.org/show_bug.cgi?id=94496
107#        --enable-data-transfer-items \
108
109# In 1.8.2:
110# AsyncFileSystemCallbacks.h is missing
111# https://bugs.webkit.org/show_bug.cgi?id=94413
112#        --enable-file-system \
113
114# In 1.8.2:
115# Source/WebKit/gtk/webkit/webkitwebview.cpp: In function 'void webkit_web_view_init(WebKitWebView*)':
116# Source/WebKit/gtk/webkit/webkitwebview.cpp:3422: error: cannot allocate an object of abstract type 'WebKit::ChromeClient'
117# ./Source/WebKit/gtk/WebCoreSupport/ChromeClientGtk.h:43: note:   because the following virtual functions are pure within 'WebKit::ChromeClient':
118# ./Source/WebCore/page/ChromeClient.h:232: note:       virtual void WebCore::ChromeClient::enumerateChosenDirectory(WebCore::FileChooser*)
119# https://bugs.webkit.org/show_bug.cgi?id=94497
120#        --enable-directory-upload \
121
122# In 1.8.2:
123# ./DerivedSources/webkit/WebKitDOMHTMLMediaElement.h:101: error: 'WebKitDOMUint8Array' has not been declared
124#        --enable-media-source \
125
126# In 1.8.2:
127# ./DerivedSources/webkit/WebKitDOMDOMWindow.h:843: error: expected constructor, destructor, or type conversion before '*' token
128# https://bugs.webkit.org/show_bug.cgi?id=94498
129# https://bugs.webkit.org/show_bug.cgi?id=66477
130#        --enable-notifications \
131
132# In 1.10.1:
133# Source/WebCore/platform/audio/gstreamer/FFTFrameGStreamer.cpp: In constructor 'WebCore::FFTFrame::FFTFrame(unsigned int)':
134# Source/WebCore/platform/audio/gstreamer/FFTFrameGStreamer.cpp:48: error: 'm_complexData' was not declared in this scope
135# Source/WebCore/platform/audio/gstreamer/FFTFrameGStreamer.cpp:48: error: 'GstFFTF32Complex' was not declared in this scope
136# Source/WebCore/platform/audio/gstreamer/FFTFrameGStreamer.cpp:48: error: no matching function for call to 'fastNewArray(size_t)'
137# Source/WebCore/platform/audio/gstreamer/FFTFrameGStreamer.cpp:50: error: 'gst_fft_next_fast_length' was not declared in this scope
138# Source/WebCore/platform/audio/gstreamer/FFTFrameGStreamer.cpp:51: error: 'm_fft' was not declared in this scope
139# Source/WebCore/platform/audio/gstreamer/FFTFrameGStreamer.cpp:51: error: 'FALSE' was not declared in this scope
140# Source/WebCore/platform/audio/gstreamer/FFTFrameGStreamer.cpp:51: error: 'gst_fft_f32_new' was not declared in this scope
141# Source/WebCore/platform/audio/gstreamer/FFTFrameGStreamer.cpp:52: error: 'm_inverseFft' was not declared in this scope
142# Source/WebCore/platform/audio/gstreamer/FFTFrameGStreamer.cpp:52: error: 'TRUE' was not declared in this scope
143#        --enable-web-audio \
144
145# In 1.8.2:
146# Source/WebCore/html/ColorInputType.cpp: In member function 'virtual void WebCore::ColorInputType::createShadowSubtree()':
147# Source/WebCore/html/ColorInputType.cpp:119: error: 'class WebCore::HTMLInputElement' has no member named 'shadowRoot'
148# Source/WebCore/html/ColorInputType.cpp: In member function 'WebCore::HTMLElement* WebCore::ColorInputType::shadowColorSwatch() const':
149# Source/WebCore/html/ColorInputType.cpp:188: error: 'class WebCore::HTMLInputElement' has no member named 'shadowRoot'
150# https://bugs.webkit.org/show_bug.cgi?id=94499
151#        --enable-input-color \
152
153pre-configure {
154    # https://bugs.webkit.org/show_bug.cgi?id=106170
155    configure.cppflags-append -I${prefix}/include/pango-1.0
156}
157
158# We don't want to use the headers from the installed WebKit
159configure.cppflags-delete -I${prefix}/include
160
161autoreconf.env-append ACLOCAL="aclocal -I Source/autotools"
162use_autoreconf  yes
163autoreconf.args -fvi
164
165# https://trac.macports.org/ticket/34044
166if {[vercmp ${xcodeversion} 3.0] >= 0} {
167    compiler.blacklist-append gcc-4.0
168}
169
170# BUILD FIX TODO: clang C++
171#
172# 1.10.1:
173# HTMLPropertiesCollection.h:52:42: error: 'namedItem' marked 'override' but does not override any member functions
174# https://bugs.webkit.org/show_bug.cgi?id=100618
175compiler.blacklist-append clang
176
177#if {[string match "*clang*" ${configure.compiler}]} {
178#    configure.cxxflags-append -std=c++11 -Wno-error=c++11-narrowing
179#}
180
181post-patch {
182    # https://bugs.webkit.org/show_bug.cgi?id=88407
183    reinplace "s:echo -n:/bin/echo -n:g" \
184        ${worksrcpath}/Source/WebCore/GNUmakefile.am
185
186    # https://bugs.webkit.org/show_bug.cgi?id=99679
187    # https://bugs.webkit.org/show_bug.cgi?id=99683
188    reinplace "s:PLATFORM(MAC):OS(DARWIN):g" \
189        ${worksrcpath}/Source/WTF/wtf/InlineASM.h \
190        ${worksrcpath}/Source/JavaScriptCore/heap/VTableSpectrum.cpp \
191        ${worksrcpath}/Source/JavaScriptCore/jit/ThunkGenerators.cpp \
192        ${worksrcpath}/Source/JavaScriptCore/tools/CodeProfile.cpp
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
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
205build.args-append V=1
206
207# see bug #24622
208variant quartz {
209    configure.args-append --with-target=quartz
210
211    # TODO: See if this will build with OpenGL.framework
212    configure.args-delete --enable-webgl
213    depends_lib-delete \
214        port:mesa \
215        port:xorg-libXt
216
217    patchfiles-append quartz-duplicate-symbols.patch
218}
219
220variant pango description {Use the pango font backend instead of freetype} {
221    configure.args-append --with-font-backend=pango
222}
223
224variant video description {Enable HTML5 video support using gstreamer} {
225        depends_lib-append      port:gst-plugins-base
226        configure.args-delete   --disable-video
227        configure.args-append   --enable-video-track
228}
229
230variant gnome_keyring description {Enable support for gnomekeyring} {
231        depends_lib-append      port:libgnome-keyring
232        configure.args-append   --enable-gnomekeyring
233}
234
235default_variants +video
236
237platform darwin {
238    if {${os.major} < 10} {
239        depends_build-append      port:python27
240        # https://trac.macports.org/ticket/35793
241        configure.python          ${prefix}/bin/python2.7
242    }
243
244    if {[string match "*10.5*" ${configure.sdkroot}] || 
245        (${os.major} == 9 && ${configure.sdkroot} == "")} {
246
247        # https://trac.macports.org/ticket/37418
248        configure.cppflags-append -D__MAC_OS_X_VERSION_MAX_ALLOWED=1050
249    }
250
251    if {$macosx_deployment_target == "10.4" ||
252        (${os.major} == 8 && $macosx_deployment_target == "")} {
253
254        # https://trac.macports.org/ticket/37828
255        configure.cppflags-append -D__MAC_OS_X_VERSION_MIN_REQUIRED=1040
256    }
257}
258
259platform powerpc {
260    # https://trac.macports.org/ticket/37839
261    configure.optflags -Os
262}
263
264livecheck.type  regex
265livecheck.url   http://webkitgtk.org/?page=download
266livecheck.regex webkitgtk-(\[0-9\]+\\.\[0-9\]*\[02468\]\\.\[0-9\]+)
Note: See TracBrowser for help on using the repository browser.