tech-pkg archive

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

Re: math/capc-calc wants /usr/include but osx 10.11 moved it out of /usr

* On 2016-01-09 at 16:58 GMT, Chuck Cranor wrote:

> hi-
>     By default, the Makefile for capc-calc determines if files like 
> <unistd.h> are present at run time by doing a "test -f" in /usr/include.
> It writes the result as as #define in a dynamically generated .h file.
> (e.g. HAVE_UNISTD is #define'd in dynamically generated have_unistd.h)
>     you can define an alternate include directory to look in with
> $INCDIR in the Makefile.  patch-aa does this, setting it to ${PREFIX}/include :
> $NetBSD: patch-aa,v 1.9 2014/01/15 16:23:31 drochner Exp $
> --- Makefile.orig       2013-09-01 23:02:02.000000000 +0000
> +++ Makefile
> @@ -585,7 +585,7 @@ HAVE_UNUSED=
>  #INCDIR= /usr/local/include
>  #INCDIR= /dev/env/DJDIR/include
> -INCDIR= /usr/include
> +INCDIR= ${PREFIX}/include
>     in Darwin 10.11, Apple moved /usr/include out of /usr for their
> rootless security feature.   Instead it appears to live in a directory
> like:
>     /Applications/
> older versions of Darwin still have /usr/include.

To be pedantic this isn't entirely accurate, they started doing it in
10.10, perhaps earlier (I didn't run 10.9 for long but it may have
done the same).

>    this prevents pkgsrc from compiling capc-calc.   
>    what's the best way to address this?   should I try and get the 
> /Applications/... include file in the Makefile, or should I just 
> hardware HAVE_UNISTD on somehow?   

For Darwin-specific sections you can use ${OSX_SDK_PATH}/usr/include,
this will evaluate to the correct path for the host machine, see
mk/platform/ for how it is set.  Or for a general purpose
setting you could use COMPILER_INCLUDE_DIRS but would then have to
handle the case where it may return multiple directories.


Jonathan Perkin  -  Joyent, Inc.  -

Home | Main Index | Thread Index | Old Index