Diff hpl-2.0-r4 with a hpl-2.3

/usr/portage/sys-cluster/hpl/hpl-2.3.ebuild 2023-10-09 14:52:35.456368501 +0300
3 3

  
4 4
EAPI=7
5 5

  
6
inherit toolchain-funcs
6
inherit autotools toolchain-funcs
7 7

  
8 8
DESCRIPTION="Portable Implementation of the Linpack Benchmark for Distributed-Memory Clusters"
9 9
HOMEPAGE="http://www.netlib.org/benchmark/hpl/"
......
21 21
	virtual/mpi"
22 22
DEPEND="${RDEPEND}"
23 23

  
24
src_prepare() {
25
	local a=""
26
	local locallib="${EPREFIX}/usr/$(get_libdir)/lib"
27
	local localblas="$(for i in $($(tc-getPKG_CONFIG) --libs-only-l blas lapack);do a="${a} ${i/-l/${locallib}}.so "; done; echo ${a})"
28

  
29
	cp setup/Make.Linux_PII_FBLAS Make.gentoo_hpl_fblas_x86 || die
30
	sed -i \
31
		-e "/^TOPdir/s,= .*,= ${S}," \
32
		-e '/^HPL_OPTS\>/s,=,= -DHPL_DETAILED_TIMING -DHPL_COPY_L,' \
33
		-e '/^ARCH\>/s,= .*,= gentoo_hpl_fblas_x86,' \
34
		-e '/^MPdir\>/s,= .*,=,' \
35
		-e '/^MPlib\>/s,= .*,=,' \
36
		-e "/^LAlib\>/s,= .*,= ${localblas}," \
37
		-e '/^LINKER\>/s,= .*,= mpicc,' \
38
		-e '/^CC\>/s,= .*,= mpicc,' \
39
		-e '/^CCFLAGS\>/s|= .*|= $(HPL_DEFS) ${CFLAGS}|' \
40
		-e "/^LINKFLAGS\>/s|= .*|= ${LDFLAGS}|" \
41
		-e "/^ARCHIVER\>/s|= .*|= $(tc-getAR)|" \
42
		Make.gentoo_hpl_fblas_x86 || die
24
PATCHES=(
25
	"${FILESDIR}/${PN}-2.3-respect-AR.patch"
26
)
43 27

  
28
src_prepare() {
44 29
	default
45
}
46 30

  
47
src_compile() {
48
	# parallel make failure bug #321539
49
	HOME="${WORKDIR}" emake -j1 arch=gentoo_hpl_fblas_x86
31
	# Needed for the AR patch
32
	eautoreconf
50 33
}
51 34

  
52 35
src_install() {
53
	dobin bin/gentoo_hpl_fblas_x86/xhpl
54
	dolib.a lib/gentoo_hpl_fblas_x86/libhpl.a
36
	default
55 37

  
56
	dodoc INSTALL BUGS COPYRIGHT HISTORY README TUNING \
57
		bin/gentoo_hpl_fblas_x86/HPL.dat
58 38
	doman man/man3/*.3
39
	dodoc testing/ptest/HPL.dat
59 40

  
60 41
	if use doc; then
61 42
		docinto html
......
64 45
}
65 46

  
66 47
pkg_postinst() {
67
	einfo "Remember to copy ${EROOT}/usr/share/hpl/HPL.dat to your working directory"
68
	einfo "before running xhpl.  Typically one may run hpl by executing:"
48
	einfo "Remember to copy (+ extract) ${EROOT}/usr/share/${PF}/HPL.dat.bzip2 to your working directory"
49
	einfo "before running xhpl. Typically one may run hpl by executing:"
69 50
	einfo "\"mpiexec -np 4 ${EROOT}/usr/bin/xhpl\""
70 51
	einfo "where -np specifies the number of processes."
71 52
}
Thank you!