diff options
author | David Seifert <soap@gentoo.org> | 2021-02-14 14:48:08 +0100 |
---|---|---|
committer | David Seifert <soap@gentoo.org> | 2021-02-14 14:48:08 +0100 |
commit | 811c337cd77f2625690105d0f1fd4c4883c27aee (patch) | |
tree | 9a5e88bd1a7e2670507f2ed6c189751057acbb51 /dev-libs/openspecfun | |
parent | sci-astronomy/swarp: Fix use flag typo (diff) | |
download | gentoo-811c337cd77f2625690105d0f1fd4c4883c27aee.tar.gz gentoo-811c337cd77f2625690105d0f1fd4c4883c27aee.tar.bz2 gentoo-811c337cd77f2625690105d0f1fd4c4883c27aee.zip |
dev-libs/openspecfun: [QA] Fix calling cc directly
Closes: https://bugs.gentoo.org/727048
Closes: https://bugs.gentoo.org/770481
Package-Manager: Portage-3.0.14, Repoman-3.0.2
Signed-off-by: David Seifert <soap@gentoo.org>
Diffstat (limited to 'dev-libs/openspecfun')
3 files changed, 80 insertions, 29 deletions
diff --git a/dev-libs/openspecfun/files/openspecfun-0.5.3-Makefile.patch b/dev-libs/openspecfun/files/openspecfun-0.5.3-Makefile.patch new file mode 100644 index 000000000000..a7ebb8609f15 --- /dev/null +++ b/dev-libs/openspecfun/files/openspecfun-0.5.3-Makefile.patch @@ -0,0 +1,67 @@ +--- a/Makefile ++++ b/Makefile +@@ -35,9 +35,7 @@ + endif + endif + +-all: libopenspecfun.a libopenspecfun.$(OSF_MAJOR_MINOR_SHLIB_EXT) +-libopenspecfun.a: $(OBJS) +- $(AR) -rcs libopenspecfun.a $(OBJS) ++all: libopenspecfun.$(OSF_MAJOR_MINOR_SHLIB_EXT) + libopenspecfun.$(OSF_MAJOR_MINOR_SHLIB_EXT): $(OBJS) + $(FC) -shared $(OBJS) $(LDFLAGS) $(LDFLAGS_add) -Wl,$(SONAME_FLAG),libopenspecfun.$(OSF_MAJOR_SHLIB_EXT) -o $@ + ifneq ($(OS),WINNT) +@@ -50,7 +48,6 @@ + mkdir -p $(DESTDIR)$(libdir) + mkdir -p $(DESTDIR)$(includedir) + cp -a libopenspecfun.*$(SHLIB_EXT)* $(DESTDIR)$(shlibdir)/ +- cp -a libopenspecfun.a $(DESTDIR)$(libdir)/ + cp -a Faddeeva/Faddeeva.h $(DESTDIR)$(includedir) + + clean: +--- a/Make.inc ++++ b/Make.inc +@@ -14,42 +14,18 @@ + libdir = $(prefix)/lib + includedir = $(prefix)/include + +-FC = gfortran + # CFLAGS_add and FFLAGS_add are flags that we always want to include + # They are not overridable by the user, whereas CFLAGS and FFLAGS are + # simply defaults and are overridable via environment variables or + # `make CFLAGS="foo"` on the command line + +-FFLAGS = -O3 +-CFLAGS = -std=c99 -Wall -O3 +-CPPFLAGS = ++CFLAGS += -std=c99 -Wall + + override FFLAGS_add = + override CFLAGS_add = + override CPPFLAGS_add = + override LDFLAGS_add = + +-USEGCC = 1 +-USECLANG = 0 +- +-ifeq ($(OS), Darwin) +-USEGCC = 0 +-USECLANG = 1 +-endif +- +-AR = ar +- +-ifeq ($(USECLANG),1) +-USEGCC = 0 +-CC = clang +-override CFLAGS_add += -fno-builtin +-endif +- +-ifeq ($(USEGCC),1) +-CC = gcc +-override CFLAGS_add += -fno-gnu89-inline -std=c99 +-endif +- + ARCH := $(shell $(CC) -dumpmachine | sed "s/\([^-]*\).*$$/\1/") + ifeq ($(ARCH),mingw32) + $(error "the mingw32 compiler you are using fails the openblas testsuite. please see the Julia README.windows.md document for a replacement") diff --git a/dev-libs/openspecfun/files/openspecfun-0.5.3-static-libs.patch b/dev-libs/openspecfun/files/openspecfun-0.5.3-static-libs.patch deleted file mode 100644 index 72dd3bc545ff..000000000000 --- a/dev-libs/openspecfun/files/openspecfun-0.5.3-static-libs.patch +++ /dev/null @@ -1,21 +0,0 @@ ---- a/Makefile -+++ b/Makefile -@@ -35,9 +35,7 @@ OSF_MAJOR_SHLIB_EXT := $(SHLIB_EXT).$(SOMAJOR) - endif - endif - --all: libopenspecfun.a libopenspecfun.$(OSF_MAJOR_MINOR_SHLIB_EXT) --libopenspecfun.a: $(OBJS) -- $(AR) -rcs libopenspecfun.a $(OBJS) -+all: libopenspecfun.$(OSF_MAJOR_MINOR_SHLIB_EXT) - libopenspecfun.$(OSF_MAJOR_MINOR_SHLIB_EXT): $(OBJS) - $(FC) -shared $(OBJS) $(LDFLAGS) $(LDFLAGS_add) -Wl,$(SONAME_FLAG),libopenspecfun.$(OSF_MAJOR_SHLIB_EXT) -o $@ - ifneq ($(OS),WINNT) -@@ -50,7 +48,6 @@ install: all - mkdir -p $(DESTDIR)$(libdir) - mkdir -p $(DESTDIR)$(includedir) - cp -a libopenspecfun.*$(SHLIB_EXT)* $(DESTDIR)$(shlibdir)/ -- cp -a libopenspecfun.a $(DESTDIR)$(libdir)/ - cp -a Faddeeva/Faddeeva.h $(DESTDIR)$(includedir) - - clean: diff --git a/dev-libs/openspecfun/openspecfun-0.5.3.ebuild b/dev-libs/openspecfun/openspecfun-0.5.3.ebuild index 9a39e379257d..5fc0b9cb540f 100644 --- a/dev-libs/openspecfun/openspecfun-0.5.3.ebuild +++ b/dev-libs/openspecfun/openspecfun-0.5.3.ebuild @@ -13,23 +13,28 @@ LICENSE="MIT public-domain" SLOT="0" KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" -DEPEND="sci-libs/openlibm" +DEPEND="sci-libs/openlibm:=" RDEPEND="${DEPEND}" -PATCHES=( "${FILESDIR}"/${P}-static-libs.patch ) +PATCHES=( "${FILESDIR}"/${P}-Makefile.patch ) -src_prepare() { - default - sed -i "s:/lib:/$(get_libdir):" Make.inc || die +src_configure() { + tc-export CC } src_compile() { - emake prefix="${EPREFIX}/usr" USE_OPENLIBM=1 FC="$(tc-getFC)" + emake \ + prefix="${EPREFIX}"/usr \ + libdir="${EPREFIX}"/usr/$(get_libdir) \ + USE_OPENLIBM=1 } src_install() { - emake DESTDIR="${D}" prefix="${EPREFIX}/usr" \ - libdir="${EPREFIX}/usr/$(get_libdir)" install + emake \ + prefix="${EPREFIX}"/usr \ + libdir="${EPREFIX}"/usr/$(get_libdir) \ + DESTDIR="${D}" \ + install einstalldocs find "${ED}" -name '*.la' -delete || die |