Skip to content

Commit 273c3a7

Browse files
committed
webkit-gtk60: enable GTK4 builds for webkit-gtk.
1 parent 6028138 commit 273c3a7

45 files changed

Lines changed: 2932 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

webkit-gtk60/DESCR

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
WebKit is an open source web browser engine. WebKit is also the name of
2+
the Mac OS X system framework version of the engine that's used by
3+
Safari, Dashboard, Mail, and many other OS X applications. WebKit's HTML
4+
and JavaScript code began as a branch of the KHTML and KJS libraries
5+
from KDE.
6+
7+
This is the GTK port of the engine.

webkit-gtk60/MESSAGE

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
===========================================================================
2+
$NetBSD: MESSAGE,v 1.1 2020/04/23 17:01:16 nia Exp $
3+
4+
WebKit needs GStreamer plugins to play web audio and video.
5+
6+
Installing the following should be enough on BSD/Solaris:
7+
8+
* gst-plugins1-libav
9+
* gst-plugins1-oss
10+
11+
Installing gst-plugins1-alsa or gst-plugins1-pulse will be necessary
12+
for audio output on Linux.
13+
14+
===========================================================================

webkit-gtk60/Makefile

Lines changed: 230 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,230 @@
1+
# $NetBSD: Makefile,v 1.240 2022/11/23 16:19:06 adam Exp $
2+
#
3+
# Some environment variables that can help debugging this:
4+
# https://trac.webkit.org/wiki/EnvironmentVariables
5+
6+
DISTNAME= webkitgtk-2.52.2
7+
PKGNAME= ${DISTNAME:S/webkitgtk/webkit-gtk60/}
8+
CATEGORIES= www
9+
MASTER_SITES= https://www.webkitgtk.org/releases/
10+
EXTRACT_SUFX= .tar.xz
11+
12+
MAINTAINER= pkgsrc-users@NetBSD.org
13+
HOMEPAGE= https://www.webkitgtk.org/
14+
COMMENT= GTK4 port of the WebKit browser engine (API 6.0)
15+
LICENSE= 2-clause-bsd AND gnu-lgpl-v2
16+
17+
TOOL_DEPENDS+= gettext-tools>=0.18:../../devel/gettext-tools
18+
# uses 'unifdef -x1'
19+
TOOL_DEPENDS+= unifdef-[0-9]*:../../devel/unifdef
20+
TOOL_DEPENDS+= ${PYPKGPREFIX}-gi-docgen-[0-9]*:../../devel/py-gi-docgen
21+
22+
USE_CXX_FEATURES= c++17
23+
USE_LANGUAGES= c c++
24+
USE_TOOLS+= automake bash bison flex gdbus-codegen gmake perl pkg-config msgfmt
25+
26+
# this doesn't seem to be using the pkg-config file, which would add this
27+
CXXFLAGS+= -I${PREFIX}/include/gstreamer-1.0
28+
29+
# Avoid million warnings
30+
CFLAGS+= -Wno-unused-parameter -Wno-undef
31+
CXXFLAGS+= -Wno-unused-parameter -Wno-undef
32+
33+
# g-ir-scanner dumps core with full RELRO
34+
RELRO_SUPPORTED= partial
35+
36+
# From Arch Linux:
37+
# JITted code crashes when CET is used
38+
#CFLAGS+= -fcf-protection=none
39+
#CXXFLAGS+= -fcf-protection=none
40+
41+
# Enabling -gdwarf-2 hits GNU ar limits on file size.
42+
CTF_SUPPORTED= no
43+
44+
GCC_REQD+= 11
45+
46+
.include "../../mk/bsd.prefs.mk"
47+
48+
CMAKE_CONFIGURE_ARGS+= -DPORT=GTK
49+
CMAKE_CONFIGURE_ARGS+= -DENABLE_X11_TARGET=ON
50+
CMAKE_CONFIGURE_ARGS+= -DENABLE_MINIBROWSER=ON
51+
CMAKE_CONFIGURE_ARGS+= -DENABLE_GAMEPAD=OFF
52+
#CMAKE_CONFIGURE_ARGS+= -DENABLE_GEOLOCATION=OFF
53+
#CMAKE_CONFIGURE_ARGS+= -DENABLE_INTROSPECTION=ON
54+
CMAKE_CONFIGURE_ARGS+= -DENABLE_JOURNALD_LOG=OFF
55+
#CMAKE_CONFIGURE_ARGS+= -DENABLE_BUBBLEWRAP_SANDBOX=OFF
56+
#CMAKE_CONFIGURE_ARGS+= -DENABLE_DOCUMENTATION=OFF
57+
CMAKE_CONFIGURE_ARGS+= -DUSE_SYSTEM_SYSPROF_CAPTURE=NO
58+
CMAKE_CONFIGURE_ARGS+= -DUSE_SYSPROF_CAPTURE=OFF
59+
CMAKE_CONFIGURE_ARGS+= -DUSE_GSTREAMER_GL=ON
60+
#CMAKE_CONFIGURE_ARGS+= -DUSE_LIBHYPHEN=OFF
61+
#CMAKE_CONFIGURE_ARGS+= -DUSE_OPENJPEG=OFF
62+
#CMAKE_CONFIGURE_ARGS+= -DUSE_SOUP2=ON
63+
CMAKE_CONFIGURE_ARGS+= -DUSE_LIBBACKTRACE=OFF
64+
CMAKE_CONFIGURE_ARGS+= -DUSE_GTK4=ON
65+
.if ${OPSYS} == "Darwin"
66+
CMAKE_CONFIGURE_ARGS+= -DUSE_LIBDRM=OFF
67+
.endif
68+
# otherwise, libsqlite3.so from ${BUILDLINK_DIR} is hardcoded into some binaries
69+
CMAKE_CONFIGURE_ARGS+= -DSQLite3_LIBRARY=${BUILDLINK_PREFIX.sqlite3}/lib/libsqlite3.so
70+
71+
# required for faking a better user-agent
72+
CMAKE_CONFIGURE_ARGS+= -DUSER_AGENT_BRANDING="Linux ${MACHINE_ARCH}"
73+
74+
# From OpenBSD ports:
75+
# we don't want an allocation of 1GB, it's above the "default" class ulimit
76+
# see Source/JavaScriptCore/jit/ExecutableAllocator.cpp for default values
77+
.if ${MACHINE_ARCH} == "x86_64"
78+
CXXFLAGS+= -DFIXED_EXECUTABLE_MEMORY_POOL_SIZE_IN_MB=512
79+
.endif
80+
# see Source/JavaScriptCore/runtime/StructureID.h for default values
81+
CXXFLAGS+= -DSTRUCTURE_HEAP_ADDRESS_SIZE_IN_MB=256
82+
83+
# For backtrace
84+
LDFLAGS.NetBSD+= -lexecinfo
85+
86+
PKGCONFIG_OVERRIDE+= Source/JavaScriptCore/javascriptcoregtk.pc.in
87+
PKGCONFIG_OVERRIDE+= Source/WebKit/gtk/webkit2gtk.pc.in
88+
PKGCONFIG_OVERRIDE+= Source/WebKit/gtk/webkit2gtk-web-extension.pc.in
89+
90+
REPLACE_PERL+= Source/JavaScriptCore/Scripts/*.pl
91+
REPLACE_PERL+= Source/JavaScriptCore/create_hash_table
92+
REPLACE_PERL+= Source/WebCore/Scripts/*.pl
93+
REPLACE_PERL+= Source/WebCore/bindings/scripts/*.pl
94+
REPLACE_PERL+= Source/WebCore/bindings/scripts/*.pm
95+
REPLACE_PERL+= Source/WebCore/css/*.pl
96+
REPLACE_PERL+= Source/WebCore/dom/*.pl
97+
REPLACE_PERL+= Source/WebCore/make-hash-tools.pl
98+
REPLACE_PERL+= Source/WebInspectorUI/Scripts/*.pl
99+
REPLACE_PERL+= Source/WebKit/Scripts/*.pl
100+
101+
REPLACE_PYTHON+= Source/JavaScriptCore/Scripts/*.py
102+
REPLACE_PYTHON+= Source/JavaScriptCore/Scripts/wkbuiltins/*.py
103+
REPLACE_PYTHON+= Source/JavaScriptCore/inspector/scripts/*.py
104+
REPLACE_PYTHON+= Source/JavaScriptCore/inspector/scripts/codegen/*.py
105+
REPLACE_PYTHON+= Source/JavaScriptCore/wasm/*.py
106+
REPLACE_PYTHON+= Source/JavaScriptCore/yarr/*.py
107+
REPLACE_PYTHON+= Source/JavaScriptCore/yarr/create_regex_tables
108+
REPLACE_PYTHON+= Source/JavaScriptCore/yarr/generateYarrCanonicalizeUnicode
109+
REPLACE_PYTHON+= Source/ThirdParty/ANGLE/src/compiler/translator/*.py
110+
REPLACE_PYTHON+= Source/ThirdParty/ANGLE/src/libANGLE/*.py
111+
REPLACE_PYTHON+= Source/ThirdParty/gtest/test/*.py
112+
REPLACE_PYTHON+= Source/WebCore/html/parser/create-html-entity-table
113+
REPLACE_PYTHON+= Source/WebCore/platform/network/create-http-header-name-table
114+
REPLACE_PYTHON+= Source/WebKit/Scripts/*.py
115+
REPLACE_PYTHON+= Tools/glib/*.py
116+
117+
REPLACE_BASH+= Source/JavaScriptCore/postprocess-headers.sh
118+
REPLACE_BASH+= Source/ThirdParty/ANGLE/adjust-angle-include-paths-rule
119+
REPLACE_BASH+= Source/ThirdParty/gtest/xcode/Samples/FrameworkSample/runtests.sh
120+
REPLACE_BASH+= Source/ThirdParty/gtest/xcode/Scripts/runtests.sh
121+
REPLACE_BASH+= Source/WebKit/Scripts/copy-webcontent-resources-to-private-headers.sh
122+
REPLACE_BASH+= Source/WebKit/Scripts/process-entitlements.sh
123+
REPLACE_BASH+= Tools/gtk/install-dependencies
124+
125+
REPLACE_RUBY+= Source/JavaScriptCore/Scripts/postprocess-asm
126+
REPLACE_RUBY+= Source/JavaScriptCore/Scripts/resolve-asm-file-conflicts.rb
127+
REPLACE_RUBY+= Source/JavaScriptCore/b3/air/*.rb
128+
REPLACE_RUBY+= Source/JavaScriptCore/offlineasm/*.rb
129+
REPLACE_RUBY+= Source/WTF/Scripts/GeneratePreferences.rb
130+
REPLACE_RUBY+= Source/WebCore/Scripts/GenerateSettings.rb
131+
REPLACE_RUBY+= Source/WebCore/domjit/*.rb
132+
REPLACE_RUBY+= Source/WebInspectorUI/Scripts/*.rb
133+
REPLACE_RUBY+= Source/bmalloc/libpas/export.rb
134+
135+
SUBST_CLASSES+= python
136+
SUBST_FILES.python+= Source/WebInspectorUI/Scripts/copy-user-interface-resources.pl
137+
SUBST_SED.python+= -e 's,"python3","${PYTHONBIN}",'
138+
SUBST_STAGE.python= pre-configure
139+
SUBST_MESSAGE.python= Fixing path to python binary.
140+
141+
SUBST_CLASSES+= ruby
142+
SUBST_FILES.ruby+= Source/bmalloc/libpas/scripts/tally_verifier_output
143+
SUBST_FILES.ruby+= Tools/TestWebKitAPI/Scripts/generate-unified-sources.sh
144+
SUBST_FILES.ruby+= Source/JavaScriptCore/Scripts/generate-unified-sources.sh
145+
SUBST_FILES.ruby+= Source/WebCore/Scripts/generate-unified-sources.sh
146+
SUBST_FILES.ruby+= Source/WebKit/Scripts/generate-unified-sources.sh
147+
SUBST_SED.ruby+= -e 's,env ruby,env ${RUBY},'
148+
SUBST_STAGE.ruby= pre-configure
149+
SUBST_MESSAGE.ruby= Fixing path to ruby binary.
150+
151+
.include "../../lang/ruby/rubyversion.mk"
152+
.include "../../lang/ruby/replace.mk"
153+
TOOL_DEPENDS+= ${RUBY_BASE}>=${RUBY_VERSION}:${RUBY_SRCDIR}
154+
CMAKE_CONFIGURE_ARGS+= -DRUBY_EXECUTABLE=${RUBY}
155+
156+
PYTHON_FOR_BUILD_ONLY= yes
157+
.include "../../lang/python/application.mk"
158+
CMAKE_CONFIGURE_ARGS+= -DPYTHON_EXECUTABLE=${PYTHONBIN}
159+
160+
CXXFLAGS.SunOS+= -fpermissive
161+
162+
# Needed for JavaScript JIT
163+
NOT_PAX_MPROTECT_SAFE+= libexec/webkitgtk-6.0/MiniBrowser
164+
NOT_PAX_MPROTECT_SAFE+= libexec/webkitgtk-6.0/WebKitWebProcess
165+
#NOT_PAX_MPROTECT_SAFE+= libexec/webkitgtk-6.0/WebKitNetworkProcess
166+
NOT_PAX_MPROTECT_SAFE+= libexec/webkitgtk-6.0/jsc
167+
168+
# TODO: fix shell portability issues in these files
169+
CHECK_PORTABILITY_SKIP+= Source/JavaScriptCore/Scripts/check-xcfilelists.sh
170+
CHECK_PORTABILITY_SKIP+= Source/JavaScriptCore/Scripts/create-symlink-to-altroot.sh
171+
CHECK_PORTABILITY_SKIP+= Source/JavaScriptCore/Scripts/generate-unified-sources.sh
172+
CHECK_PORTABILITY_SKIP+= Source/WebCore/Scripts/check-xcfilelists.sh
173+
CHECK_PORTABILITY_SKIP+= Source/WebCore/Scripts/create-symlink-to-altroot.sh
174+
CHECK_PORTABILITY_SKIP+= Source/WebCore/Scripts/generate-unified-sources.sh
175+
CHECK_PORTABILITY_SKIP+= Source/WebKit/Scripts/check-xcfilelists.sh
176+
CHECK_PORTABILITY_SKIP+= Source/WebKit/Scripts/create-symlink-to-altroot.sh
177+
CHECK_PORTABILITY_SKIP+= Source/WebKit/Scripts/generate-feature-flags-plist.sh
178+
CHECK_PORTABILITY_SKIP+= Source/WebKit/Scripts/generate-unified-sources.sh
179+
CHECK_PORTABILITY_SKIP+= Tools/TestWebKitAPI/Scripts/check-xcfilelists.sh
180+
CHECK_PORTABILITY_SKIP+= Tools/TestWebKitAPI/Scripts/generate-unified-sources.sh
181+
182+
.include "options.mk"
183+
184+
# geoclue2
185+
#.include "../../sysutils/libnotify/buildlink3.mk"
186+
.include "../../audio/flite/buildlink3.mk"
187+
.include "../../databases/sqlite3/buildlink3.mk"
188+
.include "../../devel/cmake/build.mk"
189+
.include "../../devel/gettext-lib/buildlink3.mk"
190+
.include "../../devel/glib2/buildlink3.mk"
191+
.include "../../devel/gobject-introspection/buildlink3.mk"
192+
.include "../../devel/gperf/buildlink3.mk"
193+
.if ${PKGSRC_COMPILER:Mgcc}
194+
.include "../../devel/libatomic/buildlink3.mk"
195+
.endif
196+
.include "../../devel/pango/buildlink3.mk"
197+
.include "../../devel/zlib/buildlink3.mk"
198+
.include "../../fonts/harfbuzz-icu/buildlink3.mk"
199+
.include "../../fonts/woff2/buildlink3.mk"
200+
.include "../../graphics/cairo/buildlink3.mk"
201+
.include "../../graphics/freetype2/buildlink3.mk"
202+
.include "../../graphics/gdk-pixbuf2/buildlink3.mk"
203+
.include "../../graphics/graphene/buildlink3.mk"
204+
.include "../../graphics/gst-plugins1-gl/buildlink3.mk"
205+
.include "../../graphics/lcms2/buildlink3.mk"
206+
.include "../../graphics/libavif/buildlink3.mk"
207+
.include "../../graphics/libjxl/buildlink3.mk"
208+
.include "../../graphics/libwebp/buildlink3.mk"
209+
.include "../../graphics/png/buildlink3.mk"
210+
# SkJpegCodec.cpp:210:58: error: 'JCS_RGB565' was not declared in this scope; did you mean 'JCS_RGB'?
211+
JPEG_ACCEPTED= libjpeg-turbo
212+
.include "../../mk/jpeg.buildlink3.mk"
213+
.include "../../multimedia/gst-plugins1-base/buildlink3.mk"
214+
.include "../../multimedia/gst-plugins1-good/buildlink3.mk"
215+
.include "../../multimedia/gstreamer1/buildlink3.mk"
216+
.include "../../net/libsoup3/buildlink3.mk"
217+
.include "../../security/libgcrypt/buildlink3.mk"
218+
.include "../../security/libgpg-error/buildlink3.mk"
219+
.include "../../security/libsecret/buildlink3.mk"
220+
.include "../../security/libtasn1/buildlink3.mk"
221+
.include "../../textproc/enchant2/buildlink3.mk"
222+
.include "../../textproc/hyphen/buildlink3.mk"
223+
.include "../../textproc/icu/buildlink3.mk"
224+
.include "../../textproc/libxml2/buildlink3.mk"
225+
.include "../../textproc/libxslt/buildlink3.mk"
226+
.include "../../x11/gtk4/buildlink3.mk"
227+
.include "../../x11/libX11/buildlink3.mk"
228+
#.include "../../mk/atomic64.mk"
229+
#.include "../../mk/pthread.buildlink3.mk"
230+
.include "../../mk/bsd.pkg.mk"

0 commit comments

Comments
 (0)