public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sebastien Fabbro" <bicatali@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/sci:master commit in: sci-libs/mumps/
Date: Thu, 12 Jul 2012 20:43:21 +0000 (UTC)	[thread overview]
Message-ID: <1342118880.745521660eb5de3161897e71afd923123440e7c4.bicatali@gentoo> (raw)

commit:     745521660eb5de3161897e71afd923123440e7c4
Author:     Sebastien Fabbro <sfabbro <AT> uvic <DOT> ca>
AuthorDate: Thu Jul 12 18:48:00 2012 +0000
Commit:     Sebastien Fabbro <bicatali <AT> gentoo <DOT> org>
CommitDate: Thu Jul 12 18:48:00 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=74552166

sci-libs/mumps: Shared library fixes and prefix love

(Portage version: 2.2.01.20757-prefix/git/Linux x86_64, RepoMan options: --force, unsigned Manifest commit)

---
 sci-libs/mumps/ChangeLog           |    3 ++
 sci-libs/mumps/mumps-4.10.0.ebuild |   39 ++++++++++++++++++-----------------
 2 files changed, 23 insertions(+), 19 deletions(-)

diff --git a/sci-libs/mumps/ChangeLog b/sci-libs/mumps/ChangeLog
index 4f22cd1..7c1bd5b 100644
--- a/sci-libs/mumps/ChangeLog
+++ b/sci-libs/mumps/ChangeLog
@@ -3,6 +3,9 @@
 # $Header: $
 
   12 Jul 2012; Sébastien Fabbro <bicatali@gentoo.org> mumps-4.10.0.ebuild:
+  sci-libs/mumps: Shared library fixes and prefix love
+
+  12 Jul 2012; Sébastien Fabbro <bicatali@gentoo.org> mumps-4.10.0.ebuild:
   sci-libs/mumps: prefix love
 
   13 Mar 2012; Sébastien Fabbro <bicatali@gentoo.org> mumps-4.10.0.ebuild,

diff --git a/sci-libs/mumps/mumps-4.10.0.ebuild b/sci-libs/mumps/mumps-4.10.0.ebuild
index a148f55..c5ba564 100644
--- a/sci-libs/mumps/mumps-4.10.0.ebuild
+++ b/sci-libs/mumps/mumps-4.10.0.ebuild
@@ -3,7 +3,7 @@
 # $Header: $
 
 EAPI=4
-inherit eutils toolchain-funcs flag-o-matic versionator fortran-2
+inherit eutils toolchain-funcs flag-o-matic versionator fortran-2 multilib
 
 MYP=MUMPS_${PV}
 
@@ -17,36 +17,37 @@ KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
 IUSE="doc examples metis mpi +scotch static-libs"
 
 RDEPEND="virtual/blas
+	virtual/fortran
 	metis? ( || ( sci-libs/metis <sci-libs/parmetis-4 )
 		mpi? ( <sci-libs/parmetis-4 ) )
 	scotch? ( sci-libs/scotch[mpi=] )
 	mpi? ( virtual/scalapack )"
 
 DEPEND="${RDEPEND}
-	virtual/fortran
 	virtual/pkgconfig"
 
 S="${WORKDIR}/${MYP}"
 
-make_shared_lib() {
-	local libstatic=${1}
+static_to_shared() {
+	local libstatic=${1}; shift
+	local libname=$(basename ${libstatic%.a})
+	local soname=${libname}$(get_libname $(get_version_component_range 1-2))
+	local libdir=$(dirname ${libstatic})
+
+	einfo "Making ${soname} from ${libstatic}"
 	if [[ ${CHOST} == *-darwin* ]] ; then
-		local dylibname=$(basename "${1%.a}").dylib
-		shift
-		einfo "Making ${dylibname}"
 		${LINK:-$(tc-getCC)} ${LDFLAGS}  \
-			-dynamiclib -install_name "${EPREFIX}"/usr/lib/"${dylibname}" \
-			-Wl,-all_load -Wl,"${libstatic}" \
-			"$@" -o $(dirname "${libstatic}")/"${dylibname}" || die
+			-dynamiclib -install_name "${EPREFIX}"/usr/lib/"${soname}" \
+			-Wl,-all_load -Wl,${libstatic} \
+			"$@" -o ${libdir}/${soname} || die "${soname} failed"
 	else
-		local soname=$(basename "${1%.a}").so.${LIBVER}
-		shift
-		einfo "Making ${soname}"
 		${LINK:-$(tc-getCC)} ${LDFLAGS}  \
-			-shared -Wl,-soname="${soname}" \
-			-Wl,--whole-archive "${libstatic}" -Wl,--no-whole-archive \
-			"$@" -o $(dirname "${libstatic}")/"${soname}" || die "${soname} failed"
-		ln -s "${soname}" $(dirname "${libstatic}")/"${soname%.*}"
+			-shared -Wl,-soname=${soname} \
+			-Wl,--whole-archive ${libstatic} -Wl,--no-whole-archive \
+			"$@" -o ${libdir}/${soname} || die "${soname} failed"
+		[[ $(get_version_component_count) -gt 1 ]] && \
+			ln -s ${soname} ${libdir}/${libname}$(get_libname $(get_major_version))
+		ln -s ${soname} ${libdir}/${libname}$(get_libname)
 	fi
 }
 
@@ -121,10 +122,10 @@ src_configure() {
 
 src_compile() {
 	emake alllib PIC="-fPIC"
-	make_shared_lib lib/libmumps_common.a ${LIBADD}
+	static_to_shared lib/libmumps_common.a ${LIBADD}
 	local i
 	for i in c d s z; do
-		make_shared_lib lib/lib${i}mumps.a -Llib -lmumps_common
+		static_to_shared lib/lib${i}mumps.a -Llib -lmumps_common
 	done
 	if use static-libs; then
 		emake clean



             reply	other threads:[~2012-07-12 20:44 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-12 20:43 Sebastien Fabbro [this message]
  -- strict thread matches above, loose matches on Subject: below --
2014-05-12 19:25 [gentoo-commits] proj/sci:master commit in: sci-libs/mumps/ Sebastien Fabbro
2013-06-18  9:07 Justin Lecher
2012-12-11 20:11 Sebastien Fabbro
2012-07-15 20:19 Sebastien Fabbro
2012-07-15 20:19 Sebastien Fabbro
2012-07-13  4:45 Sebastien Fabbro
2012-07-12 20:43 Sebastien Fabbro
2012-03-13  0:56 Sebastien Fabbro
2012-03-13  0:56 Sebastien Fabbro
2012-03-12 16:35 Sebastien Fabbro

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=1342118880.745521660eb5de3161897e71afd923123440e7c4.bicatali@gentoo \
    --to=bicatali@gentoo.org \
    --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