Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 10 Feb 2017 21:05:48 +0000 (UTC)
From:      Jan Beich <jbeich@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r433825 - in head/lang: yap yap-devel yap-devel/files yap/files
Message-ID:  <201702102105.v1AL5mSF064066@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jbeich
Date: Fri Feb 10 21:05:48 2017
New Revision: 433825
URL: https://svnweb.freebsd.org/changeset/ports/433825

Log:
  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

Added:
  head/lang/yap-devel/files/patch-configure   (contents, props changed)
  head/lang/yap-devel/files/patch-packages_swi-minisat2_C_SolverTypes.h   (contents, props changed)
  head/lang/yap/files/patch-configure   (contents, props changed)
  head/lang/yap/files/patch-packages_swi-minisat2_C_SolverTypes.h   (contents, props changed)
Modified:
  head/lang/yap-devel/Makefile   (contents, props changed)
  head/lang/yap/Makefile   (contents, props changed)

Modified: head/lang/yap-devel/Makefile
==============================================================================
--- head/lang/yap-devel/Makefile	Fri Feb 10 20:41:49 2017	(r433824)
+++ head/lang/yap-devel/Makefile	Fri Feb 10 21:05:48 2017	(r433825)
@@ -3,7 +3,7 @@
 
 PORTNAME=	yap
 PORTVERSION=	6.3.3
-PORTREVISION=	4
+PORTREVISION=	5
 CATEGORIES=	lang
 MASTER_SITES=	http://www.dcc.fc.up.pt/~vsc/Yap/
 PKGNAMESUFFIX=	-devel
@@ -43,13 +43,17 @@ SHEBANG_FILES=	packages/http/examples/de
 SHEBANG_LANG=	swipl
 swipl_OLD_CMD=	/usr/bin/swipl
 swipl_CMD=	${LOCALBASE}/bin/swipl # installed by lang/swi-pl
-USE_GCC=	any
 
 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 installation of docs files

Added: head/lang/yap-devel/files/patch-configure
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lang/yap-devel/files/patch-configure	Fri Feb 10 21:05:48 2017	(r433825)
@@ -0,0 +1,13 @@
+https://sourceforge.net/p/yap/yap-6.3/ci/da61f1c31fed
+
+--- configure.orig	2013-01-19 11:48:08 UTC
++++ configure
+@@ -5169,7 +5169,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*)

Added: head/lang/yap-devel/files/patch-packages_swi-minisat2_C_SolverTypes.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lang/yap-devel/files/patch-packages_swi-minisat2_C_SolverTypes.h	Fri Feb 10 21:05:48 2017	(r433825)
@@ -0,0 +1,13 @@
+https://sourceforge.net/p/yap/yap-6.3/ci/6d2e2597b183
+
+--- packages/swi-minisat2/C/SolverTypes.h.orig	2012-06-29 21:30:38 UTC
++++ packages/swi-minisat2/C/SolverTypes.h
+@@ -119,7 +119,7 @@ public:
+ 
+     // -- use this function instead:
+     template<class V>
+-    friend Clause* Clause_new(const V& ps, bool learnt = false);
++    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); }

Modified: head/lang/yap/Makefile
==============================================================================
--- head/lang/yap/Makefile	Fri Feb 10 20:41:49 2017	(r433824)
+++ head/lang/yap/Makefile	Fri Feb 10 21:05:48 2017	(r433825)
@@ -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_doc
 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

Added: head/lang/yap/files/patch-configure
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lang/yap/files/patch-configure	Fri Feb 10 21:05:48 2017	(r433825)
@@ -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

Added: head/lang/yap/files/patch-packages_swi-minisat2_C_SolverTypes.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lang/yap/files/patch-packages_swi-minisat2_C_SolverTypes.h	Fri Feb 10 21:05:48 2017	(r433825)
@@ -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



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