Skip to content

Commit

Permalink
dev-libs/starpu: add 1.4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
mipseb committed Nov 8, 2023
1 parent 48bb351 commit dd451ee
Show file tree
Hide file tree
Showing 3 changed files with 133 additions and 0 deletions.
1 change: 1 addition & 0 deletions dev-libs/starpu/Manifest
@@ -1,2 +1,3 @@
DIST starpu-1.2.6.tar.gz 8911397 BLAKE2B a73cb3b230282b0b828fdaeb65f5491928fde1b2e5797f739a99c87318fa29511196f7121a72ff91bf0d663938b50f200d108fdce2726eb7ea8c7e997156dc13 SHA512 5971f8875dd54c73486583456bd0bc81c2865cb5b8bba6d47a5085d76fa6294c869efdd1c1d14144d08e6c14cbbea3a773474d46aa827ca24f58d9fb57ccbed7
DIST starpu-1.3.9.tar.gz 12961635 BLAKE2B a6eede7c369cacaba5b7330bd6a003f624f58972432d43619aeaf47c1e9e16da871a18c24f8f511f002cb7667c247c13562b4fed2348e2af4f8e402418e1801d SHA512 7150fc11828e8f9ede036af782ff0f89946d9aaed341771436eb8cbb91be7b0faccb6280a5c3bd63800d1a73ec8518a45a02d9f3e137007751cf1c5979678295
DIST starpu-1.4.1.tar.gz 62889638 BLAKE2B 10c29ef194a37f31598869e71a8e3d298004c097fc53e061e9713b9d81e8296c64a56dd86569dcf067b7b99369ebb8f54a91286956a7c036f6bade44ac8403db SHA512 2f90318d6285a4893022139ea63f90c86ddc6374745892afcd905920a69a22017bb445ad511587ef901a462189d5375c6adb6ae54be204992a96a6d8db7e0365
21 changes: 21 additions & 0 deletions dev-libs/starpu/files/starpu-libucontext-musl.patch
@@ -0,0 +1,21 @@
From 3a3cf6c6a3d40f9b1641ccdb5ad6b7ed837c9037 Mon Sep 17 00:00:00 2001
From: mipseb <germtoo@outlook.com>
Date: Wed, 8 Nov 2023 01:05:42 -0500
Subject: [PATCH] starpu-1.4.1 musl fixes point sed to point to new file
location

--- a/configure.ac
+++ b/configure.ac
@@ -448,6 +448,9 @@ fi

AM_CONDITIONAL([STARPU_CROSS_COMPILING], [test "x$cross_compiling" = "xyes"])

+# musl libc requires libucontext to link
+LIBS="${LIBS} $(pkg-config --cflags --libs libucontext)"
+
###############################################################################
# #
# MPI compilers #
--
2.42.0

111 changes: 111 additions & 0 deletions dev-libs/starpu/starpu-1.4.1.ebuild
@@ -0,0 +1,111 @@
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

FORTRAN_NEEDED="fortran"
FORTRAN_STANDARD=90

inherit autotools cuda fortran-2 toolchain-funcs

DESCRIPTION="Unified runtime system for heterogeneous multicore architectures"
HOMEPAGE="https://starpu.gitlabpages.inria.fr/"
SRC_URI="https://files.inria.fr/${PN}/${P}/${P}.tar.gz"

LICENSE="LGPL-2.1"
SLOT="0/7"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ~ppc ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux"

IUSE="
blas cuda doc examples fftw fortran hdf5 mpi opencl opengl
openmp spinlock-check static-libs test valgrind
"
RESTRICT="!test? ( test )"

RDEPEND="
sci-mathematics/glpk:0=
>=sys-apps/hwloc-2.3.0:0=
blas? ( virtual/blas )
cuda? ( dev-util/nvidia-cuda-toolkit
x11-drivers/nvidia-drivers )
fftw? ( sci-libs/fftw:3.0= )
hdf5? ( sci-libs/hdf5:0= )
mpi? ( virtual/mpi )
opencl? ( virtual/opencl )
opengl? ( media-libs/freeglut:0= )
valgrind? ( dev-util/valgrind )
elibc_musl? ( sys-libs/libucontext )
"

DEPEND="${RDEPEND}"
BDEPEND="
virtual/pkgconfig
doc? ( app-doc/doxygen virtual/latex-base )
"

PATCHES=(
"${FILESDIR}"/${PN}-libucontext-musl.patch
)

pkg_pretend() {
[[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
}

pkg_setup() {
[[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
fortran-2_pkg_setup
}

src_prepare() {
default

sed -i -e '/Libs.private/s/@LDFLAGS@//g' packages/*.pc.in */*/*.pc.in || die
sed -i -e 's/-O3//g;s/-D_FORTIFY_SOURCE=1//g' configure.ac || die
eautoreconf

use cuda && cuda_src_prepare
}

src_configure() {
use blas && export BLAS_LIBS="$($(tc-getPKG_CONFIG) --libs blas)"

econf \
$(use mpi && use_enable test mpi-check) \
$(use_enable cuda) \
$(use_enable doc build-doc) \
$(use_enable doc build-doc-pdf) \
$(use_enable fftw starpufft) \
$(use_enable fortran) \
$(use_enable hdf5) \
$(use_enable mpi) \
$(use_enable opencl) \
$(use_enable opengl opengl-render) \
$(use_enable openmp) \
$(use_enable spinlock-check) \
$(use_enable static-libs static) \
$(use_enable valgrind) \
$(use_with mpi mpicc "$(type -P mpicc)") \
--disable-build-examples \
--disable-debug \
--disable-fstack-protector-all \
--disable-full-gdb-information
}

src_test() {
# Avoids timeouts in e.g. starpu_task_wait_for_all, starpu_task_wait
# See bug #803158
# https://gitub.u-bordeaux.fr/starpu/starpu/-/blob/master/contrib/ci.inria.fr/job-1-check.sh
export STARPU_TIMEOUT_ENV=3600
export MPIEXEC_TIMEOUT=3600

# Could switch(?) to quick check if timeouts end up being a real problem, but let's not
# do it for now. https://gitub.u-bordeaux.fr/starpu/starpu/-/blob/master/contrib/ci.inria.fr/job-1-check.sh#L85
MAKEOPTS='-j1' default
}

src_install() {
default
use doc && dodoc -r doc/doxygen/*.pdf doc/doxygen/html
use examples && dodoc -r examples
find "${ED}" -name '*.la' -delete || die
}

0 comments on commit dd451ee

Please sign in to comment.