tech-pkg archive

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

Re: building with native X11 type on FreeBSD - pkgconfig dir and pkgtools/x11-links

* On 2022-12-14 at 10:29 GMT, Sean Champ wrote:

In the process of this, I've discovered that a number of the
files under x11 are using a pathname such as ${X11BASE}/lib/pkgconfig/sm.pc
for locating a package's pc file. I understand that this pathname might be
where sm.pc would be available on most hosts.

With pkgsrc on FreeBSD under this configuration, sm.pc would be available
at ${X11BASE}/libdata/pkgconfig/sm.pc.

With sm.pc not found - though it's available on the host - this may affect
the pkgtools/x11-links build and any builds that would use the x11-links
pkg together with X11_TYPE=native. With a small patch, though. sm.pc is
found ... and then I can debug the next instance, lol

To try to make this pathname more portable, I've begun testing out a patch
where I've defined a variable PKGCONFIG_DIR?=lib/pkgconfig in mk/buildlink3/ I'm then patching each such as to use
the following, for example in x11/libSM/
.if ${X11_TYPE} != "modular" && \
   !exists(${X11BASE}/${PKGCONFIG_DIR}/sm.pc) && \
.include "../../mk/"

I think a better long-term solution for this would be to use mk/buildlink3/ and extend BUILTIN_PKGCONFIG_DIRS for the X11BASE != modular case.

That way you don't need to hardcode paths in each file, and can just use BUILTIN_FIND_PKGCONFIG_FILES for each .pc.

Jonathan Perkin   -   -
Open Source Complete Cloud

Home | Main Index | Thread Index | Old Index