From 26ed15e9e7d3fea5414e009936290fbb52e0c0a9 Mon Sep 17 00:00:00 2001 From: Sam James Date: Wed, 8 May 2024 17:55:15 +0100 Subject: sci-biology/paml: respect CC, CPPFLAGS, LDFLAGS Signed-off-by: Sam James --- sci-biology/paml/files/paml-4.10.7-LDFLAGS.patch | 60 ++++++++++++++++++++++++ sci-biology/paml/paml-4.10.7.ebuild | 8 ++-- 2 files changed, 64 insertions(+), 4 deletions(-) create mode 100644 sci-biology/paml/files/paml-4.10.7-LDFLAGS.patch (limited to 'sci-biology') diff --git a/sci-biology/paml/files/paml-4.10.7-LDFLAGS.patch b/sci-biology/paml/files/paml-4.10.7-LDFLAGS.patch new file mode 100644 index 000000000000..492396a0fd83 --- /dev/null +++ b/sci-biology/paml/files/paml-4.10.7-LDFLAGS.patch @@ -0,0 +1,60 @@ +https://github.com/abacus-gene/paml/pull/46 +--- a/src/Makefile ++++ b/src/Makefile +@@ -9,39 +9,39 @@ LIBS = -lm # -lM + all : $(PRGS) + + baseml : baseml.o tools.o treesub.c treespace.c paml.h +- $(CC) $(CFLAGS) -o $@ baseml.o tools.o $(LIBS) ++ $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ baseml.o tools.o $(LIBS) + basemlg : basemlg.o tools.o treesub.c treespace.c paml.h +- $(CC) $(CFLAGS) -o $@ basemlg.o tools.o $(LIBS) ++ $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ basemlg.o tools.o $(LIBS) + codeml : codeml.o tools.o treesub.c treespace.c paml.h +- $(CC) $(CFLAGS) -o $@ codeml.o tools.o $(LIBS) ++ $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ codeml.o tools.o $(LIBS) + evolver : evolver.o tools.o treesub.c treespace.c paml.h +- $(CC) $(CFLAGS) -o $@ evolver.o tools.o $(LIBS) ++ $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ evolver.o tools.o $(LIBS) + pamp : pamp.o tools.o treesub.c treespace.c paml.h +- $(CC) $(CFLAGS) -o $@ pamp.o tools.o $(LIBS) ++ $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ pamp.o tools.o $(LIBS) + mcmctree : mcmctree.o tools.o treesub.c treespace.c paml.h +- $(CC) $(CFLAGS) -o $@ mcmctree.c tools.o $(LIBS) +- $(CC) $(CFLAGS) -o infinitesites -D INFINITESITES mcmctree.c tools.o $(LIBS) ++ $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ mcmctree.c tools.o $(LIBS) ++ $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o infinitesites -D INFINITESITES mcmctree.c tools.o $(LIBS) + yn00: yn00.o tools.o paml.h +- $(CC) $(CFLAGS) -o $@ yn00.o tools.o $(LIBS) ++ $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ yn00.o tools.o $(LIBS) + chi2 : chi2.o +- $(CC) $(CFLAGS) -o $@ chi2.c $(LIBS) ++ $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ chi2.c $(LIBS) + + tools.o : paml.h tools.c +- $(CC) $(CFLAGS) -c tools.c ++ $(CC) $(CPPFLAGS) $(CFLAGS) -c tools.c + baseml.o : paml.h baseml.c treesub.c treespace.c +- $(CC) $(CFLAGS) -c baseml.c ++ $(CC) $(CPPFLAGS) $(CFLAGS) -c baseml.c + basemlg.o : paml.h basemlg.c treesub.c +- $(CC) $(CFLAGS) -c basemlg.c ++ $(CC) $(CPPFLAGS) $(CFLAGS) -c basemlg.c + codeml.o : paml.h codeml.c treesub.c treespace.c +- $(CC) $(CFLAGS) -c codeml.c ++ $(CC) $(CPPFLAGS) $(CFLAGS) -c codeml.c + evolver.o: evolver.c treesub.c treespace.c +- $(CC) $(CFLAGS) -c evolver.c ++ $(CC) $(CPPFLAGS) $(CFLAGS) -c evolver.c + mcmctree.o : paml.h mcmctree.c treesub.c treespace.c +- $(CC) $(CFLAGS) -c mcmctree.c ++ $(CC) $(CPPFLAGS) $(CFLAGS) -c mcmctree.c + pamp.o : paml.h pamp.c treesub.c treespace.c +- $(CC) $(CFLAGS) -c pamp.c ++ $(CC) $(CPPFLAGS) $(CFLAGS) -c pamp.c + yn00.o : paml.h yn00.c +- $(CC) $(CFLAGS) -c yn00.c ++ $(CC) $(CPPFLAGS) $(CFLAGS) -c yn00.c + + clean : + -rm *.o $(PRGS) diff --git a/sci-biology/paml/paml-4.10.7.ebuild b/sci-biology/paml/paml-4.10.7.ebuild index 53a41c38fd11..598c844c5ce1 100644 --- a/sci-biology/paml/paml-4.10.7.ebuild +++ b/sci-biology/paml/paml-4.10.7.ebuild @@ -13,12 +13,12 @@ LICENSE="free-noncomm" SLOT="0" KEYWORDS="~amd64" -src_configure() { - tc-export CC -} +PATCHES=( + "${FILESDIR}"/${PN}-4.10.7-LDFLAGS.patch +) src_compile() { - emake -C src + emake -C src CC="$(tc-getCC)" CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" } src_install() { -- cgit v1.2.3-65-gdbad