tech-pkg archive

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

Re: USE_FEATURES+=getopt_long and getopt.h



On Sun, Oct 11, 2009 at 9:25 AM, Georg Schwarz 
<georg.schwarz%freenet.de@localhost> wrote:
> On Solaris, when a package uses USE_FEATURES+=getopt_long getopt.h is still
> not found.
> work/libnbcompat/nbcompat/getopt.h does exist, but how is the compiler
> supposed to find it?

From the notes at the top of pkgsrc/mk/features/features-vars.mk, the c code
must be patched to look for it.  For an example, see the top section of
pkgsrc/misc/watch/patches/patch-aa (quoted below):

--- watch.c.orig        2008-02-22 03:05:28.000000000 +0100
+++ watch.c
@@ -13,7 +13,13 @@
 #define VERSION "0.2.0"

 #include <ctype.h>
+#if defined(HAVE_NBCOMPAT_H)
+#include <nbcompat/config.h>
+#include <nbcompat/cdefs.h>
+#include <nbcompat/getopt.h>
+#else
 #include <getopt.h>
+#endif
 #include <signal.h>
 #include <ncurses.h>
 #include <stdio.h>

This seems to not be a Solaris specific thing.  Hope this helps.

 - Tim


Home | Main Index | Thread Index | Old Index