Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 3 Jul 2019 01:30:47 +0000 (UTC)
From:      Alexey Dokuchaev <danfe@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r505720 - in head/lang/gnu-apl: . files
Message-ID:  <201907030130.x631UlAP097090@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: danfe
Date: Wed Jul  3 01:30:46 2019
New Revision: 505720
URL: https://svnweb.freebsd.org/changeset/ports/505720

Log:
  - Unbreak the build on PowerPC and other GCC-based architectures
  - Add an XXX comment about hardcoded `math/fftw3' on LIB_DEPENDS
  - Convert direct dependency on `libsqlite3.so' to USES+=sqlite:3
  
  PR:		238896 (modified)
  Submitted by:	pkubaj
  Tested on:	Mac mini G4

Added:
  head/lang/gnu-apl/files/
  head/lang/gnu-apl/files/patch-src_Tokenizer.cc   (contents, props changed)
Modified:
  head/lang/gnu-apl/Makefile

Modified: head/lang/gnu-apl/Makefile
==============================================================================
--- head/lang/gnu-apl/Makefile	Wed Jul  3 00:08:47 2019	(r505719)
+++ head/lang/gnu-apl/Makefile	Wed Jul  3 01:30:46 2019	(r505720)
@@ -12,9 +12,10 @@ COMMENT=	Free interpreter for APL programming language
 
 LICENSE=	GPLv3+
 
+# XXX: should be optional, but no way to disable in the configure script
 LIB_DEPENDS=	libfftw3.so:math/fftw3
 
-USES=		gmake libtool localbase
+USES=		compiler:c++11-lang gmake libtool localbase
 GNU_CONFIGURE=	yes
 USE_LDCONFIG=	yes
 INSTALL_TARGET=	install-strip
@@ -34,7 +35,7 @@ GTK3_CONFIGURE_WITH=	gtk3
 PCRE_LIB_DEPENDS=	libpcre2-8.so:devel/pcre2
 PCRE_CONFIGURE_WITH=	pcre=${LOCALBASE}
 
-SQLITE_LIB_DEPENDS=	libsqlite3.so:databases/sqlite3
+SQLITE_USES=		sqlite:3
 SQLITE_CONFIGURE_WITH=	sqlite3=${LOCALBASE}
 
 post-patch:
@@ -45,5 +46,10 @@ post-patch:
 		${WRKSRC}/src/emacs_mode/UnixSocketListener.cc
 	@${REINPLACE_CMD} -e 's,POLLRDHUP,POLLHUP,' \
 		${WRKSRC}/src/Quad_GTK.cc
+# Fixes below are for GCC-based builds
+	@${REINPLACE_CMD} -e '28s,^,#include <cstring>,' \
+		${WRKSRC}/src/Error.hh
+	@${REINPLACE_CMD} -E '/(total|used)_memory/s,uint64_t,int64_t,' \
+		${WRKSRC}/src/Quad_WA.?? ${WRKSRC}/src/Value.cc
 
 .include <bsd.port.mk>

Added: head/lang/gnu-apl/files/patch-src_Tokenizer.cc
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lang/gnu-apl/files/patch-src_Tokenizer.cc	Wed Jul  3 01:30:46 2019	(r505720)
@@ -0,0 +1,33 @@
+--- src/Tokenizer.cc.orig	2019-06-23 12:39:20 UTC
++++ src/Tokenizer.cc
+@@ -755,10 +755,10 @@ enum { MAX_TOKENIZE_DIGITS_1 = 20,                    
+        MAX_TOKENIZE_DIGITS = MAX_TOKENIZE_DIGITS_1 - 1   // excl. rounding digit
+      };
+ 
+-#define exp_0_9(x) x ## 0L, x ## 1L, x ## 2L, x ## 3L, x ## 4L,  \
+-                           x ## 5L, x ## 6L, x ## 7L, x ## 8L, x ## 9L, 
++#define exp_0_9(x) x ## 0, x ## 1, x ## 2, x ## 3, x ## 4,  \
++                           x ## 5, x ## 6, x ## 7, x ## 8, x ## 9,
+ 
+-static const long double expo_tab[310] = 
++static const long double expo_tab[309] = 
+ {
+    exp_0_9(1E)   exp_0_9(1E1)  exp_0_9(1E2)  exp_0_9(1E3)  exp_0_9(1E4)
+    exp_0_9(1E5)  exp_0_9(1E6)  exp_0_9(1E7)  exp_0_9(1E8)  exp_0_9(1E9)
+@@ -766,7 +766,7 @@ static const long double expo_tab[310] = 
+    exp_0_9(1E15) exp_0_9(1E16) exp_0_9(1E17) exp_0_9(1E18) exp_0_9(1E19)
+    exp_0_9(1E20) exp_0_9(1E21) exp_0_9(1E22) exp_0_9(1E23) exp_0_9(1E24)
+    exp_0_9(1E25) exp_0_9(1E26) exp_0_9(1E27) exp_0_9(1E28) exp_0_9(1E29)
+-   exp_0_9(1E30)
++   1E300, 1E301, 1E302, 1E303, 1E304, 1E305, 1E306, 1E307, 1E308
+ };
+ 
+ static const long double nexpo_tab[310] = 
+@@ -960,6 +960,7 @@ UTF8_string digits = int_digits;
+ 
+         if (expo > 0)
+            {
++             if (expo > 308)   return false;
+              if (negative)   flt_val = - v * expo_tab[expo];
+              else            flt_val =   v * expo_tab[expo];
+              return true;   // OK



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201907030130.x631UlAP097090>