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 Sat, Jan 09, 2016 at 06:29:31PM +0000, Jonathan Perkin wrote:
> 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/Darwin.mk 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.
using OSX_SDK_PATH is going to be easier, otherwise I'd have to
rewrite big chunks of Makefile to handle multiple directories for
COMPILER_INCLUDE_DIRS.
There's a bit of a problem with patch-aa, as it sets INCDIR
to ${PREFIX}/include. I think this is mainly because later
CALC_INCDIR is set to ${INCDIR}/calc. [calc has its own
.h files it wants to install in CALC_INCDIR.]
Setting INCDIR to ${PREFIX}/include isn't going to work
as files like unistd.h are not there (they are in OSX_SDK_PATH).
We need to break up INCDIR (system includes) from CALC_INCDIR
(calc's .h files).
Here's something that works. I used MAKE_ENV to pass down
a path based on $OPSYS. Is this ok?
chuck
Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/math/capc-calc/Makefile,v
retrieving revision 1.46
diff -u -r1.46 Makefile
--- Makefile 18 Aug 2015 07:31:12 -0000 1.46
+++ Makefile 9 Jan 2016 19:40:05 -0000
@@ -3,7 +3,7 @@
DISTNAME= calc-2.12.4.13
PKGNAME= capc-${DISTNAME:S/t/./}
-PKGREVISION= 2
+PKGREVISION= 3
CATEGORIES= math
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=calc/}
EXTRACT_SUFX= .tar.bz2
@@ -26,3 +26,10 @@
.include "../../devel/ncurses/buildlink3.mk"
.include "../../mk/readline.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
+
+.if ${OPSYS} == "Darwin"
+MAKE_ENV+= INCDIR_FROM_PKGSRC=${OSX_SDK_PATH}/usr/include
+.else
+MAKE_ENV+= INCDIR_FROM_PKGSRC=/usr/include
+.endif
+
Index: distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/math/capc-calc/distinfo,v
retrieving revision 1.26
diff -u -r1.26 distinfo
--- distinfo 3 Nov 2015 23:33:31 -0000 1.26
+++ distinfo 9 Jan 2016 19:40:05 -0000
@@ -4,5 +4,5 @@
RMD160 (calc-2.12.4.13.tar.bz2) = c04d995a500ad7b0be27afbb6edaa6978c42437e
SHA512 (calc-2.12.4.13.tar.bz2) = 7b7136c793917652ce2f2b3866b2db16a69dbead729d8a72b8c1359ebb8a4e1d4e7a3a8b214f8e85b9ccf41193ba6ffcb49926cc68f494e2b6cdff58559f2534
Size (calc-2.12.4.13.tar.bz2) = 970778 bytes
-SHA1 (patch-aa) = 4cc64664e4eb3e5f1aea56f74d9615caa75483b2
+SHA1 (patch-aa) = b7c591725585bf57d40af66f996737f906f9d259
SHA1 (patch-fposval_c) = 8a8d08f8b566e583faa3bd9033c4a9ac90cb343c
Index: patches/patch-aa
===================================================================
RCS file: /cvsroot/pkgsrc/math/capc-calc/patches/patch-aa,v
retrieving revision 1.9
diff -u -r1.9 patch-aa
--- patches/patch-aa 15 Jan 2014 16:23:31 -0000 1.9
+++ patches/patch-aa 9 Jan 2016 19:40:05 -0000
@@ -1,17 +1,17 @@
$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=
+--- Makefile.orig 2013-09-27 04:55:28.000000000 -0400
++++ Makefile 2016-01-09 14:37:31.000000000 -0500
+@@ -585,7 +585,7 @@
#INCDIR= /usr/local/include
#INCDIR= /dev/env/DJDIR/include
-INCDIR= /usr/include
-+INCDIR= ${PREFIX}/include
++INCDIR= ${INCDIR_FROM_PKGSRC}
# Where to install calc related things
#
-@@ -624,15 +624,15 @@ INCDIR= /usr/include
+@@ -624,15 +624,15 @@
#
#BINDIR= /usr/local/bin
#BINDIR= /dev/env/DJDIR/bin
@@ -30,7 +30,16 @@
# NOTE: Do not set CALC_INCDIR to /usr/include or /usr/local/include!!!
# Always be sure that the CALC_INCDIR path ends in /calc to avoid
-@@ -710,7 +710,7 @@ T=
+@@ -640,7 +640,7 @@
+ #
+ #CALC_INCDIR= /usr/local/include/calc
+ #CALC_INCDIR= /dev/env/DJDIR/include/calc
+-CALC_INCDIR= ${INCDIR}/calc
++CALC_INCDIR= ${PREFIX}/include/calc
+
+ # By default, these values are based CALC_SHAREDIR, INCDIR, BINDIR
+ # ---------------------------------------------------------------
+@@ -710,7 +710,7 @@
#MANDIR=
#MANDIR= /usr/local/man/man1
#MANDIR= /usr/man/man1
@@ -39,7 +48,7 @@
#MANDIR= /dev/env/DJDIR/man/man1
#MANDIR= /usr/man/u_man/man1
#MANDIR= /usr/contrib/man/man1
-@@ -721,7 +721,7 @@ MANDIR= /usr/share/man/man1
+@@ -721,7 +721,7 @@
#
# Use CATDIR= to disable installation of the calc cat (formatted) page.
#
@@ -48,7 +57,7 @@
#CATDIR= /usr/local/man/cat1
#CATDIR= /usr/local/catman/cat1
#CATDIR= /usr/man/cat1
-@@ -742,9 +742,9 @@ MANEXT= 1
+@@ -742,9 +742,9 @@
#
# This is ignored if CATDIR is empty.
#
@@ -60,7 +69,7 @@
#CATEXT= l
# how to format a man page
-@@ -770,8 +770,8 @@ CATEXT= 1
+@@ -770,8 +770,8 @@
# and CATDIR to empty and ignore the NROFF, NROFF_ARG and MANMAKE
# lines below.
#
@@ -71,7 +80,7 @@
#NROFF= groff
NROFF_ARG= -man
#NROFF_ARG= -mandoc
-@@ -837,13 +837,14 @@ CALCRC= ${CALC_SHAREDIR}/startup:~/.calc
+@@ -837,13 +837,14 @@
#
# If in doubt, set USE_READLINE, READLINE_LIB and READLINE_INCLUDE to nothing.
#
@@ -89,7 +98,7 @@
#READLINE_EXTRAS= -lhistory -lncurses
#
#READLINE_LIB= -L/usr/gnu/lib -lreadline
-@@ -896,7 +897,7 @@ CALCPAGER= less
+@@ -896,7 +897,7 @@
#
#DEBUG= -O3
#DEBUG= -O3 -g
@@ -98,7 +107,7 @@
#DEBUG= -O3 -ipa
#DEBUG= -O3 -g3 -ipa
-@@ -1409,10 +1410,10 @@ CC= ${PURIFY} ${LCC} ${CCWERR}
+@@ -1409,10 +1410,10 @@
# LDFLAGS for ${CC} in linking calc programs other than intermediate programs
#
ICFLAGS= ${COMMON_CFLAGS} ${CC_STATIC}
@@ -111,7 +120,7 @@
#
#if 0 /* start of skip for non-Gnu makefiles */
endif
-@@ -1470,7 +1471,7 @@ endif
+@@ -1470,7 +1471,7 @@
# NOTE: This is the default generic host target. Used when no other
# host target matches.
@@ -120,7 +129,7 @@
#
BLD_TYPE= calc-static-only
#
-@@ -1516,7 +1517,7 @@ ICFLAGS= ${COMMON_CFLAGS} ${CC_STATIC}
+@@ -1516,7 +1517,7 @@
else
ICFLAGS= ${COMMON_CFLAGS} ${CC_SHARE}
endif
@@ -129,7 +138,7 @@
# Required flags to link files for calc
#
-@@ -4511,9 +4512,9 @@ endif
+@@ -4511,9 +4512,9 @@
${Q}# NOTE: The this makefile installs libcustcalc${LIB_EXT_VERSION}
${Q}# because we only want to perform one ${LDCONFIG} for both
${Q}# libcalc${LIB_EXT_VERSION} and libcustcalc${LIB_EXT_VERSION}.
Home |
Main Index |
Thread Index |
Old Index