Commit c994eb27 authored by Tristan Van Berkom's avatar Tristan Van Berkom

webkitgtk4: Use straight cmake and support arm & i386

When building for i386 on an x86_64 system, or building for arm
on an aarch64 system, one must specify -DCMAKE_SYSTEM_PROCESSOR
to ensure that webkitgtk build scripts select the correct assembly
code paths.

Note: when building the "i386" arch, we specify i586 as the system
processor because the compiler in the base runtime is actually
i586-unknown-linux-gnu.
parent a27a7b73
......@@ -640,11 +640,41 @@
},
{
"name": "webkitgtk4",
"cmake": true,
"build-options" : {
"cflags": "-O2 -g1",
"cxxflags": "-O2 -g1"
"cxxflags": "-O2 -g1",
"arch" : {
"i386" : {
"config-opts" : [
"-DCMAKE_SYSTEM_PROCESSOR=i586"
]
},
"arm" : {
"config-opts" : [
"-DCMAKE_SYSTEM_PROCESSOR=arm"
]
}
}
},
"sources": [
"config-opts": [
"-DPORT=GTK",
"-DCMAKE_BUILD_TYPE=Release",
"-DCMAKE_C_FLAGS_RELEASE:STRING=-DNDEBUG",
"-DCMAKE_CXX_FLAGS_RELEASE:STRING=-DNDEBUG",
"-DENABLE_ACCELERATED_2D_CANVAS=OFF",
"-DCMAKE_INSTALL_PREFIX:PATH=/usr",
"-DLIB_INSTALL_DIR:PATH=/usr/lib",
"-DSYSCONF_INSTALL_DIR:PATH=/usr/etc",
"-DSHARE_INSTALL_PREFIX:PATH=/usr/share",
"-DINCLUDE_INSTALL_DIR:PATH=/usr/include",
"-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON",
"-DBUILD_SHARED_LIBS:BOOL=ON",
"-DENABLE_GTKDOC=OFF",
"-DENABLE_VIDEO=ON",
"-DENABLE_WEB_AUDIO=ON"
],
"sources": [
{
"type": "archive",
"url": "http://www.webkitgtk.org/releases/webkitgtk-2.12.0.tar.xz",
......@@ -654,11 +684,6 @@
"type": "patch",
"path": "webkitgtk-cmake-buildapi.patch"
}
{
"type": "file",
"path": "webkitgtk-configure",
"dest-filename": "configure"
}
]
},
{
......
#!/bin/bash
# configure script adapter for cmake
# Copyright 2010, 2011, 2013 Colin Walters <walters@verbum.org>
# Copyright 2014 Debarshi Ray <debarshir@gnome.org>
# Licensed under the new-BSD license (http://www.opensource.org/licenses/bsd-license.php)
prefix=/usr
# Little helper function for reading args from the commandline.
# it automatically handles -a b and -a=b variants, and returns 1 if
# we need to shift $3.
read_arg() {
# $1 = arg name
# $2 = arg value
# $3 = arg parameter
local rematch='^[^=]*=(.*)$'
if [[ $2 =~ $rematch ]]; then
read "$1" <<< "${BASH_REMATCH[1]}"
else
read "$1" <<< "$3"
# There is no way to shift our callers args, so
# return 1 to indicate they should do it instead.
return 1
fi
}
while (($# > 0)); do
case "${1%%=*}" in
--prefix) read_arg prefix "$@" || shift;;
*) echo "Ignoring unknown option '$1'";;
esac
shift
done
srcdir=$(dirname $0)
exec cmake \
-DPORT=GTK \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_C_FLAGS_RELEASE:STRING="-DNDEBUG" \
-DCMAKE_CXX_FLAGS_RELEASE:STRING="-DNDEBUG" \
-DENABLE_ACCELERATED_2D_CANVAS=OFF \
-DCMAKE_INSTALL_PREFIX:PATH=${prefix} \
-DLIB_INSTALL_DIR:PATH=${prefix}/lib \
-DSYSCONF_INSTALL_DIR:PATH=%{prefix}/etc \
-DSHARE_INSTALL_PREFIX:PATH=%{prefix}/share \
-DINCLUDE_INSTALL_DIR:PATH=%{prefix}/include \
-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \
-DBUILD_SHARED_LIBS:BOOL=ON \
-DENABLE_GTKDOC=OFF \
-DENABLE_VIDEO=ON \
-DENABLE_WEB_AUDIO=ON \
${srcdir}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment