the Fink project is an effort to port
popular Unix programs to Mac OS X
Package: calc
Version: 2.12.4.3
Revision: 1
Source: mirror:sourceforge:%n/%n-%v.tar.bz2
Source-MD5: d95dccde71cc8d920af0f8375e85e9c8
SourceDirectory: %n-%v
PatchFile: %n.patch
PatchFile-MD5: 9e63b35039744a0e439e29635937d42f
PatchScript: sed 's|@PREFIX@|%p|g' < %{PatchFile}| patch -p1
BuildDepends: readline5, libncurses5 (>= 5.4-20041023-1006), fink (>= 0.24.12)
Depends: readline5-shlibs, ncurses (>= 5.4-20041023-1006), libncurses5-shlibs (>= 5.4-20041023-1006)
GCC: 4.0
UseMaxBuildJobs: false
CompileScript: make BLD_TYPE=calc-static-only
InstallScript: <<
make install T=%d BLD_TYPE=calc-static-only
mkdir -p %i/share/doc/%n
mv %i/bin/simple %i/share/doc/%n
rm -rf %i/include %i/lib
<<
DocFiles: COPYING COPYING-LGPL LIBRARY README
Description: C-style arbitrary precision calculator
DescPackaging: <<
Former Maintainer: Jon Dugan
%i/bin/simple is pure documentation, hence moved, to avoid
a conflict with cppunit1.10.2
Shared library is not up to install_name packaging standards?
Just build static-linked program and don't bother with public
libs at all. Some day could spawn -{dev,shlibs} (making sure
to Replaces:%n at previous %v-%r to avoid deadlock if old
leaked library files)
<<
DescDetail: <<
Calc is a calculator program with arbitrary precision arithmetic.
All numbers are represented as fractions with arbitrarily large
numerators and denominators which are always reduced to lowest terms.
Real or exponential format numbers can be input and are converted
to the equivalent fraction. Hex, binary, or octal numbers can be
input by using numbers with leading '0x', '0b' or '0' characters.
Complex numbers can be input using a trailing 'i', as in '2+3i'.
Strings and characters are input by using single or double quotes.
Commands are statements in a C-like language, where each input
line is treated as the body of a procedure. Thus the command
line can contain variable declarations, expressions, labels,
conditional tests, and loops. Assignments to any variable name
will automatically define that name as a global variable. The
other important thing to know is that all non-assignment expressions
which are evaluated are automatically printed. Thus, you can evaluate
an expression's value by simply typing it in.
Many useful built-in mathematical functions are available. Use
the 'show builtins' command to list them. You can also define
your own functions by using the 'define' keyword, followed by a
function declaration very similar to C. Functions which only
need to return a simple expression can be defined using an
equals sign, as in the example 'define sc(a,b) = a^3 + b^3'.
Variables in functions can be defined as either 'global', 'local',
or 'static'. Global variables are common to all functions and the
command line, whereas local variables are unique to each function
level, and are destroyed when the function returns. Static variables
are scoped within single input files, or within functions, and are
never destroyed. Variables are not typed at definition time, but
dynamically change as they are used. So you must supply the correct
type of variable to those functions and operators which only work
for a subset of types.
<<
License: LGPL
Homepage: http://www.isthe.com/chongo/tech/comp/calc/
Maintainer: Daniel Macks
diff -Nurd -x'*~' calc-2.12.4.3.orig/Makefile calc-2.12.4.3/Makefile
--- calc-2.12.4.3.orig/Makefile 2010-09-02 05:48:42.000000000 -0400
+++ calc-2.12.4.3/Makefile 2011-04-18 04:04:10.000000000 -0400
@@ -86,7 +86,7 @@
#
# If in doubt, leave TERMCONTROL empty.
#
-TERMCONTROL=
+TERMCONTROL= -DUSE_TERMIOS
#TERMCONTROL= -DUSE_TERMIOS
#TERMCONTROL= -DUSE_TERMIO
#TERMCONTROL= -DUSE_SGTTY
@@ -585,7 +585,7 @@
#INCDIR= /usr/local/include
#INCDIR= /dev/env/DJDIR/include
-INCDIR= /usr/include
+INCDIR= @PREFIX@/include
# Where to install calc realted things
#
@@ -624,15 +624,15 @@
#
#BINDIR= /usr/local/bin
#BINDIR= /dev/env/DJDIR/bin
-BINDIR= /usr/bin
+BINDIR= @PREFIX@/bin
#LIBDIR= /usr/local/lib
#LIBDIR= /dev/env/DJDIR/lib
-LIBDIR= /usr/lib
+LIBDIR= @PREFIX@/lib
#CALC_SHAREDIR= /usr/local/lib/calc
#CALC_SHAREDIR= /dev/env/DJDIR/share/calc
-CALC_SHAREDIR= /usr/share/calc
+CALC_SHAREDIR= @PREFIX@/share/calc
# 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
@@ -667,7 +667,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
#
@@ -710,7 +710,7 @@
#MANDIR=
#MANDIR= /usr/local/man/man1
#MANDIR= /usr/man/man1
-MANDIR= /usr/share/man/man1
+MANDIR= @PREFIX@/share/man/man1
#MANDIR= /dev/env/DJDIR/man/man1
#MANDIR= /usr/man/u_man/man1
#MANDIR= /usr/contrib/man/man1
@@ -771,7 +771,7 @@
# lines below.
#
#NROFF= nroff
-NROFF=
+NROFF= nroff
#NROFF= groff
NROFF_ARG= -man
#NROFF_ARG= -mandoc
@@ -837,10 +837,10 @@
#
# 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_LIB= -L@PREFIX@/lib -lreadline -lhistory -lncurses
READLINE_EXTRAS=
#
#READLINE_LIB= -lreadline
@@ -858,7 +858,7 @@
#READLINE_LIB= -L/sw/lib -lreadline
#READLINE_EXTRAS= -lhistory -lncurses
#
-READLINE_INCLUDE=
+READLINE_INCLUDE= -I@PREFIX@/include
#READLINE_INCLUDE= -I/usr/gnu/include
#READLINE_INCLUDE= -I/usr/local/include
@@ -4485,7 +4485,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 \