Skip to content

Commit

Permalink
lis: fix build with +mpich
Browse files Browse the repository at this point in the history
  • Loading branch information
tenomoto committed Jun 25, 2021
1 parent aef1603 commit e132ff4
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 6 deletions.
8 changes: 2 additions & 6 deletions math/lis/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ compilers.allow_arguments_mismatch \
yes

# respect MacPorts compiler
patchfiles-append patch-compiler.diff
patchfiles-append patch-compiler.diff \
patch-src-Makefile.in.diff

# configure script sets optimization flag
configure.optflags-delete -Os
Expand All @@ -41,11 +42,6 @@ configure.args-append \
--enable-complex \
--enable-saamg

if {[variant_isset gfortran]} {
set gccPort [fortran_depends_port_name ${compilers.gcc_default}]
configure.ldflags-append -L${prefix}/lib/${gccPort} -lgfortran
}

if {[mpi_variant_isset]} {
configure.args-append \
--enable-mpi
Expand Down
21 changes: 21 additions & 0 deletions math/lis/files/patch-src-Makefile.in.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
--- src/Makefile.in.orig 2021-01-24 11:48:49.000000000 +0900
+++ src/Makefile.in 2021-06-25 11:01:00.000000000 +0900
@@ -116,6 +116,9 @@
LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
$(LDFLAGS) -o $@
+LINKF = $(LIBTOOL) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=link $(FC) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+ $(LDFLAGS) -o $@
SOURCES = $(liblis@LIBSUFFIX@_la_SOURCES)
DIST_SOURCES = $(liblis@LIBSUFFIX@_la_SOURCES)
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
@@ -387,7 +390,7 @@
rm -f "$${dir}/so_locations"; \
done
liblis@[email protected]: $(liblis@LIBSUFFIX@_la_OBJECTS) $(liblis@LIBSUFFIX@_la_DEPENDENCIES) $(EXTRA_liblis@LIBSUFFIX@_la_DEPENDENCIES)
- $(LINK) -rpath $(libdir) $(liblis@LIBSUFFIX@_la_OBJECTS) $(liblis@LIBSUFFIX@_la_LIBADD) $(LIBS)
+ $(LINKF) -rpath $(libdir) $(liblis@LIBSUFFIX@_la_OBJECTS) $(liblis@LIBSUFFIX@_la_LIBADD) $(LIBS)

mostlyclean-compile:
-rm -f *.$(OBJEXT)

0 comments on commit e132ff4

Please sign in to comment.