diff -Nurd calc-2.13.0.1.orig/Makefile calc-2.13.0.1/Makefile --- calc-2.13.0.1.orig/Makefile 2021-04-11 06:24:51.000000000 -0400 +++ calc-2.13.0.1/Makefile 2021-05-29 05:26:55.000000000 -0400 @@ -157,7 +157,7 @@ # # If in doubt, leave TERMCONTROL empty. # -TERMCONTROL= +TERMCONTROL= -DUSE_TERMIOS #TERMCONTROL= -DUSE_TERMIOS #TERMCONTROL= -DUSE_TERMIO #TERMCONTROL= -DUSE_SGTTY @@ -686,7 +686,7 @@ ifeq ($(target),Darwin) # default INCDIR for macOS -INCDIR= $(shell xcrun --show-sdk-path --sdk macosx)/usr/include +INCDIR= ${PREFIX}/include else #endif /* end of skip for non-Gnu makefiles */ @@ -828,7 +828,7 @@ CUSTOMCALDIR= ${CALC_SHAREDIR}/custom CUSTOMHELPDIR= ${CALC_SHAREDIR}/custhelp CUSTOMINCDIR= ${CALC_INCDIR}/custom -SCRIPTDIR= ${BINDIR}/cscript +SCRIPTDIR= ${BINDIR} # T - top level directory under which calc will be installed # @@ -959,7 +959,7 @@ # lines below. # #NROFF= nroff -NROFF= +NROFF= nroff #NROFF= groff NROFF_ARG= -man #NROFF_ARG= -mandoc @@ -1033,11 +1033,11 @@ # # If in doubt, set USE_READLINE, READLINE_LIB and READLINE_INCLUDE to nothing. # -USE_READLINE= +USE_READLINE= -DUSE_READLINE #USE_READLINE= -DUSE_READLINE # -READLINE_LIB= -READLINE_EXTRAS= +READLINE_LIB= -L${PREFIX}/lib -lreadline +READLINE_EXTRAS= -lhistory -lncurses # #READLINE_LIB= -lreadline #READLINE_EXTRAS= -lhistory -lncurses @@ -1063,7 +1063,7 @@ #READLINE_LIB= -L${PREFIX}/opt/readline/lib -lreadline #READLINE_EXTRAS= -lhistory -lncurses # -READLINE_INCLUDE= +READLINE_INCLUDE= -I${PREFIX}/include #READLINE_INCLUDE= -I/usr/gnu/include #READLINE_INCLUDE= -I${PREFIX}/include @@ -2581,14 +2581,14 @@ hist.o: hist.c ${MAKE_FILE} ${LOC_MKF} ${CC} ${CFLAGS} ${TERMCONTROL} ${USE_READLINE} ${READLINE_INCLUDE} \ - -c hist.c + -c hist.c ${CPPFLAGS} seed.o: seed.c ${MAKE_FILE} ${LOC_MKF} ${CC} ${CFLAGS} ${WNO_IMPLICT} ${WNO_ERROR_LONG_LONG} \ - ${WNO_LONG_LONG} -c seed.c + ${WNO_LONG_LONG} -c seed.c ${CPPFLAGS} file.o: file.c ${MAKE_FILE} ${LOC_MKF} - ${CC} ${CFLAGS} ${WNO_ERROR_LONG_LONG} ${WNO_LONG_LONG} -c file.c + ${CC} ${CFLAGS} ${WNO_ERROR_LONG_LONG} ${WNO_LONG_LONG} -c file.c ${CPPFLAGS} ### # @@ -5100,7 +5100,7 @@ ${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}. - -${Q} if ${CMP} -s libcalc${LIB_EXT_VERSION} \ + -${Q} if [ ! -e libcalc${LIB_EXT_VERSION} ]; then ${TRUE}; elif ${CMP} -s libcalc${LIB_EXT_VERSION} \ ${T}${LIBDIR}/libcalc${LIB_EXT_VERSION} && \ ${CMP} -s custom/libcustcalc${LIB_EXT_VERSION} \ ${T}${LIBDIR}/libcustcalc${LIB_EXT_VERSION}; then \ diff -Nurd calc-2.13.0.1.orig/custom/Makefile calc-2.13.0.1/custom/Makefile --- calc-2.13.0.1.orig/custom/Makefile 2021-04-17 02:53:22.000000000 -0400 +++ calc-2.13.0.1/custom/Makefile 2021-05-29 05:33:05.000000000 -0400 @@ -1305,7 +1305,7 @@ ## c_sysinfo.o: c_sysinfo.c ${MAKE_FILE} - ${CC} ${CFLAGS} c_sysinfo.c -c + ${CC} ${CFLAGS} c_sysinfo.c -c ${CPPFLAGS} ## #