From owner-svn-ports-head@FreeBSD.ORG Thu Sep 4 18:43:59 2014 Return-Path: Delivered-To: svn-ports-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 09B80F44; Thu, 4 Sep 2014 18:43:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E902714B4; Thu, 4 Sep 2014 18:43:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s84IhwZt083016; Thu, 4 Sep 2014 18:43:58 GMT (envelope-from amdmi3@FreeBSD.org) Received: (from amdmi3@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s84IhwYr083013; Thu, 4 Sep 2014 18:43:58 GMT (envelope-from amdmi3@FreeBSD.org) Message-Id: <201409041843.s84IhwYr083013@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: amdmi3 set sender to amdmi3@FreeBSD.org using -f From: Dmitry Marakasov Date: Thu, 4 Sep 2014 18:43:58 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r367304 - in head/science/qcl: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 18:43:59 -0000 Author: amdmi3 Date: Thu Sep 4 18:43:58 2014 New Revision: 367304 URL: http://svnweb.freebsd.org/changeset/ports/367304 QAT: https://qat.redports.org/buildarchive/r367304/ Log: - Fix build with clang by using std::vector instead of variable size array of non-POD type - Fix build with PLOTUTILS enabled, which was broken when built with GCC Added: head/science/qcl/files/patch-eval.cc (contents, props changed) head/science/qcl/files/patch-extern.cc (contents, props changed) Modified: head/science/qcl/Makefile Modified: head/science/qcl/Makefile ============================================================================== --- head/science/qcl/Makefile Thu Sep 4 18:35:10 2014 (r367303) +++ head/science/qcl/Makefile Thu Sep 4 18:43:58 2014 (r367304) @@ -12,15 +12,9 @@ COMMENT= Quantum computer simulator LICENSE= GPLv2 # (or later) USES= bison gmake readline tar:tgz -USE_GCC= any -PLIST_FILES= bin/qcl \ - %%DATADIR%%/default.qcl %%DATADIR%%/deutsch.qcl \ - %%DATADIR%%/dft.qcl %%DATADIR%%/examples.qcl \ - %%DATADIR%%/grover.qcl %%DATADIR%%/linalg.qcl \ - %%DATADIR%%/modarith.qcl %%DATADIR%%/primes.qcl \ - %%DATADIR%%/shor.qcl %%DATADIR%%/test.qcl -PLIST_DIRS= %%DATADIR%% +PLIST_FILES= bin/qcl +PORTDATA= * OPTIONS_DEFINE= PLOTUTILS Added: head/science/qcl/files/patch-eval.cc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/science/qcl/files/patch-eval.cc Thu Sep 4 18:43:58 2014 (r367304) @@ -0,0 +1,15 @@ +--- eval.cc.orig 2014-03-27 17:24:43.000000000 +0400 ++++ eval.cc 2014-09-04 21:33:12.000000000 +0400 +@@ -474,10 +474,10 @@ + void *c; + int i; + int argc=pexpr->n(); +- tValue v[argc]; ++ std::vector v(argc); + tInt n[argc]; + tReal r[argc]; +- tComplex z[argc]; ++ std::vector z(argc); + tInt rn; + tReal rr; + TRACE(); Added: head/science/qcl/files/patch-extern.cc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/science/qcl/files/patch-extern.cc Thu Sep 4 18:43:58 2014 (r367304) @@ -0,0 +1,47 @@ +--- extern.cc.orig 2014-03-27 17:24:43.000000000 +0400 ++++ extern.cc 2014-09-04 21:37:03.000000000 +0400 +@@ -81,7 +81,7 @@ + dim=(1 << n); + if(!loc->getRef(sdec(dim-1,"u%ld")+sdec(dim-1)) || loc->getRef(string("u")+sdec(dim)+sdec(dim))) + EXTERR("illegal register size for matrix operator"); +- tComplex u[dim][dim]; ++ std::vector > u(dim, std::vector(dim)); + term* t[dim]; + for(i=0;igetVal(sdec(j,"u%ld")+sdec(i)); +@@ -190,7 +190,7 @@ + EXTERR("illegal register size for permutation operator"); + int p[dim]; + int pp[dim]; +- term t[dim]; ++ std::vector t(dim); + for(i=0;igetVal(sdec(i,"p%ld")); + if(!v.isInt() || v.toInt() < 0 || v.toInt() >= dim) +@@ -207,7 +207,7 @@ + t[i]=term(bitvec(n,p[i]),1); + } + } +- opPermutation(n,t).apply(*q); ++ opPermutation(n,t.data()).apply(*q); + return 0; + } + +@@ -221,7 +221,7 @@ + if(dim!=v.dim()) + EXTERR("illegal register size for permutation operator"); + int p[dim]; +- term t[dim]; ++ std::vector t(dim); + for(i=0;i