Ticket #39598: Portfile

File Portfile, 8.3 KB (added by drs@…, 11 years ago)

reverted 2.0.1_0 portfile

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 105804 2013-05-06 04:22:14Z 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.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-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        --enable-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# gobject-introspection uses g-ir-scanner, which uses $CC from env
85if {[variant_isset universal]} {
86    foreach arch ${configure.universal_archs} {
87        lappend merger_build_args(${arch})     CC='${configure.cc} -arch ${arch}'
88        lappend merger_destroot_args(${arch})  CC='${configure.cc} -arch ${arch}'
89    }
90} else {
91    build.args-append       CC="${configure.cc} ${configure.cc_archflags}"
92    destroot.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
123# TODO: Remove this block once 2.2 is released
124compiler.fallback-append macports-clang-3.2
125if {[info exists portconfigure::compiler_name_map(${configure.compiler})]} {
126    depends_build-append port:$portconfigure::compiler_name_map(${configure.compiler})
127
128    # base 2.1.x ignores the argument and just use ${configure.compiler}
129    if {[portconfigure::arch_flag_supported ${configure.compiler}]} {
130        depends_skip_archcheck-append $portconfigure::compiler_name_map(${configure.compiler})
131    }
132
133    if {[string match macports-gcc* ${configure.compiler}]} {
134        depends_lib-append port:$portconfigure::compiler_name_map(${configure.compiler})
135    }
136}
137
138if {[string match *clang* ${configure.compiler}]} {
139    configure.cxxflags-append -Wno-c++11-extensions
140}
141
142lappend merger_dont_diff ${prefix}/include/webkitgtk-1.0/webkitdom/WebKitDOMNavigator.h
143
144post-patch {
145    # https://bugs.webkit.org/show_bug.cgi?id=88407
146    reinplace "s:echo -n:/bin/echo -n:g" \
147        ${worksrcpath}/Source/WebCore/GNUmakefile.am
148
149    # https://bugs.webkit.org/show_bug.cgi?id=99683
150    reinplace "s:PLATFORM(MAC):OS(DARWIN):g" \
151        ${worksrcpath}/Source/JavaScriptCore/heap/VTableSpectrum.cpp \
152        ${worksrcpath}/Source/JavaScriptCore/jit/ThunkGenerators.cpp \
153        ${worksrcpath}/Source/JavaScriptCore/tools/CodeProfile.cpp
154
155    # https://bugs.webkit.org/show_bug.cgi?id=58737
156    reinplace "s:OS(MAC_OS_X):PLATFORM(MAC):" \
157        ${worksrcpath}/Source/WTF/wtf/ThreadingPthreads.cpp
158}
159
160# TODO: fix this for muniversal
161# keep it for debug
162#post-destroot {
163#    file copy ${worksrcpath}/Programs/.libs/GtkLauncher ${destroot}${prefix}/bin
164#}
165
166build.args-append V=1
167
168# see bug #24622
169variant quartz {
170    configure.args-append --with-target=quartz
171
172    # TODO: See if this will build with OpenGL.framework
173    configure.args-delete --enable-webgl
174    depends_lib-delete \
175        port:mesa \
176        port:xorg-libXt
177
178    # quartz-include-widgetbackingstorecairo.patch
179    # https://trac.macports.org/ticket/38203
180    # https://bugs.webkit.org/show_bug.cgi?id=111598
181    patchfiles-append quartz-duplicate-symbols.patch \
182                      quartz-include-widgetbackingstorecairo.patch
183}
184
185variant video description {Enable HTML5 video support using gstreamer} {
186        depends_lib-append      port:gstreamer1-gst-plugins-base
187        configure.args-delete   --disable-video
188        configure.args-append   --enable-video
189}
190
191default_variants +video
192
193platform darwin {
194    if {${os.major} < 10} {
195        depends_build-append      port:python27
196        # https://trac.macports.org/ticket/35793
197        configure.python          ${prefix}/bin/python2.7
198    }
199
200    if {[string match "*10.5*" ${configure.sdkroot}] ||
201        (${os.major} == 9 && ${configure.sdkroot} == "")} {
202
203        # https://trac.macports.org/ticket/37418
204        configure.cppflags-append -D__MAC_OS_X_VERSION_MAX_ALLOWED=1050
205    }
206
207    if {[string match "*10.4*" ${configure.sdkroot}] ||
208        (${os.major} == 8 && ${configure.sdkroot} == "")} {
209
210        # https://trac.macports.org/ticket/37828
211        configure.cppflags-append -D__MAC_OS_X_VERSION_MAX_ALLOWED=1040
212    }
213
214    if {$macosx_deployment_target == "10.4" ||
215        (${os.major} == 8 && $macosx_deployment_target == "")} {
216
217        # https://trac.macports.org/ticket/37828
218        configure.cppflags-append -D__MAC_OS_X_VERSION_MIN_REQUIRED=1040
219    }
220}
221
222platform powerpc {
223    # https://trac.macports.org/ticket/37839
224    configure.optflags -Os
225}
226
227livecheck.type  regex
228livecheck.url   http://webkitgtk.org/?page=download
229livecheck.regex webkitgtk-(\[0-9\]+\\.\[0-9\]*\[02468\]\\.\[0-9\]+)