Skip to content
Permalink
Browse files

calc: update patchfile for Mojave and Xcode 10

It was necessary to remove the test for /usr/include existing, and to
set the system include files for autoconfiguration based on
xcrun --show-sdk-path

I'll work with upstream to try to minimize some of this.
  • Loading branch information
pmetzger committed Sep 27, 2018
1 parent 0f2ba52 commit 29b67f3d2659199c3dd3bc8691abc34c89324684
Showing with 30 additions and 3 deletions.
  1. +30 −3 math/calc/files/patch-Makefile.diff
@@ -1,11 +1,11 @@
--- Makefile.orig 2018-01-18 22:20:20.000000000 +0000
+++ Makefile 2018-05-06 03:35:05.000000000 +0000
--- Makefile.orig 2018-09-27 08:46:20.000000000 -0400
+++ Makefile 2018-09-27 09:38:57.000000000 -0400
@@ -575,7 +575,7 @@
ifeq ($(target),Darwin)

# default INCDIR for macOS
-INCDIR= /usr/local/include
+INCDIR= ___PREFIX___/include
+INCDIR=$(shell xcrun --show-sdk-path)/usr/include

else
#endif /* end of skip for non-Gnu makefiles */
@@ -36,6 +36,15 @@

else
#endif /* end of skip for non-Gnu makefiles */
@@ -690,7 +690,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
# ---------------------------------------------------------------
@@ -760,7 +760,7 @@
#MANDIR=
#MANDIR= /usr/local/man/man1
@@ -82,3 +91,21 @@
#
# Darwin dynamic shared lib filenames
LIB_EXT:= .dylib
@@ -2176,7 +2179,7 @@
#
###

-all: check_include ${BLD_TYPE} CHANGES
+all: ${BLD_TYPE} CHANGES

check_include:
$(Q) if [ ! -d /usr/include ]; then \
@@ -4528,7 +4531,7 @@
else \
${TRUE}; \
fi
- -${Q} if [ ! -d ${T}${INCDIR} ]; then \
+ -${Q} if /usr/bin/false; then \
echo ${MKDIR} -p ${T}${INCDIR}; \
${MKDIR} -p ${T}${INCDIR}; \
echo ${CHMOD} 0755 ${T}${INCDIR}; \

0 comments on commit 29b67f3

Please sign in to comment.
You can’t perform that action at this time.