[vlc-devel] [PATCH] codec: fluidsynth: look for sound fonts in $XDG_DATA_DIRS

Raitis V veinbahs at gmail.com
Mon Mar 19 12:40:13 CET 2018


> Thomas Guillem: You should use asprintf here

Gotcha.


> Thomas Guillem: This code is weird to read.
> Rémi Denis-Courmont: This would probably be simpler with GLOB_APPEND.

Yeah, looks like GLOB_APPEND could help here.


> And I don't think VLC has any business in /usr/local unless that is the
> installation prefix. At this point, you are probably better off with
> config_GetDataDir().

Well, that will¹ default to /usr/local/share/vlc, which means that the sound
fonts installed by the package manager won't be visible unless pointed to by
the $XDG_DATA_DIRS, but they should(!) because it should default to
/usr/local/share:/usr/share, as mentioned earlier.

1 — judging by
  1. vlc/src/posix/dirs.c:  return strdup ((path != NULL) ? path :
PKGDATADIR);
  2. src/Makefile.am:       -DPKGDATADIR=\"$(vlcdatadir)\" \
  3. configure.ac:47:       vlcdatadir="\${datadir}/\${PKGDIR}"
  4. configure.ac:12:       PKGDIR="vlc"
  5. https://www.gnu.org/prep/standards/html_node/Directory-Variables.html

So either config_GetDataDir isn't the right source for the information
or it has incorrect contents. So which one is it?


On Sun, Feb 25, 2018 at 9:38 PM, Rémi Denis-Courmont <remi at remlab.net>
wrote:

> Le perjantaina 23. helmikuuta 2018, 11.09.40 EET Raitis V a écrit :
> > Hi,
> >
> > The attached patch fixes the issue #19795: https://trac.videolan.
> > org/vlc/ticket/19795
> >
> > I've compiled and tested the functionality on the 2.x branch, but it
> merges
> > with should work on master too.
> >
> > Out of the box soundfont detection didn't work for me on Arch Linux and
> not
> > it doesn't work on NixOS, so that's why I wanted to fix this.
>
> This would probably be simpler with GLOB_APPEND.
>
> And I don't think VLC has any business in /usr/local unless that is the
> installation prefix. At this point, you are probably better off with
> config_GetDataDir().
>
> --
> 雷米‧德尼-库尔蒙
> https://www.remlab.net/
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
>



-- 
Raitis Veinbahs, +371 2236 4708
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20180319/7b31d6b7/attachment.html>


More information about the vlc-devel mailing list