public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Nicolas Bock" <nicolasbock@gmail.com>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/sci:master commit in: sci-libs/p4est/
Date: Fri, 26 Jul 2013 16:14:00 +0000 (UTC)	[thread overview]
Message-ID: <1374777781.e58d7c3c4d407a6fb757ce8df115986570cba392.nicolasbock@gentoo> (raw)

commit:     e58d7c3c4d407a6fb757ce8df115986570cba392
Author:     Matthias Maier <tamiko <AT> kyomu <DOT> 43-1 <DOT> org>
AuthorDate: Thu Jul 25 18:42:30 2013 +0000
Commit:     Nicolas Bock <nicolasbock <AT> gmail <DOT> 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/
 }
+


             reply	other threads:[~2013-07-26 16:14 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-26 16:14 Nicolas Bock [this message]
  -- strict thread matches above, loose matches on Subject: below --
2013-07-26 16:14 [gentoo-commits] proj/sci:master commit in: sci-libs/p4est/ Nicolas Bock
2013-07-26 16:14 Nicolas Bock
2013-07-26 16:14 Nicolas Bock
2013-07-26 16:14 Nicolas Bock
2013-07-26 16:14 Nicolas Bock
2013-07-26 16:14 Nicolas Bock
2013-10-18 16:19 Christoph Junghans
2014-07-24 21:51 Jens-Malte Gottfried
2014-10-16 15:50 Christoph Junghans
2014-10-16 15:50 Christoph Junghans
2015-06-06 10:23 Justin Lecher
2015-06-06 10:23 Justin Lecher
2016-09-02 22:08 Christoph Junghans
2016-09-02 22:08 Christoph Junghans
2016-09-02 22:08 Christoph Junghans
2016-09-02 22:08 Christoph Junghans

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1374777781.e58d7c3c4d407a6fb757ce8df115986570cba392.nicolasbock@gentoo \
    --to=nicolasbock@gmail.com \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox