139.18. libdvbpsi-1.3.3
MPEG-TS PSI/SI table decoder — VLC's transport-stream and DVB demuxing
| Version | 1.3.3, release 1 |
| Shelf | video-libs — Video codecs, containers, subtitles, disc playback and effects libraries |
| Phase | 41_system (System), 997 of 1047 in build order |
| Licence | LGPL-2.1-or-later |
| Homepage | https://www.videolan.org/developers/libdvbpsi.html |
| Build time | 0.1 SBU |
| Installed size | 629.8 KiB in 83 files |
| Recipe | ports/core/video-libs/libdvbpsi/kpkgbuild |
About
libdvbpsi decodes and generates the PSI and SI tables of an MPEG transport stream: the program association and program map tables, and DVB’s service, event and time tables. VLC’s transport-stream demuxer is built on it, and without it VLC plays no .ts or .m2ts file and no DVB stream.
Sources
libdvbpsi-1.3.3.tar.bz2(476.6 KiB)
sha25602b5998bcf289cdfbd8757bedd5987e681309b0a25b3ffe6cebae599f7a00112
upstream: https://download.videolan.org/pub/libdvbpsi/1.3.3/libdvbpsi-1.3.3.tar.bz2
archive copy: sources-4/video-libs--libdvbpsi-1.3.3.tar.bz2
Dependencies
Depends on: pkgconf.
Required by (1): vlc.
Patches
build.sh applies these; kpkg applies nothing by itself.
dr_7c-realloc.patch— Corrects the AAC descriptor decoder insrc/descriptors/dr_7c.cand the TOT generator insrc/tables/tot.c. The decoder refuses a descriptor of length 0, and one shorter than three bytes whose type flag is set, before reading the bytes such a descriptor does not have; and it assigns the result of itsreallocback to the pointer it then fills, which otherwise goes on pointing at the blockreallocmay have freed. The generator writes the high bits ofdescriptors_loop_lengthshifted right by 8 instead of left.
Installation
From the repository root, inside the build container, this is the line kdosbuild runs for the port:
script/chroot/exec.sh bash -c 'source script/phases/41_system/phase.env && kpkg install libdvbpsi'
What kpkg does
kpkg runs these steps, in this order, as root inside the chroot. The port directory is /ports/core/video-libs/libdvbpsi.
1. Verify every declared source. Each file a sha256 = line names, found in the port directory or in /var/cache/kpkg/sources, must hash to its line; a mismatch stops the build before anything is unpacked.
cd /ports/core/video-libs/libdvbpsi
echo '02b5998bcf289cdfbd8757bedd5987e681309b0a25b3ffe6cebae599f7a00112 libdvbpsi-1.3.3.tar.bz2' | sha256sum -c -
2. Unpack. The work directory is emptied and the first source is unpacked into $SRC with its top directory stripped; any later tarball lands unstripped beside it in $SRC_ROOT, and a file that is not a tarball is copied into $SRC.
SRC_ROOT=/var/cache/kpkg/work/libdvbpsi
SRC=$SRC_ROOT/libdvbpsi-1.3.3
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf libdvbpsi-1.3.3.tar.bz2 -C "$SRC" --strip-components=1
Every config.guess and config.sub older than automake’s is then replaced with automake’s, so a configure script recognises the musl target.
3. Build. build.sh is sourced in a subshell under set -e, from $SRC, with name, version, release and the five paths PKGNAME, PORT_SRC, SRC_ROOT, SRC and PKG set as shell variables. Its body, verbatim:
patch -p1 -i "$PORT_SRC/dr_7c-realloc.patch"
./configure --prefix=/usr --libdir=/usr/lib --disable-static \
--enable-release \
--disable-debug \
--disable-gcc-sanitize
make
make DESTDIR=$PKG install
The switches, and why each is set:
--enable-release— Compile without-DDVBPSI_DIST, which configure adds toCFLAGSunless asked for a release build. The macro is read only by the example programs, to choose between the in-tree headers and the installed ones, so it changes nothing in the library.--disable-debug— No debug build. It is upstream’s default.--disable-gcc-sanitize— No AddressSanitizer build. It is upstream’s default.
The common switches of each build system are explained in the Flag glossary.
4. Package. kpkg removes libtool archives, the info directory index, mimeinfo.cache and every fonts.dir from $PKG, copies the source’s licence files into /usr/share/licenses/libdvbpsi, prunes what the image does not ship, lints the tree and rolls it reproducibly:
tar --sort=name --format=gnu --numeric-owner --owner=0 --group=0 \
--mtime=@$SOURCE_DATE_EPOCH \
--use-compress-program='xz -9 -T0 --block-size=32MiB --no-adjust' \
-cf libdvbpsi-1.3.3-1.tar.xz -C "$PKG" .
5. Adopt. kpkgadd installs the package’s files over the root, refusing a path another package owns, records the file list in /var/lib/kpkg/db/libdvbpsi, and runs the triggers its paths call for.
Contents
Installed libraries: libdvbpsi.so.
Installed directories: /usr/include/dvbpsi, /usr/share/licenses/libdvbpsi.
Short descriptions
libdvbpsi.pc |
libdvbpsi is a simple library designed for decoding and generation of MPEG TS and DVB PSI tables. |