Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/wpewebkit-core.package
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ class Package(package.Package):
'proxy-libintl:libs',
'libpsl:libs',
'openjpeg:libs',
'openxr:libs',
'sqlite3:libs',
'xkbcommon:libs',
'wpewebkit',
Expand Down
43 changes: 43 additions & 0 deletions recipes/openxr.recipe
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# -*- Mode: Python -*- vi:si:et:sw=4:sts=4:ts=4:syntax=python
import shutil

from cerbero.tools.libtool import LibtoolLibrary
from cerbero.utils import android

class Recipe(recipe.Recipe):
name = 'openxr'
version = '1.1.52'
stype = SourceType.TARBALL
url = f'https://github.com/KhronosGroup/OpenXR-SDK/archive/refs/tags/release-{version}.tar.gz'
tarball_checksum = '9ace2834c5f86a77df339865bc072e71d766f4348f3914257d8f87ebe64994a9'
tarball_name = f'OpenXR-SDK-release-{version}.tar.gz'
tarball_dirname = f'OpenXR-SDK-release-{version}'

licenses = [License.Apachev2]

btype = BuildType.CMAKE
cmake_generator = 'ninja'
library_type = LibraryType.SHARED

files_libs = ['libopenxr_loader']
files_devel = ['include/openxr', 'lib/pkgconfig/openxr.pc']

configure_options = "\
-DBUILD_TESTING=OFF \
-DBUILD_TESTS=OFF \
-DBUILD_CONFORMANCE_TESTS=OFF \
-DCMAKE_INSTALL_LIBDIR=lib \
"

def prepare(self):
if self.config.target_platform == Platform.ANDROID:
ndk_path = self.config.env['ANDROID_NDK_TOOLCHAIN_BIN'] + "/../../../../.."
android_api = DistroVersion.get_android_api_version(self.config.target_distro_version)
android_arch = android.get_android_arch_name(self.config.target_arch)
self.configure_options += f' \
-DCMAKE_TOOLCHAIN_FILE={ndk_path}/build/cmake/android.toolchain.cmake \
-DANDROID_ABI={android_arch} \
-DANDROID_PLATFORM=android-{android_api} \
-DANDROID_STL=c++_shared \
'
self.append_env("CXXFLAGS", "-fexceptions")
4 changes: 4 additions & 0 deletions recipes/wpewebkit.recipe
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class Recipe(recipe.Recipe):
'libwebp',
'libwpe',
'openjpeg',
'openxr',
]
# TODO: support accessibility woff2
configure_options = '\
Expand All @@ -38,6 +39,7 @@ class Recipe(recipe.Recipe):
-DENABLE_JOURNALD_LOG=OFF \
-DENABLE_BUBBLEWRAP_SANDBOX=OFF \
-DENABLE_SPEECH_SYNTHESIS=OFF \
-DENABLE_WEBXR=ON \
-DUSE_ATK=OFF \
-DUSE_LCMS=OFF \
-DUSE_AVIF=OFF \
Expand Down Expand Up @@ -93,12 +95,14 @@ class Recipe(recipe.Recipe):
-DPNG_LIBRARY={self.config.prefix}/lib/libpng.so \
-DPNG_INCLUDE_DIR={self.config.prefix}/include \
'
self.append_env('CXXFLAGS', '-DXR_USE_GRAPHICS_API_OPENGL_ES')
if self.config.target_platform in (Platform.ANDROID):
arch_src_name = self.config.target_arch
if self.config.target_arch == Architecture.ARMv7:
arch_src_name = 'arm'
self.configure_options += ' -DCMAKE_SYSTEM_PROCESSOR=' + arch_src_name
self.configure_options += ' -DANDROID=1'
self.append_env('CXXFLAGS', '-DXR_USE_PLATFORM_ANDROID')
# Placeholder to allow enabling debug externally
self.append_env('WEBKIT_DEBUG', '')
else:
Expand Down
Loading