Skip to content

Instantly share code, notes, and snippets.

@angus-g
Created June 24, 2019 07:19
Show Gist options
  • Save angus-g/a88cf19bc8814f9a45fb47a2cffb7a3a to your computer and use it in GitHub Desktop.
Save angus-g/a88cf19bc8814f9a45fb47a2cffb7a3a to your computer and use it in GitHub Desktop.
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit flag-o-matic
DESCRIPTION="Parallel partitioning, load balancing and data-management services"
HOMEPAGE="http://www.cs.sandia.gov/zoltan"
SRC_URI="http://cs.sandia.gov/~kddevin/Zoltan_Distributions/${PN}_distrib_v${PV}.tar.gz"
LICENSE="LGPL"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="fortran metis scotch"
DEPEND="
virtual/mpi[fortran?]
metis? ( sci-libs/parmetis )
scotch? ( sci-libs/scotch[mpi] )
"
RDEPEND="${DEPEND}"
S="${WORKDIR}/Zoltan_v${PV}/build"
src_unpack() {
unpack "${A}"
mkdir -p "${S}"
cd "${S}"
}
src_configure() {
ECONF_SOURCE=..
append-flags "-fPIC"
use fortran && append-libs gfortran
use scotch && append-libs ptscotch ptscotcherr ptscotcherrexit scotch scotcherr scotcherrexit
use metis && append-libs parmetis metis
econf \
CC="mpicc" \
CXX="mpicxx" \
RANLIB="echo" \
--enable-mpi \
--with-gnumake \
$(use_with scotch) \
$(use_with scotch scotch-incdir "${ESYSROOT}/usr/include/scotch") \
$(use_with metis parmetis) \
$(use_enable fortran f90interface) \
--with-ar='$(CXX) -shared $(LDFLAGS) -o'
}
src_install() {
emake DESTDIR="${D}" install
newlib.so src/libzoltan.a libzoltan.so
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment