Some MPD clients such as Cantata support giving tracks ratings as seen below. If you haven’t set up MPD yet, have a look at my other post “How to Set up MPD on Void Linux”.
Enabling Ratings in Cantata
In Cantata, track ratings are enabled by going to the menu on the right or
Edit in the toolbar, then
Preferences > Interface > Toolbar > Show Track Ratings.
Upon enabling them, I got an error message saying that this version of MPD “does not support stickers”.
Here is how I fixed it.
Building and Installing from Source
Void Linux’s MPD package does not support stickers because not everyone wants them, so making everyone install the SQLite database on their system is unnecessary. If we want track ratings, we need to enable SQLite support for MPD and then recompile it from source ourselves.
Void Linux uses
xbps-src to build packages.
There is a quickstart for setting up the build environment on Github.
As it says, you will need to clone the
void-packages repository and then
cd into it and run
./xbps-src binary-bootstrap, which might take a few minutes.
Once that finishes, the
srcpkgs/ directory has the tools and recipes to build every piece of software available through
xbps (plus a few more even).
Edit the Template
We are messing with the MPD package, so open
void-packages/srcpkgs/mpd/template in your text editor.
Now there are three lines we need to change:
configure_argssetting as follows:
configure_args="-Dopus=enabled -Dmikmod=enabled -Dneighbor=true -Dsqlite=enabled
This tells the build system that we want SQLite support.
-Dsqlite flag is documented here.
makedepends="avahi-glib-libs-devel boost-devel faad2-devel ffmpeg-devel sqlite-devel
Having SQLite support won’t do much good without having SQLite installed.
Now it’s time to actually compile MPD.
void-packages directory, run
./xbps-src pkg mpd.
This may take a few minutes.
Make the Switch
To switch to our version with SQLite support, uninstall the previous package with
sudo xbps-remove mpd.
Next, install the version we just compiled with
sudo xbps-install --repository hostdir/binpkgs mpd.
The old version is still probably running on your system, so you may need to
pkill mpd so that the new version starts.
As you have seen, Void Linux makes it very easy to reconfigure packages and build them yourself. If you ever run into a similar problem with a package not supporting an option you want, try a similar approach.