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

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

webkit-gtk: Blacklist older compilers (#38640)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 7.2 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 104778 2013-04-02 19:00:51Z 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           1
11version         2.0.0
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    dd216769fec6039b9471ca57fcef70b9e8603892 \
25                    rmd160  f718bf1d641ebeabdc7f3b306263382a70ed185c \
26                    sha256  454cdc4beffc2010f83661059178e33b6d9a07bcd60d09eabdf5d7cda17b88e4
27
28depends_lib     \
29        path:lib/pkgconfig/glib-2.0.pc:glib2 \
30        port:enchant \
31        port:geoclue \
32        port:gtk2 \
33        port:harfbuzz \
34        port:icu \
35        port:libxslt \
36        port:libpng \
37        port:libsecret \
38        port:libsoup \
39        port:mesa \
40        port:sqlite3 \
41        port:webp \
42        port:xorg-libXt
43
44depends_build   \
45        port:gtk-doc \
46        port:pkgconfig
47
48# case-insensitive.patch: https://bugs.webkit.org/show_bug.cgi?id=65811
49# our-icu.patch: No upstream bug report, probably not wanted
50# ruby-1.8.patch: http://trac.macports.org/ticket/37740
51# ListableHandler.patch: https://trac.macports.org/ticket/37828
52# execinfo.patch: https://trac.macports.org/ticket/37882
53# ppc.patch: https://bugs.webkit.org/show_bug.cgi?id=96005
54# tiger.patch: No upstream bug, http://trac.macports.org/ticket/35923
55
56patchfiles \
57        clang-assertions.patch \
58        case-insensitive.patch \
59        our-icu.patch \
60        execinfo.patch \
61        ruby-1.8.patch \
62        ListableHandler.patch \
63        ppc.patch \
64        tiger.patch
65
66conflicts_build     google-test
67
68# https://trac.macports.org/ticket/36329
69configure.python    /usr/bin/python
70
71configure.args  \
72        --with-gtk=2.0 \
73        --disable-webkit2 \
74        --disable-introspection \
75        --disable-video \
76        --enable-svg \
77        --enable-geolocation \
78        --enable-media-stream \
79        --enable-webgl
80
81# https://bugs.webkit.org/show_bug.cgi?id=94488
82configure.universal_args-delete --disable-dependency-tracking
83
84# In 1.10.1:
85# Source/WebCore/platform/audio/gstreamer/FFTFrameGStreamer.cpp: In constructor 'WebCore::FFTFrame::FFTFrame(unsigned int)':
86# Source/WebCore/platform/audio/gstreamer/FFTFrameGStreamer.cpp:48: error: 'm_complexData' was not declared in this scope
87# Source/WebCore/platform/audio/gstreamer/FFTFrameGStreamer.cpp:48: error: 'GstFFTF32Complex' was not declared in this scope
88# Source/WebCore/platform/audio/gstreamer/FFTFrameGStreamer.cpp:48: error: no matching function for call to 'fastNewArray(size_t)'
89# Source/WebCore/platform/audio/gstreamer/FFTFrameGStreamer.cpp:50: error: 'gst_fft_next_fast_length' was not declared in this scope
90# Source/WebCore/platform/audio/gstreamer/FFTFrameGStreamer.cpp:51: error: 'm_fft' was not declared in this scope
91# Source/WebCore/platform/audio/gstreamer/FFTFrameGStreamer.cpp:51: error: 'FALSE' was not declared in this scope
92# Source/WebCore/platform/audio/gstreamer/FFTFrameGStreamer.cpp:51: error: 'gst_fft_f32_new' was not declared in this scope
93# Source/WebCore/platform/audio/gstreamer/FFTFrameGStreamer.cpp:52: error: 'm_inverseFft' was not declared in this scope
94# Source/WebCore/platform/audio/gstreamer/FFTFrameGStreamer.cpp:52: error: 'TRUE' was not declared in this scope
95#        --enable-web-audio \
96
97# We don't want to use the headers from the installed WebKit
98configure.cppflags-delete -I${prefix}/include
99
100# google-test suite build fix
101configure.cppflags-append -DGTEST_USE_OWN_TR1_TUPLE=1
102
103autoreconf.env-append ACLOCAL="aclocal -I Source/autotools"
104use_autoreconf  yes
105autoreconf.args -fvi
106
107# configure checks that we're clang 3.0, gcc 4.7, or better
108compiler.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
109compiler.blacklist-append macports-gcc-4.2 macports-gcc-4.3 macports-gcc-4.4 macports-gcc-4.5 macports-gcc-4.6
110compiler.blacklist-append {clang < 300} macports-clang-2.9
111
112if {[string match *clang* ${configure.compiler}]} {
113    configure.cxxflags-append -Wno-c++11-extensions
114}
115
116post-patch {
117    # https://bugs.webkit.org/show_bug.cgi?id=88407
118    reinplace "s:echo -n:/bin/echo -n:g" \
119        ${worksrcpath}/Source/WebCore/GNUmakefile.am
120
121    # https://bugs.webkit.org/show_bug.cgi?id=99679
122    # https://bugs.webkit.org/show_bug.cgi?id=99683
123    reinplace "s:PLATFORM(MAC):OS(DARWIN):g" \
124        ${worksrcpath}/Source/WTF/wtf/InlineASM.h \
125        ${worksrcpath}/Source/JavaScriptCore/heap/VTableSpectrum.cpp \
126        ${worksrcpath}/Source/JavaScriptCore/jit/ThunkGenerators.cpp \
127        ${worksrcpath}/Source/JavaScriptCore/tools/CodeProfile.cpp
128
129    # https://bugs.webkit.org/show_bug.cgi?id=58737
130    reinplace "s:OS(MAC_OS_X):PLATFORM(MAC):" \
131        ${worksrcpath}/Source/WTF/wtf/ThreadingPthreads.cpp
132}
133
134# TODO: fix this for muniversal
135# keep it for debug
136#post-destroot {
137#    file copy ${worksrcpath}/Programs/.libs/GtkLauncher ${destroot}${prefix}/bin
138#}
139
140build.args-append V=1
141
142# see bug #24622
143variant quartz {
144    configure.args-append --with-target=quartz
145
146    # TODO: See if this will build with OpenGL.framework
147    configure.args-delete --enable-webgl
148    depends_lib-delete \
149        port:mesa \
150        port:xorg-libXt
151
152    # quartz-include-widgetbackingstorecairo.patch
153    # https://trac.macports.org/ticket/38203
154    # https://bugs.webkit.org/show_bug.cgi?id=111598
155    patchfiles-append quartz-duplicate-symbols.patch \ 
156                      quartz-include-widgetbackingstorecairo.patch
157}
158
159variant video description {Enable HTML5 video support using gstreamer} {
160        depends_lib-append      port:gstreamer1-gst-plugins-base
161        configure.args-delete   --disable-video
162        configure.args-append   --enable-video
163}
164
165default_variants +video
166
167platform darwin {
168    if {${os.major} < 10} {
169        depends_build-append      port:python27
170        # https://trac.macports.org/ticket/35793
171        configure.python          ${prefix}/bin/python2.7
172    }
173
174    if {[string match "*10.5*" ${configure.sdkroot}] || 
175        (${os.major} == 9 && ${configure.sdkroot} == "")} {
176
177        # https://trac.macports.org/ticket/37418
178        configure.cppflags-append -D__MAC_OS_X_VERSION_MAX_ALLOWED=1050
179    }
180
181    if {[string match "*10.4*" ${configure.sdkroot}] || 
182        (${os.major} == 8 && ${configure.sdkroot} == "")} {
183
184        # https://trac.macports.org/ticket/37828
185        configure.cppflags-append -D__MAC_OS_X_VERSION_MAX_ALLOWED=1040
186    }
187
188    if {$macosx_deployment_target == "10.4" ||
189        (${os.major} == 8 && $macosx_deployment_target == "")} {
190
191        # https://trac.macports.org/ticket/37828
192        configure.cppflags-append -D__MAC_OS_X_VERSION_MIN_REQUIRED=1040
193    }
194}
195
196platform powerpc {
197    # https://trac.macports.org/ticket/37839
198    configure.optflags -Os
199}
200
201livecheck.type  regex
202livecheck.url   http://webkitgtk.org/?page=download
203livecheck.regex webkitgtk-(\[0-9\]+\\.\[0-9\]*\[02468\]\\.\[0-9\]+)
Note: See TracBrowser for help on using the repository browser.