127.14. liblangtag-0.6.8
Library for parsing, matching and canonicalising BCP 47 language tags
0.6.8-1 · LGPL-3.0-or-later OR MPL-2.0 · 0.5 SBU · 3.3 MiB, 100 files · 41_system, 684 of 1047 · ports/core/i18n/liblangtag
Homepage: https://gitlab.com/tagoh/liblangtag
liblangtag parses, validates, matches and canonicalises BCP 47 language tags (en-GB, zh-Hant-TW, sr-Latn) against the IANA language subtag registry and the CLDR data it carries. libetonyek uses it for the languages of the text in iWork documents. liblangtag-gobject is the GObject wrapper, with an introspection typelib.
Depends on: pkgconf, libxml2, glib, gobject-introspection.
Required by (1): libetonyek.
Sources: liblangtag-0.6.8.tar.bz2 (750.5 KiB). Every step kpkg takes applies to this port.
Install: script/chroot/exec.sh bash -c 'source script/phases/41_system/phase.env && kpkg install liblangtag'
build.sh:
./configure --prefix=/usr --sysconfdir=/etc --libdir=/usr/lib \
--disable-static \
--disable-test \
--enable-introspection=yes \
--disable-gtk-doc
make
make DESTDIR=$PKG install
--disable-static— Shared library only; nothing links the archive.--disable-test— No unit tests, which need thecheckframework.--enable-introspection=yes— Buildliblangtag-gobjectand itsLangTag-0.6typelib and require gobject-introspection. Upstream’sautodrops the GObject library silently when the scanner is missing.--disable-gtk-doc— Do not regenerate the gtk-doc API reference. The tarball carries it already built, andmake installinstalls that copy under/usr/share/gtk-doc/html/liblangtag, which the package keeps.
Libraries: liblangtag-gobject.so, liblangtag.so.
Directories: /usr/include/liblangtag, /usr/lib/liblangtag, /usr/share/gtk-doc/html/liblangtag, /usr/share/liblangtag, /usr/share/licenses/liblangtag.
The source is LibreOffice’s mirror of the release tarball, the same file upstream’s GitLab release links, because the tag archive GitLab generates has no configure. configure looks for locale.alias under the locale directory and builds its alias table from it when it is there; otherwise the library uses the table shipped in the source. The subtag registry XML is rebuilt from the registry text in the tarball by a small program the build compiles; nothing is downloaded.
The BCP 47 extensions (-t- transformed content and -u- Unicode locale) are modules the library opens at run time from /usr/lib/liblangtag.