From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 474B3158086 for ; Sun, 28 Nov 2021 20:52:42 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 49A582BC001; Sun, 28 Nov 2021 20:52:41 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 15D8B2BC001 for ; Sun, 28 Nov 2021 20:52:41 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 23D8A342D7B for ; Sun, 28 Nov 2021 20:52:40 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 68BB9164 for ; Sun, 28 Nov 2021 20:52:38 +0000 (UTC) From: "Marek Szuba" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Marek Szuba" Message-ID: <1638132536.b25061d0cf0d41213c90ebab0845ed3f50403eef.marecki@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sci-libs/superlu_mt/ X-VCS-Repository: repo/gentoo X-VCS-Files: sci-libs/superlu_mt/superlu_mt-3.1-r1.ebuild X-VCS-Directories: sci-libs/superlu_mt/ X-VCS-Committer: marecki X-VCS-Committer-Name: Marek Szuba X-VCS-Revision: b25061d0cf0d41213c90ebab0845ed3f50403eef X-VCS-Branch: master Date: Sun, 28 Nov 2021 20:52:38 +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-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: b7f109a4-4541-410d-aabe-d25780782f14 X-Archives-Hash: 6f4211094cd539011d59d9e29a223d6b commit: b25061d0cf0d41213c90ebab0845ed3f50403eef Author: Marek Szuba gentoo org> AuthorDate: Sun Nov 28 20:48:56 2021 +0000 Commit: Marek Szuba gentoo org> CommitDate: Sun Nov 28 20:48:56 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b25061d0 sci-libs/superlu_mt: apply Alex's PREDEFS patch New revision because it changes runtime behaviour for USE=int64 users. Closes: https://bugs.gentoo.org/817680 Closes: https://github.com/gentoo/gentoo/pull/23063 Signed-off-by: Marek Szuba gentoo.org> sci-libs/superlu_mt/superlu_mt-3.1-r1.ebuild | 105 +++++++++++++++++++++++++++ 1 file changed, 105 insertions(+) diff --git a/sci-libs/superlu_mt/superlu_mt-3.1-r1.ebuild b/sci-libs/superlu_mt/superlu_mt-3.1-r1.ebuild new file mode 100644 index 000000000000..23f70df88150 --- /dev/null +++ b/sci-libs/superlu_mt/superlu_mt-3.1-r1.ebuild @@ -0,0 +1,105 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit toolchain-funcs + +MY_PN=SuperLU_MT +SOVERSION=$(ver_cut 1) + +DESCRIPTION="Multithreaded sparse LU factorization library" +HOMEPAGE="https://portal.nersc.gov/project/sparse/superlu/" +SRC_URI="https://portal.nersc.gov/project/sparse/superlu/${PN}_${PV}.tar.gz" + +LICENSE="BSD" +SLOT="0/${SOVERSION}" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux" +IUSE="doc examples int64 openmp static-libs test threads" +RESTRICT="!test? ( test )" +REQUIRED_USE="|| ( openmp threads )" + +RDEPEND="virtual/blas" +DEPEND="${RDEPEND}" +BDEPEND="virtual/pkgconfig + test? ( app-shells/tcsh )" + +S="${WORKDIR}/${MY_PN}_${PV}" + +PATCHES=( + "${FILESDIR}"/${PN}-3.1-duplicate-symbols.patch + "${FILESDIR}"/${PN}-3.1-fix-predefs.patch +) + +pkg_setup() { + if use openmp && ! use threads; then + if [[ $(tc-getCC) == *gcc ]] && ! tc-has-openmp; then + ewarn "OpenMP is not available in your current selected gcc" + die "need openmp capable gcc" + fi + CTHREADS="-D__OPENMP" + [[ $(tc-getCC) == *gcc ]] && LDTHREADS="-fopenmp" + else + CTHREADS="-D__PTHREAD" + LDTHREADS="-pthread" + fi +} + +src_prepare() { + default + cat <<-EOF > make.inc + CC=$(tc-getCC) + LOADER=$(tc-getCC) + ARCH=$(tc-getAR) + RANLIB=$(tc-getRANLIB) + PREDEFS=${CPPFLAGS} -DUSE_VENDOR_BLAS -DPRNTlevel=0 -DDEBUGlevel=0 $(use int64 && echo -D_LONGINT) + CDEFS=-DAdd_ + CFLAGS=${CFLAGS} ${CTHREADS} \$(PIC) + BLASLIB=$($(tc-getPKG_CONFIG) --libs blas) + MATHLIB=-lm + NOOPTS=-O0 \$(PIC) + ARCHFLAGS=cr + LOADOPTS=${LDFLAGS} ${LDTHREADS} + SUPERLULIB=lib${PN}.a + TMGLIB=libtmglib.a + EOF + SONAME=lib${PN}.so.${SOVERSION} + sed -e "s|../SRC|${EPREFIX}/usr/include/${PN}|" \ + -e '/:.*$(SUPERLULIB)/s|../lib/$(SUPERLULIB)||g' \ + -e 's|../lib/$(SUPERLULIB)|-lsuperlu_mt|g' \ + -i EXAMPLE/Makefile || die +} + +src_compile() { + # shared library + emake PIC="-fPIC" \ + ARCH="echo" \ + ARCHFLAGS="" \ + RANLIB="echo" \ + superlulib + $(tc-getCC) ${LDFLAGS} ${LDTHREADS} -shared -Wl,-soname=${SONAME} SRC/*.o \ + $($(tc-getPKG_CONFIG) --libs blas) -lm -o lib/${SONAME} || die + ln -s ${SONAME} lib/libsuperlu_mt.so || die + + use static-libs && rm -f SRC/*.o && \ + emake PIC="" superlulib +} + +src_test() { + emake -j1 tmglib + LD_LIBRARY_PATH="${S}/lib:${LD_LIBRARY_PATH}" \ + emake SUPERLULIB="${SONAME}" testing +} + +src_install() { + dolib.so lib/*so* + use static-libs && dolib.a lib/*.a + insinto /usr/include/${PN} + doins SRC/*h + dodoc README + use doc && dodoc DOC/ug.pdf + if use examples; then + docinto /examples + dodoc -r EXAMPLE/* make.inc + fi +}