tech-pkg archive

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

Re: pkg-config difference when run in pkgsrc vs normal run?





пт, 5 июл. 2024 г., 04:08 Andrew Randrianasulu <randrianasulu%gmail.com@localhost>:
I have bunch of those line is Makefile:

LIBS += `pkg-config --libs OpenEXR 2>/dev/null`

this seems to work on Linux and when I directly run configure/gmake for package I am trying to create in pkgsrc-wip [cingg-netbsd]

But if I use pkgsrc for some reason this line gives empty output,  so I resort to hacks like


Now, line for lv2 support will be even longer and apparently it does not work at configure stage, where I have also some calls to pkg-config in configure.ac :

if test "x$WANT_LV2" != "xno"; then                                                                  GTK2_LIBS=`pkg-config --libs gtk+-2.0`

  AC_CHECK_LIB([m], [gtk_init], [HAVE_gtk=yes], [HAVE_gtk=no], [$GTK2_LIBS])
  test "x$HAVE_gtk" != "xno" && test -z "`pkg-config --cflags gtk+-2.0`" && HAVE_gtk=no
  test "x$HAVE_gtk" != "xno" && test -z "`pkg-config --libs gtk+-2.0`" && HAVE_gtk=no              

  if test "x$HAVE_gtk" = "xno"; then
    AC_MSG_ERROR([LV2 requires gtk+-2.0 support.])
  fi


Not sure why this happen, I tried to add pkg-config to USE_TOOLS variable in Makefile (no change), and checked that configure.ac sees pkg-config. May be PKG_CONFIG_PATH is not set when building inside pkgsrc system ?



found this old message:

https://pkgsrc-users.netbsd.narkive.com/ycVD0pte/pkg-config-doesn-t-find-stuff-when-trying-to-create-my-own-pkgsrc-lldpd-package

so I just replaced pkg-config script in .tools with symlink to /usr/pkg/bin/pkg-config (in itself symlink).

It seems to work this way, even if I still hardcoded one path in my second patch-ac and thus pkglint complain about it.

But at least it builds now ....

I wonder how  pkgsrc-wip package should be synced when there is pkgsrc update? 

Because I actually run this package from /usr/pkgsrc tree, and copy it from VM to host where I update pkgsrc-wip git tree and push it .... so each time I do "pkgin update" in VM I risk to break my package :)



Home | Main Index | Thread Index | Old Index