Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
079b085
build: Remove requires_non_src_build option
turran Jun 2, 2024
d4913aa
recipe: repo_dir doesn't belong here
turran Jun 3, 2024
97c08d9
build: Differentiate the build and src vars
turran Jun 3, 2024
41770b8
source: Add a LocalDir Source type
turran Jun 3, 2024
8066198
Make it generate the package again
turran Jun 5, 2024
2de5821
wasm: Implement the emscripten bootstrapper
turran May 8, 2024
80de3c6
meson: don't try to setup rust if the variant is disabled
dememax Jun 11, 2024
ee59a90
web: force static libraries for all recipes
ylatuya Jun 12, 2024
da724bf
autoconf: bump version to 2.72
ylatuya Jun 12, 2024
2211f12
autotools: respect the recipe's library_type configuration
ylatuya Jun 12, 2024
5977e7a
meson: adjust system for emscripten builds
ylatuya Jun 12, 2024
8eaf57d
gst-plugins-base: set gl options when targetting the WEB platform
ylatuya Jun 12, 2024
697b01c
web: Define explicit options for {C,CXX,LD}FLAGS
dememax Jun 12, 2024
6a0aaa1
web: disable intrisics in opus
ylatuya Jun 12, 2024
fdc31ae
web: disable options and plugins for gstreamer and -base
ylatuya Jun 12, 2024
f19fb09
web: disable plugins not working for -good
ylatuya Jun 12, 2024
082e458
env: add gstreamer plugins path to PKG_CONFIG_PATH
ylatuya Jun 12, 2024
4ce83e6
web: disable options and plugins for -bad
ylatuya Jun 12, 2024
f3ce053
Update emscripten to 3.1.61
ylatuya Jun 13, 2024
406740e
build/oven: Fix build-deps command for a recipe with no deps
dememax Jun 13, 2024
be5cf09
emscripten: Show the version of SDK
dememax Jun 13, 2024
4e4578a
web: Support Emscripten builds for CMake
turran Nov 9, 2024
03a0cdb
web: Support emscripten triple in rust
turran Nov 9, 2024
21d7d03
cmake: Configure using emcmake
cfoch Nov 25, 2024
f34f3a2
Update emscripten to 3.1.68
rgonzalezfluendo Dec 6, 2024
42c4b00
wasm: update emsdk version to the latest one (4.0.6)
aslobodeniuk Apr 22, 2025
036c45a
build: Add the exe wrapper for emscripten
turran Jun 2, 2025
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
3 changes: 2 additions & 1 deletion cerbero/bootstrap/bootstrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,11 @@ def __new__(klass, config, system, toolchains, build_tools, offline, assume_yes)
return bs


from cerbero.bootstrap import linux, windows, android, osx, ios # noqa: E402
from cerbero.bootstrap import linux, windows, android, osx, ios, emscripten # noqa: E402

linux.register_all()
windows.register_all()
android.register_all()
osx.register_all()
ios.register_all()
emscripten.register_all()
64 changes: 64 additions & 0 deletions cerbero/bootstrap/emscripten.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# cerbero - a multi-platform build system for Open Source software
# Copyright (C) 2024 Fluendo S.A <support@fluendo.com>
# Authors: Maxim Dementyev <mdementyev@fluendo.com>
# Andoni Morales <amorales@fluendo.com>
# Jorge Zapata <jzapata@fluendo.com>
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Library General Public License for more details.
#
# You should have received a copy of the GNU Library General Public
# License along with this library; if not, write to the
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.

from cerbero.bootstrap import BootstrapperBase
from cerbero.bootstrap.bootstrapper import register_toolchain_bootstrapper
from cerbero.enums import Distro
from cerbero.utils import messages as m
from cerbero.utils import shell
import os.path
import shutil

EMSDK_VERSION = '4.0.6'
EMSDK_BUNDLE_EXT = '.tar.gz'
EMSDK_BASE_URL = 'https://github.com/emscripten-core/emsdk/archive/refs/tags/%s' + EMSDK_BUNDLE_EXT
EMSDK_CHECKSUMS = {'4.0.6' + EMSDK_BUNDLE_EXT: '2d3292d508b4f5477f490b080b38a34aaefed43e85258a1de72cb8dde3f8f3af'}


class EmscriptenToolchainBootstrapper(BootstrapperBase):
"""
Bootstrapper for Emscripten builds.
Installs the Emscripten SDK
"""

def __init__(self, config, offline, assume_yes):
super().__init__(config, offline, 'emscripten')
url = EMSDK_BASE_URL % (EMSDK_VERSION)
bundle_name = 'emsdk-' + EMSDK_VERSION + EMSDK_BUNDLE_EXT
urls = (url, bundle_name, EMSDK_CHECKSUMS[os.path.basename(url)])
self.fetch_urls.append(urls)
self.extract_steps.append((url, True, self.config.home_dir))

async def start(self, jobs=0):
sdk_path_after_extract = os.path.join(self.config.home_dir, 'emsdk-' + EMSDK_VERSION)
shutil.rmtree(self.config.toolchain_prefix) # to be sure it's rename and not a move
shutil.move(sdk_path_after_extract, self.config.toolchain_prefix)
m.message(f'Install Emscripten SDK {EMSDK_VERSION}...')
await shell.async_call_output(
['./emsdk', 'install', EMSDK_VERSION], cmd_dir=self.config.toolchain_prefix, cpu_bound=False
)
m.message('Activate Emscripten SDK...')
await shell.async_call_output(
['./emsdk', 'activate', EMSDK_VERSION], cmd_dir=self.config.toolchain_prefix, cpu_bound=False
)


def register_all():
register_toolchain_bootstrapper(Distro.EMSCRIPTEN, EmscriptenToolchainBootstrapper)
Loading