Skip to content

Commit

Permalink
sci-libs/superlu_mt: fix int64 not taking effect
Browse files Browse the repository at this point in the history
upstream uses unconventional variables names. int64 adds _LONG_INT
to PREDEFS. PREDEFS seems to be a synonym of CPPFLAGS and used
sparingly to be appended to CFLAGS. It should be passed to $(CC)
explicitly for int64 to take effect.

EXAMLE/Makefile should include ../make.in, which is the same in
upstream.

Closes: https://bugs.gentoo.org/817680
Signed-off-by: Alex Fan <alex.fan.q@gmail.com>
  • Loading branch information
alexfanqi committed Nov 28, 2021
1 parent 49163da commit 52f9a69
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 2 deletions.
26 changes: 26 additions & 0 deletions sci-libs/superlu_mt/files/superlu_mt-3.1-fix-predefs.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
diff --git a/INSTALL/Makefile b/INSTALL/Makefile
index 55977b0..fe565e5 100644
--- a/INSTALL/Makefile
+++ b/INSTALL/Makefile
@@ -19,7 +19,7 @@ slamch.o: slamch.c ; $(CC) $(NOOPTS) -c $<
dlamch.o: dlamch.c ; $(CC) $(NOOPTS) -c $<
superlu_timer.o: superlu_timer.c; $(CC) $(NOOPTS) -c $<

-.c.o: ; $(CC) $(CFLAGS) -c $<
+.c.o: ; $(CC) $(PREDEFS) $(CFLAGS) -c $<

clean:
rm -f *.o test* *.out
diff --git a/SRC/Makefile b/SRC/Makefile
index 81209e5..42dd28b 100644
--- a/SRC/Makefile
+++ b/SRC/Makefile
@@ -130,7 +130,7 @@ await.o: await.c
$(CC) -c $(NOOPTS) $< $(VERBOSE)

.c.o:
- $(CC) $(CFLAGS) $(CDEFS) $(BLASDEF) -c $< $(VERBOSE)
+ $(CC) ${PREDEFS} $(CFLAGS) $(CDEFS) $(BLASDEF) -c $< $(VERBOSE)

clean:
rm -f *.o core ../lib/$(SUPERLULIB)
3 changes: 1 addition & 2 deletions sci-libs/superlu_mt/superlu_mt-3.1.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,7 @@ src_prepare() {
TMGLIB=libtmglib.a
EOF
SONAME=lib${PN}.so.${SOVERSION}
sed -e 's|../make.inc|make.inc|' \
-e "s|../SRC|${EPREFIX}/usr/include/${PN}|" \
sed -e "s|../SRC|${EPREFIX}/usr/include/${PN}|" \
-e '/:.*$(SUPERLULIB)/s|../lib/$(SUPERLULIB)||g' \
-e 's|../lib/$(SUPERLULIB)|-lsuperlu_mt|g' \
-i EXAMPLE/Makefile || die
Expand Down

0 comments on commit 52f9a69

Please sign in to comment.