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

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

webkit-gtk: Bump to 2.0.1

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