Splitting and understanding Vala's place in xbps-src
Introduction
A while back Void Linux started cross compiling GObject Introspection data using a combniation of qemu-user-static for running resulting binaries prelink and patches from Yocto.
A nice side-effect of having gir cross compilable is that now we can also generate vala bindings (vapi), with that in mind i started working on cleaning up the templates that generate vala bindings and making them appropriate for cross compilation.
Spltting Vala
The currently vala package is confused at best and willingly inefficient at worst, the separation is haphazard and we have no clue what goes where.
Let's put each part of Vala where it belongs.
libvala
This package will hold the libvala library for us, packages that link to libvala are:
gnome-builder-3.30.3_2: libvala-0.42.so.0 io.elementary.code-3.0.2_1: libvala-0.42.so.0 vala-0.42.5_1: libvala-0.42.so.0
Yeah, not much packages need it.
These are the files:
/usr/lib/libvala-0.42.so.0.0.0 /usr/lib/libvala-0.42.so.0 -> /usr/lib/libvala-0.42.so.0.0.0
installed_size is an attribute that can be queried with xbps-query -S
installed_size: 1691KB
vala
This is the main package, it will hold: vala, valac, vapigen, the common
libraries on /usr/share/vala-0.42/vapi
and the Makefile.vapigen from
/usr/share/vala/Makefile.vapigen
This is all the contents we need to include to make vala usable to generate vapi bindings, packages can simply include it in hostmakedepends and their job is done.
Here are the files:
/usr/bin/vala-gen-introspect-0.42 /usr/bin/valac-0.42 /usr/bin/vapigen-0.42 /usr/lib/pkgconfig/vapigen-0.42.pc /usr/lib/vala-0.42/gen-introspect-0.42 /usr/lib/vala-0.42/libvalaccodegen.so /usr/share/man/man1/vala-gen-introspect-0.42.1 /usr/share/man/man1/valac-0.42.1 /usr/share/man/man1/vapigen-0.42.1 /usr/share/vala/Makefile.vapigen /usr/share/vala-0.42/vapi/alsa.deps /usr/share/vala-0.42/vapi/alsa.vapi /usr/share/vala-0.42/vapi/atk.vapi /usr/share/vala-0.42/vapi/atspi-2.deps /usr/share/vala-0.42/vapi/atspi-2.vapi /usr/share/vala-0.42/vapi/avahi-client.vapi /usr/share/vala-0.42/vapi/avahi-gobject.deps /usr/share/vala-0.42/vapi/avahi-gobject.vapi /usr/share/vala-0.42/vapi/bzlib.vapi /usr/share/vala-0.42/vapi/cairo-xcb.deps /usr/share/vala-0.42/vapi/cairo-xcb.vapi /usr/share/vala-0.42/vapi/cairo.vapi /usr/share/vala-0.42/vapi/ccss-1.vapi /usr/share/vala-0.42/vapi/clutter-1.0.deps /usr/share/vala-0.42/vapi/clutter-1.0.vapi /usr/share/vala-0.42/vapi/clutter-gdk-1.0.deps /usr/share/vala-0.42/vapi/clutter-gdk-1.0.vapi /usr/share/vala-0.42/vapi/clutter-gst-2.0.deps /usr/share/vala-0.42/vapi/clutter-gst-2.0.vapi /usr/share/vala-0.42/vapi/clutter-gst-3.0.deps /usr/share/vala-0.42/vapi/clutter-gst-3.0.vapi /usr/share/vala-0.42/vapi/clutter-gtk-0.10.deps /usr/share/vala-0.42/vapi/clutter-gtk-0.10.vapi /usr/share/vala-0.42/vapi/clutter-gtk-1.0.deps /usr/share/vala-0.42/vapi/clutter-gtk-1.0.vapi /usr/share/vala-0.42/vapi/clutter-x11-1.0.deps /usr/share/vala-0.42/vapi/clutter-x11-1.0.vapi /usr/share/vala-0.42/vapi/cogl-1.0.deps /usr/share/vala-0.42/vapi/cogl-1.0.vapi /usr/share/vala-0.42/vapi/cogl-pango-1.0.deps /usr/share/vala-0.42/vapi/cogl-pango-1.0.vapi /usr/share/vala-0.42/vapi/curses.vapi /usr/share/vala-0.42/vapi/dbus-glib-1.vapi /usr/share/vala-0.42/vapi/enchant.vapi /usr/share/vala-0.42/vapi/fuse.deps /usr/share/vala-0.42/vapi/fuse.vapi /usr/share/vala-0.42/vapi/gconf-2.0.vapi /usr/share/vala-0.42/vapi/gdesktopenums-3.0.vapi /usr/share/vala-0.42/vapi/gdk-2.0.deps /usr/share/vala-0.42/vapi/gdk-2.0.vapi /usr/share/vala-0.42/vapi/gdk-3.0.deps /usr/share/vala-0.42/vapi/gdk-3.0.vapi /usr/share/vala-0.42/vapi/gdk-pixbuf-2.0.deps /usr/share/vala-0.42/vapi/gdk-pixbuf-2.0.vapi /usr/share/vala-0.42/vapi/gdk-x11-2.0.deps /usr/share/vala-0.42/vapi/gdk-x11-2.0.vapi /usr/share/vala-0.42/vapi/gdk-x11-3.0.deps /usr/share/vala-0.42/vapi/gdk-x11-3.0.vapi /usr/share/vala-0.42/vapi/gdl-1.0.deps /usr/share/vala-0.42/vapi/gdl-1.0.vapi /usr/share/vala-0.42/vapi/gdl-3.0.deps /usr/share/vala-0.42/vapi/gdl-3.0.vapi /usr/share/vala-0.42/vapi/gedit-2.20.deps /usr/share/vala-0.42/vapi/gedit-2.20.vapi /usr/share/vala-0.42/vapi/geocode-glib-1.0.deps /usr/share/vala-0.42/vapi/geocode-glib-1.0.vapi /usr/share/vala-0.42/vapi/gio-2.0.vapi /usr/share/vala-0.42/vapi/gio-unix-2.0.deps /usr/share/vala-0.42/vapi/gio-unix-2.0.vapi /usr/share/vala-0.42/vapi/gio-windows-2.0.deps /usr/share/vala-0.42/vapi/gio-windows-2.0.vapi /usr/share/vala-0.42/vapi/glib-2.0.vapi /usr/share/vala-0.42/vapi/gmodule-2.0.vapi /usr/share/vala-0.42/vapi/gnet-2.0.deps /usr/share/vala-0.42/vapi/gnet-2.0.vapi /usr/share/vala-0.42/vapi/gnome-desktop-2.0.deps /usr/share/vala-0.42/vapi/gnome-desktop-2.0.vapi /usr/share/vala-0.42/vapi/gnome-desktop-3.0.deps /usr/share/vala-0.42/vapi/gnome-desktop-3.0.vapi /usr/share/vala-0.42/vapi/gnome-vfs-2.0.vapi /usr/share/vala-0.42/vapi/gnutls.vapi /usr/share/vala-0.42/vapi/gobject-2.0.vapi /usr/share/vala-0.42/vapi/gobject-introspection-1.0.vapi /usr/share/vala-0.42/vapi/goocanvas.deps /usr/share/vala-0.42/vapi/goocanvas.vapi /usr/share/vala-0.42/vapi/graphene-1.0.deps /usr/share/vala-0.42/vapi/graphene-1.0.vapi /usr/share/vala-0.42/vapi/gsl.vapi /usr/share/vala-0.42/vapi/gst-editing-services-1.0.deps /usr/share/vala-0.42/vapi/gst-editing-services-1.0.vapi /usr/share/vala-0.42/vapi/gstreamer-1.0.vapi /usr/share/vala-0.42/vapi/gstreamer-allocators-1.0.deps /usr/share/vala-0.42/vapi/gstreamer-allocators-1.0.vapi /usr/share/vala-0.42/vapi/gstreamer-app-1.0.deps /usr/share/vala-0.42/vapi/gstreamer-app-1.0.vapi /usr/share/vala-0.42/vapi/gstreamer-audio-1.0.deps /usr/share/vala-0.42/vapi/gstreamer-audio-1.0.vapi /usr/share/vala-0.42/vapi/gstreamer-bad-allocators-1.0.deps /usr/share/vala-0.42/vapi/gstreamer-bad-allocators-1.0.vapi /usr/share/vala-0.42/vapi/gstreamer-base-1.0.deps /usr/share/vala-0.42/vapi/gstreamer-base-1.0.vapi /usr/share/vala-0.42/vapi/gstreamer-check-1.0.deps /usr/share/vala-0.42/vapi/gstreamer-check-1.0.vapi /usr/share/vala-0.42/vapi/gstreamer-controller-1.0.deps /usr/share/vala-0.42/vapi/gstreamer-controller-1.0.vapi /usr/share/vala-0.42/vapi/gstreamer-fft-1.0.deps /usr/share/vala-0.42/vapi/gstreamer-fft-1.0.vapi /usr/share/vala-0.42/vapi/gstreamer-net-1.0.deps /usr/share/vala-0.42/vapi/gstreamer-net-1.0.vapi /usr/share/vala-0.42/vapi/gstreamer-pbutils-1.0.deps /usr/share/vala-0.42/vapi/gstreamer-pbutils-1.0.vapi /usr/share/vala-0.42/vapi/gstreamer-player-1.0.deps /usr/share/vala-0.42/vapi/gstreamer-player-1.0.vapi /usr/share/vala-0.42/vapi/gstreamer-riff-1.0.deps /usr/share/vala-0.42/vapi/gstreamer-riff-1.0.vapi /usr/share/vala-0.42/vapi/gstreamer-rtp-1.0.deps /usr/share/vala-0.42/vapi/gstreamer-rtp-1.0.vapi /usr/share/vala-0.42/vapi/gstreamer-rtsp-1.0.deps /usr/share/vala-0.42/vapi/gstreamer-rtsp-1.0.vapi /usr/share/vala-0.42/vapi/gstreamer-rtsp-server-1.0.deps /usr/share/vala-0.42/vapi/gstreamer-rtsp-server-1.0.vapi /usr/share/vala-0.42/vapi/gstreamer-sdp-1.0.deps /usr/share/vala-0.42/vapi/gstreamer-sdp-1.0.vapi /usr/share/vala-0.42/vapi/gstreamer-tag-1.0.deps /usr/share/vala-0.42/vapi/gstreamer-tag-1.0.vapi /usr/share/vala-0.42/vapi/gstreamer-video-1.0.deps /usr/share/vala-0.42/vapi/gstreamer-video-1.0.vapi /usr/share/vala-0.42/vapi/gstreamer-webrtc-1.0.deps /usr/share/vala-0.42/vapi/gstreamer-webrtc-1.0.vapi /usr/share/vala-0.42/vapi/gtk+-2.0.deps /usr/share/vala-0.42/vapi/gtk+-2.0.vapi /usr/share/vala-0.42/vapi/gtk+-3.0.deps /usr/share/vala-0.42/vapi/gtk+-3.0.vapi /usr/share/vala-0.42/vapi/gtk+-4.0.deps /usr/share/vala-0.42/vapi/gtk+-4.0.vapi /usr/share/vala-0.42/vapi/gtk+-unix-print-2.0.deps /usr/share/vala-0.42/vapi/gtk+-unix-print-2.0.vapi /usr/share/vala-0.42/vapi/gtk+-unix-print-3.0.deps /usr/share/vala-0.42/vapi/gtk+-unix-print-3.0.vapi /usr/share/vala-0.42/vapi/gtk+-unix-print-4.0.deps /usr/share/vala-0.42/vapi/gtk+-unix-print-4.0.vapi /usr/share/vala-0.42/vapi/gtkmozembed.deps /usr/share/vala-0.42/vapi/gtkmozembed.vapi /usr/share/vala-0.42/vapi/gtksourceview-2.0.deps /usr/share/vala-0.42/vapi/gtksourceview-2.0.vapi /usr/share/vala-0.42/vapi/gudev-1.0.deps /usr/share/vala-0.42/vapi/gudev-1.0.vapi /usr/share/vala-0.42/vapi/hal.deps /usr/share/vala-0.42/vapi/hal.vapi /usr/share/vala-0.42/vapi/hildon-1.deps /usr/share/vala-0.42/vapi/hildon-1.vapi /usr/share/vala-0.42/vapi/hildon-fm-2.deps /usr/share/vala-0.42/vapi/hildon-fm-2.vapi /usr/share/vala-0.42/vapi/javascriptcoregtk-4.0.vapi /usr/share/vala-0.42/vapi/json-glib-1.0.deps /usr/share/vala-0.42/vapi/json-glib-1.0.vapi /usr/share/vala-0.42/vapi/libarchive.deps /usr/share/vala-0.42/vapi/libarchive.vapi /usr/share/vala-0.42/vapi/libbonoboui-2.0.vapi /usr/share/vala-0.42/vapi/libdaemon.vapi /usr/share/vala-0.42/vapi/libepc-1.0.vapi /usr/share/vala-0.42/vapi/libesmtp.vapi /usr/share/vala-0.42/vapi/libftdi.deps /usr/share/vala-0.42/vapi/libftdi.vapi /usr/share/vala-0.42/vapi/libgeoclue-2.0.deps /usr/share/vala-0.42/vapi/libgeoclue-2.0.vapi /usr/share/vala-0.42/vapi/libglade-2.0.deps /usr/share/vala-0.42/vapi/libglade-2.0.vapi /usr/share/vala-0.42/vapi/libgnome-2.0.vapi /usr/share/vala-0.42/vapi/libgnome-menu-3.0.deps /usr/share/vala-0.42/vapi/libgnome-menu-3.0.vapi /usr/share/vala-0.42/vapi/libgnome-menu.vapi /usr/share/vala-0.42/vapi/libgnomeui-2.0.deps /usr/share/vala-0.42/vapi/libgnomeui-2.0.vapi /usr/share/vala-0.42/vapi/libgrss.deps /usr/share/vala-0.42/vapi/libgrss.vapi /usr/share/vala-0.42/vapi/libgsf-1.deps /usr/share/vala-0.42/vapi/libgsf-1.vapi /usr/share/vala-0.42/vapi/libgvc.vapi /usr/share/vala-0.42/vapi/libmagic.vapi /usr/share/vala-0.42/vapi/libnl-1.vapi /usr/share/vala-0.42/vapi/libnl-2.0.deps /usr/share/vala-0.42/vapi/libnl-2.0.vapi /usr/share/vala-0.42/vapi/libnl-3.0.deps /usr/share/vala-0.42/vapi/libnl-3.0.vapi /usr/share/vala-0.42/vapi/libnotify.deps /usr/share/vala-0.42/vapi/libnotify.vapi /usr/share/vala-0.42/vapi/liboobs-1.vapi /usr/share/vala-0.42/vapi/libosso.vapi /usr/share/vala-0.42/vapi/libpanelapplet-2.0.deps /usr/share/vala-0.42/vapi/libpanelapplet-2.0.vapi /usr/share/vala-0.42/vapi/libpeas-1.0.deps /usr/share/vala-0.42/vapi/libpeas-1.0.vapi /usr/share/vala-0.42/vapi/libpeas-gtk-1.0.deps /usr/share/vala-0.42/vapi/libpeas-gtk-1.0.vapi /usr/share/vala-0.42/vapi/libpq.vapi /usr/share/vala-0.42/vapi/libsexy.deps /usr/share/vala-0.42/vapi/libsexy.vapi /usr/share/vala-0.42/vapi/libsoup-2.4.deps /usr/share/vala-0.42/vapi/libsoup-2.4.vapi /usr/share/vala-0.42/vapi/libusb-1.0.deps /usr/share/vala-0.42/vapi/libusb-1.0.vapi /usr/share/vala-0.42/vapi/libusb.vapi /usr/share/vala-0.42/vapi/libwnck-1.0.deps /usr/share/vala-0.42/vapi/libwnck-1.0.vapi /usr/share/vala-0.42/vapi/libwnck-3.0.deps /usr/share/vala-0.42/vapi/libwnck-3.0.vapi /usr/share/vala-0.42/vapi/libxml-2.0.vapi /usr/share/vala-0.42/vapi/linux.deps /usr/share/vala-0.42/vapi/linux.vapi /usr/share/vala-0.42/vapi/loudmouth-1.0.vapi /usr/share/vala-0.42/vapi/lua.vapi /usr/share/vala-0.42/vapi/mysql.vapi /usr/share/vala-0.42/vapi/orc-0.4.vapi /usr/share/vala-0.42/vapi/packagekit-glib2.deps /usr/share/vala-0.42/vapi/packagekit-glib2.vapi /usr/share/vala-0.42/vapi/pango.deps /usr/share/vala-0.42/vapi/pango.vapi /usr/share/vala-0.42/vapi/pangocairo.deps /usr/share/vala-0.42/vapi/pangocairo.vapi /usr/share/vala-0.42/vapi/pixman-1.vapi /usr/share/vala-0.42/vapi/polkit-agent-1.deps /usr/share/vala-0.42/vapi/polkit-agent-1.vapi /usr/share/vala-0.42/vapi/polkit-gobject-1.deps /usr/share/vala-0.42/vapi/polkit-gobject-1.vapi /usr/share/vala-0.42/vapi/poppler-glib.deps /usr/share/vala-0.42/vapi/poppler-glib.vapi /usr/share/vala-0.42/vapi/posix.vapi /usr/share/vala-0.42/vapi/purple.deps /usr/share/vala-0.42/vapi/purple.vapi /usr/share/vala-0.42/vapi/raptor.vapi /usr/share/vala-0.42/vapi/rasqal.deps /usr/share/vala-0.42/vapi/rasqal.vapi /usr/share/vala-0.42/vapi/readline.vapi /usr/share/vala-0.42/vapi/rest-0.7.deps /usr/share/vala-0.42/vapi/rest-0.7.vapi /usr/share/vala-0.42/vapi/rest-extras-0.7.deps /usr/share/vala-0.42/vapi/rest-extras-0.7.vapi /usr/share/vala-0.42/vapi/sdl-gfx.deps /usr/share/vala-0.42/vapi/sdl-gfx.vapi /usr/share/vala-0.42/vapi/sdl-image.deps /usr/share/vala-0.42/vapi/sdl-image.vapi /usr/share/vala-0.42/vapi/sdl-mixer.deps /usr/share/vala-0.42/vapi/sdl-mixer.vapi /usr/share/vala-0.42/vapi/sdl-net.deps /usr/share/vala-0.42/vapi/sdl-net.vapi /usr/share/vala-0.42/vapi/sdl-ttf.deps /usr/share/vala-0.42/vapi/sdl-ttf.vapi /usr/share/vala-0.42/vapi/sdl.vapi /usr/share/vala-0.42/vapi/sqlite3.vapi /usr/share/vala-0.42/vapi/taglib_c.vapi /usr/share/vala-0.42/vapi/tiff.vapi /usr/share/vala-0.42/vapi/tokyocabinet.vapi /usr/share/vala-0.42/vapi/udisks2.deps /usr/share/vala-0.42/vapi/udisks2.vapi /usr/share/vala-0.42/vapi/unique-1.0.deps /usr/share/vala-0.42/vapi/unique-1.0.vapi /usr/share/vala-0.42/vapi/v4l2.vapi /usr/share/vala-0.42/vapi/vte-2.90.deps /usr/share/vala-0.42/vapi/vte-2.90.vapi /usr/share/vala-0.42/vapi/vte.deps /usr/share/vala-0.42/vapi/vte.vapi /usr/share/vala-0.42/vapi/webkit-1.0.deps /usr/share/vala-0.42/vapi/webkit-1.0.vapi /usr/share/vala-0.42/vapi/webkit2gtk-4.0.deps /usr/share/vala-0.42/vapi/webkit2gtk-4.0.vapi /usr/share/vala-0.42/vapi/webkit2gtk-web-extension-4.0.deps /usr/share/vala-0.42/vapi/webkit2gtk-web-extension-4.0.vapi /usr/share/vala-0.42/vapi/x11.vapi /usr/share/vala-0.42/vapi/xcb-icccm.deps /usr/share/vala-0.42/vapi/xcb-icccm.vapi /usr/share/vala-0.42/vapi/xcb.vapi /usr/share/vala-0.42/vapi/xtst.deps /usr/share/vala-0.42/vapi/xtst.vapi /usr/share/vala-0.42/vapi/zlib.vapi /usr/bin/vala -> /usr/bin/vala-0.42 /usr/bin/vala-0.42 -> /usr/bin/valac-0.42 /usr/bin/vala-gen-introspect -> /usr/bin/vala-gen-introspect-0.42 /usr/bin/valac -> /usr/bin/valac-0.42 /usr/bin/vapigen -> /usr/bin/vapigen-0.42 /usr/lib/pkgconfig/vapigen.pc -> /usr/lib/pkgconfig/vapigen-0.42.pc /usr/share/man/man1/vala-gen-introspect.1 -> /usr/share/man/man1/vala-gen-introspect-0.42.1 /usr/share/man/man1/valac.1 -> /usr/share/man/man1/valac-0.42.1 /usr/share/man/man1/vapigen.1 -> /usr/share/man/man1/vapigen-0.42.1
installed_size: 8640KB
valadoc
This package includes the libvaladoc library (like libvala) and also the utilities
for generate vala documentation, the valadoc-0.42 executable, the assets on
/usr/share/valadoc/icons
and some helper internal libraries/plugins.
There isn't a split between valadoc and libvaladoc like there is between from vala and libvala because nobody uses valadoc.
Here are packages that link to libvaladoc:
Your eyes aren't deceived, your page didn't fail to load, it is nothing, considering that let's keep this away from everyone else.
install_size: 1388KB
vala-devel
This is a development package that holds the headers, some m4 stuff and other stuff required for linking against libvala itself, if you remember from above only vala needs it and 2 IDEs, gnome-builder and io.elementary.code.
These are the files:
/usr/include/vala-0.42/vala.h /usr/include/vala-0.42/valagee.h /usr/lib/pkgconfig/libvala-0.42.pc /usr/share/aclocal/vala.m4 /usr/share/aclocal/vapigen.m4 /usr/share/vala/vapi/libvala-0.42.vapi /usr/lib/libvala-0.42.so -> /usr/lib/libvala-0.42.so.0.0.0<Paste>
Lots of package wrongly depend on vala-devel because it used to hold Makefile.vapigen.
installed_size: 516KB
valadoc-devel
This is the same as vala-devel but for linking against valadoc which manages to match the uselessness of Aqua, nobody even links against libvaladoc, we just split it here because somebody in the future might do it and it is encouraged in Void.
Files:
/usr/include/valadoc-0.42/valadoc.h /usr/lib/pkgconfig/valadoc-0.42.pc /usr/share/vala/vapi/valadoc-0.42.deps /usr/share/vala/vapi/valadoc-0.42.vapi /usr/lib/libvaladoc-0.42.so -> /usr/lib/libvaladoc-0.42.so.0.0.0
installed_size: 400KB
vala-doc
This is the developer documentation of Vala itself in the form of GNOME devhelp books. Almost nobody will install it and it is only meant for users of gnome-builder and other IDEs, and some people that use plugins for vim and all that jazz.
Files:
/usr/share/devhelp/books/vala-0.42/Attributes.html /usr/share/devhelp/books/vala-0.42/Classes.html /usr/share/devhelp/books/vala-0.42/Concepts.html /usr/share/devhelp/books/vala-0.42/Delegates.html /usr/share/devhelp/books/vala-0.42/Enumerated_types__Enums_.html /usr/share/devhelp/books/vala-0.42/Errors.html /usr/share/devhelp/books/vala-0.42/Expressions.html /usr/share/devhelp/books/vala-0.42/GIDL_metadata_format.html /usr/share/devhelp/books/vala-0.42/GIR_metadata_format.html /usr/share/devhelp/books/vala-0.42/Generics.html /usr/share/devhelp/books/vala-0.42/Interfaces.html /usr/share/devhelp/books/vala-0.42/Methods.html /usr/share/devhelp/books/vala-0.42/Namespaces.html /usr/share/devhelp/books/vala-0.42/Overview.html /usr/share/devhelp/books/vala-0.42/Preprocessor.html /usr/share/devhelp/books/vala-0.42/Statements.html /usr/share/devhelp/books/vala-0.42/Structs.html /usr/share/devhelp/books/vala-0.42/Types.html /usr/share/devhelp/books/vala-0.42/default.css /usr/share/devhelp/books/vala-0.42/index.html /usr/share/devhelp/books/vala-0.42/vala-0.42.devhelp2
installed_size: 315KB
Fitting in xbps-src
Now that they have a somewhat sane separation instead of the no-brainer that was before we can provide guidelines of what to put where inside xbps-src templates.
Generating vapi
This is the most common usage of vala inside xbps-src, to generate vala
bindings for usage in other packages. There is a build_option dedicated
to it called vala
.
Currently 21 packages use the vapi
build option to provide the option
to generate vala bindings, some do so unconditionally or use the old, now
wrong style of checking whether we are cross compiling.
Now packages that want to generate vala bindings are encouraged to:
- Add the vala build_option like this:
build_options="vala"
Note that vala usually requires GObject Introspection, so it is recommended
that you include them as well via the gir
build_option.
And after adding the vala build_option to add vala to hostmakedepends
conditionally using vopt_if
.
hostmakedepends="foo bar $(vopt_if vala vala)
If you're providing a -devel package you should move the vala bindings there,
also doing it conditionally with if [ "$build_option_vala" ]; then
.
foo-devel_package() { short_desc+=" - development files" depends="foo-${version}_${revision} pkg_install() { vmove "usr/lib/*.so" vmove usr/include if [ "$build_option_vala" ]; then vmove usr/share/vala fi } }
Linking libvala
The second most common usage with 2 total users is linking against libvala. For that just add libvala-devel to makedepends and vala to hostmakedepends.
hostmakedepends="vala" makedepends="vala-devel"
That will provide all content necessary to link against libvala itself.
Linking libvaladoc
This has 0 total users but I'm going to write it down anyways, just do the same as above but with valadoc-devel instead of vala-devel
hostmakedepends="vala" makedepends="valadoc-devel"
Benefits
This new organisation brings in a couple of benefits to Void Linux, the maintainers and the end users.
Size reduction
Packages are now smaller and will take less time to install when building and take up less space on disk.
Here is a nice table:
Package | Before | After | Change |
---|---|---|---|
libvala | 2665KB | 1691KB | -974KB |
vala | 9052KB | 8640KB | -412KB |
vala-devel | 1233KB | 516KB | -704KB |
valadoc | N/A | 1388KB | 1388KB |
valadoc-devel | N/A | 400KB | 400KB |
vala-doc | N/A | 315KB | 315KB |
Total | 12950KB | 12950KB | 0KB |
Keen readers will notice the total size didn't really change, but on the other side the most used packages, libvala, vala and vala-devel are the ones that saw actual size reductions. Sounds like a pretty nice trade-off, total size remains but the packages that see most use are smaller.
Simpler usage
It is now much simpler to use it in xbps-src as noted above we now know where and how we should include each component for each use case.
Unnecessary libraries
We no longer include libvaladoc for no reason, which is very good, it was just sitting there, destined to do absolutely nothing.
Closing
Some wild changes but overall pretty welcome ones, they are not yet in Void Linux, we need this pull request to be merged.