pkgsrc-Users archive

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

Re: Proper usage of BUILTIN_FIND_PKGCONFIG_FILES_VAR?



I got a puzzling result.

When I ran the modified code below,
(Makefile code)
.PHONY: copy-base-pkgconfig
copy-base-pkgconfig:
.info ${LIBSELINUX}
.info ${BUILTIN_FIND_PKGCONFIG_FILES_VAR}
.info ${USE_TOOLS:Uundefined}
.if !empty(USE_TOOLS:Mpkg-config)
.  for var in ${BUILTIN_FIND_PKGCONFIG_FILES_VAR}
.    if empty(${var}:M__nonexistent__)
        ${RUN} ${CP} ${${_var_}} ${WRKDIR}/.buildlink/lib/pkgconfig/  
.    endif
.  endfor
.endif

(my package Makefile contains following)
pre-configure: copy-base-pkgconfig

(command)
bmake (in my local package)

I got following output

....
==> Invoking ``all'' after barrier for libvolume-key
bmake[1]: "/var/pkgsrc/pkgsrc-2022Q1/local/copy-base-pkgconfig.mk" line 7:
bmake[1]: "/var/pkgsrc/pkgsrc-2022Q1/local/copy-base-pkgconfig.mk" line 8:
bmake[1]: "/var/pkgsrc/pkgsrc-2022Q1/local/copy-base-pkgconfig.mk" line 10: autoreconf autoconf automake gmake pkg-config
===> Checking for vulnerabilities in libvolume-key
===> Overriding tools for libvolume-key
...

.info ${LIBSELINUX}
.info ${BUILTIN_FIND_PKGCONFIG_FILES_VAR}
both output nothing.

On the other hand,
sudo bmake show-var VARNAME=LIBSELINUX gave me the following.

bmake: "/var/pkgsrc/pkgsrc-2022Q1/local/copy-base-pkgconfig.mk" line 7:
bmake: "/var/pkgsrc/pkgsrc-2022Q1/local/copy-base-pkgconfig.mk" line 8:
bmake: "/var/pkgsrc/pkgsrc-2022Q1/local/copy-base-pkgconfig.mk" line 10: autoreconf autoconf automake gmake pkg-config
/usr/lib/x86_64-linux-gnu/pkgconfig/libselinux.pc

best regards,

Yosuke


2022年6月14日(火) 3:45 Roland Illig <roland.illig%gmx.de@localhost>:
Am 13.06.2022 um 19:38 schrieb Yosuke Kawasaki:
> However, the code still failed to loop on any items in
> BUILTIN_FIND_PKGCONFIG_FILES_VAR.

Hmmm, that's strange. I tried your code using sysutils/checkperms, which
worked fine, at least on NetBSD.

Right below the '.include' line, you should add this line:

.info ${LIBSELINUX}

Then I had a look at mk/buildlink3/find-pkgconfig-files.mk again, which
has a list of directories that it searches for, in
BUILTIN_PKGCONFIG_DIRS. Do you have these directories, and do they
contain the files you are looking for?

The next step would be to sprinkle more of the '.info' lines into
find-pkgconfig-files.mk, to see what exactly is happening. I tried
bmake's debug log, and it was overwhelmingly verbose. So instead of the
full '-dc -dp -dv', you may try '-dc' only, and then add '-df' to see
what each .for loop does. If you ignore the special characters in the
debug output, you can at least see which directories and files are
tried. Maybe that helps.

Roland


--
Yosuke Kawasaki

you.kawasaki%gmail.com@localhost




Home | Main Index | Thread Index | Old Index