pkgsrc-Users archive

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

Re: pango, cairo, and libXft



(sorry my mail got delayed, the datacenter with my mail server had an
outage)

On Tue 21 Jun 2022 at 14:00:46 -0400, Greg Troxel wrote:
> 
> I'm really not sure what's going on.
> 
> Two thoughts:
> 
> * Are you really sure you have
>     - a consistent tree, all cvs up -A

I made sure to run this again; I have some local changes in some
packages that might be suitable for committing but that's for another
time.

>     - no stale workdirs

It's a tmpfs and I rm'ed it again

>     - everything up to date?

cvs update -A completed successfully

> * Partial PREFER_PKGSRC considered harmful
> 
>   If you are going to prefer_pkgsrc for something, you should do that
>   for everything that depends on it.  Yes, it ought to warn if you
>   don't.

I should indeed have set PREFER.libXft too, I agree. And setting that
is supposed to fix the situation, I gather. But...

pkg_comp:default.conf# pwd                
/usr/pkgsrc/x11/libXft
pkg_comp:default.conf# make show-var VARNAME=PREFER.libXft
pkgsrc
pkg_comp:default.conf# make show-var VARNAME=X11_TYPE      
native
pkg_comp:default.conf# make
=> Bootstrap dependency digest>=20211023: found digest-20220214
WARNING: [license.mk] Every package should define a LICENSE.
ERROR: This package has set PKG_SKIP_REASON:
ERROR: Package set is using native X11 component
*** Error code 1

Stop.
make: stopped in /usr/pkgsrc/x11/libXft

This should build the package, I would think.

So where does this message come from? In this directory's Makefile there is

.include "../../meta-pkgs/modular-xorg/avoid-duplicate.mk"

which contains amongst other lines,

.include "../../mk/bsd.fast.prefs.mk"

.if ${X11_TYPE} == "native"
.    if exists(${X11BASE}/lib/${X11_LIB_NAME}.so)
PKG_SKIP_REASON+=       "Package set is using native X11 component"
.    endif

and /usr/X11R7/lib/libXft.so exists.

It doesn't seem to look at PREFER.libXft at all.

One could imagine that bsd.fast.prefs.mk could (for packages like these
where PREFER.name == pkgsrc) set X11_TYPE to something other than
"native", but it doesn't, as shown by the `make show-var` above. I'm not
sure where exactly the value is set, but it seems correct to me.

One way to make avoid-duplicate.mk look at PREFER.foo could be

Index: avoid-duplicate.mk
===================================================================
RCS file: /cvsroot/pkgsrc/meta-pkgs/modular-xorg/avoid-duplicate.mk,v
retrieving revision 1.4
diff -u -r1.4 avoid-duplicate.mk
--- avoid-duplicate.mk  10 Apr 2022 08:52:01 -0000      1.4
+++ avoid-duplicate.mk  23 Jun 2022 20:45:50 -0000
@@ -2,7 +2,7 @@
 
 .include "../../mk/bsd.fast.prefs.mk"
 
-.if ${X11_TYPE} == "native"
+.if ${PREFER.${X11_BIN_NAME}${X11_LIB_NAME}${X11_DRV_NAME}} == "native"
 .  if !empty(X11_BIN_NAME)
 .    if exists(${X11BASE}/bin/${X11_BIN_NAME})
 PKG_SKIP_REASON+=      "Package set is using native X11 component"

I tried ${PREFER.${PKGBASE}} == "native" as the condition first, but it
seems that PKGBASE is not known yet at the right time. Hence the hack,
which is needed because the name can be in 3 different variables.
Hopefully they match the package name, too.

The condition ${X11_TYPE} == "native" isn't really needed if the
PREFER.foo is already native, and the conditions further down won't
match anyway for non-native setups.

-Olaf.
-- 
___ "Buying carbon credits is a bit like a serial killer paying someone else to
\X/  have kids to make his activity cost neutral." -The BOFH    falu.nl@rhialto

Attachment: signature.asc
Description: PGP signature



Home | Main Index | Thread Index | Old Index