Skip to content

Commit

Permalink
sci-astronomy/psfex: add gcc 10 workaround
Browse files Browse the repository at this point in the history
Closes: https://bugs.gentoo.org/724588
Signed-off-by: Sam James <[email protected]>
  • Loading branch information
thesamesam committed Mar 4, 2021
1 parent 2084bbf commit 2902198
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions sci-astronomy/psfex/psfex-3.17.1.ebuild
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Copyright 1999-2020 Gentoo Authors
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=6
EAPI=7

inherit autotools
inherit autotools flag-o-matic

DESCRIPTION="Extracts models of the Point Spread Function from FITS images"
HOMEPAGE="http://www.astromatic.net/software/psfex"
Expand All @@ -14,12 +14,12 @@ LICENSE="GPL-3"
SLOT="0"
IUSE="doc threads plplot"

BDEPEND="virtual/pkgconfig"
RDEPEND="
sci-libs/atlas:0[lapack,threads=]
sci-libs/fftw:3.0
plplot? ( sci-libs/plplot:= )"
DEPEND="${RDEPEND}
virtual/pkgconfig"
DEPEND="${RDEPEND}"

PATCHES=(
"${FILESDIR}/${P}-have-mmap.patch"
Expand All @@ -29,13 +29,16 @@ PATCHES=(

src_prepare() {
default
local mycblas=atlcblas myclapack=atlclapack

local mycblas=atlcblas myclapack=atlclapack

if use threads; then
[[ -e ${EPREFIX}/usr/$(get_libdir)/libptcblas.so ]] && \
[[ -e "${EPREFIX}"/usr/$(get_libdir)/libptcblas.so ]] && \
mycblas=ptcblas
[[ -e ${EPREFIX}/usr/$(get_libdir)/libptclapack.so ]] &&
[[ -e "${EPREFIX}"/usr/$(get_libdir)/libptclapack.so ]] &&
myclapack=ptclapack
fi

# fix the configure and not the acx_atlas.m4. the eautoreconf will
# produce a configure giving a wrong install Makefile target (to fix)
sed -e "s/-lcblas/-l${mycblas}/g" \
Expand All @@ -51,6 +54,9 @@ src_prepare() {
}

src_configure() {
# bug #724588
append-cflags "-fcommon"

econf \
--with-atlas-incdir="${EPREFIX}/usr/include/atlas" \
$(use_enable plplot) \
Expand Down

0 comments on commit 2902198

Please sign in to comment.