dev-libs/StringiFor: fix call gfortran directly, pass system LDFLAGS

Closes: https://bugs.gentoo.org/784935
Closes: https://bugs.gentoo.org/780942

Signed-off-by: Sergey Torokhov <torokhov-s-a@yandex.ru>
This commit is contained in:
Sergey Torokhov
2021-04-24 12:37:38 +03:00
parent 0672bdc822
commit 709970547b

View File

@@ -34,8 +34,7 @@ KEYWORDS="~amd64 ~x86"
IUSE="static-libs test"
RESTRICT="!test? ( test )"
DEPEND="dev-util/FoBiS"
BDEPEND="virtual/fortran"
BDEPEND="dev-util/FoBiS"
PATCHES=(
"${FILESDIR}/stringifor-1.1.1_fobos_soname.patch"
@@ -48,7 +47,7 @@ set_build_mode() {
BUILD_MODE_SHARED="-mode stringifor-shared-gnu"
BUILD_MODE_STATIC="-mode stringifor-static-gnu"
BUILD_MODE_TESTS="-mode tests-gnu" ;;
ifort )
*ifort* )
BUILD_MODE_SHARED="-mode stringifor-shared-intel"
BUILD_MODE_STATIC="-mode stringifor-static-intel"
BUILD_MODE_TESTS="-mode tests-intel" ;;
@@ -68,16 +67,17 @@ src_prepare() {
mv -T "${WORKDIR}"/PENF-"${PENF_sha}" "${S}"/src/third_party/PENF
default
sed -i -e 's:\$OPTIMIZE = -O2:\$OPTIMIZE = '"${FFLAGS}"':' fobos || die
sed -i -e 's:\$OPTIMIZE = -O2:\$OPTIMIZE = '"${FFLAGS}"':' \
-e '/^\$LSHARED/s:$: '"${LDFLAGS}"':' fobos || die
}
src_compile() {
FoBiS.py build -verbose ${BUILD_MODE_SHARED}
use static-libs && FoBiS.py build -verbose ${BUILD_MODE_STATIC}
FoBiS.py build -verbose -compiler custom -fc $(tc-getFC) ${BUILD_MODE_SHARED}
use static-libs && FoBiS.py build -verbose -compiler custom -fc $(tc-getFC) ${BUILD_MODE_STATIC}
}
src_test() {
FoBiS.py build ${BUILD_MODE_TESTS}
FoBiS.py build -compiler custom -fc $(tc-getFC) ${BUILD_MODE_TESTS}
for e in $( find ./exe/ -type f -executable -print ); do
if [ "$e" != "./exe/stringifor_test_parse_large_csv" ] ; then
echo " run test $e :" && $e