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

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

webkit-gtk: Add support for gobject introspection

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