summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sci-libs/parmetis/parmetis-3.2.0.ebuild')
-rw-r--r--sci-libs/parmetis/parmetis-3.2.0.ebuild109
1 files changed, 0 insertions, 109 deletions
diff --git a/sci-libs/parmetis/parmetis-3.2.0.ebuild b/sci-libs/parmetis/parmetis-3.2.0.ebuild
deleted file mode 100644
index 50aedad..0000000
--- a/sci-libs/parmetis/parmetis-3.2.0.ebuild
+++ /dev/null
@@ -1,109 +0,0 @@
-# Copyright 1999-2011 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: $
-
-EAPI=4
-inherit eutils flag-o-matic toolchain-funcs alternatives-2 versionator
-
-MYP=ParMetis-${PV}
-
-DESCRIPTION="Parallel graph partitioner"
-HOMEPAGE="http://www-users.cs.umn.edu/~karypis/metis/parmetis/"
-SRC_URI="http://glaros.dtc.umn.edu/gkhome/fetch/sw/${PN}/${MYP}.tar.gz"
-
-KEYWORDS="~amd64 ~x86"
-LICENSE="free-noncomm"
-SLOT="0"
-IUSE="debug doc mpi static-libs"
-
-DEPEND="mpi? ( virtual/mpi )"
-RDEPEND="${DEPEND}
- !sci-libs/metis"
-
-S="${WORKDIR}/${MYP}"
-
-make_shared_lib() {
- local libstatic=${1}
- local soname=$(basename "${1%.a}").so.$(get_major_version)
- 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%.*}"
-}
-
-src_compile() {
- emake -C METISLib CC=$(tc-getCC) COPTIONS=-fPIC OPTFLAGS="${CFLAGS}"
- $(tc-getCC) ${LDFLAGS} -shared -Wl,-soname=libmetis.so \
- -Wl,--whole-archive libmetis.a -Wl,--no-whole-archive \
- -lm -o libmetis.so || die "Creating shared libmetis failed"
- if use mpi; then
- emake -C ParMETISLib CC=mpicc COPTIONS=-fPIC OPTFLAGS="${CFLAGS}"
- mpicc ${LDFLAGS} -shared -Wl,-soname=libparmetis.so \
- -Wl,--whole-archive libparmetis.a -Wl,--no-whole-archive \
- -L. -lmetis -o libparmetis.so || die "Creating shared libparmetis failed"
- fi
- if use static-libs; then
- make clean && rm -f *.a
- emake -C METISLib CC=$(tc-getCC) OPTFLAGS="${CFLAGS}"
- use mpi && emake -C ParMETISLib CC=mpicc OPTFLAGS="${CFLAGS}"
- fi
-}
-
-src_test() {
- use mpi || return
- emake -C Programs CC=mpicc OPTFLAGS="${CFLAGS}"
- cd Graphs
- LD_LIBRARY_PATH="${S}:${LD_LIBRARY_PATH}" \
- mpirun -np 2 ./ptest${PV} rotor.graph && \
- mpirun -np 2 ./mtest${PV} bricks.hex3d 2 || die
-}
-
-src_install() {
- insinto /usr/include/metis
- doins METISLib/*.h
- dolib.so libmetis.so*
- use static-libs && dolib.a libmetis.a
- cat <<-EOF > metis.pc
- prefix=${EPREFIX}/usr
- libdir=\${prefix}/$(get_libdir)
- includedir=\${prefix}/include
- Name: metis
- Description: ${DESCRIPTION}
- Version: ${PV}
- URL: ${HOMEPAGE}
- Libs: -L\${libdir} -lmetis
- Private: -lm
- Cflags: -I\${includedir}/metis
- EOF
- insinto /usr/$(get_libdir)/pkgconfig
- doins metis.pc
- alternatives_for metis parmetis 0 \
- "/usr/$(get_libdir)/pkgconfig/metis.pc" "parmetis.pc"
- if use mpi; then
- insinto /usr/include
- doins parmetis.h
- insinto /usr/include/parmetis
- doins ParMETISLib/*.h
- dolib.so libparmetis.so*
- use static-libs && dolib.a libparmetis.a
- cat <<-EOF > parmetis-mpi.pc
- prefix=${EPREFIX}/usr
- libdir=\${prefix}/$(get_libdir)
- includedir=\${prefix}/include
- Name: parmetis
- Description: ${DESCRIPTION}
- Version: ${PV}
- URL: ${HOMEPAGE}
- Libs: -L\${libdir} -lparmetis
- Private: -lm
- Cflags: -I\${includedir}/metis
- Requires: metis
- EOF
- alternatives_for metis-mpi parmetis 0 \
- "/usr/$(get_libdir)/pkgconfig/metis-mpi.pc" "parmetis-mpi.pc"
- fi
- use doc && dodoc Manual/*.pdf
-}