1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-18 19:49:40 +00:00
freebsd-ports/math/calc/files/patch-Makefile.ship
Adam Weinberger ad32ca0c4b calc: Simplify and take maintainership
calc provides a horrific Makefile that uses ?= for nothing at all,
requiring the file to be mangled by hand. Still, it was a little
much for us to redefine every system command. `cp` is unlikely to
wander out of $PATH.

While here, add some options to not install some stuff. In particular,
make it possible to just install a simple usable calculator without
hundreds of scripts, functions, headers, and help files.
2019-11-05 00:08:55 +00:00

128 lines
3.2 KiB
Plaintext

--- Makefile.ship.orig 2019-11-04 23:36:46 UTC
+++ Makefile.ship
@@ -581,7 +581,7 @@ else
#endif /* end of skip for non-Gnu makefiles */
# default INCDIR for non-macOS
-INCDIR= /usr/include
+INCDIR= ${LOCALBASE}/include
#INCDIR= /usr/local/include
#INCDIR= /dev/env/DJDIR/include
@@ -644,7 +644,7 @@ else
#endif /* end of skip for non-Gnu makefiles */
# default BINDIR for non-macOS
-BINDIR= /usr/bin
+BINDIR= ${PREFIX}/bin
#BINDIR= /usr/local/bin
#BINDIR= /dev/env/DJDIR/bin
@@ -660,7 +660,7 @@ else
#endif /* end of skip for non-Gnu makefiles */
# default LIBDIR for non-macOS
-LIBDIR= /usr/lib
+LIBDIR= ${PREFIX}/lib
#LIBDIR= /usr/local/lib
#LIBDIR= /dev/env/DJDIR/lib
@@ -676,7 +676,7 @@ else
#endif /* end of skip for non-Gnu makefiles */
# default CALC_SHAREDIR for non-macOS
-CALC_SHAREDIR= /usr/share/calc
+CALC_SHAREDIR= ${DATADIR}
#CALC_SHAREDIR= /usr/local/lib/calc
#CALC_SHAREDIR= /dev/env/DJDIR/share/calc
@@ -690,7 +690,7 @@ endif
#
#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
# ---------------------------------------------------------------
@@ -717,7 +717,7 @@ HELPDIR= ${CALC_SHAREDIR}/help
CUSTOMCALDIR= ${CALC_SHAREDIR}/custom
CUSTOMHELPDIR= ${CALC_SHAREDIR}/custhelp
CUSTOMINCDIR= ${CALC_INCDIR}/custom
-SCRIPTDIR= ${BINDIR}/cscript
+SCRIPTDIR= ${PREFIX}/libexec/cscript
# T - top level directory under which calc will be installed
#
@@ -749,7 +749,7 @@ SCRIPTDIR= ${BINDIR}/cscript
#
# If in doubt, use T=
#
-T=
+T= ${DESTDIR}
# where man pages are installed
#
@@ -760,7 +760,7 @@ T=
#MANDIR=
#MANDIR= /usr/local/man/man1
#MANDIR= /usr/man/man1
-MANDIR= /usr/share/man/man1
+MANDIR= ${PREFIX}/man/man1
#MANDIR= /dev/env/DJDIR/man/man1
#MANDIR= /usr/man/u_man/man1
#MANDIR= /usr/contrib/man/man1
@@ -895,11 +895,11 @@ CALCRC= ${CALC_SHAREDIR}/startup:~/.calcrc:./.calcinit
#
# 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${LOCALBASE}/lib -lreadline
+READLINE_EXTRAS= -lhistory -lncurses
#
#READLINE_LIB= -lreadline
#READLINE_EXTRAS= -lhistory -lncurses
@@ -925,7 +925,7 @@ READLINE_EXTRAS=
#READLINE_LIB= -L/usr/local/opt/readline/lib -lreadline
#READLINE_EXTRAS= -lhistory -lncurses
#
-READLINE_INCLUDE=
+READLINE_INCLUDE= -I${LOCALBASE}/include
#READLINE_INCLUDE= -I/usr/gnu/include
#READLINE_INCLUDE= -I/usr/local/include
@@ -936,7 +936,7 @@ READLINE_INCLUDE=
#CALCPAGER= more
#CALCPAGER= pg
#CALCPAGER= cat
-CALCPAGER= less
+CALCPAGER= more
#CALCPAGER= less.exe -ci
# Debug/Optimize options for ${CC} and ${LCC}
@@ -1384,8 +1384,8 @@ CCWERR=
CCOPT= ${DEBUG}
CCMISC=
#
-LCC= gcc
-CC= ${PURIFY} ${LCC} ${CCWERR}
+LCC= ${CC}
+#CC= ${PURIFY} ${CC} ${CCWERR}
#
MAKE= gmake
#
@@ -1734,7 +1734,7 @@ ICFLAGS= ${COMMON_CFLAGS} ${CC_STATIC}
else
ICFLAGS= ${COMMON_CFLAGS} ${CC_SHARE}
endif
-CFLAGS= ${ICFLAGS} ${CCOPT}
+CFLAGS+= ${ICFLAGS} ${CCOPT}
# Required flags to link files for calc
#