pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Meson default pkgconfig directory on FreeBSD

Le 22/04/2020 à 22:39, Frédéric Fauberteau a écrit :
> Le 22/04/2020 à 15:34, Greg Troxel a écrit :
>> Frédéric Fauberteau <> writes:
>>> pkg_create: can't stat `/var/cache/pkgsrc/work/graphics/gdk-pixbuf2/work/.destdir/usr/pkg/lib/pkgconfig/gdk-pixbuf-2.0.pc'
>>> => Checking file-check results for gdk-pixbuf2-2.40.0nb1
>>> ERROR: ************************************************************
>>> ERROR: The following files are in the PLIST but not in /var/cache/pkgsrc/work/graphics/gdk-pixbuf2/work/.destdir/usr/pkg:
>>> ERROR:         /var/cache/pkgsrc/work/graphics/gdk-pixbuf2/work/.destdir/usr/pkg/lib/pkgconfig/gdk-pixbuf-2.0.pc
>>> ERROR: ************************************************************
>>> ERROR: The following files are in /var/cache/pkgsrc/work/graphics/gdk-pixbuf2/work/.destdir/usr/pkg but not in the PLIST:
>>> ERROR:         /var/cache/pkgsrc/work/graphics/gdk-pixbuf2/work/.destdir/usr/pkg/libdata/pkgconfig/gdk-pixbuf-2.0.pc
>>> *** Error code 1
>>> It seems that meson changes the default pkgconfig directory to $(PREFIX)/libdata/pkgconfig:
>> In general, we have the problem that on each operating system there is a
>> native notion of the equivalent of hier(7) (or equivalently, Linux FHS).
>> In pkgsrc, we have a standardized notion, and packages are supposed to
>> adjust builds to meet pkgsrc norms, on all platforms.
>> We end up fighting with build systems that encode OS-specific decisions.
>> I wonder if the libdata/pkgconfig convention is FreeBSD native, or
>> FreeBSD ports, and if there is "ifdef FreeBSD, do this" code in the
>> meson control files, specifically for gdk-pixbuf2.
>> I also wonder if the gdk-pixbuf2 package doesn't have a
>> --pkgconfigdir=lib/pkgconfig (to use autoconf syntax) argument to meson,
>> while the others do.
> It seems that the gdk-pixbuf2 package doesn't have a dedicated argument to set parameters for the pkg-config path. Actually, I don't see clear difference between gdk-pixbuf2 and other packages that use meson too (e.g. pango) while these latters have their .pc files in $(PREFIX)/lib/pkgconfig. 
> I don't know if the libdata/pkgconfig convention is FreeBSD native and/or ports but it is conflicting with the pkgsrc convention. The following lines are in the code of meson:
> if mesonlib.is_freebsd():
>     pkgroot = os.path.join(state.environment.coredata.get_builtin_option('prefix'), 'libdata', 'pkgconfig')
> I suggest to patch meson to remove these lines because other packages using it should be affected on FreeBSD.

Assuming I submit the patch below, I wonder if I should bump revision since it only changes a python file. If yes, I also wonder if I should bump the revision of all the packages that depend on meson for their configuration.

Index: distinfo
RCS file: /cvsroot/pkgsrc/devel/meson/distinfo,v
retrieving revision 1.6
diff -r1.6 distinfo
> SHA1 ( = 4cdd50f9c3f459129795a3e47c1890910a4bd32b
cvs diff: Diffing patches
Index: patches/
RCS file: patches/
diff -N patches/
> $NetBSD$
> * Revert that introduces
>   a FreeBSD dependent path for pkg-config files.
> --- build/lib/mesonbuild/modules/    2020-03-23 17:22:09.000000000 +0000
> +++ build/lib/mesonbuild/modules/
> @@ -496,10 +496,7 @@ class PkgConfigModule(ExtensionModule):
>          pcfile = filebase + '.pc'
>          pkgroot = kwargs.get('install_dir', default_install_dir)
>          if pkgroot is None:
> -            if mesonlib.is_freebsd():
> -                pkgroot = os.path.join(state.environment.coredata.get_builtin_option('prefix'), 'libdata', 'pkgconfig')
> -            else:
> -                pkgroot = os.path.join(state.environment.coredata.get_builtin_option('libdir'), 'pkgconfig')
> +            pkgroot = os.path.join(state.environment.coredata.get_builtin_option('libdir'), 'pkgconfig')
>          if not isinstance(pkgroot, str):
>              raise mesonlib.MesonException('Install_dir must be a string.')
>          self.generate_pkgconfig_file(state, deps, subdirs, name, description, url,

Home | Main Index | Thread Index | Old Index