ENH Support SDL-based packages and add pyxel. ### Description

This adds SDL-based package support to Pyodide and adds pyxel as a PoC. Most of the troubleshooting is done by @kitao and pyxel devs, a big thanks to them.

This is on top of #3505

1) I linked only js part of SDL libraries to the main module and linked the native parts to the side module. So the size increase of the main module is small enough (~0.1MB increase to the pyodide.asm.js).

Before (in #3505):

```
5145705 pyodide.asm.data
1204075 pyodide.asm.js
8862216 pyodide.asm.wasm
```

After:

```
5145705 pyodide.asm.data
1346524 pyodide.asm.js
8905514 pyodide.asm.wasm
```

2) Emscripten draws everything into `Module.canvas`, but the canvas attribute is not set automatically (which makes sense as we don't output any HTML), so it is the user's job to set it manually.

For now, I am thinking of just mentioning it in the FAQ entry, "you need to set pyodide._module.canvas = ...". But it would be probably nice to have an API to set canvas, as pyodide._module is a private attribute.

### Checklists

- [x] Add a [CHANGELOG](https://github.com/pyodide/pyodide/blob/main/docs/project/changelog.md) entry
- [x] Add / update tests
- [x] Add new / update outdated documentation

### Demo

https://ryanking13.github.io/pyodide-pyxel-test

(mostly borrowed from the pyxel repository: https://github.com/kitao/pyxel/tree/main/wasm)

import pathlib
import sys
from typing import Any

from docutils import nodes
from docutils.parsers.rst import Directive
from sphinx import addnodes

base_dir = pathlib.Path(__file__).resolve().parents[3]
sys.path.append(str(base_dir / "pyodide-build"))

from pyodide_build.io import MetaConfig

PYODIDE_TESTONLY = "pyodide.test"
PYODIDE_STDLIB = "pyodide.stdlib"


def get_packages_summary_directive(app):
    class PyodidePackagesSummary(Directive):
        """A directive that dumps the full list of packages included in Pyodide in place."""

        required_arguments = 1

        def run(self):
            packages_root = base_dir / self.arguments[0]
            packages_list = self.get_package_metadata_list(packages_root)

            packages = {}
            for package in packages_list:
                try:
                    name, version, is_package, tag = self.parse_package_info(package)
                except Exception:
                    print(f"Warning: failed to parse package config for {package}")

                # skip libraries (e.g. libxml, libyaml, ...) and test only packages
                if not is_package or PYODIDE_TESTONLY in tag:
                    continue

                if PYODIDE_STDLIB in tag:
                    version = "Pyodide standard library"

                packages[name] = {
                    "name": name,
                    "version": version,
                }

            result = []
            columns = ("name", "version")
            table_markup = self.format_packages_table(packages, columns)
            result.extend(table_markup)

            return result

        def parse_package_info(
            self, config: pathlib.Path
        ) -> tuple[str, str, bool, list[str]]:
            yaml_data = MetaConfig.from_yaml(config)

            name = yaml_data.package.name
            version = yaml_data.package.version
            tag = yaml_data.package.tag
            is_package = yaml_data.build.package_type == "package"

            return name, version, is_package, tag

        def get_package_metadata_list(
            self, directory: pathlib.Path
        ) -> list[pathlib.Path]:
            """Return metadata files of packages in alphabetical order (case insensitive)"""
            return sorted(
                directory.glob("**/meta.yaml"),
                key=lambda path: path.parent.name.lower(),
            )

        def format_packages_table(
            self, packages: dict[str, Any], columns: tuple[str, ...]
        ) -> list[Any]:
            table_spec = addnodes.tabular_col_spec()
            table_spec["spec"] = r"\X{1}{2}\X{1}{2}"

            table = nodes.table("", classes=["longtable"])

            group = nodes.tgroup("", cols=len(columns))
            group.extend([nodes.colspec("", colwidth=100) for _ in columns])
            table.append(group)

            thead = nodes.thead()
            row = nodes.row()
            for column in columns:
                entry = nodes.entry()
                entry += nodes.paragraph(text=column.capitalize())
                row += entry

            thead.append(row)
            group += thead

            rows = []
            for pkg_info in packages.values():
                row = nodes.row()
                rows.append(row)
                for column in columns:
                    value = pkg_info[column]
                    entry = nodes.entry()
                    entry += nodes.paragraph(text=value)
                    row += entry

            tbody = nodes.tbody()
            tbody.extend(rows)
            group += tbody

            return [table_spec, table]

    return PyodidePackagesSummary

import pathlib
import sys
from typing import Any

from docutils import nodes
from docutils.parsers.rst import Directive
from sphinx import addnodes

base_dir = pathlib.Path(__file__).resolve().parents[3]
sys.path.append(str(base_dir / "pyodide-build"))

from pyodide_build.io import MetaConfig

PYODIDE_TESTONLY = "pyodide.test"
PYODIDE_STDLIB = "pyodide.stdlib"


def get_packages_summary_directive(app):
    class PyodidePackagesSummary(Directive):
        """A directive that dumps the full list of packages included in Pyodide in place."""

        required_arguments = 1

        def run(self):
            packages_root = base_dir / self.arguments[0]
            packages_list = self.get_package_metadata_list(packages_root)

            packages = {}
            for package in packages_list:
                try:
                    name, version, is_package, tag = self.parse_package_info(package)
                except Exception:
                    print(f"Warning: failed to parse package config for {package}")

                # skip libraries (e.g. libxml, libyaml, ...) and test only packages
                if not is_package or PYODIDE_TESTONLY in tag:
                    continue

                if PYODIDE_STDLIB in tag:
                    version = "Pyodide standard library"

                packages[name] = {
                    "name": name,
                    "version": version,
                }

            result = []
            columns = ("name", "version")
            table_markup = self.format_packages_table(packages, columns)
            result.extend(table_markup)

            return result

        def parse_package_info(
            self, config: pathlib.Path
        ) -> tuple[str, str, bool, list[str]]:
            yaml_data = MetaConfig.from_yaml(config)

            name = yaml_data.package.name
            version = yaml_data.package.version
            tag = yaml_data.package.tag
            is_package = yaml_data.build.package_type == "package"

            return name, version, is_package, tag

        def get_package_metadata_list(
            self, directory: pathlib.Path
        ) -> list[pathlib.Path]:
            """Return metadata files of packages in alphabetical order (case insensitive)"""
            return sorted(
                directory.glob("**/meta.yaml"),
                key=lambda path: path.parent.name.lower(),
            )

        def format_packages_table(
            self, packages: dict[str, Any], columns: tuple[str, ...]
        ) -> list[Any]:
            table_spec = addnodes.tabular_col_spec()
            table_spec["spec"] = r"\X{1}{2}\X{1}{2}"

            table = nodes.table("", classes=["longtable"])

            group = nodes.tgroup("", cols=len(columns))
            group.extend([nodes.colspec("", colwidth=100) for _ in columns])
            table.append(group)

            thead = nodes.thead()
            row = nodes.row()
            for column in columns:
                entry = nodes.entry()
                entry += nodes.paragraph(text=column.capitalize())
                row += entry

            thead.append(row)
            group += thead

            rows = []
            for pkg_info in packages.values():
                row = nodes.row()
                rows.append(row)
                for column in columns:
                    value = pkg_info[column]
                    entry = nodes.entry()
                    entry += nodes.paragraph(text=value)
                    row += entry

            tbody = nodes.tbody()
            tbody.extend(rows)
            group += tbody

            return [table_spec, table]

    return PyodidePackagesSummary
