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 AD72A1381F3 for ; Fri, 26 Jul 2013 16:14:07 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D38D7E0A61; Fri, 26 Jul 2013 16:14:04 +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 0E7D5E0A61 for ; Fri, 26 Jul 2013 16:14:03 +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 0265D33E256 for ; Fri, 26 Jul 2013 16:14:03 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id E5043E5465 for ; Fri, 26 Jul 2013 16:14:00 +0000 (UTC) From: "Nicolas Bock" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Nicolas Bock" Message-ID: <1374777781.e58d7c3c4d407a6fb757ce8df115986570cba392.nicolasbock@gentoo> Subject: [gentoo-commits] proj/sci:master commit in: sci-libs/p4est/ X-VCS-Repository: proj/sci X-VCS-Files: sci-libs/p4est/p4est-0.3.4.1.ebuild X-VCS-Directories: sci-libs/p4est/ X-VCS-Committer: nicolasbock X-VCS-Committer-Name: Nicolas Bock X-VCS-Revision: e58d7c3c4d407a6fb757ce8df115986570cba392 X-VCS-Branch: master Date: Fri, 26 Jul 2013 16:14:00 +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: 3f289781-2fd4-4166-ae0f-c1095d5c850f X-Archives-Hash: cb72028fc06a7c5ad846918d0eeb3658 commit: e58d7c3c4d407a6fb757ce8df115986570cba392 Author: Matthias Maier kyomu 43-1 org> AuthorDate: Thu Jul 25 18:42:30 2013 +0000 Commit: Nicolas Bock gmail com> CommitDate: Thu Jul 25 18:43:01 2013 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=e58d7c3c Rewrite the ebuild - uses autotools-utils, now - introduce a static-libs use flag - introduce doc and examples use flags that install corresponding files directly from the tarball --- sci-libs/p4est/p4est-0.3.4.1.ebuild | 62 ++++++++++++++++++++++++++----------- 1 file changed, 44 insertions(+), 18 deletions(-) diff --git a/sci-libs/p4est/p4est-0.3.4.1.ebuild b/sci-libs/p4est/p4est-0.3.4.1.ebuild index ff11185..c4ed5f3 100644 --- a/sci-libs/p4est/p4est-0.3.4.1.ebuild +++ b/sci-libs/p4est/p4est-0.3.4.1.ebuild @@ -6,7 +6,7 @@ EAPI=5 WANT_AUTOMAKE="1.11" -inherit autotools eutils +inherit autotools-utils toolchain-funcs eutils multilib DESCRIPTION="Scalable Algorithms for Parallel Adaptive Mesh Refinement on Forests of Octrees" HOMEPAGE="http://www.p4est.org/" @@ -17,7 +17,7 @@ KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" LICENSE="GPL-2+" SLOT="0" -IUSE="mpi" +IUSE="debug doc examples mpi static-libs" DEPEND=" dev-lang/lua @@ -27,24 +27,50 @@ DEPEND=" virtual/lapack mpi? ( virtual/mpi )" -RDEPEND="${DEPEND} +RDEPEND=" + ${DEPEND} virtual/pkgconfig" -src_prepare() { - epatch "${FILESDIR}"/${PN}-fix-install-locations.patch - eautoreconf || die "eautoreconf failed" -} +DOCS=(AUTHORS ChangeLog COPYING NEWS README) src_configure() { - blas=$(pkg-config --libs-only-l blas) - lapack=$(pkg-config --libs-only-l lapack | cut -d' ' -f1) - - econf \ - --prefix="${EPREFIX}/usr" \ - --exec-prefix="${EPREFIX}/usr" \ - --enable-shared \ - --with-blas=${blas:2} \ - --with-lapack=${lapack:2} \ - $(use_enable mpi) \ - || die "econf failed" + local myeconfargs=( + $(use_enable debug) + --enable-shared + $(use_enable static-libs static) + --with-blas="$($(tc-getPKG_CONFIG) --libs blas)" + --with-lapack="$($(tc-getPKG_CONFIG) --libs lapack)" + ) + autotools-utils_src_configure +} + +src_install() { + autotools-utils_src_install + + if use doc + then + cp -r "${S}"/doc/* "${D}${EPREFIX}"/usr/share/doc/${PF}/ + fi + + if use examples + then + mkdir -p "${D}${EPREFIX}"/usr/share/${PN}/examples + cp -r "${S}"/example/* "${D}${EPREFIX}"/usr/share/${PN}/examples + else + # Remove the compiled example binaries in case of -examples: + rm -r "${D}${EPREFIX}"/usr/bin + fi + + if ! use static-libs + then + # *sigh* The build system apparently ignores --enable/disable-static + rm "${D}${EPREFIX}"/$(get_libdir)/*.a + fi + + # Fix up some wrong installation pathes: + mkdir -p "${D}${EPREFIX}"/usr/share/p4est + mv "${D}${EPREFIX}"/usr/share/data "${D}${EPREFIX}"/usr/share/p4est/data + mv "${D}${EPREFIX}"/etc/* "${D}${EPREFIX}"/usr/share/p4est + rmdir "${D}${EPREFIX}"/etc/ } +