source: trunk/dports/www/webkit2-gtk/Portfile @ 151980

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

webkit2-gtk: Bump to 2.12.4

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 6.6 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 151980 2016-08-25 21:03:47Z jeremyhu@macports.org $
3
4# We have an umbrella radar tracking webkit-gtk issues on OS X.  Please relate
5# any future issues with this tracker.
6# http://bugs.webkit.org/show_bug.cgi?id=126492
7
8PortSystem          1.0
9PortGroup           active_variants 1.1
10PortGroup           cmake 1.0
11PortGroup           compiler_blacklist_versions 1.0
12PortGroup           cxx11 1.0
13
14name                webkit2-gtk
15conflicts           webkit2-gtk-devel
16version             2.12.4
17description         Apple's WebKit2 HTML rendering library for GTK+3 (with optional support for GTK+2 plugins)
18long_description    ${description}
19maintainers         jeremyhu devans
20categories          www gnome
21platforms           darwin freebsd
22license             LGPL-2+ BSD
23homepage            http://webkitgtk.org/
24master_sites        http://webkitgtk.org/releases/
25
26use_xz              yes
27distname            webkitgtk-${version}
28
29dist_subdir         webkit-gtk
30
31checksums           rmd160  9bccd3c05f3c6a28d36f2bb5fdb3a9a58be10539 \
32                    sha256  424d3177599abbc1eb1a1ad7928dd280a62006e992f2fada2e059375a9609a77
33
34# don't overwrite build dependencies provided by cmake portgroup
35depends_build-append \
36                    port:gperf \
37                    port:gtk-doc \
38                    port:pkgconfig \
39                    port:python27 \
40                    port:py27-simplejson
41
42depends_lib         port:atk \
43                    port:at-spi2-atk \
44                    port:bison \
45                    path:lib/pkgconfig/cairo.pc:cairo \
46                    port:flex \
47                    port:fontconfig \
48                    port:freetype \
49                    port:enchant \
50                    port:geoclue2 \
51                    path:lib/pkgconfig/glib-2.0.pc:glib2 \
52                    port:gobject-introspection \
53                    port:gstreamer1 \
54                    port:gstreamer1-gst-plugins-bad \
55                    port:gstreamer1-gst-plugins-base \
56                    port:gstreamer1-gst-plugins-good \
57                    port:gtk3 \
58                    port:harfbuzz-icu \
59                    port:hyphen \
60                    port:icu \
61                    port:libnotify \
62                    port:libpng \
63                    port:libsecret \
64                    port:libsoup \
65                    port:libxml2 \
66                    port:libxslt \
67                    port:sqlite3 \
68                    port:webp \
69                    port:zlib
70
71# PR-152650-2.patch: WIP to re-enable gtk-doc support
72# PR-153138.patch: https://bugs.webkit.org/show_bug.cgi?id=153138
73# PR-157554.patch: https://bugs.webkit.org/show_bug.cgi?id=157554
74# PR-157574.patch: https://bugs.webkit.org/show_bug.cgi?id=157574
75patchfiles-append \
76    PR-152650-2.patch \
77    PR-153138.patch \
78    PR-157554.patch \
79    PR-157574.patch
80
81# Build out-of-tree
82configure.post_args     ../${worksrcdir}
83default configure.dir   {${workpath}/build}
84default build.dir       {${workpath}/build}
85
86configure.args-append \
87    -DPORT=GTK \
88    -DUSE_SYSTEM_MALLOC=ON \
89    -DENABLE_INTROSPECTION=ON \
90    -DENABLE_MINIBROWSER=OFF \
91    -DENABLE_PLUGIN_PROCESS_GTK2=OFF \
92    -DENABLE_VIDEO=ON
93
94# TODO: File a bug about this not working
95configure.args-append -DENABLE_GTKDOC=OFF
96
97# <rdar://problem/24031030>
98configure.optflags  -Os
99
100pre-configure {
101    if {![variant_isset quartz] && ![variant_isset x11]} {
102        error "Either +x11 or +quartz is required"
103    }
104}
105
106post-configure {
107    # https://bugs.webkit.org/show_bug.cgi?id=153176
108    reinplace {s|\.\./\.\./lib/libWTFGTK\.a||} \
109        ${build.dir}/Source/WebKit2/CMakeFiles/WebKit2.dir/link.txt
110    reinplace {s|\.\./\.\./lib/libbmalloc\.a||} \
111        ${build.dir}/Source/JavaScriptCore/CMakeFiles/JavaScriptCore.dir/link.txt
112    reinplace {s|[\./]*\.\./lib/lib[^\.]*\.a||g} \
113        ${build.dir}/Source/JavaScriptCore/CMakeFiles/LLIntOffsetsExtractor.dir/link.txt \
114        ${build.dir}/Source/JavaScriptCore/shell/CMakeFiles/jsc.dir/link.txt \
115        ${build.dir}/Source/JavaScriptCore/shell/CMakeFiles/testb3.dir/link.txt \
116        ${build.dir}/Source/WebKit2/CMakeFiles/DatabaseProcess.dir/link.txt \
117        ${build.dir}/Source/WebKit2/CMakeFiles/NetworkProcess.dir/link.txt \
118        ${build.dir}/Source/WebKit2/CMakeFiles/webkit2gtkinjectedbundle.dir/link.txt \
119        ${build.dir}/Source/WebKit2/CMakeFiles/WebProcess.dir/link.txt
120    if {[variant_isset x11]} {
121        # ENABLE_PLUGIN_PROCESS is only enabled with +x11
122        reinplace {s|[\./]*\.\./lib/lib[^\.]*\.a||g} \
123            ${build.dir}/Source/WebKit2/CMakeFiles/PluginProcess.dir/link.txt
124
125        if {[variant_isset gtk2]} {
126            reinplace {s|\.\./\.\./lib/libWTFGTK\.a||} \
127                ${build.dir}/Source/WebKit2/CMakeFiles/WebKitPluginProcess2.dir/link.txt
128            reinplace {s|-Wl,-all_load||g} \
129                ${build.dir}/Source/WebKit2/CMakeFiles/WebKitPluginProcess2.dir/link.txt
130        }
131    }
132    if {[variant_isset minibrowser]} {
133        reinplace {s|[\./]*\.\./lib/lib[^\.]*\.a||g} \
134            ${build.dir}/Tools/MiniBrowser/gtk/CMakeFiles/MiniBrowser.dir/link.txt
135    }
136
137    # https://bugs.webkit.org/show_bug.cgi?id=153192
138    reinplace {s|\.\./\.\./lib/libWTFGTK\.a|-Wl,-all_load ../../lib/libWTFGTK.a|} \
139        ${build.dir}/Source/JavaScriptCore/CMakeFiles/JavaScriptCore.dir/link.txt
140}
141
142# https://trac.macports.org/ticket/41560#comment:2
143configure.cflags-append     -ftemplate-depth=256
144configure.cxxflags-append   -ftemplate-depth=256
145
146variant quartz conflicts x11 gtk2 {
147    require_active_variants port:gtk3 quartz
148
149    configure.args-append \
150        -DENABLE_QUARTZ_TARGET=ON \
151        -DENABLE_X11_TARGET=OFF \
152        -DENABLE_OPENGL=OFF
153}
154
155variant x11 conflicts quartz {
156    require_active_variants port:gtk3 x11
157
158    configure.args-append \
159        -DENABLE_QUARTZ_TARGET=OFF \
160        -DENABLE_X11_TARGET=ON \
161        -DENABLE_OPENGL=ON
162
163    depends_lib-append \
164        port:mesa \
165        port:xorg-libXt
166}
167
168variant minibrowser description {Build and install MiniBrowser (for testing)} {
169    configure.args-delete   -DENABLE_MINIBROWSER=OFF
170    configure.args-append   -DENABLE_MINIBROWSER=ON
171}
172
173variant gtk2 conflicts quartz description {Enable support for GTK+2 plugins} {
174    require_active_variants port:gtk2 x11
175
176    depends_lib-append      port:gtk2
177    configure.args-delete   -DENABLE_PLUGIN_PROCESS_GTK2=OFF
178    configure.args-append   -DENABLE_PLUGIN_PROCESS_GTK2=ON
179}
180
181if {![variant_isset quartz]} {
182    default_variants-append +x11 +gtk2
183}
184
185livecheck.type      regex
186livecheck.url       http://webkitgtk.org/releases/
187livecheck.regex     "webkitgtk-(\\d+\\.\\d*\[02468\](?:\\.\\d+)*)"
Note: See TracBrowser for help on using the repository browser.