tech-pkg archive

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

inconsistent freetype2/fontconfig/libXft



Some time ago I hit a problem where I'd get

   % make show-var VARNAME=USE_BUILTIN.fontconfig
   no
   % make show-var VARNAME=BUILDLINK_PREFIX.fontconfig
   /usr/pkg

which is all wrong and leads to the wrong files being buildlinked.

See PR 57517 for further details. Summary: BUILDLINK_PREFIX can
(sometimes?) get set before the logic that handles transitive
USE_BUILTIN=no, and if it does, the wrong files get buildlinked.

I just stepped on this again (this time with libXft) and discovered
(after wasting time digging around) that one of my trees had the
candidate fix but the one I was using didn't.

Does anyone object if I commit the following? It is a hack, but it
makes things work, and it's apparently been broken for everyone else
since at least 2023.

diff -u -r1.266 bsd.buildlink3.mk
--- mk/buildlink3/bsd.buildlink3.mk     3 May 2025 16:02:45 -0000       1.266
+++ mk/buildlink3/bsd.buildlink3.mk     31 Oct 2026 22:13:21 -0000
@@ -135,6 +135,9 @@
 .      if ${_ok_} != yes
          # not ok for it to be builtin; force it to pkgsrc
          USE_BUILTIN.${_pkg_:S/^-//}:=no
+         # If the buildlink prefix is already set, clear it or we'll
+         # buildlink the wrong files. XXX: this is a hack
+.        undef BUILDLINK_PREFIX.${_pkg_:S/^-//}
          FORCED_PKGSRC+=${_pkg_:S/^-//}
          # using += here fails to evaluate ${_ok_} until after the loop
          FORCED_PKGSRC_REASONS:=${FORCED_PKGSRC_REASONS} ${_pkg_:S/^-//}:${_ok_:S/^no,//}

Nobody's apparently had any better ideas, and I posted this patch the
first time in 2024...

-- 
David A. Holland
dholland%netbsd.org@localhost


Home | Main Index | Thread Index | Old Index