# FormCapy browser runtime source and relink materials

## Status and scope

These downloads and selected original members were checked against fixed hashes.
**No native/WASM rebuild has been performed by this collector.** This inventory
is not a legal compliance certification or a byte-identical rebuild claim.
The official wheel has no independent per-library build attestation. Matching
evidence and limits are recorded in SOURCE-MANIFEST.json.

The five lxml recipes declare static libiconv 1.16, libxml2 2.15.3, libxslt 1.1.45
and zlib 1.3.1; lxml 6.1.3 links with -liconv. Their original meta.yaml files are
under materials/recipes/packages/. They declare no source.patches. This is a
different build from the project's Windows wheel and its Windows source kit.

pypdf 6.21.4 is supplied as an unmodified
pure-Python PyPI wheel for local PDF text extraction. Its matching source
distribution, original BSD-3-Clause LICENSE and pyproject.toml are included.
It needs no native/WASM rebuild. Optional cryptography, image and font packages
are not part of this runtime; encrypted PDFs and OCR are not supported.

## Get the original sources

Each source is listed separately in SOURCE-MANIFEST.json and index.html. Files
below 25 MiB are supplied unchanged in sources/. Larger archives are split into
20 MiB binary parts without recompression. Reassemble and verify an original:

```sh
python reassemble.py cpython work/Python-3.14.2.tgz
python reassemble.py emscripten work/emscripten-5.0.3.tar.gz
```

The helper also works for an unsplit source ID. It verifies every part and the
whole archive. It refuses to overwrite an existing destination. Original license
and copyright bytes are in materials/; source archives also retain all original
source and notices. A file labelled as source/build material does not imply that
every component inside that archive is linked into the browser runtime.

## Fixed build inputs

- Pyodide 314.0.7: b1e4fcc2488962f6360a97f19b9982d6fdb5d16f
- CPython 3.14.2; ABI 2026_0, wasm32
- Emscripten SDK 5.0.3: 285c424dfa9e83b03cf8490c65ceadb7c45f28eb
- Recipes 314-20260911: fc8587207ecbf0fb54305d5da25ab7ed70f126d3
- Recipes' pyodide-build submodule: 26a30ea0c7274d0f99220c5d54e8938a28afb46c
- Core's pyodide-build submodule: 79fb82b2a576a833a12f3889061ca976de2f4167
- hiwire: 6a1e67280a15d929ebeceee54a6358c9c8d5f697

The two pyodide-build submodule revisions are intentionally supplied separately.
The C/C++ compiler binaries, SDK activation, host Python and host build tools are
external prerequisites; no downloaded compiler binary is represented as included.
Use the requirements and build instructions in these exact source revisions.

## Pure-Python pypdf source

The source archive is listed as `pypdf`, and its original wheel as
`pypdf-published-wheel`. Reassemble either through the same helper if needed.
The supplied pyproject.toml identifies the flit build backend. A modified wheel
can be built in an isolated host Python environment using those declared build
requirements; that rebuild has not been performed here. To ship a replacement,
update the wheel filename and hashes in browser/runtime.json and the matching
source pins, then rebuild the static application. Text extraction does not
recover a PDF's semantic structure, images or original Word layout.

## Modify libiconv and rebuild the lxml wheel

1. Work on a Linux build host with native host Python 3.14.2, a native compiler,
   Git, CMake, autotools, and Emscripten SDK 5.0.3 activated. Follow the supplied
   Pyodide source's build instructions to obtain its matching sysroot/xbuildenv;
   do not silently substitute a newer ABI or SDK. Put the supplied pyodide-build
   archives at the respective repositories' pyodide-build submodule paths.
2. Unpack the five original native source archives, the Pyodide source, recipes,
   and recipes' pyodide-build source. Install that local pyodide-build package
   into an isolated host environment. Its build_recipes CLI source and
   pyproject.toml are included as readable material.
3. Edit your own copy of the unpacked libiconv 1.16 source. In a working copy of
   packages/libiconv/meta.yaml, replace source.url/source.sha256 with source.path
   pointing at this modified directory (resolved relative to that recipe).
   Preserve the original recipe alongside your changed recipe and describe your
   modifications. For an unmodified rebuild, retain the pinned URL and hash.
   The other four recipes can likewise use their supplied local source trees.
4. From the recipes checkout, build the complete dependent set using a clean
   build directory so an earlier stock libiconv cannot be reused:

   ```sh
   pyodide build-recipes libiconv libzlib libxml libxslt lxml \
     --recipe-dir packages --force-rebuild --install --install-dir rebuilt-wheels
   ```

   Retain the static-library configure/CMake options from the supplied recipes:
   libiconv --disable-shared; libxml --with-iconv and --with-zlib pointing at
   WASM_LIBRARY_DIR; libxslt --disable-shared --without-crypto; lxml -liconv.
   If build prerequisites or the exact sysroot are unavailable, report that
   limitation. These commands describe the upstream flow; this collector has
   not executed or validated a complete rebuild on this host.
5. Keep the rebuilt lxml wasm wheel and its build logs, original notices,
   modified sources, recipe changes and updated hashes. The wheel tag must stay
   compatible with cp314/pyemscripten_2026_0_wasm32 for this runtime. A modified
   wheel normally has a different SHA-256 and must not retain the stock hash.
6. In a source checkout of FormCapy, replace the static site's lxml wheel and
   its pyodide-lock.json package entry with your rebuilt wheel filename and
   SHA-256. Update the source manifest for your changed sources. Rebuild the
   static artifact using that checkout's browser build instructions, then serve
   it from your own HTTPS origin. No original signing key or account is needed
   to modify the formatter or host your own replacement wheel.

You may modify the library/work for your own use and reverse engineer it to debug
such modifications as allowed by the applicable licenses. GNU libiconv's original
COPYING.LIB and other notices are supplied under materials/libiconv/. Pyodide and
hiwire's MPL texts and corresponding source archives are listed in index.html.
The application and each other component retain their respective licenses.

## Remaining work before publication

- Integrate this complete output directory into the actual static artifact and
  link its index from the application; a private build directory is not delivery.
- Verify runtime/wheel files in the final artifact independently against their
  runtime manifest. This collector checks the declared runtime identity and its
  pinned downloaded source/wheel materials, not a final deployed site.
- Record any further source changes and dependencies added after this manifest.
- Review actual relink success separately; material collection alone does not
  prove a reproducible native build or settle every redistribution question.
