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

Monica Vaida <[email protected]>
Newsgroups gmane.os.netbsd.general
Message-ID <CAKVUwhZ1MohkQGVs7DV0ZWTD+b2zv2Mcn+Z83L9VQUksiDZzfQ@mail.gmail.com>
Hello again,

I just finished successfully compiling Motif. `mwm` runs and works as
expected displaying on an X server over the network (Wayland could
never).

I am not very familiar with NetBSD or pkgsrc, so I might be
misunderstanding the way you do things, but I think the problem was in
the package `pkgtools/x11-links`. It is supposed to contain symlinks
to the built-in X, right? But, at least on my VAX, the links to
freetype2 were all missing; the libraries, headers, and the pkgconf
`.pc` files.

If it's meant to be that way, please tell me, but if it's a real bug,
please report it. As I said above, I am not very familiar with NetBSD,
so it would be better if someone else made the report.

Now, I am trying to build libxslt, xmlto, and opensp, so that I can
compile CDE. Building libxslt failed due to NAN not being defined on
VAX. I added `#define NAN 0.0` to the two files causing the errors,
`libexslt/math.c` and `libexslt/date.c`, and was able to install
libxslt. Trying to build xmlto with the modified libxslt failed with a
floating point exception in `xsltproc`. Would any of you know how to
get it to build?

Thank you.

On Sat, 25 Apr 2026 at 02:11, RVP <[email protected]> wrote:
>
> On Fri, 24 Apr 2026, Monica Vaida wrote:
>
> >> Did you install all the X11 sets during install?
> >
> > Yes.
> >
>
> Well, I built CDE on both 10.1_STABLE/amd64 and 11.0_RC3/i386 and it built
> fine using only the system freetype/fontconfig (and, no cmake/python deps.).
> Testing on 11.0_RC3/i386, CDE ran just fine too--but with the std. X11 bitmap
> fonts (I don't know anything about CDE, so I don't know how to customize it
> to use TTF fonts...) in the UI.
>
> Don't know why it's not working on the VAX (never even *seen* a VAX IRL!).
> Might fire up SIMH to investigate--if I have the time.
>
> >> Ask on pkgsrc-users@ for fine tuning all this...
> >
> > I will go do that now, hopefully it is ok to post on both lists.
> >
>
> I'm not on any of the pkgsrc MLs so that would be useful.
>
> > If you have any more ideas pleasw reply!
> >
>
> You can try the patch below. Since the system freetype *is* built with brotli
> (for compressed WOFF2 files), this less disruptive patch should work. I haven't
> built CDE again with this, but `make show-var VARNAME=USE_BUILTIN.freetype'
> says `yes'.
>
> ```
> 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-24 22:52:21.983264419 +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
>
> @@ -21,10 +21,6 @@
>   pkgbase := freetype2
>   .include "../../mk/pkg-build-options.mk"
>
> -.if ${PKG_BUILD_OPTIONS.freetype2:Mbrotli}
> -.include "../../archivers/brotli/buildlink3.mk"
> -.endif
> -
>   .if ${PKG_BUILD_OPTIONS.freetype2:Mpng}
>   CHECK_BUILTIN.freetype2:=     yes
>   .include "../../graphics/freetype2/builtin.mk"
> @@ -35,6 +31,12 @@
>   .  endif
>   .endif
>
> +.if ${PKG_BUILD_OPTIONS.freetype2:Mbrotli}
> +.  if ${USE_BUILTIN.freetype2:tl} != yes
> +.    include "../../archivers/brotli/buildlink3.mk"
> +.  endif
> +.endif
> +
>   .endif # FREETYPE2_BUILDLINK3_MK
>
>   BUILDLINK_TREE+=      -freetype2
> ```
>
> -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.