Merge updates from master

This commit is contained in:
Repository mirror & CI
2020-10-22 11:05:16 +00:00
8 changed files with 2466 additions and 1 deletions

View File

@@ -137,7 +137,7 @@ See the [dev manual](https://devmanual.gentoo.org/eclass-reference/distutils-r1.
Installation of small files, like documentation, completions, man pages, etc, does not have to be toggle-able with an USE flag. Instead, just install these files unconditionally. This avoids unnecessary recompilations when an user forgot to enable a flag that installs a small file.
The same holds for optional runtime dependencies. It is not necessary to introduce a USE flag, that does not alter the compiled binary and just pulls in an extra optional runtime dependency. Instead, you can notify the user of these optional runtime dependencies with the `optfeature` function from the [eutils](https://devmanual.gentoo.org/eclass-reference/eutils.eclass/) eclass. If, for whatever reason, it is still desired to introduce an USE flag for optional runtime dependencies, one can still use the `optfeature` function as well to allow the user to choose to avoid recompiling a package.
The same holds for optional runtime dependencies. It is not necessary to introduce a USE flag, that does not alter the compiled binary and just pulls in an extra optional runtime dependency. Instead, you can notify the user of these optional runtime dependencies with the `optfeature` function from the [optfeature](https://devmanual.gentoo.org/eclass-reference/optfeature.eclass/) eclass (early from currently deprecated [eutils](https://devmanual.gentoo.org/eclass-reference/eutils.eclass/) eclass). If, for whatever reason, it is still desired to introduce an USE flag for optional runtime dependencies, one can still use the `optfeature` function as well to allow the user to choose to avoid recompiling a package.
## Useful Links <a name="links"></a>

View File

@@ -1,3 +1,6 @@
DIST SU2-7.0.6-TestCases.tar.gz 447944839 BLAKE2B 5212ef7bf69bb40120ca2af99a02f2a89ae6cc0a1e048e57409ee1d2911f930452f4a5ef668126d6b7144c3f81d50bdadd0bcc810f0472740ccbbb6605e5a07d SHA512 c976450e7e17df58b47cbf14d18c4435f977a70dc086d5b74ea584ae14b3204632ef87b2dce6a456396179f1b72ef8eba83065a42d978b8d6966d5446decbd3c
DIST SU2-7.0.6-Tutorials.tar.gz 64282244 BLAKE2B 3b0ce136c9fa5c3e0ffc585e28b1a60470eeaf2518cbef539fccc185f79cd41a889e3c3c8a0ada3f488cfe1d2d0115e2768267c6ef4502b882b07f909f6f382c SHA512 4aaf39b98cbbe4c9e12d78027b0ee2b3d30fd614d1e48092d8bfd25c312a06a1621b2192653a7d8ac767762b06ae339ab6fb77e81f833efdb419ce09f92dec2f
DIST SU2-7.0.6.tar.gz 20531872 BLAKE2B 30e59bc6876223d87429b79f101a5705f989096a1b81725aa20012567d15b08b6a8a24140cc76b35c6c3657a1d6afa85d56da699ab38dac85714e296d7ad8531 SHA512 a4619dd969c6d9cb20de1d373c8e0af9d56654f9f96d919662897db4c3c8bf52b45fb1239065d480ba1b4f05ba7a17c9540ff3fe47fb0d96864736200cda8bcc
DIST SU2-7.0.7-TestCases.tar.gz 448969006 BLAKE2B 6c886824b55d7f8516d2ea69e2f7bef36a40986f4f715da46d91f851eb59390329433c6941a280eca34ad675633b2f1b01a897d1db8d177a5c4f770b286d0625 SHA512 0884b4f750dbcfd3f2cb0e71d6005932e4edd90a50fa84eb484f6c0c523930ddebfb3ed4315161b8fdeff911a52fa72b6d79739c8e19cd634b9823e007520213
DIST SU2-7.0.7-Tutorials.tar.gz 64282235 BLAKE2B 7a6b780ee6f01d26a7a7d4751ca39798af56cfd7b99ca3e13fdff61aecd631a3aa4c98a487f48a8b2593c711ee25bd1ddc90a316bde2c287e95a383321f1d5e9 SHA512 189b5da96f08689b62ba3c42ee349edd2e145f371112895587e53497f16de3d6fdbf17308af39961775d76e3169c40872ced8e267146b6da5ae12d31a4c70fa9
DIST SU2-7.0.7.tar.gz 20618138 BLAKE2B c823ea59fd28547b78c4694d45995e83c5f2c16229c40d20b951cdd62a98e13c77c07cffa87a1ec105b29a597878c7a2342c6ac90c7c9751ed20f876194a55e1 SHA512 c5dacc8b2f4ab7eb72852d8e6ae59c0800e8126faf20641135fa31ec42915b8e3553082e328b2b158e3e337f7aab0a932b6b1f875d3c0191db538bb923affcf3

View File

@@ -0,0 +1,114 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python3_{6,7,8} )
inherit meson python-single-r1
DESCRIPTION="SU2: An Open-Source Suite for Multiphysics Simulation and Design"
HOMEPAGE="https://su2code.github.io/"
SRC_URI="
https://github.com/su2code/SU2/archive/v${PV}.tar.gz -> ${P}.tar.gz
test? ( https://github.com/su2code/TestCases/archive/v${PV}.tar.gz -> ${P}-TestCases.tar.gz )
tutorials? ( https://github.com/su2code/Tutorials/archive/v${PV}.tar.gz -> ${P}-Tutorials.tar.gz )
"
LICENSE="LGPL-2.1"
SLOT="0"
KEYWORDS="~amd64"
# cgns, metis, parmetis are bundled;
# omp is disable as it's experimental;
# pastix is disabled as it's try to find bundled libs;
IUSE="cgns -mkl +mpi openblas tecio test tutorials"
RESTRICT="!test? ( test )"
REQUIRED_USE="
${PYTHON_REQUIRED_USE}
mkl? ( !openblas )
"
RDEPEND="
${PYTHON_DEPS}
mpi? ( virtual/mpi[cxx] )
mkl? ( sci-libs/mkl )
openblas? ( sci-libs/openblas )
"
DEPEND="
${RDEPEND}
tecio? ( dev-libs/boost:= )
"
BDEPEND="virtual/pkgconfig"
PATCHES=(
"${FILESDIR}/${P}-fix-env.patch"
"${FILESDIR}/${PN}-7.0.4-unbundle_boost.patch"
"${FILESDIR}/${P}-fix-python-optimize.patch"
)
DOCS=( "LICENSE.md" "README.md" "SU2_PY/documentation.txt" )
src_unpack() {
unpack "${P}.tar.gz"
if use test ; then
einfo "Unpacking ${P}-TestCases.tar.gz to /var/tmp/portage/sci-physics/${P}/work/${P}/TestCases"
tar -C "${P}"/TestCases --strip-components=1 -xzf "${DISTDIR}/${P}-TestCases.tar.gz" || die
fi
if use tutorials ; then
einfo "Unpacking ${P}-Tutorials.tar.gz to /var/tmp/portage/sci-physics/${P}/work/${P}"
mkdir "${P}"/Tutorials
tar -C "${P}"/Tutorials --strip-components=1 -xzf "${DISTDIR}/${P}-Tutorials.tar.gz" || die
fi
}
src_configure() {
local emesonargs=(
-Denable-autodiff=false
-Denable-directdiff=false
-Denable-pastix=false
-Denable-pywrapper=false
-Dwith-omp=false
$(meson_feature mpi with-mpi)
$(meson_use cgns enable-cgns)
$(meson_use mkl enable-mkl)
$(meson_use openblas enable-openblas)
$(meson_use tecio enable-tecio)
$(meson_use test enable-tests)
)
meson_src_configure
}
src_test() {
ln -s ../../${P}-build/SU2_CFD/src/SU2_CFD SU2_PY/SU2_CFD
ln -s ../../${P}-build/SU2_DEF/src/SU2_DEF SU2_PY/SU2_DEF
ln -s ../../${P}-build/SU2_DOT/src/SU2_DOT SU2_PY/SU2_DOT
ln -s ../../${P}-build/SU2_GEO/src/SU2_GEO SU2_PY/SU2_GEO
ln -s ../../${P}-build/SU2_SOL/src/SU2_SOL SU2_PY/SU2_SOL
export SU2_RUN="${S}/SU2_PY"
export SU2_HOME="${S}"
export PATH=$PATH:$SU2_RUN
export PYTHONPATH=$PYTHONPATH:$SU2_RUN
einfo "Running UnitTests ..."
../${P}-build/UnitTests/test_driver
pushd TestCases/
use mpi && python parallel_regression.py
use mpi || python serial_regression.py
use tutorials && use mpi && python tutorials.py
popd
}
src_install() {
meson_src_install
mkdir -p "${ED}$(python_get_sitedir)"
mv "${ED}"/usr/bin/{FSI,SU2,*.py} -t "${ED}$(python_get_sitedir)"
python_optimize "${D}/$(python_get_sitedir)"
if use tutorials ; then
insinto "/usr/share/${P}"
doins -r Tutorials
fi
}

View File

@@ -0,0 +1,12 @@
diff -Naur old_env/UnitTests/meson.build new_env/UnitTests/meson.build
--- old_env/UnitTests/meson.build 2020-06-15 17:03:43.000000000 +0300
+++ new_env/UnitTests/meson.build 2020-06-15 17:04:35.000000000 +0300
@@ -26,7 +26,7 @@
test_driver = executable(
'test_driver',
unit_test_files,
- install : true,
+ install : false,
dependencies : [su2_cfd_dep, common_dep, su2_deps, catch2_dep],
cpp_args: ['-fPIC', default_warning_flags, su2_cpp_args]
)

File diff suppressed because it is too large Load Diff

View File

@@ -1 +1,2 @@
DIST gfs2-utils-3.2.0.tar.xz 279696 BLAKE2B bc8691396d820be09fbeeb590727d51fdcbfb739029a10bcbca501eb12fb4e1853d8dd9c70a0cb04fc1bad1c88be7520809b2bffa1d454f8d07923f6993629ed SHA512 77b5448d46a27ee77b14fe5437b7932233a25f1d189b407a440657591e44c1d0d77b6253003b8b92d7fc4e363fa6eab97e01f5ca8de2529d5c60a94917e9ef18
DIST gfs2-utils-3.3.0.tar.gz 370498 BLAKE2B 00835f4d162bebe64d11f5007b6408c7de4320d74ac29c4a1057e86d99a8ee236a70aa8cd25ca37872dbce1d72499c7b846fb3780752aad00aa4f61c20a51712 SHA512 f944d8ce69f2ae49a678d5c3d45ff5be19ce8836c7559528aff088c4e660c54b636f4ed37f8e5016325a196f1e0ed201d9e0e71134766fed866095aac66337a2

View File

@@ -0,0 +1,59 @@
From eb1020191f7743f451442096db8635643c5fddb1 Mon Sep 17 00:00:00 2001
From: Andrew Price <anprice@redhat.com>
Date: Sep 05 2020 23:59:02 +0000
Subject: restoremeta: Fix unaligned access in restore_init()
On sparc64 we get restoremeta tests failing with SIGBUS due to an
unaligned access when scanning for the super block offset in the
metadata file. memcpy the buffer into a gfs2_sb struct to avoid that. In
most cases, if not always, this loop succeeds on the first iteration
and might not even be needed, so the added overhead is minimal.
diff --git a/gfs2/edit/savemeta.c b/gfs2/edit/savemeta.c
index 80c11c9..32e1f70 100644
--- a/gfs2/edit/savemeta.c
+++ b/gfs2/edit/savemeta.c
@@ -1251,7 +1251,7 @@ nobuffer:
return NULL;
}
-static int restore_super(struct metafd *mfd, char *buf, int printonly)
+static int restore_super(struct metafd *mfd, void *buf, int printonly)
{
int ret;
@@ -1337,7 +1337,7 @@ static void complain(const char *complaint)
static int restore_init(const char *path, struct metafd *mfd, struct savemeta_header *smh, int printonly)
{
- struct gfs2_meta_header *sbmh;
+ struct gfs2_sb rsb;
uint16_t sb_siglen;
char *end;
char *bp;
@@ -1372,12 +1372,12 @@ static int restore_init(const char *path, struct metafd *mfd, struct savemeta_he
return -1;
}
/* Scan for the position of the superblock. Required to support old formats(?). */
- end = &restore_buf[256 + sizeof(struct saved_metablock) + sizeof(*sbmh)];
+ end = &restore_buf[256 + sizeof(struct saved_metablock) + sizeof(struct gfs2_meta_header)];
while (bp <= end) {
+ memcpy(&rsb, bp + sizeof(struct saved_metablock), sizeof(rsb));
sb_siglen = be16_to_cpu(((struct saved_metablock *)bp)->siglen);
- sbmh = (struct gfs2_meta_header *)(bp + sizeof(struct saved_metablock));
- if (sbmh->mh_magic == cpu_to_be32(GFS2_MAGIC) &&
- sbmh->mh_type == cpu_to_be32(GFS2_METATYPE_SB))
+ if (be32_to_cpu(rsb.sb_header.mh_magic) == GFS2_MAGIC &&
+ be32_to_cpu(rsb.sb_header.mh_type) == GFS2_METATYPE_SB)
break;
bp++;
}
@@ -1386,7 +1386,7 @@ static int restore_init(const char *path, struct metafd *mfd, struct savemeta_he
return -1;
}
bp += sizeof(struct saved_metablock);
- ret = restore_super(mfd, bp, printonly);
+ ret = restore_super(mfd, &rsb, printonly);
if (ret != 0)
return ret;

View File

@@ -0,0 +1,64 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit autotools toolchain-funcs linux-info
DESCRIPTION="Shared-disk cluster file system"
HOMEPAGE="https://pagure.io/gfs2-utils"
SRC_URI="https://pagure.io/gfs2-utils/archive/${PV}/${P}.tar.gz"
LICENSE="GPL-2 LGPL-2.1"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="nls test"
BDEPEND="sys-devel/autoconf
sys-devel/automake
sys-devel/libtool
sys-devel/make
"
RDEPEND="sys-libs/zlib
app-arch/bzip2
sys-libs/ncurses
sys-apps/util-linux
"
DEPEND="${RDEPEND}
sys-devel/gettext
sys-devel/bison
sys-devel/flex
test? ( dev-libs/check )
sys-kernel/linux-headers
"
src_prepare() {
eapply "${FILESDIR}"/reproducible.patch
eapply "${FILESDIR}"/gfs2_withdraw_helper.patch
eapply "${FILESDIR}"/python3.patch
eapply "${FILESDIR}"/restoremeta.patch
default
./autogen.sh
eautoreconf
}
src_configure() {
local econf_args
econf_args=(
bzip2_LIBS="-L/$(get_libdir) -lbz2"
bzip2_CFLAGS="-I${prefix}/include"
)
ECONF_SOURCE="${S}" econf "${econf_args[@]}"
}
src_compile() {
emake
}
src_install() {
emake DESTDIR="${D}" install
}