aboutsummaryrefslogtreecommitdiffstats
path: root/lang/yap
diff options
context:
space:
mode:
authorjbeich <jbeich@FreeBSD.org>2017-02-11 05:05:48 +0800
committerjbeich <jbeich@FreeBSD.org>2017-02-11 05:05:48 +0800
commit654c177185a3746dab6732a09d2c06adeec84ad9 (patch)
treea978b786be0ea19a40ef260885483188072c9578 /lang/yap
parent90af13c4ce615548c96213fb662f0200fc3f68dc (diff)
downloadfreebsd-ports-gnome-654c177185a3746dab6732a09d2c06adeec84ad9.tar.gz
freebsd-ports-gnome-654c177185a3746dab6732a09d2c06adeec84ad9.tar.zst
freebsd-ports-gnome-654c177185a3746dab6732a09d2c06adeec84ad9.zip
lang/yap{,-devel}: use clang and unbreak with gcc5 or later
In file included from ./Solver.C:20: In file included from ./Solver.h:29: ./SolverTypes.h:122:20: error: friend declaration specifying a default argument must be a definition friend Clause* Clause_new(const V& ps, bool learnt = false); ^ ./SolverTypes.h:147:9: error: friend declaration specifying a default argument must be the only declaration Clause* Clause_new(const V& ps, bool learnt) { ^ ./SolverTypes.h:122:20: note: previous declaration is here friend Clause* Clause_new(const V& ps, bool learnt = false); ^ ./Solver.C:123:21: error: no matching function for call to 'Clause_new' Clause* c = Clause_new(ps, false); ^~~~~~~~~~ ./Solver.C:602:29: error: no matching function for call to 'Clause_new' Clause* c = Clause_new(learnt_clause, true); ^~~~~~~~~~ 4 errors generated. PR: 216809 Obtained from: upstream Approved by: portmgr blanket
Diffstat (limited to 'lang/yap')
-rw-r--r--lang/yap/Makefile12
-rw-r--r--lang/yap/files/patch-configure25
-rw-r--r--lang/yap/files/patch-packages_swi-minisat2_C_SolverTypes.h31
3 files changed, 65 insertions, 3 deletions
diff --git a/lang/yap/Makefile b/lang/yap/Makefile
index 2f9831474027..936c279f541f 100644
--- a/lang/yap/Makefile
+++ b/lang/yap/Makefile
@@ -3,13 +3,15 @@
PORTNAME= yap
PORTVERSION= 6.2.2
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= lang
MASTER_SITES= http://www.dcc.fc.up.pt/~vsc/Yap/
MAINTAINER= danilo@FreeBSD.org
COMMENT= High-performance Prolog compiler
+LIB_DEPENDS= libgmp.so:math/gmp
+
PORTSCOUT= limit:^6\.2\.
CONFLICTS= yap-6.3.*
@@ -23,14 +25,18 @@ DOCS_INSTALL_TARGET= install install_docs
USE_LDCONFIG= yes
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --enable-max-performance
-USES= gmake readline
-USE_GCC= any
+USES= gmake localbase readline
DOCSDIR= ${PREFIX}/share/doc/Yap
DATADIR= ${PREFIX}/share/Yap
.include <bsd.port.options.mk>
+.if ${ARCH} == i386
+# H/absmi.h:77:23: error: global register variables are not supported
+USES+= compiler:gcc-c++11-lib
+.endif
+
post-build:
.if empty(PORT_OPTIONS:MDOCS)
# prevent the instalation of three docs files
diff --git a/lang/yap/files/patch-configure b/lang/yap/files/patch-configure
new file mode 100644
index 000000000000..6011f2ffdac8
--- /dev/null
+++ b/lang/yap/files/patch-configure
@@ -0,0 +1,25 @@
+https://sourceforge.net/p/yap/yap-6.3/ci/139f64a45900
+https://sourceforge.net/p/yap/yap-6.3/ci/da61f1c31fed
+
+--- configure.orig 2011-10-23 22:11:24 UTC
++++ configure
+@@ -4397,7 +4397,7 @@ then
+ C_PARSER_FLAGS="-O3 -Wall -Wstrict-prototypes -Wmissing-prototypes $CFLAGS"
+ CFLAGS="-O3 -fomit-frame-pointer -Wall -Wstrict-prototypes -Wmissing-prototypes $CFLAGS"
+ case "`$CC --version < /dev/null`" in
+- *3.4*) CFLAGS="-fno-gcse -fno-crossjumping $CFLAGS" ;;
++ gcc-3.4*) CFLAGS="-fno-gcse -fno-crossjumping $CFLAGS" ;;
+ esac
+ case "$target_cpu" in
+ i*86*)
+@@ -4434,10 +4434,6 @@ then
+ CFLAGS="-march=i486 $CFLAGS"
+ CXXFLAGS="-march=i486 $CXXFLAGS"
+ ;;
+- i386*)
+- CFLAGS="-march=i386 $CFLAGS"
+- CXXFLAGS="-march=i386 $CXXFLAGS"
+- ;;
+ esac
+ fi
+ fi
diff --git a/lang/yap/files/patch-packages_swi-minisat2_C_SolverTypes.h b/lang/yap/files/patch-packages_swi-minisat2_C_SolverTypes.h
new file mode 100644
index 000000000000..1d6f5f1f79fc
--- /dev/null
+++ b/lang/yap/files/patch-packages_swi-minisat2_C_SolverTypes.h
@@ -0,0 +1,31 @@
+https://sourceforge.net/p/yap/yap-6.3/ci/e938c1774890
+https://sourceforge.net/p/yap/yap-6.3/ci/6d2e2597b183
+
+--- packages/swi-minisat2/C/SolverTypes.h.orig 2010-10-18 08:48:21 UTC
++++ packages/swi-minisat2/C/SolverTypes.h
+@@ -119,11 +119,7 @@ public:
+
+ // -- use this function instead:
+ template<class V>
+- friend Clause* Clause_new(const V& ps, bool learnt = false) {
+- assert(sizeof(Lit) == sizeof(uint32_t));
+- assert(sizeof(float) == sizeof(uint32_t));
+- void* mem = malloc(sizeof(Clause) + sizeof(uint32_t)*(ps.size()));
+- return new (mem) Clause(ps, learnt); }
++ friend Clause* Clause_new(const V& ps, bool learnt);
+
+ int size () const { return size_etc >> 3; }
+ void shrink (int i) { assert(i <= size()); size_etc = (((size_etc >> 3) - i) << 3) | (size_etc & 7); }
+@@ -147,6 +143,12 @@ public:
+ };
+
+
++template<class V>
++Clause* Clause_new(const V& ps, bool learnt) {
++ assert(sizeof(Lit) == sizeof(uint32_t));
++ assert(sizeof(float) == sizeof(uint32_t));
++ void* mem = malloc(sizeof(Clause) + sizeof(uint32_t)*(ps.size()));
++ return new (mem) Clause(ps, learnt); }
+ /*_________________________________________________________________________________________________
+ |
+ | subsumes : (other : const Clause&) -> Lit