summaryrefslogtreecommitdiff
path: root/math/reduce
diff options
context:
space:
mode:
Diffstat (limited to 'math/reduce')
-rw-r--r--math/reduce/Makefile9
-rw-r--r--math/reduce/distinfo6
-rw-r--r--math/reduce/files/patch-svn-r4935218
3 files changed, 7 insertions, 226 deletions
diff --git a/math/reduce/Makefile b/math/reduce/Makefile
index 2e7abb11b595..24bc036a7ef0 100644
--- a/math/reduce/Makefile
+++ b/math/reduce/Makefile
@@ -2,13 +2,13 @@
# $FreeBSD$
PORTNAME= reduce
-PORTVERSION= 20190120
+PORTVERSION= 20190413
CATEGORIES= math lang
MASTER_SITES= SF/${PORTNAME}-algebra/${SFSUBDIR}/
-DISTNAME= Reduce-svn4868-src
+DISTNAME= Reduce-svn4961-src
MAINTAINER= pfg@FreeBSD.org
-COMMENT= REDUCE Codemist Standard Lisp general-purpose computer system
+COMMENT= Codemist Standard Lisp REDUCE general-purpose computer system
LICENSE= BSD2CLAUSE
@@ -17,7 +17,6 @@ BROKEN_armv6= fails to compile: redfront.h:118:12: conflicting types for '__wcw
BROKEN_powerpc64= fails to compile: arith01.cpp: 'statuc' does not name a type
BUILD_DEPENDS= gnuplot:math/gnuplot
-
LIB_DEPENDS= libfontconfig.so:x11-fonts/fontconfig \
libfreetype.so:print/freetype2 \
libpng.so:graphics/png \
@@ -26,7 +25,7 @@ LIB_DEPENDS= libfontconfig.so:x11-fonts/fontconfig \
USES= autoreconf:build libtool gmake ncurses jpeg
USE_XORG= x11 xcursor xext xorgproto xft xrandr xrender
-SFSUBDIR= snapshot_2019-01-20
+SFSUBDIR= snapshot_2019-04-13
TARGET_SDIR= ${ARCH:S/amd64/x86_64/}-unknown-${OPSYS:tl}${OSREL}
CPPFLAGS+= -I${NCURSESINC}
diff --git a/math/reduce/distinfo b/math/reduce/distinfo
index 39a86ac76abf..ed39292c852d 100644
--- a/math/reduce/distinfo
+++ b/math/reduce/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1549385721
-SHA256 (Reduce-svn4868-src.tar.gz) = 65911f572cfc41f3cf9c021d13e146d09a0de8b8671414a5397f7187684053b0
-SIZE (Reduce-svn4868-src.tar.gz) = 261906123
+TIMESTAMP = 1556572460
+SHA256 (Reduce-svn4961-src.tar.gz) = adf721f5cba02b342b8259156ef6999ee93d334cb790147485b252a2ac1080c9
+SIZE (Reduce-svn4961-src.tar.gz) = 271949781
diff --git a/math/reduce/files/patch-svn-r4935 b/math/reduce/files/patch-svn-r4935
deleted file mode 100644
index 40992469e02e..000000000000
--- a/math/reduce/files/patch-svn-r4935
+++ /dev/null
@@ -1,218 +0,0 @@
-https://sourceforge.net/p/reduce-algebra/code/4935/
-
---- csl/cslbase/allocate.cpp.orig 2018-09-16 11:16:17 UTC
-+++ csl/cslbase/allocate.cpp
-@@ -2284,15 +2284,13 @@ void init_heap_segments(double store_size)
- set_next_active_page();
-
- // There are other bits of memory that I will grab manually for now...
-- nilsegment = (LispObject *)malloc(NIL_SEGMENT_SIZE+16);
-+ nilsegment = (LispObject *)aligned_malloc(NIL_SEGMENT_SIZE+16);
- #ifdef COMMON
-- nil = (LispObject)(doubleword_align_up((uintptr_t)nilsegment) +
-- TAG_CONS + 8);
-+ nil = (LispObject)((uintptr_t)nilsegment + TAG_CONS + 8);
- #else
-- nil = (LispObject)(doubleword_align_up((uintptr_t)nilsegment) +
-- TAG_SYMBOL);
-+ nil = (LispObject)((uintptr_t)nilsegment + TAG_SYMBOL);
- #endif
-- stacksegment = (LispObject *)malloc(CSL_PAGE_SIZE);
-+ stacksegment = (LispObject *)alligned_malloc(CSL_PAGE_SIZE);
- if (stacksegment == NULL) fatal_error(err_no_store);
- stackbase = (LispObject *)stacksegment;
- }
-@@ -2310,8 +2308,8 @@ void drop_heap_segments(void)
- }
- #endif
- }
-- free(nilsegment);
-- free(stacksegment);
-+ aligned_free(nilsegment);
-+ aligned_free(stacksegment);
- }
-
- // This allocates another page of memory if that is allowed and if it is
-@@ -3270,11 +3268,9 @@ uintptr_t *C_stackbase;
- /*@*/ pool = pool + NIL_SEGMENT_SIZE;
- #ifdef COMMON
- /*@*/// NB here that NIL is tagged as a CONS not as a symbol
--/*@*/ nil = (LispObject)(
--/*@*/ doubleword_align_up((uintptr_t)nilsegment) + TAG_CONS + 8);
-+/*@*/ nil = (LispObject)((uintptr_t)nilsegment + TAG_CONS + 8);
- #else
--/*@*/ nil = (LispObject)(
--/*@*/ doubleword_align_up((uintptr_t)nilsegment) + TAG_SYMBOL);
-+/*@*/ nil = (LispObject)((uintptr_t)nilsegment + TAG_SYMBOL);
- #endif
- /*@*/// If at the end of the run I am going to free some space I had better not
- /*@*/// free these pages. When I free the nilsegment they all get discarded at
-@@ -3298,7 +3294,7 @@ uintptr_t *C_stackbase;
- /*@*/ if (nilsegment != NULL && pages_count > 0)
- /*@*/ { if (stack_segsize != 1)
- /*@*/ { stacksegment =
--/*@*/ (LispObject *)malloc(stack_segsize*CSL_PAGE_SIZE);
-+/*@*/ (LispObject *)aligned_malloc(stack_segsize*CSL_PAGE_SIZE);
- /*@*/ if (stacksegment == NULL) fatal_error(err_no_store);
- /*@*/ }
- /*@*/ else stacksegment = (LispObject *)pages[--pages_count];
-@@ -3326,7 +3322,7 @@ uintptr_t *C_stackbase;
- /*@*/// all be recycled in one go when the whole chunk is freed. Note that
- /*@*/// the whole of the "big chunk" tends to get allocated as part of the
- /*@*/// segment that contans nil.
--/*@*/ if (w != NULL && !is_in_big_chunk(w)) free(w);
-+/*@*/ if (w != NULL && !is_in_big_chunk(w)) aligned_free(w);
- /*@*/ }
- /*@*/}
- /*@*/
-@@ -3334,8 +3330,8 @@ uintptr_t *C_stackbase;
- /*@*/{ abandon(pages, pages_count);
- /*@*/ abandon(heap_pages, heap_pages_count);
- /*@*/ abandon(vheap_pages, vheap_pages_count);
--/*@*/ if (!is_in_big_chunk(stacksegment)) free(stacksegment);
--/*@*/ free(nilsegment);
-+/*@*/ if (!is_in_big_chunk(stacksegment)) aligned_free(stacksegment);
-+/*@*/ aligned_free(nilsegment);
- /*@*/}
- /*@*/
- /*@*/// This allocates another page of memory if that is allowed and if it is
---- csl/cslbase/configure.ac.orig 2018-09-25 20:26:06 UTC
-+++ csl/cslbase/configure.ac
-@@ -803,6 +803,12 @@ else
- AC_DEFINE([NORETURN], [[/* noreturn */]], [C++-11 attributes available?])
- fi
-
-+# The sad news is that some 32-bit systems only set maxalign to 4, so for
-+# instance even double precision floats can be aligned only that well. A
-+# consequence is that they are entitles to let malloc() return an address
-+# that is not 8-byte aligned, and that hurts my tagging scheme. I need to
-+# review uses of malloc() and do alignment for myself where it is needed.
-+
- AC_COMPUTE_INT(maxalign, alignof(std::max_align_t), [#include <cstddef>],
- maxalign="0")
- if test "$maxalign" = "0"
-@@ -818,11 +824,11 @@ fi
- # it to be 16 on most if not all 64-bit systems. The test here is in case
- # somebody tries a build on a system where everything can be placed at
- # arbitrary byte boundaries and hence where malloc (and friends) feel
--# entitles to return values that are not aligned at all.
-+# entitled to return values that are not aligned at all.
-
- if test $maxalign -lt 8
- then
-- AC_MSG_ERROR([max_align_t must be at least 8 for CSL to work])
-+ AC_DEFINE([MAXALIGN4], [1], [alignof(max_align_t)==4])
- fi
-
- # I have alternative ways of doing things on Windows and Macintosh, but
---- csl/cslbase/csl.cpp.orig 2018-07-01 08:32:38 UTC
-+++ csl/cslbase/csl.cpp
-@@ -2629,7 +2629,7 @@ void cslstart(int argc, const char *argv[], character_
- // nil-segment and cons().
- //
-
-- nilsegment = (LispObject *)malloc(NIL_SEGMENT_SIZE);
-+ nilsegment = (LispObject *)aligned_malloc(NIL_SEGMENT_SIZE);
- if (nilsegment == NULL) abort();
- #ifdef COMMON
- nil = (LispObject)nilsegment + TAG_CONS + 8;
-@@ -2637,7 +2637,7 @@ void cslstart(int argc, const char *argv[], character_
- nil = (LispObject)nilsegment + TAG_SYMBOL;
- #endif
- pages_count = heap_pages_count = vheap_pages_count = 0;
-- stacksegment = (LispObject *)malloc(CSL_PAGE_SIZE);
-+ stacksegment = (LispObject *)aligned_malloc(CSL_PAGE_SIZE);
- if (stacksegment == NULL) abort();
- heaplimit = (LispObject)stacksegment;
- heaplimit = (LispObject)stacksegment;
---- csl/cslbase/machine.h.orig 2018-05-05 12:06:25 UTC
-+++ csl/cslbase/machine.h
-@@ -333,6 +333,46 @@ typedef __int128 int128_t;
- // With luck that will have regularised the situation with regard to
- // integer types!
-
-+#ifdef MAXALING4
-+
-+// In the horrid case where malloc might return a fairly unaligned block
-+// of memory I will allocate a block that is 32-bytes larger than will be
-+// required. If I round that address up to be a multiple of 16 I can then
-+// guarantee to leave 16 bytes that are both free and aligned at a 16 byte
-+// boundary. I put a "void *" value in there (it will very probably not use
-+// up all the space, but I do not mind) pointing at the original start of
-+// the block.
-+
-+inline void *aligned_malloc(size_t n)
-+{ void *p = (void *)malloc(n + 32);
-+ if (p == NULL) return p;
-+ void *r = (void *)((((uintptr_t)p + 15) & -(uint64_t)16) + 16);
-+ (void *)((uintptr_t)r - 16) = p;
-+ return r;
-+}
-+
-+// To free something I need to retrieve the pointer to the genuine block
-+// start and hand that to free().
-+
-+inline void aligned_free(void *p)
-+{ if (p == NULL) return;
-+ free(*(void *)((uintptr_t)p - 16));
-+}
-+#else // MAXALING4
-+
-+// IN the hugely more common case where malloc does align things to at least
-+// 8 byte boundaries I can use malloc() and free() directly.
-+
-+inline void *aligned_malloc(size_t n)
-+{ return (void *)malloc(n);
-+}
-+
-+inline void aligned_free(void *p)
-+{ free(p);
-+}
-+
-+#endif // MAXALING4
-+
- #endif // header_machine_h
-
- // end machine.h
---- csl/cslbase/restart.cpp.orig 2018-07-01 08:32:38 UTC
-+++ csl/cslbase/restart.cpp
-@@ -2528,7 +2528,7 @@ void setup(int restart_flag, double store_size)
- { int32_t more = heap_pages_count + vheap_pages_count;
- more = 3 *more - pages_count;
- while (more-- > 0)
-- { void *page = (void *)malloc((size_t)CSL_PAGE_SIZE);
-+ { void *page = (void *)aligned_malloc((size_t)CSL_PAGE_SIZE);
- if (page == NULL)
- { init_flags &= ~INIT_EXPANDABLE;
- break;
---- csl/cslbase/showmathdemo.cpp.orig 2017-02-05 19:17:16 UTC
-+++ csl/cslbase/showmathdemo.cpp
-@@ -73,16 +73,25 @@ extern int main(int argc,char *argv[]);
-
- #ifdef HAVE_LIBXFT
-
-+namespace FX
-+{
-+extern XftDraw *ftDraw;
-+extern XftColor ftBlack;
-+extern XftFont *ftFont;
-+}
-+
- extern Display *dpy;
- extern int screen;
--extern XftDraw *ftDraw;
-+extern XftDraw *FX::ftDraw;
- extern Visual *ftVisual;
- extern Colormap ftColormap;
--extern XftColor ftBlack;
-+extern XftColor FX::ftBlack;
- extern FcConfig *config;
--extern XftFont *ftFont;
-+extern XftFont *FX::ftFont;
-
- #endif
-+
-+using namespace FX;
-
- // At least for testing purposes I will extract the LaTeX-like stuff
- // from a string...