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 buildlink3.mk
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/
pkgconfig-builtin.mk I'm then patching each buildlink3.mk such as to use
the following, for example in x11/libSM/buildlink3.mk
~~~~~
.if ${X11_TYPE} != "modular" && \
   !exists(${X11BASE}/${PKGCONFIG_DIR}/sm.pc) && \
   !exists(${X11BASE}/lib${LIBABISUFFIX}/pkgconfig/sm.pc)
.include "../../mk/x11.buildlink3.mk"
.else
[...]
~~~~~

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

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

--
Jonathan Perkin   -   mnx.io   -   pkgsrc.smartos.org
Open Source Complete Cloud   www.tritondatacenter.com


Home | Main Index | Thread Index | Old Index