libnbcompat

by Larson, Timothy E.on 2010-03-10T20:05:59+00:00
Practically speaking, how do I use this? I'm building a package on a platform that is missing a function supplied by nbcompat. I started looking at patching, but they're all over. It would be far easier to link against this library, but only on this OS. Is there a way to tell the package to do that?
Thanks,
Tim

Re: libnbcompat

by Jeremy C. Reedon 2010-03-10T20:14:57+00:00.
On Wed, 10 Mar 2010, Larson, Timothy E. wrote:
Look for USE-FEATURES examples in pkgsrc. But sorry I can't see where it
is documented.

RE: libnbcompat

by Larson, Timothy E.on 2010-03-10T22:03:18+00:00.

Thanks. I've been looking at them for a couple hours now, scratching my head, not sure what it's supposed to do. I see some have nbcompat there, but that seems to try to build another copy of it locally, which I wouldn't think I'd need. If I put just the functions I'm missing, as I see some packages do, I don't notice any difference.
Do I need a conditional dependency on libnbcompat (haven't seen anything like that)? Do I need LDADD.SomeOS or LDFLAGS.SomeOS to add it (not much documentation on this either)? I'm groping, here...
Anybody familiar with this functionality?
Thanks,
Tim
--
Tim Larson
App Admin, Intercall Production Services

RE: libnbcompat

by Larson, Timothy E.on 2010-03-12T13:43:48+00:00.

I dug a bit deeper, and turned up mk/features. Comments in there indicate that you need to patch the files needing the functionality to conditionally use the nbcompat headers, in addition to just setting USE-FEATURES.
I noticed that although mk/features/features-vars.mk seemed to provide for setenv, it isn't mentioned in the list of features. It grabbed my attention, because that's the function I needed. :) Here's a patch.
.for -feature- in setenv
. if !empty(USE-FEATURES:M${-feature-})
-. if !empty(MACHINE-PLATFORM:MHPUX-11.11-hppa) # XXX too narrow?
+. if (${OPSYS} == "SunOS" && ${OS-VERSION} < 10) || !empty(MACHINE-PLATFORM:MHPUX-11.11-hppa) # XXX too narrow?
MISSING-FEATURES+= ${-feature-}
. endif
. endif
I patched the relevant files in the package, as directed, and tried again but get the same error. I don't think I'd need to rebuild libnbcompat because of the patch above. But libnbcompat isn't getting buildlinked, so maybe that's the problem.
Thanks,
Tim
--
Tim Larson
App Admin, Intercall Production Services