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

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

webkit-gtk: update to version 2.0.2.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 8.3 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 106148 2013-05-16 20:00:28Z devans@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       2
11version     2.0.2
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    1e977150db1ac10df6f791be178f20e5cbf95a39 \
25            rmd160  0f02d658f8ca6648053718265f7da58aa3c16a7d \
26            sha256  c3685032545eb4c23f3f56826817783a6963ad59bd7bbf806705059b3d8caeb2
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        lappend merger_destroot_args(${arch})  CC='${configure.cc} -arch ${arch}'
90    }
91} else {
92    build.args-append       CC="${configure.cc} ${configure.cc_archflags}"
93    destroot.args-append    CC="${configure.cc} ${configure.cc_archflags}"
94}
95
96# In 1.10.1:
97# Source/WebCore/platform/audio/gstreamer/FFTFrameGStreamer.cpp: In constructor 'WebCore::FFTFrame::FFTFrame(unsigned int)':
98# Source/WebCore/platform/audio/gstreamer/FFTFrameGStreamer.cpp:48: error: 'm_complexData' was not declared in this scope
99# Source/WebCore/platform/audio/gstreamer/FFTFrameGStreamer.cpp:48: error: 'GstFFTF32Complex' was not declared in this scope
100# Source/WebCore/platform/audio/gstreamer/FFTFrameGStreamer.cpp:48: error: no matching function for call to 'fastNewArray(size_t)'
101# Source/WebCore/platform/audio/gstreamer/FFTFrameGStreamer.cpp:50: error: 'gst_fft_next_fast_length' was not declared in this scope
102# Source/WebCore/platform/audio/gstreamer/FFTFrameGStreamer.cpp:51: error: 'm_fft' was not declared in this scope
103# Source/WebCore/platform/audio/gstreamer/FFTFrameGStreamer.cpp:51: error: 'FALSE' was not declared in this scope
104# Source/WebCore/platform/audio/gstreamer/FFTFrameGStreamer.cpp:51: error: 'gst_fft_f32_new' was not declared in this scope
105# Source/WebCore/platform/audio/gstreamer/FFTFrameGStreamer.cpp:52: error: 'm_inverseFft' was not declared in this scope
106# Source/WebCore/platform/audio/gstreamer/FFTFrameGStreamer.cpp:52: error: 'TRUE' was not declared in this scope
107#        --enable-web-audio \
108
109# We don't want to use the headers from the installed WebKit
110configure.cppflags-delete -I${prefix}/include
111
112# google-test suite build fix
113configure.cppflags-append -DGTEST_USE_OWN_TR1_TUPLE=1
114
115autoreconf.env-append ACLOCAL="aclocal -I Source/autotools"
116use_autoreconf  yes
117autoreconf.args -fvi
118
119# configure checks that we're clang 3.0, gcc 4.7, or better
120compiler.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
121compiler.blacklist-append macports-gcc-4.2 macports-gcc-4.3 macports-gcc-4.4 macports-gcc-4.5 macports-gcc-4.6
122compiler.blacklist-append {clang < 300} macports-clang-2.9
123
124# TODO: Remove this block once 2.2 is released
125compiler.fallback-append macports-clang-3.2
126if {[info exists portconfigure::compiler_name_map(${configure.compiler})]} {
127    depends_build-append port:$portconfigure::compiler_name_map(${configure.compiler})
128
129    # base 2.1.x ignores the argument and just use ${configure.compiler}
130    if {[portconfigure::arch_flag_supported ${configure.compiler}]} {
131        depends_skip_archcheck-append $portconfigure::compiler_name_map(${configure.compiler})
132    }
133
134    if {[string match macports-gcc* ${configure.compiler}]} {
135        depends_lib-append port:$portconfigure::compiler_name_map(${configure.compiler})
136    }
137}
138
139if {[string match *clang* ${configure.compiler}]} {
140    configure.cxxflags-append -Wno-c++11-extensions
141}
142
143lappend merger_dont_diff ${prefix}/include/webkitgtk-1.0/webkitdom/WebKitDOMNavigator.h
144
145post-patch {
146    # https://bugs.webkit.org/show_bug.cgi?id=88407
147    reinplace "s:echo -n:/bin/echo -n:g" \
148        ${worksrcpath}/Source/WebCore/GNUmakefile.am
149
150    # https://bugs.webkit.org/show_bug.cgi?id=99683
151    reinplace "s:PLATFORM(MAC):OS(DARWIN):g" \
152        ${worksrcpath}/Source/JavaScriptCore/heap/VTableSpectrum.cpp \
153        ${worksrcpath}/Source/JavaScriptCore/jit/ThunkGenerators.cpp \
154        ${worksrcpath}/Source/JavaScriptCore/tools/CodeProfile.cpp
155
156    # https://bugs.webkit.org/show_bug.cgi?id=58737
157    reinplace "s:OS(MAC_OS_X):PLATFORM(MAC):" \
158        ${worksrcpath}/Source/WTF/wtf/ThreadingPthreads.cpp
159}
160
161# TODO: fix this for muniversal
162# keep it for debug
163#post-destroot {
164#    file copy ${worksrcpath}/Programs/.libs/GtkLauncher ${destroot}${prefix}/bin
165#}
166
167build.args-append V=1
168
169# see bug #24622
170variant quartz {
171    configure.args-append --with-target=quartz
172
173    # TODO: See if this will build with OpenGL.framework
174    configure.args-delete --enable-webgl
175    depends_lib-delete \
176        port:mesa \
177        port:xorg-libXt
178
179    # quartz-include-widgetbackingstorecairo.patch
180    # https://trac.macports.org/ticket/38203
181    # https://bugs.webkit.org/show_bug.cgi?id=111598
182    patchfiles-append quartz-duplicate-symbols.patch \
183                      quartz-include-widgetbackingstorecairo.patch
184}
185
186variant video description {Enable HTML5 video support using gstreamer} {
187        depends_lib-append      port:gstreamer1-gst-plugins-base
188        configure.args-delete   --disable-video
189        configure.args-append   --enable-video
190}
191
192default_variants +video
193
194platform darwin {
195    if {${os.major} < 10} {
196        depends_build-append      port:python27
197        # https://trac.macports.org/ticket/35793
198        configure.python          ${prefix}/bin/python2.7
199    }
200
201    if {[string match "*10.5*" ${configure.sdkroot}] ||
202        (${os.major} == 9 && ${configure.sdkroot} == "")} {
203
204        # https://trac.macports.org/ticket/37418
205        configure.cppflags-append -D__MAC_OS_X_VERSION_MAX_ALLOWED=1050
206    }
207
208    if {[string match "*10.4*" ${configure.sdkroot}] ||
209        (${os.major} == 8 && ${configure.sdkroot} == "")} {
210
211        # https://trac.macports.org/ticket/37828
212        configure.cppflags-append -D__MAC_OS_X_VERSION_MAX_ALLOWED=1040
213    }
214
215    if {$macosx_deployment_target == "10.4" ||
216        (${os.major} == 8 && $macosx_deployment_target == "")} {
217
218        # https://trac.macports.org/ticket/37828
219        configure.cppflags-append -D__MAC_OS_X_VERSION_MIN_REQUIRED=1040
220    }
221}
222
223platform powerpc {
224    # https://trac.macports.org/ticket/37839
225    configure.optflags -Os
226}
227
228livecheck.type  regex
229livecheck.url   http://webkitgtk.org/?page=download
230livecheck.regex webkitgtk-(\[0-9\]+\\.\[0-9\]*\[02468\]\\.\[0-9\]+)
Note: See TracBrowser for help on using the repository browser.