Re: How to get pkgsrc to use builtin/native libraries?

Monica Vaida <[email protected]>
Newsgroups gmane.os.netbsd.general
Message-ID <CAKVUwhY6YO6J-SZYaDoAN+_UMnPt-RdJ0VGrzV4kZ8mVDB4KxA@mail.gmail.com>
Hello again,

Thank you for the help.

I applied your patch and did `make clean clean-depends`, but the
compilation failed again. During the `./configure` step of the build I
get these errors:
```
checking for FcInit... yes
Package freetype2 was not found in the pkg-config search path.
Perhaps you should add the directory containing `freetype2.pc'
to the PKG_CONFIG_PATH environment variable
Package 'freetype2', required by 'xft', not found
Package freetype2 was not found in the pkg-config search path.
Perhaps you should add the directory containing `freetype2.pc'
to the PKG_CONFIG_PATH environment variable
Package 'freetype2', required by 'xft', not found
checking jpeglib.h usability... yes
```
If I let the build continue anyway it eventually fails due to missing freetype2.
Do you have any ideas?

Thank you again.



On Thu, 23 Apr 2026 at 11:42, RVP <[email protected]> wrote:
>
> > I am attempting to build CDE on NetBSD/vax 11.0 . CDE seems to require
> > fontconfig, and it obviously requires Motif. Motif in turn requires
> > Xft2, which itself requires fontconfig. Building fontconfig is
> > impossible due to the Python dependency.
> >
>
> You should ask this on pkgsrc-users@ -- that's where all the pkgsrc people
> hang out...
>
> > I would be able to build Motif if I could convince pkgsrc to use the
> > libXft included with the base system. For some reason, pkgsrc refuses.
> > I have checked the version numbers; `2.3.8nb1` is required, and `make
> > show-var VARNAME=BUILTIN_PKG.libXft` returns `2.3.9`. This should
> > work, right? `2.3.9` is greater than `2.3.8nb1`!
> >
>
> Yes, but on 11.0_RC3, the built-in FreeType is very old:
>
> ```
> $ pwd
> /usr/pkgsrc/x11/motif
> $ make show-vars VARNAMES="BUILTIN_PKG.fontconfig BUILTIN_PKG.freetype2"
> fontconfig-2.15.0               # OK
> freetype2-2.10.4                # too old.
> $
> ```
>
> `graphics/freetype2/buildlink3.mk' has:
>
> ```
> BUILDLINK_API_DEPENDS.freetype2+=       freetype2>=2.13.0
> BUILDLINK_ABI_DEPENDS.freetype2+=       freetype2>=2.13.2nb1
> ```
>
> and `graphics/freetype2/options.mk' also has:
>
> ```
> PKG_SUPPORTED_OPTIONS=  brotli png
> ```
>
> but, the built-in FreeType is compiled with neither (so, no coloured emojis
> with the system FreeType), so this requirement isn't satisfied either.
>
> Try this patch (pkgsrc-2026Q1):
>
> ```
> diff -urN pkgsrc.orig/graphics/freetype2/buildlink3.mk pkgsrc/graphics/freetype2/buildlink3.mk
> --- pkgsrc.orig/graphics/freetype2/buildlink3.mk        2024-08-18 19:54:53.000000000 +0000
> +++ pkgsrc/graphics/freetype2/buildlink3.mk     2026-04-23 08:37:04.994335954 +0000
> @@ -5,8 +5,8 @@
>   .if !defined(FREETYPE2_BUILDLINK3_MK)
>   FREETYPE2_BUILDLINK3_MK:=
>
> -BUILDLINK_API_DEPENDS.freetype2+=      freetype2>=2.13.0
> -BUILDLINK_ABI_DEPENDS.freetype2+=      freetype2>=2.13.2nb1
> +BUILDLINK_API_DEPENDS.freetype2+=      freetype2>=2.10.0
> +BUILDLINK_ABI_DEPENDS.freetype2+=      freetype2>=2.10.2nb1
>   BUILDLINK_PKGSRCDIR.freetype2?=               ../../graphics/freetype2
>   BUILDLINK_INCDIRS.freetype2?=         include/freetype2
>
> diff -urN pkgsrc.orig/graphics/freetype2/options.mk pkgsrc/graphics/freetype2/options.mk
> --- pkgsrc.orig/graphics/freetype2/options.mk   2023-11-09 20:10:32.000000000 +0000
> +++ pkgsrc/graphics/freetype2/options.mk        2026-04-23 08:37:24.601154154 +0000
> @@ -2,7 +2,7 @@
>
>   PKG_OPTIONS_VAR=      PKG_OPTIONS.freetype2
>   PKG_SUPPORTED_OPTIONS=        brotli png
> -PKG_SUGGESTED_OPTIONS= brotli png
> +PKG_SUGGESTED_OPTIONS=
>
>   .include "../../mk/bsd.options.mk"
>
> ```
>
> -RVP
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.