# BOZ LGPL Relink Kit

This kit allows relinking the port with replacement LGPL libraries: vitaGL, sndfile, mpg123, vitashark, and mp3lame.

Use the softfp SDK to run any of the commands below:

```sh
docker run --rm -it -v "$PWD:/kit" -w /kit atamanenko/vitasdk-softfp:latest bash
```

Rebuild the bundled vitaGL source:

```sh
mkdir -p build/vitagl
cd build/vitagl
cmake -E tar xf ../../lgpl-libs/vitagl/source/vitagl-source.zip
cmake -E env NO_DEBUG=1 SOFTFP_ABI=1 NO_SPLASHSCREEN=1 HAVE_SHADER_CACHE=1 USE_SCRATCH_MEMORY=1 DEPTH_STENCIL_HACK=1 make -C vitagl
cd ../..
```

Relink and rebuild the VPK:

```sh
cmake -DVITAGL_A="$PWD/build/vitagl/vitagl/libvitaGL.a" -P relink/relink.cmake
```

Other LGPL libraries are linked against the ones bundled in the vitasdk-softfp Docker image. Their source and vdpm packages are here: https://github.com/vitasdk-softfp/packages


Then you can manually link them using:

```sh
cmake -DVITAGL_A=/path/libvitaGL.a -DSNDFILE_A=/path/libsndfile.a -DMPG123_A=/path/libmpg123.a -DVITASHARK_A=/path/libvitashark.a -DMP3LAME_A=/path/libmp3lame.a -P relink/relink.cmake
```

Output: `build/boz_vita.vpk`.
