Mercurial > vanilla
comparison www/webkitgtk/webkitgtk.sh @ 743:a6ccd21107cb
www/webkit: initial import, closes #1752
author | David Demelier <markand@malikania.fr> |
---|---|
date | Wed, 07 Aug 2019 07:13:31 +0200 |
parents | |
children | cb3df02aede3 |
comparison
equal
deleted
inserted
replaced
742:aa3c1de1780a | 743:a6ccd21107cb |
---|---|
1 #!/bin/sh | |
2 # | |
3 # Copyright (c) 2019 David Demelier <markand@malikania.fr> | |
4 # | |
5 # Permission to use, copy, modify, and/or distribute this software for any | |
6 # purpose with or without fee is hereby granted, provided that the above | |
7 # copyright notice and this permission notice appear in all copies. | |
8 # | |
9 # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | |
10 # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | |
11 # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | |
12 # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | |
13 # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | |
14 # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | |
15 # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | |
16 # | |
17 | |
18 PKGNAME=webkitgtk | |
19 PKGVERSION=2.24.3 | |
20 PKGREVISION=1 | |
21 PKGLICENSE="CUSTOM" | |
22 PKGSUMMARY="web content engine for Gtk" | |
23 PKGDOWNLOAD="https://webkitgtk.org/releases/$PKGNAME-$PKGVERSION.tar.xz" | |
24 PKGDEPENDS="accessibility/atk | |
25 dev/cmake:build | |
26 fonts/fontconfig | |
27 fonts/freetype | |
28 fonts/harfbuzz | |
29 graphics/cairo | |
30 graphics/gtk | |
31 graphics/libpng | |
32 graphics/libwebp | |
33 lib/glib | |
34 lib/icu | |
35 lib/libtasn1 | |
36 network/libsoup | |
37 perl/perl:build | |
38 python/python:build | |
39 ruby/ruby:build | |
40 text/libxslt" | |
41 PKGOPTIONS="GEOLOCATION | |
42 GSTREAMER | |
43 HYPHEN | |
44 INTROSPECTION | |
45 JPEG | |
46 NOTIFICATIONS | |
47 LIBSECRET | |
48 OPENGL | |
49 SPELL | |
50 WAYLAND | |
51 WOFF2 | |
52 X" | |
53 | |
54 : ${CC:=clang} | |
55 : ${CFLAGS:=-O2} | |
56 : ${CXX:=clang++} | |
57 : ${CXXFLAGS:=-O2} | |
58 : ${GEOLOCATION:=no} # TODO: set to on once geoclue is there. | |
59 : ${GSTREAMER:=no} # TODO: set to on once gst-plugins-base is there. | |
60 : ${HYPHEN:=no} # TODO: set to on once hyphen is there. | |
61 : ${INTROSPECTION:=no} # BROKEN: does not build if enabled | |
62 : ${JPEG:=no} # TODO: set to on once openjpeg is there. | |
63 : ${NOTIFICATIONS:=yes} | |
64 : ${LIBSECRET:=yes} | |
65 : ${OPENGL:=yes} | |
66 : ${SPELL:=no} # TODO: set to on once enchant is there. | |
67 : ${WAYLAND:=yes} | |
68 : ${WOFF2:=no} # TODO: set to on once woff2 is there. | |
69 : ${X:=yes} | |
70 | |
71 if [ "$GEOLOCATION" = "yes" ]; then | |
72 PKGDEPENDS="network/geoclue $PKGDEPENDS" | |
73 with_geolocation="-DENABLE_GEOLOCATION=On" | |
74 else | |
75 with_geolocation="-DENABLE_GEOLOCATION=Off" | |
76 fi | |
77 | |
78 if [ "$GSTREAMER" = "yes" ]; then | |
79 PKGDEPENDS="multimedia/gstreamer multimedia/gst-plugins-base $PKGDEPENDS" | |
80 with_gstreamer="-DENABLE_VIDEO=On -DENABLE_WEB_AUDIO=On" | |
81 else | |
82 with_gstreamer="-DENABLE_VIDEO=Off -DENABLE_WEB_AUDIO=Off" | |
83 fi | |
84 | |
85 if [ "$HYPHEN" = "yes" ]; then | |
86 with_hyphen="-DUSE_LIBHYPHEN=On" | |
87 else | |
88 with_hyphen="-DUSE_LIBHYPHEN=Off" | |
89 fi | |
90 | |
91 if [ "$INTROSPECTION" = "yes" ]; then | |
92 PKGDEPENDS="dev/gobject-introspection:build $PKGDEPENDS" | |
93 with_introspection="-DENABLE_INTROSPECTION=On" | |
94 else | |
95 with_introspection="-DENABLE_INTROSPECTION=Off" | |
96 fi | |
97 | |
98 if [ "$JPEG" = "yes" ]; then | |
99 PKGDEPENDS="graphics/openjpeg $PKGDEPENDS" | |
100 with_jpeg="-DUSE_OPENJPEG=On" | |
101 else | |
102 with_jpeg="-DUSE_OPENJPEG=Off" | |
103 fi | |
104 | |
105 if [ "$NOTIFICATIONS" = "yes" ]; then | |
106 PKGDEPENDS="desktop/notifications $PKGDEPENDS" | |
107 with_notifications="-DUSE_NOTIFICATIONS=On" | |
108 else | |
109 with_notifications="-DUSE_NOTIFICATIONS=Off" | |
110 fi | |
111 | |
112 if [ "$LIBSECRET" = "yes" ]; then | |
113 PKGDEPENDS="security/libsecret $PKGDEPENDS" | |
114 with_libsecret="-DUSE_LIBSECRET=On" | |
115 else | |
116 with_libsecret="-DUSE_LIBSECRET=Off" | |
117 fi | |
118 | |
119 if [ "$OPENGL" = "yes" ]; then | |
120 PKGDEPENDS="graphics/mesa $PKGDEPENDS" | |
121 with_opengl="-DENABLE_OPENGL=On" | |
122 else | |
123 with_opengl="-DENABLE_OPENGL=Off" | |
124 fi | |
125 | |
126 if [ "$SPELL" = "yes" ]; then | |
127 with_spell="-DENABLE_SPELLCHECK=On" | |
128 else | |
129 with_spell="-DENABLE_SPELLCHECK=Off" | |
130 fi | |
131 | |
132 if [ "$WAYLAND" = "yes" ]; then | |
133 with_wayland="-DENABLE_WAYLAND_TARGET=On" | |
134 else | |
135 with_wayland="-DENABLE_WAYLAND_TARGET=Off" | |
136 fi | |
137 | |
138 if [ "$WOFF2" = "yes" ]; then | |
139 PKGDEPENDS="fonts/woff2 $PKGDEPENDS" | |
140 with_woff2="-DUSE_WOFF2=On" | |
141 else | |
142 with_woff2="-DUSE_WOFF2=Off" | |
143 fi | |
144 | |
145 if [ "$X" = "yes" ]; then | |
146 PKGDEPENDS="x11/libxcomposite | |
147 x11/libxdamage | |
148 x11/libxrender | |
149 x11/libxt | |
150 $PKGDEPENDS" | |
151 with_x="-DENABLE_X11_TARGET=On" | |
152 else | |
153 with_x="-DENABLE_X11_TARGET=Off" | |
154 fi | |
155 | |
156 build() | |
157 { | |
158 rm -rf $PKGNAME-$PKGVERSION | |
159 tar xvf $PKGNAME-$PKGVERSION.tar.xz | |
160 cd $PKGNAME-$PKGVERSION | |
161 | |
162 # -DENABLE_PLUGIN_PROCESS_GTK2=Off: in Vanilla Gtk 2 is deprecated. | |
163 patch -p0 < ../patch-clang.patch | |
164 patch -p1 < ../patch-musl.patch | |
165 patch -p1 < ../patch-isystem.patch | |
166 mkdir build && cd build | |
167 cmake .. \ | |
168 -DBUILD_SHARED_LIBS=On \ | |
169 -DCMAKE_BUILD_TYPE=Release \ | |
170 -DCMAKE_CXX_COMPILER="$CXX" \ | |
171 -DCMAKE_CXX_FLAGS="$CXXFLAGS" \ | |
172 -DCMAKE_C_COMPILER="$CC" \ | |
173 -DCMAKE_C_FLAGS="$CFLAGS" \ | |
174 -DCMAKE_INSTALL_PREFIX= \ | |
175 -DLIB_INSTALL_DIR=/lib \ | |
176 -DPORT=GTK \ | |
177 -DENABLE_PLUGIN_PROCESS_GTK2=Off \ | |
178 $with_geolocation \ | |
179 $with_gstreamer \ | |
180 $with_hyphen \ | |
181 $with_introspection \ | |
182 $with_jpeg \ | |
183 $with_notifications \ | |
184 $with_libsecret \ | |
185 $with_opengl \ | |
186 $with_spell \ | |
187 $with_wayland \ | |
188 $with_woff2 \ | |
189 $with_x | |
190 make -j3 | |
191 make install DESTDIR=$DESTDIR | |
192 cd .. | |
193 | |
194 cd .. | |
195 rm -rf $PKGNAME-$PKGVERSION | |
196 } |