diff options
author | Marius Strobl <marius@FreeBSD.org> | 2004-08-11 20:47:39 +0000 |
---|---|---|
committer | Marius Strobl <marius@FreeBSD.org> | 2004-08-11 20:47:39 +0000 |
commit | dfb1bd873d69ca5f2708c467568d1e27667d4d20 (patch) | |
tree | 42b5796d2a5cd710e32b5ff822f056e1917b4447 | |
parent | Fix check_ircd which fails due to perl taint checks (diff) |
- Fix compilation with GCC 3.4.2.
- Fix WITH_GMP on FreeBSD >= 500035
- Add a test target to the Makefile of the port.
Approved by: netchild
Notes
Notes:
svn path=/head/; revision=115963
-rw-r--r-- | math/yacas/Makefile | 7 | ||||
-rw-r--r-- | math/yacas/files/patch-plugins::pcre::plugin.cc | 11 | ||||
-rw-r--r-- | math/yacas/files/patch-plugins:filescanner::plugin.cc | 11 | ||||
-rw-r--r-- | math/yacas/files/patch-scripts::compile.rep::compilecpp.ys | 11 | ||||
-rw-r--r-- | math/yacas/files/patch-scripts::cstubgen.rep::code.ys | 11 | ||||
-rw-r--r-- | math/yacas/files/patch-src::cyacas.h | 11 | ||||
-rw-r--r-- | math/yacas/files/patch-src::gmpnumbers.cpp | 63 | ||||
-rw-r--r-- | math/yacas/files/patch-src::grower.inl | 15 | ||||
-rw-r--r-- | math/yacas/files/patch-src::mathcommands.h | 15 | ||||
-rw-r--r-- | math/yacas/files/patch-src::obmalloc.cpp | 11 | ||||
-rw-r--r-- | math/yacas/files/patch-src::stdfileio.cpp | 20 |
11 files changed, 183 insertions, 3 deletions
diff --git a/math/yacas/Makefile b/math/yacas/Makefile index 9fb616bf68f7..9333adec8485 100644 --- a/math/yacas/Makefile +++ b/math/yacas/Makefile @@ -32,9 +32,6 @@ CONFIGURE_ARGS+= --with-numlib=gmp PLIST_SUB+= GMP="" NOGMP="@comment " CPPFLAGS+= -I${LOCALBASE}/include LDFLAGS+= -L${LOCALBASE}/lib -. if ${OSVERSION} >= 500035 -BROKEN= "Does not compile on 5.x with libgmp" -. endif .else CONFIGURE_ARGS+= --with-numlib=native PLIST_SUB+= GMP="@comment " NOGMP="" @@ -51,4 +48,8 @@ CONFIGURE_ARGS+= --without-x PLIST_SUB+= X11="@comment " .endif +test: build + @cd ${WRKSRC}/manmake && ${GMAKE} wester-1994.ys + @cd ${WRKSRC}/tests && ${GMAKE} check + .include <bsd.port.post.mk> diff --git a/math/yacas/files/patch-plugins::pcre::plugin.cc b/math/yacas/files/patch-plugins::pcre::plugin.cc new file mode 100644 index 000000000000..ffdf460d0ae5 --- /dev/null +++ b/math/yacas/files/patch-plugins::pcre::plugin.cc @@ -0,0 +1,11 @@ +--- plugins/pcre/plugin.cc.orig Sun Aug 24 14:17:25 2003 ++++ plugins/pcre/plugin.cc Thu Jul 29 16:05:37 2004 +@@ -180,7 +180,7 @@ + return NEW PcrePlugin; + } + +-}; ++} + + + diff --git a/math/yacas/files/patch-plugins:filescanner::plugin.cc b/math/yacas/files/patch-plugins:filescanner::plugin.cc new file mode 100644 index 000000000000..fd897fa7dd5a --- /dev/null +++ b/math/yacas/files/patch-plugins:filescanner::plugin.cc @@ -0,0 +1,11 @@ +--- plugins/filescanner/plugin.cc.orig Sun Aug 24 14:17:44 2003 ++++ plugins/filescanner/plugin.cc Thu Jul 29 16:07:27 2004 +@@ -81,7 +81,7 @@ + return NEW FileScannerPlugin; + } + +-}; ++} + + + diff --git a/math/yacas/files/patch-scripts::compile.rep::compilecpp.ys b/math/yacas/files/patch-scripts::compile.rep::compilecpp.ys new file mode 100644 index 000000000000..4fd81a2fc8fa --- /dev/null +++ b/math/yacas/files/patch-scripts::compile.rep::compilecpp.ys @@ -0,0 +1,11 @@ +--- scripts/compile.rep/compilecpp.ys.orig Sun Aug 24 14:35:27 2003 ++++ scripts/compile.rep/compilecpp.ys Thu Jul 29 15:48:30 2004 +@@ -312,7 +312,7 @@ + { + return NEW <?WriteString(\"Plugin_\":pluginName);?>; + } +-}; ++} + "; + //{cname,fname,nrargs} + diff --git a/math/yacas/files/patch-scripts::cstubgen.rep::code.ys b/math/yacas/files/patch-scripts::cstubgen.rep::code.ys new file mode 100644 index 000000000000..88378d171a89 --- /dev/null +++ b/math/yacas/files/patch-scripts::cstubgen.rep::code.ys @@ -0,0 +1,11 @@ +--- scripts/cstubgen.rep/code.ys.orig Sun Aug 24 14:37:32 2003 ++++ scripts/cstubgen.rep/code.ys Thu Jul 29 15:59:31 2004 +@@ -262,7 +262,7 @@ + return NEW <? WriteString(pluginname); ?>; + } + +-}; ++} + + <? + WriteString(postlog); diff --git a/math/yacas/files/patch-src::cyacas.h b/math/yacas/files/patch-src::cyacas.h new file mode 100644 index 000000000000..4a7669ec0669 --- /dev/null +++ b/math/yacas/files/patch-src::cyacas.h @@ -0,0 +1,11 @@ +--- src/cyacas.h 2002/07/31 19:26:14 1.4 ++++ src/cyacas.h 2004/07/03 19:32:14 1.5 +@@ -63,7 +63,7 @@ +
+
+ #ifdef __cplusplus
+-};
++}
+ #endif
+
+
diff --git a/math/yacas/files/patch-src::gmpnumbers.cpp b/math/yacas/files/patch-src::gmpnumbers.cpp new file mode 100644 index 000000000000..49acd02c72b6 --- /dev/null +++ b/math/yacas/files/patch-src::gmpnumbers.cpp @@ -0,0 +1,63 @@ +--- src/gmpnumbers.cpp.orig Thu Nov 20 21:50:20 2003 ++++ src/gmpnumbers.cpp Thu Nov 20 22:04:17 2003 +@@ -82,25 +82,19 @@ + + void initGMPNumber(GMPNumber& x, GMPNumber& y) + { +- mpz_t man; +- mpz_init_set(man,y.man); +- x.man = man; ++ mpz_init_set(x.man,y.man); + x.exp = y.exp; + } + + void initGMPNumber(GMPNumber& x, long y) + { +- mpz_t man; +- mpz_init_set_ui(man,y); +- x.man = man; ++ mpz_init_set_ui(x.man,y); + x.exp = 0; + } + + void initGMPNumber(GMPNumber& x, mpz_t mpz) + { +- mpz_t man; +- mpz_init_set(man,mpz); +- x.man = man; ++ mpz_init_set(x.man,mpz); + x.exp = 0; + } + +@@ -149,11 +143,9 @@ + exp++; + } + if (!*man) {*man='0';*(man+1)='\0';neg=0;exp=0;} +- mpz_t ma; +- mpz_init_set_str(ma,man,10); ++ mpz_init_set_str(x.man,man,10); + free(man); +- if(neg)mpz_neg(ma,ma); +- x.man=ma; ++ if(neg)mpz_neg(x.man,x.man); + x.exp=exp; + } + +@@ -170,7 +162,7 @@ + free(str); + } + +-char* getstrGMPNumber(GMPNumber& x, long prec=0) ++char* getstrGMPNumber(GMPNumber& x, long prec) + { + long rawsize = mpz_sizeinbase(x.man,10); + size_t size; +@@ -241,7 +233,7 @@ + } + + static LispStringPtr GMPNumberToString(GMPNumber& x, LispHashTable& h, +- LispInt prec=0) ++ LispInt prec) + { + char* result = getstrGMPNumber(x, prec); + LispStringPtr toreturn = h.LookUp(result); diff --git a/math/yacas/files/patch-src::grower.inl b/math/yacas/files/patch-src::grower.inl new file mode 100644 index 000000000000..8c15d111ad98 --- /dev/null +++ b/math/yacas/files/patch-src::grower.inl @@ -0,0 +1,15 @@ +--- src/grower.inl 2001/07/18 19:59:34 1.5 ++++ src/grower.inl 2004/07/03 19:32:15 1.6 +@@ -123,10 +123,10 @@ + inline CDeletingArrayGrower<T>::~CDeletingArrayGrower() + { + LispInt i,nr; +- nr = NrItems(); ++ nr = CDeletingArrayGrower::NrItems(); + for (i=0;i<nr;i++) + { +- delete Item(i); ++ delete CDeletingArrayGrower::Item(i); + } + } + #endif diff --git a/math/yacas/files/patch-src::mathcommands.h b/math/yacas/files/patch-src::mathcommands.h new file mode 100644 index 000000000000..bcb9f348eec6 --- /dev/null +++ b/math/yacas/files/patch-src::mathcommands.h @@ -0,0 +1,15 @@ +--- src/mathcommands.h 2003/03/11 16:53:16 1.27 ++++ src/mathcommands.h 2004/07/03 19:32:15 1.28 +@@ -11,9 +11,9 @@ + + //#define CORE_FUNCTION(NAME) void NAME(LispEnvironment& aEnvironment, LispPtr& aResult, LispPtr& aArguments); + +-#define CORE_KERNEL_FUNCTION(iname,fname,nrargs,flags) void fname(LispEnvironment& aEnvironment, LispInt aStackTop); +-#define CORE_KERNEL_FUNCTION_ALIAS(iname,fname,nrargs,flags) +-#define OPERATOR(kind, prec, yacas_name) ++#define CORE_KERNEL_FUNCTION(iname,fname,nrargs,flags) void fname(LispEnvironment& aEnvironment, LispInt aStackTop) ++#define CORE_KERNEL_FUNCTION_ALIAS(iname,fname,nrargs,flags) int JimDummyFunction() ++#define OPERATOR(kind, prec, yacas_name) int JimDummyFunction() + + #include "corefunctions.h" + #undef CORE_KERNEL_FUNCTION diff --git a/math/yacas/files/patch-src::obmalloc.cpp b/math/yacas/files/patch-src::obmalloc.cpp new file mode 100644 index 000000000000..d7a888c2ff71 --- /dev/null +++ b/math/yacas/files/patch-src::obmalloc.cpp @@ -0,0 +1,11 @@ +--- src/obmalloc.cpp 2002/11/24 17:48:08 1.5 ++++ src/obmalloc.cpp 2004/07/03 19:32:15 1.6 +@@ -318,7 +318,7 @@ + /* + * This malloc lock + */ +-SIMPLELOCK_DECL(_malloc_lock); ++SIMPLELOCK_DECL(_malloc_lock) + #define LOCK() SIMPLELOCK_LOCK(_malloc_lock) + #define UNLOCK() SIMPLELOCK_UNLOCK(_malloc_lock) + #define LOCK_INIT() SIMPLELOCK_INIT(_malloc_lock) diff --git a/math/yacas/files/patch-src::stdfileio.cpp b/math/yacas/files/patch-src::stdfileio.cpp new file mode 100644 index 000000000000..6e2c0e2a7a5d --- /dev/null +++ b/math/yacas/files/patch-src::stdfileio.cpp @@ -0,0 +1,20 @@ +--- src/stdfileio.cpp 2003/02/10 18:53:56 1.5 ++++ src/stdfileio.cpp 2004/07/03 19:32:15 1.6 +@@ -99,7 +99,7 @@ + iCurrentPos = 0; + fread(iBuffer,iNrBytes,1,iFile); + iBuffer[iNrBytes] = '\0'; +-}; ++} + + LispChar CachedStdFileInput::Next() + { +@@ -222,7 +222,7 @@ + { + //printf("CachedStdUserInput:construct\n"); + Rewind(); +-}; ++} + LispChar CachedStdUserInput::Next() + { + //printf("CachedStdUserInput:Next\n"); |