From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id AFE43138247 for ; Mon, 2 Dec 2013 16:21:45 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 59538E092C; Mon, 2 Dec 2013 16:21:44 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 6964CE092C for ; Mon, 2 Dec 2013 16:21:43 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 4DECA33F3C9 for ; Mon, 2 Dec 2013 16:21:42 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 9B23711000A for ; Mon, 2 Dec 2013 16:21:39 +0000 (UTC) From: "Justin Lecher" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Justin Lecher" Message-ID: <1386001016.d5bc424a65eca8d0a8097971559084c66ff42a14.jlec@gentoo> Subject: [gentoo-commits] proj/sci:master commit in: sci-mathematics/z3/ X-VCS-Repository: proj/sci X-VCS-Files: sci-mathematics/z3/ChangeLog sci-mathematics/z3/metadata.xml sci-mathematics/z3/z3-4.3.1.ebuild sci-mathematics/z3/z3-9999.ebuild X-VCS-Directories: sci-mathematics/z3/ X-VCS-Committer: jlec X-VCS-Committer-Name: Justin Lecher X-VCS-Revision: d5bc424a65eca8d0a8097971559084c66ff42a14 X-VCS-Branch: master Date: Mon, 2 Dec 2013 16:21:39 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: c12b888b-184c-458c-b0bc-3505a79fcb93 X-Archives-Hash: 77334318b7aca30c622b1b77f4ee6ac5 commit: d5bc424a65eca8d0a8097971559084c66ff42a14 Author: Justin Lecher gentoo org> AuthorDate: Mon Dec 2 16:16:56 2013 +0000 Commit: Justin Lecher gentoo org> CommitDate: Mon Dec 2 16:16:56 2013 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=d5bc424a sci-mathematics/z3: Make build verbose; respect CXX, CXXFLAGS, LDFLAGS; use EPYTHON instead of a direct python call; check for openmp compatibility of the c++ compiler; add USE=gmp; drop unnecessary eclass; add missing metadata.xml Package-Manager: portage-2.2.7 --- sci-mathematics/z3/ChangeLog | 10 +++++++ sci-mathematics/z3/metadata.xml | 5 ++++ sci-mathematics/z3/z3-4.3.1.ebuild | 47 ++++++++++++++++++++++++------ sci-mathematics/z3/z3-9999.ebuild | 59 +++++++++++++++++++++++++++++++------- 4 files changed, 103 insertions(+), 18 deletions(-) diff --git a/sci-mathematics/z3/ChangeLog b/sci-mathematics/z3/ChangeLog new file mode 100644 index 0000000..a078c2a --- /dev/null +++ b/sci-mathematics/z3/ChangeLog @@ -0,0 +1,10 @@ +# ChangeLog for sci-mathematics/z3 +# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 +# $Header: $ + + 02 Dec 2013; Justin Lecher z3-4.3.1.ebuild, z3-9999.ebuild, + +metadata.xml: + Make build verbose; respect CXX, CXXFLAGS, LDFLAGS; use EPYTHON instead of a + direct python call; check for openmp compatibility of the c++ compiler; add + USE=gmp; drop unnecessary eclass; add missing metadata.xml + diff --git a/sci-mathematics/z3/metadata.xml b/sci-mathematics/z3/metadata.xml new file mode 100644 index 0000000..897aa2e --- /dev/null +++ b/sci-mathematics/z3/metadata.xml @@ -0,0 +1,5 @@ + + + + sci + diff --git a/sci-mathematics/z3/z3-4.3.1.ebuild b/sci-mathematics/z3/z3-4.3.1.ebuild index 749e8e0..adf4f6e 100644 --- a/sci-mathematics/z3/z3-4.3.1.ebuild +++ b/sci-mathematics/z3/z3-4.3.1.ebuild @@ -6,7 +6,7 @@ EAPI=5 PYTHON_COMPAT=( python2_7 ) -inherit autotools python-r1 vcs-snapshot +inherit autotools flag-o-matic python-r1 toolchain-funcs vcs-snapshot DESCRIPTION="An efficient theorem prover" HOMEPAGE="http://z3.codeplex.com/" @@ -15,28 +15,59 @@ SRC_URI="http://dev.gentoo.org/~jlec/distfiles/${P}.tar.xz" SLOT="0" LICENSE="MSR-LA" KEYWORDS="~amd64 ~x86" -IUSE="" +IUSE="gmp" -RDEPEND="${PYTHON_DEPS}" +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +RDEPEND="${PYTHON_DEPS} + gmp? ( dev-libs/gmp )" DEPEND="${RDEPEND}" +pkg_setup() { + if [[ ${MERGE_TYPE} != binary ]]; then + if [[ $(tc-getCXX)$ == *g++* ]] && ! tc-has-openmp; then + ewarn "Please use an openmp compatible compiler" + ewarn "like >gcc-4.2 with USE=openmp" + die "Openmp support missing in compiler" + fi + fi +} + src_prepare() { + sed \ + -e 's:-O3::g' \ + -e 's:-fomit-frame-pointer::' \ + -e 's:-msse2::g' \ + -e 's:-msse::g' \ + -e "/LINK_EXTRA_FLAGS/s:@LDFLAGS@:-lrt $(usex gmp -lgmp):g" \ + -e 's:t@\$:t\$:g' \ + -i scripts/*mk* || die + + append-ldflags -fopenmp + eautoreconf } src_configure() { python_export_best - econf --host="" --with-python="${PYTHON}" - python2 scripts/mk_make.py + econf \ + --host="" \ + --with-python="${PYTHON}" \ + $(use_with gmp) \ + SLIBFLAGS=" -Wl,-soname,lib${PN}.so.0.1 " + ${EPYTHON} scripts/mk_make.py || die } src_compile() { - emake --directory="build" + emake \ + --directory="build" \ + CXX=$(tc-getCXX) \ + LINK="$(tc-getCXX) ${LDFLAGS}" \ + LINK_FLAGS="${LDFLAGS}" } src_install() { - doheader src/api/z3*.h - doheader src/api/c++/z3*.h + doheader src/api/z3*.h src/api/c++/z3*.h dolib.so build/*.so dobin build/z3 diff --git a/sci-mathematics/z3/z3-9999.ebuild b/sci-mathematics/z3/z3-9999.ebuild index 434e866..15c338b 100644 --- a/sci-mathematics/z3/z3-9999.ebuild +++ b/sci-mathematics/z3/z3-9999.ebuild @@ -1,40 +1,79 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + EAPI=5 PYTHON_COMPAT=( python2_7 ) -inherit eutils git-r3 autotools python-r1 +inherit autotools flag-o-matic git-r3 python-r1 toolchain-funcs DESCRIPTION="An efficient theorem prover" HOMEPAGE="http://z3.codeplex.com/" +SRC_URI="" EGIT_REPO_URI="https://git01.codeplex.com/z3" -EGIT_NONSHALLOW=1 -KEYWORDS="" SLOT="0" -IUSE="" +LICENSE="MSR-LA" +KEYWORDS="" +IUSE="gmp" + +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +RDEPEND="${PYTHON_DEPS} + gmp? ( dev-libs/gmp )" # A new curl is needed because codeplex has a bug and early version of libcurl # will cause a failed git clone. -RDEPEND="${PYTHON_DEPS}" DEPEND="${RDEPEND} >=net-misc/curl-7.33" +EGIT_NONSHALLOW=1 + +pkg_setup() { + if [[ ${MERGE_TYPE} != binary ]]; then + if [[ $(tc-getCXX)$ == *g++* ]] && ! tc-has-openmp; then + ewarn "Please use an openmp compatible compiler" + ewarn "like >gcc-4.2 with USE=openmp" + die "Openmp support missing in compiler" + fi + fi +} + src_prepare() { + sed \ + -e 's:-O3::g' \ + -e 's:-fomit-frame-pointer::' \ + -e 's:-msse2::g' \ + -e 's:-msse::g' \ + -e "/LINK_EXTRA_FLAGS/s:@LDFLAGS@:-lrt $(usex gmp -lgmp):g" \ + -e 's:t@\$:t\$:g' \ + -i scripts/*mk* || die + + append-ldflags -fopenmp + eautoreconf } src_configure() { python_export_best - econf --host="" --with-python="${PYTHON}" - python2 scripts/mk_make.py + econf \ + --host="" \ + --with-python="${PYTHON}" \ + $(use_with gmp) \ + SLIBFLAGS=" -Wl,-soname,lib${PN}.so.0.1 " + ${EPYTHON} scripts/mk_make.py || die } src_compile() { - emake --directory="build" + emake \ + --directory="build" \ + CXX=$(tc-getCXX) \ + LINK="$(tc-getCXX) ${LDFLAGS}" \ + LINK_FLAGS="${LDFLAGS}" } src_install() { - doheader src/api/z3*.h - doheader src/api/c++/z3*.h + doheader src/api/z3*.h src/api/c++/z3*.h dolib.so build/*.so dobin build/z3