source: trunk/dports/www/webkit2-gtk-devel/Portfile @ 149330

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

webkit2-gtk-devel: Bump to current master

  • 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 149330 2016-06-12 07:05:48Z 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
13PortGroup           github 1.0
14
15name                webkit2-gtk-devel
16conflicts           webkit2-gtk
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/
24
25# r201982
26github.setup        WebKit webkit e5e9f0d843319985c5e13156cc47bb3b96e90b9b
27checksums           rmd160  b3971e256dc94443d74f8bbb74fd3171d83a4f8b \
28                    sha256  99f6e250b4a7436eb1b57b2291ea78f41de6c23ac1f8a25e28b75b237ec1e12e
29
30# version needs to come after github.setup
31version             2.13.0
32revision            14
33epoch               1
34
35# don't overwrite build dependencies provided by cmake portgroup
36depends_build-append \
37                    port:gperf \
38                    port:gtk-doc \
39                    port:pkgconfig \
40                    port:python27 \
41                    port:py27-simplejson
42
43depends_lib         port:atk \
44                    port:at-spi2-atk \
45                    port:bison \
46                    path:lib/pkgconfig/cairo.pc:cairo \
47                    port:flex \
48                    port:fontconfig \
49                    port:freetype \
50                    port:enchant \
51                    port:geoclue2 \
52                    path:lib/pkgconfig/glib-2.0.pc:glib2 \
53                    port:gobject-introspection \
54                    port:gstreamer1 \
55                    port:gstreamer1-gst-plugins-bad \
56                    port:gstreamer1-gst-plugins-base \
57                    port:gstreamer1-gst-plugins-good \
58                    port:gtk3 \
59                    port:harfbuzz-icu \
60                    port:hyphen \
61                    port:icu \
62                    port:libnotify \
63                    port:libpng \
64                    port:libsecret \
65                    port:libsoup \
66                    port:libxml2 \
67                    port:libxslt \
68                    port:sqlite3 \
69                    port:webp \
70                    port:zlib
71
72# PR-152650-2.patch: WIP to re-enable gtk-doc support
73# PR-153138.patch: https://bugs.webkit.org/show_bug.cgi?id=153138
74# PR-157554.patch: https://bugs.webkit.org/show_bug.cgi?id=157554
75# PR-157574.patch: https://bugs.webkit.org/show_bug.cgi?id=157574
76patchfiles-append \
77    PR-152650-2.patch \
78    PR-153138.patch \
79    PR-157554.patch \
80    PR-157574.patch
81
82# Build out-of-tree
83configure.post_args     ../${worksrcdir}
84default configure.dir   {${workpath}/build}
85default build.dir       {${workpath}/build}
86
87configure.args-append \
88    -DPORT=GTK \
89    -DUSE_SYSTEM_MALLOC=ON \
90    -DENABLE_INTROSPECTION=ON \
91    -DENABLE_MINIBROWSER=OFF \
92    -DENABLE_PLUGIN_PROCESS_GTK2=OFF \
93    -DENABLE_VIDEO=ON
94
95# TODO: File a bug about this not working
96configure.args-append -DENABLE_GTKDOC=OFF
97
98# <rdar://problem/24031030>
99configure.optflags  -Os
100
101pre-configure {
102    if {![variant_isset quartz] && ![variant_isset x11]} {
103        error "Either +x11 or +quartz is required"
104    }
105}
106
107post-configure {
108    # https://bugs.webkit.org/show_bug.cgi?id=153176
109    reinplace {s|\.\./\.\./lib/libWTFGTK\.a||} \
110        ${build.dir}/Source/WebKit2/CMakeFiles/WebKit2.dir/link.txt
111    reinplace {s|\.\./\.\./lib/libbmalloc\.a||} \
112        ${build.dir}/Source/JavaScriptCore/CMakeFiles/JavaScriptCore.dir/link.txt
113    reinplace {s|[\./]*\.\./lib/lib[^\.]*\.a||g} \
114        ${build.dir}/Source/JavaScriptCore/CMakeFiles/LLIntOffsetsExtractor.dir/link.txt \
115        ${build.dir}/Source/JavaScriptCore/shell/CMakeFiles/jsc.dir/link.txt \
116        ${build.dir}/Source/JavaScriptCore/shell/CMakeFiles/testb3.dir/link.txt \
117        ${build.dir}/Source/WebKit2/CMakeFiles/DatabaseProcess.dir/link.txt \
118        ${build.dir}/Source/WebKit2/CMakeFiles/NetworkProcess.dir/link.txt \
119        ${build.dir}/Source/WebKit2/CMakeFiles/webkit2gtkinjectedbundle.dir/link.txt \
120        ${build.dir}/Source/WebKit2/CMakeFiles/WebProcess.dir/link.txt
121    if {[variant_isset x11]} {
122        # ENABLE_PLUGIN_PROCESS is only enabled with +x11
123        reinplace {s|[\./]*\.\./lib/lib[^\.]*\.a||g} \
124            ${build.dir}/Source/WebKit2/CMakeFiles/PluginProcess.dir/link.txt
125
126        if {[variant_isset gtk2]} {
127            reinplace {s|\.\./\.\./lib/libWTFGTK\.a||} \
128                ${build.dir}/Source/WebKit2/CMakeFiles/WebKitPluginProcess2.dir/link.txt
129            reinplace {s|-Wl,-all_load||g} \
130                ${build.dir}/Source/WebKit2/CMakeFiles/WebKitPluginProcess2.dir/link.txt
131        }
132    }
133    if {[variant_isset minibrowser]} {
134        reinplace {s|[\./]*\.\./lib/lib[^\.]*\.a||g} \
135            ${build.dir}/Tools/MiniBrowser/gtk/CMakeFiles/MiniBrowser.dir/link.txt
136    }
137
138    # https://bugs.webkit.org/show_bug.cgi?id=153192
139    reinplace {s|\.\./\.\./lib/libWTFGTK\.a|-Wl,-all_load ../../lib/libWTFGTK.a|} \
140        ${build.dir}/Source/JavaScriptCore/CMakeFiles/JavaScriptCore.dir/link.txt
141}
142
143# https://trac.macports.org/ticket/41560#comment:2
144configure.cflags-append     -ftemplate-depth=256
145configure.cxxflags-append   -ftemplate-depth=256
146
147variant quartz conflicts x11 gtk2 {
148    require_active_variants port:gtk3 quartz
149
150    configure.args-append \
151        -DENABLE_QUARTZ_TARGET=ON \
152        -DENABLE_X11_TARGET=OFF \
153        -DENABLE_OPENGL=OFF
154}
155
156variant x11 conflicts quartz {
157    require_active_variants port:gtk3 x11
158
159    configure.args-append \
160        -DENABLE_QUARTZ_TARGET=OFF \
161        -DENABLE_X11_TARGET=ON \
162        -DENABLE_OPENGL=ON
163
164    depends_lib-append \
165        port:mesa \
166        port:xorg-libXt
167}
168
169variant minibrowser description {Build and install MiniBrowser (for testing)} {
170    configure.args-delete   -DENABLE_MINIBROWSER=OFF
171    configure.args-append   -DENABLE_MINIBROWSER=ON
172}
173
174variant gtk2 conflicts quartz description {Enable support for GTK+2 plugins} {
175    require_active_variants port:gtk2 x11
176
177    depends_lib-append      port:gtk2
178    configure.args-delete   -DENABLE_PLUGIN_PROCESS_GTK2=OFF
179    configure.args-append   -DENABLE_PLUGIN_PROCESS_GTK2=ON
180}
181
182if {![variant_isset quartz]} {
183    default_variants-append +x11 +gtk2
184}
185
186livecheck.type      none
Note: See TracBrowser for help on using the repository browser.