1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-30 05:40:06 +00:00

- 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
This commit is contained in:
Marius Strobl 2004-08-11 20:47:39 +00:00
parent 8a76d765b7
commit dfb1bd873d
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=115963
11 changed files with 183 additions and 3 deletions

View File

@ -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>

View File

@ -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;
}
-};
+}

View File

@ -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;
}
-};
+}

View File

@ -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}

View File

@ -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);

View File

@ -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

View File

@ -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);

View File

@ -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

View File

@ -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

View File

@ -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)

View File

@ -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");