- Fix build with Tcl 8.6
- Take maintainership (tcltk@FreeBSD.org) - Add LICENSE - Switch to USES+=gmake tcl - Add regression-test target - STAGE-clean
This commit is contained in:
parent
cf9c8e21f2
commit
76079b1b64
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=332997
@ -6,28 +6,36 @@ PORTVERSION= 1.1
|
||||
CATEGORIES= math tcl
|
||||
MASTER_SITES= SF
|
||||
|
||||
MAINTAINER= ports@FreeBSD.org
|
||||
MAINTAINER= tcltk@FreeBSD.org
|
||||
COMMENT= Multiple precision math for Tcl
|
||||
|
||||
LICENSE= BSD
|
||||
|
||||
WRKSRC= ${WRKDIR}/${DISTNAME}/unix
|
||||
PATCH_WRKSRC= ${WRKDIR}/${DISTNAME}
|
||||
USE_TCL= 84
|
||||
USE_TCL_BUILD= 84
|
||||
USES+= gmake tcl
|
||||
GNU_CONFIGURE= yes
|
||||
USE_GMAKE= yes
|
||||
CONFIGURE_ARGS= --prefix=${PREFIX}
|
||||
USE_LDCONFIG= yes
|
||||
CONFIGURE_ARGS= --prefix=${PREFIX} \
|
||||
--with-tcl=${TCL_LIBDIR}
|
||||
CONFIGURE_ENV+= TCL_INC_DIR=${TCL_INCLUDEDIR} \
|
||||
TCL_LIB_DIR=${TCL_LIBDIR}
|
||||
|
||||
PLIST_DIRS= lib/Mpexpr10
|
||||
PLIST_FILES= lib/libMpexpr10.so \
|
||||
lib/Mpexpr10/pkgIndex.tcl
|
||||
MANN= mpexpr.n
|
||||
PLIST_FILES= lib/Mpexpr10/libMpexpr10.so \
|
||||
lib/Mpexpr10/pkgIndex.tcl \
|
||||
man/mann/mpexpr.n.gz
|
||||
|
||||
post-patch:
|
||||
${REINPLACE_CMD} -e 's|\.\.||' ${WRKSRC}/pkgIndex.tcl.in
|
||||
${REINPLACE_CMD} -e '/set VERBOSE/s|0|1|' ${WRKSRC}/../tests/defs
|
||||
|
||||
NO_STAGE= yes
|
||||
do-install:
|
||||
${MKDIR} ${PREFIX}/lib/Mpexpr10
|
||||
${INSTALL_PROGRAM} ${WRKSRC}/libMpexpr10.so ${PREFIX}/lib/
|
||||
${INSTALL_DATA} ${WRKSRC}/pkgIndex.tcl ${PREFIX}/lib/Mpexpr10/
|
||||
${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/mpexpr.man ${PREFIX}/man/mann/mpexpr.n
|
||||
@${MKDIR} ${STAGEDIR}${PREFIX}/lib/Mpexpr10
|
||||
${INSTALL_PROGRAM} ${WRKSRC}/libMpexpr10.so ${STAGEDIR}${PREFIX}/lib/Mpexpr10
|
||||
${INSTALL_DATA} ${WRKSRC}/pkgIndex.tcl ${STAGEDIR}${PREFIX}/lib/Mpexpr10
|
||||
${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/mpexpr.man ${STAGEDIR}${PREFIX}/man/mann/mpexpr.n
|
||||
|
||||
regression-test: build
|
||||
cd ${WRKSRC} && ${GMAKE} test
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
70
math/mpexpr/files/patch-generic_mpexpr.c
Normal file
70
math/mpexpr/files/patch-generic_mpexpr.c
Normal file
@ -0,0 +1,70 @@
|
||||
--- generic/mpexpr.c.orig 2013-11-06 15:23:00.000000000 +0100
|
||||
+++ generic/mpexpr.c 2013-11-06 15:29:26.000000000 +0100
|
||||
@@ -1242,7 +1242,7 @@
|
||||
*/
|
||||
|
||||
default:
|
||||
- interp->result = "unknown operator in expression";
|
||||
+ Tcl_SetObjResult(interp, Tcl_NewStringObj("unknown operator in expression", -1));
|
||||
result = TCL_ERROR;
|
||||
goto done;
|
||||
}
|
||||
@@ -1272,9 +1272,8 @@
|
||||
|
||||
if (ziszero(value2.intValue)) {
|
||||
divideByZero:
|
||||
- interp->result = "divide by zero";
|
||||
- Tcl_SetErrorCode(interp, "ARITH", "DIVZERO",
|
||||
- interp->result, (char *) NULL);
|
||||
+ Tcl_SetObjResult(interp, Tcl_NewStringObj("divide by zero", -1));
|
||||
+ Tcl_SetErrorCode(interp, "ARITH", "DIVZERO", "divide by zero", (char *) NULL);
|
||||
result = TCL_ERROR;
|
||||
goto done;
|
||||
}
|
||||
@@ -1637,7 +1636,7 @@
|
||||
break;
|
||||
|
||||
case COLON:
|
||||
- interp->result = "can't have : operator without ? first";
|
||||
+ Tcl_SetObjResult(interp, Tcl_NewStringObj("can't have : operator without ? first", -1));
|
||||
result = TCL_ERROR;
|
||||
goto done;
|
||||
}
|
||||
@@ -1930,8 +1929,7 @@
|
||||
ckfree(math_io);
|
||||
} else {
|
||||
if (value.pv.buffer != value.staticSpace) {
|
||||
- interp->result = value.pv.buffer;
|
||||
- interp->freeProc = TCL_DYNAMIC;
|
||||
+ Tcl_SetResult(interp, value.pv.buffer, TCL_DYNAMIC);
|
||||
value.pv.buffer = value.staticSpace;
|
||||
} else {
|
||||
Tcl_SetResult(interp, value.pv.buffer, TCL_VOLATILE);
|
||||
@@ -2133,8 +2131,7 @@
|
||||
ExprFreeMathArgs(args);
|
||||
zfree(funcResult.intValue);
|
||||
Qfree(funcResult.doubleValue);
|
||||
- interp->result =
|
||||
- "argument to math function didn't have numeric value";
|
||||
+ Tcl_SetObjResult(interp, Tcl_NewStringObj("argument to math function didn't have numeric value", -1));
|
||||
return TCL_ERROR;
|
||||
}
|
||||
|
||||
@@ -2177,7 +2174,7 @@
|
||||
break;
|
||||
}
|
||||
if (infoPtr->token == COMMA) {
|
||||
- interp->result = "too many arguments for math function";
|
||||
+ Tcl_SetObjResult(interp, Tcl_NewStringObj("too many arguments for math function", -1));
|
||||
ExprFreeMathArgs(args);
|
||||
zfree(funcResult.intValue);
|
||||
Qfree(funcResult.doubleValue);
|
||||
@@ -2188,7 +2185,7 @@
|
||||
}
|
||||
if (infoPtr->token != COMMA) {
|
||||
if (infoPtr->token == CLOSE_PAREN) {
|
||||
- interp->result = "too few arguments for math function";
|
||||
+ Tcl_SetObjResult(interp, Tcl_NewStringObj("too few arguments for math function", -1));
|
||||
ExprFreeMathArgs(args);
|
||||
zfree(funcResult.intValue);
|
||||
Qfree(funcResult.doubleValue);
|
28
math/mpexpr/files/patch-generic_mpparse.c
Normal file
28
math/mpexpr/files/patch-generic_mpparse.c
Normal file
@ -0,0 +1,28 @@
|
||||
--- generic/mpparse.c.orig 2013-11-06 15:29:52.000000000 +0100
|
||||
+++ generic/mpparse.c 2013-11-06 15:36:11.000000000 +0100
|
||||
@@ -283,7 +283,9 @@
|
||||
continue;
|
||||
} else if (c == '\0') {
|
||||
Tcl_ResetResult(interp);
|
||||
- sprintf(interp->result, "missing %c", termChar);
|
||||
+ char buf[10];
|
||||
+ sprintf(buf, "missing %c", termChar);
|
||||
+ Tcl_SetObjResult(interp, Tcl_NewStringObj(buf, -1));
|
||||
*termPtr = string-1;
|
||||
return TCL_ERROR;
|
||||
} else {
|
||||
@@ -349,12 +351,12 @@
|
||||
if (result != TCL_OK) {
|
||||
return result;
|
||||
}
|
||||
- length = strlen(interp->result);
|
||||
+ length = strlen(Tcl_GetStringResult(interp));
|
||||
shortfall = length + 1 - (pvPtr->end - pvPtr->next);
|
||||
if (shortfall > 0) {
|
||||
(*pvPtr->expandProc)(pvPtr, shortfall);
|
||||
}
|
||||
- strcpy(pvPtr->next, interp->result);
|
||||
+ strcpy(pvPtr->next, Tcl_GetStringResult(interp));
|
||||
pvPtr->next += length;
|
||||
Tcl_ResetResult(interp);
|
||||
} else {
|
@ -1,21 +1,5 @@
|
||||
--- unix/Makefile.in.orig Tue Jun 8 04:16:40 2004
|
||||
+++ unix/Makefile.in Thu Mar 15 03:28:30 2007
|
||||
@@ -92,13 +92,13 @@
|
||||
#------------------------------------------------------------------------------
|
||||
# define names for Mpexpr tclsh/tcl executable
|
||||
|
||||
-TCL_EXEC = tclsh
|
||||
+TCL_EXEC = tclsh8.4
|
||||
TCLX_EXEC = tcl
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# define name for Mpexpr wish/wishx executable
|
||||
|
||||
-WISH_EXEC = wish
|
||||
+WISH_EXEC = wish8.4
|
||||
WISHX_EXEC = wishx
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
--- unix/Makefile.in.orig 2004-06-08 04:16:40.000000000 +0200
|
||||
+++ unix/Makefile.in 2013-11-06 15:14:48.000000000 +0100
|
||||
@@ -219,17 +219,17 @@
|
||||
# a make clobber and try LITTLE_ENDIAN. If that fails, ask a wizard
|
||||
# for help.
|
||||
@ -38,21 +22,3 @@
|
||||
#LONG_BITS= 64
|
||||
|
||||
|
||||
@@ -402,14 +402,15 @@
|
||||
#------------------------------------------------------------------------------
|
||||
# install targets
|
||||
|
||||
-install: @INSTALL_TARGET@ install-man install-tools
|
||||
+#install: @INSTALL_TARGET@ install-man install-tools
|
||||
+install: @INSTALL_TARGET@ install-man
|
||||
|
||||
install-shared: $(LIB_SH_MPEXPR)
|
||||
@echo installing $(LIB_SH_MPEXPR)
|
||||
$(INSTALL_PROGRAM) $(LIB_SH_MPEXPR) $(LIB_DIR)/$(LIB_SH_MPEXPR)
|
||||
@echo installing pkgIndex.tcl
|
||||
-mkdir $(LIB_DIR)/Mpexpr$(MPEXPR_LIBVER)
|
||||
- $(INSTALL_PROGRAM) pkgIndex.tcl $(LIB_DIR)/Mpexpr$(MPEXPR_LIBVER)/pkgIndex.tcl
|
||||
+ $(INSTALL_DATA) pkgIndex.tcl $(LIB_DIR)/Mpexpr$(MPEXPR_LIBVER)/pkgIndex.tcl
|
||||
|
||||
install-static: @PROGS@ $(LIB_MPEXPR)
|
||||
@for f in $(T_EXEC) $(W_EXEC) ; do \
|
||||
|
@ -1,5 +1,5 @@
|
||||
--- unix/configure.orig Thu Mar 15 03:26:26 2007
|
||||
+++ unix/configure Thu Mar 15 03:25:16 2007
|
||||
--- unix/configure.orig 2013-11-06 15:39:52.000000000 +0100
|
||||
+++ unix/configure 2013-11-06 15:39:52.000000000 +0100
|
||||
@@ -23,6 +23,8 @@
|
||||
# Initialize some variables set by options.
|
||||
# The variables have the same names as the options, with
|
||||
@ -9,25 +9,28 @@
|
||||
build=NONE
|
||||
cache_file=./config.cache
|
||||
exec_prefix=NONE
|
||||
@@ -735,8 +737,8 @@
|
||||
@@ -733,24 +735,6 @@
|
||||
fi
|
||||
|
||||
# find include/tcl.h
|
||||
for f in $with_tclpath $prefix_locations ; do
|
||||
|
||||
-# find include/tcl.h
|
||||
-for f in $with_tclpath $prefix_locations ; do
|
||||
- if test -r "$f/include/tcl.h"; then
|
||||
- TCL_INC_DIR=$f/include
|
||||
+ if test -r "$f/include/tcl8.4/tcl.h"; then
|
||||
+ TCL_INC_DIR=$f/include/tcl8.4
|
||||
echo "$ac_t""setting TCL_INC_DIR to $TCL_INC_DIR" 1>&6
|
||||
break
|
||||
fi
|
||||
@@ -744,8 +746,8 @@
|
||||
|
||||
# find lib/tclConfig.sh
|
||||
for f in $with_tclpath $exec_prefix_locations ; do
|
||||
- echo "$ac_t""setting TCL_INC_DIR to $TCL_INC_DIR" 1>&6
|
||||
- break
|
||||
- fi
|
||||
-done
|
||||
-
|
||||
-# find lib/tclConfig.sh
|
||||
-for f in $with_tclpath $exec_prefix_locations ; do
|
||||
- if test -r "$f/lib/tclConfig.sh"; then
|
||||
- TCL_LIB_DIR=$f/lib
|
||||
+ if test -r "$f/lib/tcl8.4/tclConfig.sh"; then
|
||||
+ TCL_LIB_DIR=$f/lib/tcl8.4
|
||||
echo "$ac_t""setting TCL_LIB_DIR to $TCL_LIB_DIR" 1>&6
|
||||
break
|
||||
fi
|
||||
- echo "$ac_t""setting TCL_LIB_DIR to $TCL_LIB_DIR" 1>&6
|
||||
- break
|
||||
- fi
|
||||
-done
|
||||
-
|
||||
if test -z "$TCL_INC_DIR" ; then
|
||||
{ echo "configure: error: could not find include/tcl.h in $prefix_locations" 1>&2; exit 1; }
|
||||
fi
|
||||
|
@ -1,3 +0,0 @@
|
||||
lib/libMpexpr10.so
|
||||
lib/Mpexpr10/pkgIndex.tcl
|
||||
@dirrm lib/Mpexpr10
|
Loading…
Reference in New Issue
Block a user