commit:     892348f1c0bf6a4024ad25377c5e03ad2a2a873e
Author:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
AuthorDate: Wed Jun 29 21:55:05 2022 +0000
Commit:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
CommitDate: Thu Jun 30 10:26:16 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=892348f1

sys-cluster/otf2: add 3.0, use custom compiler

Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com>

 sys-cluster/otf2/Manifest                          |   1 +
 .../otf2/files/otf2-2.3-respect-flags.patch        | 264 ---------------------
 .../otf2/files/otf2-3.0-respect-flags.patch        |  95 ++++++++
 .../{otf2-2.3-r2.ebuild => otf2-2.3-r3.ebuild}     |  51 +++-
 .../otf2/{otf2-2.3-r2.ebuild => otf2-3.0.ebuild}   |  51 +++-
 5 files changed, 172 insertions(+), 290 deletions(-)

diff --git a/sys-cluster/otf2/Manifest b/sys-cluster/otf2/Manifest
index 4ff1ad525..1bb17c409 100644
--- a/sys-cluster/otf2/Manifest
+++ b/sys-cluster/otf2/Manifest
@@ -1 +1,2 @@
 DIST otf2-2.3.tar.gz 5321226 BLAKE2B 
a217ac2bcc0fa777dccc99a0f90a143b3cfea66ff717cfe66f68d2d59407023b1f0e419d9c4275d27f201fa3df0c5a89d4730052039144b02a2136e390e85fbb
 SHA512 
c27c768f178e512c46683667d70bc2ad3871b17b8978356b13917d3fc12b49b4ee5d5767e9e10a247bbc7f2e911aaae7455bfec8f36704236d55c16454fa0a4c
+DIST otf2-3.0.tar.gz 5260678 BLAKE2B 
cb783c8466e2be424452284ac03df13306f1bad1163adcf113b4bcf93fe2be4e7fb05053ccf09d825db3e3f21b40667d4c03365be96ab240b4e1376ba6943703
 SHA512 
63cef15091d4071860211a5f52c375be089a3c8dc5ce28df0078197f2a2b7c45c2ecd9e677cb7ecf02339716bd0b2b692d1cb17c1ad1114978ffaa29cd28ff43

diff --git a/sys-cluster/otf2/files/otf2-2.3-respect-flags.patch 
b/sys-cluster/otf2/files/otf2-2.3-respect-flags.patch
index ff1db4dcd..091e6f80b 100644
--- a/sys-cluster/otf2/files/otf2-2.3-respect-flags.patch
+++ b/sys-cluster/otf2/files/otf2-2.3-respect-flags.patch
@@ -1,267 +1,3 @@
---- a/build-config/common/platforms/compiler-frontend-clang
-+++ b/build-config/common/platforms/compiler-frontend-clang
-@@ -1,12 +1,12 @@
--CC_FOR_BUILD=clang
--CXX_FOR_BUILD=clang++
--F77_FOR_BUILD=flang
--FC_FOR_BUILD=flang
-+CC_FOR_BUILD="$(CC)"
-+CXX_FOR_BUILD="$(CXX)"
-+F77_FOR_BUILD="$(F77)"
-+FC_FOR_BUILD="$(FC)"
- 
--#CPPFLAGS_FOR_BUILD=
--#CFLAGS_FOR_BUILD=
--#CXXFLAGS_FOR_BUILD=
--#FFLAGS_FOR_BUILD=
--#FCFLAGS_FOR_BUILD=
--#LDFLAGS_FOR_BUILD=
-+CPPFLAGS_FOR_BUILD="$(CPPFLAGS)"
-+CFLAGS_FOR_BUILD="$(CFLAGS)"
-+CXXFLAGS_FOR_BUILD="$(CXXFLAGS)"
-+FFLAGS_FOR_BUILD="$(FFLAGS)"
-+FCFLAGS_FOR_BUILD="$(FCFLAGS)"
-+LDFLAGS_FOR_BUILD="$(LDFLAGS)"
- #LIBS_FOR_BUILD=
---- a/build-config/common/platforms/compiler-frontend-gcc
-+++ b/build-config/common/platforms/compiler-frontend-gcc
-@@ -1,12 +1,12 @@
--CC_FOR_BUILD=gcc
--CXX_FOR_BUILD=g++
--F77_FOR_BUILD=gfortran
--FC_FOR_BUILD=gfortran
-+CC_FOR_BUILD="$(CC)"
-+CXX_FOR_BUILD="$(CXX)"
-+F77_FOR_BUILD="$(F77)"
-+FC_FOR_BUILD="$(FC)"
- 
--#CPPFLAGS_FOR_BUILD=
--#CFLAGS_FOR_BUILD=
--#CXXFLAGS_FOR_BUILD=
--#FFLAGS_FOR_BUILD=
--#FCFLAGS_FOR_BUILD=
--#LDFLAGS_FOR_BUILD=
-+CPPFLAGS_FOR_BUILD="$(CPPFLAGS)"
-+CFLAGS_FOR_BUILD="$(CFLAGS)"
-+CXXFLAGS_FOR_BUILD="$(CXXFLAGS)"
-+FFLAGS_FOR_BUILD="$(FFLAGS)"
-+FCFLAGS_FOR_BUILD="$(FCFLAGS)"
-+LDFLAGS_FOR_BUILD="$(LDFLAGS)"
- #LIBS_FOR_BUILD=
---- a/build-config/common/platforms/compiler-mpi-mpich
-+++ b/build-config/common/platforms/compiler-mpi-mpich
-@@ -1,10 +1,10 @@
--MPICC=mpicc -cc={CC}
-+#MPICC=mpicc -cc={CC}
- #MPI_CFLAGS
--MPICXX=mpicxx -CC={CXX}
-+#MPICXX=mpicxx -CC={CXX}
- #MPI_CXXFLAGS=
--MPIF77=mpif77 -f77={F77}
-+#MPIF77=mpif77 -f77={F77}
- #MPI_FFLAGS=
--MPIFC=mpif90 -f90={FC}
-+#MPIFC=mpif90 -f90={FC}
- #MPI_FCFLAGS=
- #MPI_CPPFLAGS=
- #MPI_LDFLAGS=
---- a/build-config/common/platforms/compiler-mpi-mpich2
-+++ b/build-config/common/platforms/compiler-mpi-mpich2
-@@ -1,12 +1,12 @@
--MPICC=mpicc -cc={CC}
-+#MPICC=mpicc -cc={CC}
- #MPI_CFLAGS
--MPICXX=mpicxx -cxx={CXX}
-+#MPICXX=mpicxx -cxx={CXX}
- #MPI_CXXFLAGS=
--MPIF77=mpif77 -f77={F77}
-+#MPIF77=mpif77 -f77={F77}
- #MPI_FFLAGS=
--MPIFC=mpif90 -f90={FC}
-+#MPIFC=mpif90 -f90={FC}
- #MPI_FCFLAGS=
--MPI_CPPFLAGS=-DMPICH_SKIP_MPICXX
-+MPI_CPPFLAGS="${MPI_CPPFLAGS} -DMPICH_SKIP_MPICXX"
- #MPI_LDFLAGS=
- #MPI_LIBS=
- 
---- a/build-config/common/platforms/compiler-mpi-mpich3
-+++ b/build-config/common/platforms/compiler-mpi-mpich3
-@@ -1,12 +1,12 @@
--MPICC=mpicc -cc={CC}
-+#MPICC=mpicc -cc={CC}
- #MPI_CFLAGS
--MPICXX=mpicxx -cxx={CXX}
-+#MPICXX=mpicxx -cxx={CXX}
- #MPI_CXXFLAGS=
--MPIF77=mpif77 -fc={F77}
-+#MPIF77=mpif77 -fc={F77}
- #MPI_FFLAGS=
--MPIFC=mpif90 -fc={FC}
-+#MPIFC=mpif90 -fc={FC}
- #MPI_FCFLAGS=
--MPI_CPPFLAGS=-DMPICH_SKIP_MPICXX
-+MPI_CPPFLAGS="${MPI_CPPFLAGS} -DMPICH_SKIP_MPICXX"
- #MPI_LDFLAGS=
- #MPI_LIBS=
- 
---- a/build-config/common/platforms/compiler-mpi-openmpi
-+++ b/build-config/common/platforms/compiler-mpi-openmpi
-@@ -1,10 +1,10 @@
--MPICC=mpicc
-+#MPICC=mpicc
- #MPI_CFLAGS
--MPICXX=mpicxx
-+#MPICXX=mpicxx
- #MPI_CXXFLAGS=
--MPIF77=mpif77
-+#MPIF77=mpif77
- #MPI_FFLAGS=
--MPIFC=mpif90
-+#MPIFC=mpif90
- #MPI_FCFLAGS=
- #MPI_CPPFLAGS=
- #MPI_LDFLAGS=
---- a/build-config/common/platforms/compiler-mpi-openmpi3
-+++ b/build-config/common/platforms/compiler-mpi-openmpi3
-@@ -1,10 +1,10 @@
--MPICC=mpicc
-+#MPICC=mpicc
- #MPI_CFLAGS
--MPICXX=mpicxx
-+#MPICXX=mpicxx
- #MPI_CXXFLAGS=
--MPIF77=mpif77
-+#MPIF77=mpif77
- #MPI_FFLAGS=
--MPIFC=mpif90
-+#MPIFC=mpif90
- #MPI_FCFLAGS=
- #MPI_CPPFLAGS=
- #MPI_LDFLAGS=
---- a/build-config/common/platforms/compiler-nocross-clang
-+++ b/build-config/common/platforms/compiler-nocross-clang
-@@ -1,7 +1,7 @@
--CC=clang
--CXX=clang++
--F77=flang
--FC=flang
-+#CC=clang
-+#CXX=clang++
-+#F77=flang
-+#FC=flang
- 
- #CPPFLAGS=
- #CFLAGS=
---- a/build-config/common/platforms/compiler-nocross-gcc
-+++ b/build-config/common/platforms/compiler-nocross-gcc
-@@ -1,7 +1,7 @@
--CC=gcc
--CXX=g++
--F77=gfortran
--FC=gfortran
-+#CC=gcc
-+#CXX=g++
-+#F77=gfortran
-+#FC=gfortran
- 
- #CPPFLAGS=
- #CFLAGS=
---- a/build-config/common/platforms/platform-backend-linux
-+++ b/build-config/common/platforms/platform-backend-linux
-@@ -1,7 +1,7 @@
--CC=gcc
--CXX=g++
--F77=gfortran
--FC=gfortran
-+#CC=gcc
-+#CXX=g++
-+#F77=gfortran
-+#FC=gfortran
- 
- #CPPFLAGS=
- #CFLAGS=
---- a/build-config/common/platforms/platform-backend-user-provided
-+++ b/build-config/common/platforms/platform-backend-user-provided
-@@ -1,7 +1,7 @@
--CC=
--CXX=
--F77=
--FC=
-+#CC=
-+#CXX=
-+#F77=
-+#FC=
- 
- #CPPFLAGS=
- #CFLAGS=
---- a/build-config/common/platforms/platform-frontend-linux
-+++ b/build-config/common/platforms/platform-frontend-linux
-@@ -1,14 +1,14 @@
- # not a cross compile platform, frontend ignored
- 
--#CC_FOR_BUILD=
--#CXX_FOR_BUILD=
--#F77_FOR_BUILD=
--#FC_FOR_BUILD=
-+#CC_FOR_BUILD="$(CC)"
-+#CXX_FOR_BUILD="$(CXX)"
-+#F77_FOR_BUILD="$(F77)"
-+#FC_FOR_BUILD="$(FC)"
- 
--#CPPFLAGS_FOR_BUILD=
--#CFLAGS_FOR_BUILD=
--#CXXFLAGS_FOR_BUILD=
--#FFLAGS_FOR_BUILD=
--#FCFLAGS_FOR_BUILD=
--#LDFLAGS_FOR_BUILD=
-+#CPPFLAGS_FOR_BUILD="$(CPPFLAGS)"
-+#CFLAGS_FOR_BUILD="$(CFLAGS)"
-+#CXXFLAGS_FOR_BUILD="$(CXXFLAGS)"
-+#FFLAGS_FOR_BUILD="$(FFLAGS)"
-+#FCFLAGS_FOR_BUILD="$(FCFLAGS)"
-+#LDFLAGS_FOR_BUILD="$(LDFLAGS)"
- #LIBS_FOR_BUILD=
---- a/build-config/common/platforms/platform-frontend-user-provided
-+++ b/build-config/common/platforms/platform-frontend-user-provided
-@@ -1,12 +1,12 @@
--CC_FOR_BUILD=
--CXX_FOR_BUILD=
--F77_FOR_BUILD=
--FC_FOR_BUILD=
-+CC_FOR_BUILD="$(CC)"
-+CXX_FOR_BUILD="$(CXX)"
-+F77_FOR_BUILD="$(F77)"
-+FC_FOR_BUILD="$(FC)"
- 
--CPPFLAGS_FOR_BUILD=
--CFLAGS_FOR_BUILD=
--CXXFLAGS_FOR_BUILD=
--FFLAGS_FOR_BUILD=
--FCFLAGS_FOR_BUILD=
--LDFLAGS_FOR_BUILD=
--LIBS_FOR_BUILD=
-+CPPFLAGS_FOR_BUILD="$(CPPFLAGS)"
-+CFLAGS_FOR_BUILD="$(CFLAGS)"
-+CXXFLAGS_FOR_BUILD="$(CXXFLAGS)"
-+FFLAGS_FOR_BUILD="$(FFLAGS)"
-+FCFLAGS_FOR_BUILD="$(FCFLAGS)"
-+LDFLAGS_FOR_BUILD="$(LDFLAGS)"
-+#LIBS_FOR_BUILD=
---- a/build-config/common/platforms/platform-mpi-user-provided
-+++ b/build-config/common/platforms/platform-mpi-user-provided
-@@ -1,7 +1,7 @@
--MPICC=
--MPICXX=
--MPIF77=
--MPIFC=
-+#MPICC=
-+#MPICXX=
-+#MPIF77=
-+#MPIFC=
- 
- #MPI_LDFLAGS=
- #MPI_LIBS=
 --- a/doc/examples/Makefile
 +++ b/doc/examples/Makefile
 @@ -37,78 +37,78 @@

diff --git a/sys-cluster/otf2/files/otf2-3.0-respect-flags.patch 
b/sys-cluster/otf2/files/otf2-3.0-respect-flags.patch
new file mode 100644
index 000000000..6fd8c6ca5
--- /dev/null
+++ b/sys-cluster/otf2/files/otf2-3.0-respect-flags.patch
@@ -0,0 +1,95 @@
+--- a/doc/examples/Makefile
++++ b/doc/examples/Makefile
+@@ -37,78 +37,78 @@
+ pthread: $(ALL_PTHREAD)
+ 
+ otf2_reader_example.o: otf2_reader_example.c
+-      gcc -std=c99 `otf2-config --cflags` \
++      $(CC) $(CFLAGS) -fPIC -std=c99 `otf2-config --cflags` \
+             -c otf2_reader_example.c \
+             -o otf2_reader_example.o
+ 
+ otf2_reader_example: otf2_reader_example.o
+-      gcc otf2_reader_example.o \
++      $(CC) $(CFLAGS) $(LDFLAGS) -fPIE otf2_reader_example.o \
+             `otf2-config --ldflags` \
+             `otf2-config --libs` \
+             -o otf2_reader_example
+ 
+ otf2_writer_example.o: otf2_writer_example.c
+-      gcc -std=c99 `otf2-config --cflags` \
++      $(CC) $(CFLAGS) -fPIC -std=c99 `otf2-config --cflags` \
+             -c otf2_writer_example.c \
+             -o otf2_writer_example.o
+ 
+ otf2_writer_example: otf2_writer_example.o
+-      gcc otf2_writer_example.o \
++      $(CC) $(CFLAGS) $(LDFLAGS) -fPIE otf2_writer_example.o \
+             `otf2-config --ldflags` \
+             `otf2-config --libs` \
+             -o otf2_writer_example
+ 
+ otf2_mpi_reader_example.o: otf2_mpi_reader_example.c
+-      mpicc -std=c99 `otf2-config --cflags` \
++      $(MPICC) $(CFLAGS) -fPIC -std=c99 `otf2-config --cflags` \
+             -c otf2_mpi_reader_example.c \
+             -o otf2_mpi_reader_example.o
+ 
+ otf2_mpi_reader_example: otf2_mpi_reader_example.o
+-      mpicc otf2_mpi_reader_example.o \
++      $(MPICC) $(CFLAGS) $(LDFLAGS) -fPIE otf2_mpi_reader_example.o \
+             `otf2-config --ldflags` \
+             `otf2-config --libs` \
+             -o otf2_mpi_reader_example
+ 
+ otf2_mpi_reader_example_cc.o: otf2_mpi_reader_example.cc
+-      mpic++ `otf2-config --cflags` \
++      $(MPICXX) $(CXXFLAGS) -fPIC \
+             -c otf2_mpi_reader_example.cc \
+             -o otf2_mpi_reader_example_cc.o
+ 
+ otf2_mpi_reader_example_cc: otf2_mpi_reader_example_cc.o
+-      mpic++ otf2_mpi_reader_example_cc.o \
++      $(MPICXX) $(CXXFLAGS) $(LDFLAGS) -fPIE otf2_mpi_reader_example_cc.o \
+             `otf2-config --ldflags` \
+             `otf2-config --libs` \
+             -o otf2_mpi_reader_example_cc
+ 
+ otf2_mpi_writer_example.o: otf2_mpi_writer_example.c
+-      mpicc -std=c99 `otf2-config --cflags` \
++      $(MPICC) $(CFLAGS) -fPIC -std=c99 `otf2-config --cflags` \
+             -c otf2_mpi_writer_example.c \
+             -o otf2_mpi_writer_example.o
+ 
+ otf2_mpi_writer_example: otf2_mpi_writer_example.o
+-      mpicc otf2_mpi_writer_example.o \
++      $(MPICC) $(CFLAGS) $(LDFLAGS) -fPIE otf2_mpi_writer_example.o \
+             `otf2-config --ldflags` \
+             `otf2-config --libs` \
+             -o otf2_mpi_writer_example
+ 
+ otf2_openmp_writer_example.o: otf2_openmp_writer_example.c
+-      gcc -std=c99 -fopenmp `otf2-config --cflags` \
++      $(CC) $(CFLAGS) -fPIC -std=c99 -fopenmp `otf2-config --cflags` \
+             -c otf2_openmp_writer_example.c \
+             -o otf2_openmp_writer_example.o
+ 
+ otf2_openmp_writer_example: otf2_openmp_writer_example.o
+-      gcc -fopenmp otf2_openmp_writer_example.o \
++      $(CC) $(CFLAGS) $(LDFLAGS) -fPIE -fopenmp otf2_openmp_writer_example.o \
+             `otf2-config --ldflags` \
+             `otf2-config --libs` \
+             -o otf2_openmp_writer_example
+ 
+ otf2_pthread_writer_example.o: otf2_pthread_writer_example.c
+-      gcc -std=c99 -pthread `otf2-config --cflags` \
++      $(CC) $(CFLAGS) -fPIC -std=c99 -pthread `otf2-config --cflags` \
+             -c otf2_pthread_writer_example.c \
+             -o otf2_pthread_writer_example.o
+ 
+ otf2_pthread_writer_example: otf2_pthread_writer_example.o
+-      gcc -pthread otf2_pthread_writer_example.o \
++      $(CC) $(CFLAGS) $(LDFLAGS) -fPIE -pthread otf2_pthread_writer_example.o 
\
+             `otf2-config --ldflags` \
+             `otf2-config --libs` \
+             -o otf2_pthread_writer_example

diff --git a/sys-cluster/otf2/otf2-2.3-r2.ebuild 
b/sys-cluster/otf2/otf2-2.3-r3.ebuild
similarity index 58%
copy from sys-cluster/otf2/otf2-2.3-r2.ebuild
copy to sys-cluster/otf2/otf2-2.3-r3.ebuild
index 8bc469478..32afecbb0 100644
--- a/sys-cluster/otf2/otf2-2.3-r2.ebuild
+++ b/sys-cluster/otf2/otf2-2.3-r3.ebuild
@@ -12,7 +12,7 @@ HOMEPAGE="https://www.vi-hps.org/projects/score-p";
 
SRC_URI="https://perftools.pages.jsc.fz-juelich.de/cicd/otf2/tags/${P}/${P}.tar.gz";
 
 LICENSE="BSD"
-SLOT="0"
+SLOT="0/2.3"
 KEYWORDS="~amd64"
 IUSE="debug sionlib test"
 
@@ -31,23 +31,48 @@ PATCHES=( "${FILESDIR}/${P}-respect-flags.patch" )
 
 src_configure() {
        tc-export CC CXX FC F77 CPP
-
-       export MPICC=/usr/bin/mpicc
-       export MPICXX=/usr/bin/mpicxx
-       export MPIF77=/usr/bin/mpif77
-       export MPIFC=/usr/bin/mpifc
-
-       export MPI_CFLAGS="${CFLAGS}"
-       export MPI_CXXFLAGS="${CXXFLAGS}"
-       export MPI_CPPFLAGS="${CPPFLAGS}"
-       export MPI_F77LAGS="${F77FLAGS}"
-       export MPI_FCLAGS="${FCFLAGS}"
-       export MPI_LDFLAGS="${LDFLAGS}"
+       rm build-config/common/platforms/platform-* || die
+
+       cat > build-config/common/platforms/platform-backend-user-provided 
<<-EOF || die
+       CC=${CC}
+       CXX=${CXX}
+       FC=${FC}
+       F77=${F77}
+       CPP=${CPP}
+       CXXCPP=${CPP}
+       EOF
+
+       cat > build-config/common/platforms/platform-frontend-user-provided 
<<-EOF || die
+       CC_FOR_BUILD=${CC}
+       F77_FOR_BUILD=${F77}
+       FC_FOR_BUILD=${FC}
+       CXX_FOR_BUILD=${CXX}
+       LDFLAGS_FOR_BUILD=${LDFLAGS}
+       CFLAGS_FOR_BUILD=${CFLAGS}
+       CXXFLAGS_FOR_BUILD=${CXXFLAGS}
+       CPPFLAGS_FOR_BUILD=${CPPFLAGS}
+       FCFLAGS_FOR_BUILD=${FCFLAGS}
+       FFLAGS_FOR_BUILD=${FFLAGS}
+       EOF
+
+       cat > build-config/common/platforms/platform-mpi-user-provided <<-EOF 
|| die
+       MPICC=mpicc
+       MPICXX=mpicxx
+       MPIF77=mpif77
+       MPIFC=mpif90
+       MPI_CPPFLAGS=${CPPFLAGS}
+       MPI_CFLAGS=${CFLAGS}
+       MPI_CXXFLAGS=${CXXFLAGS}
+       MPI_FFLAGS=${FFLAGS}
+       MPI_FCFLAGS=${FCFLAGS}
+       MPI_LDFLAGS=${LDFLAGS}
+       EOF
 
        local myconf=(
                --disable-platform-mic
                --disable-static
                --enable-shared
+               --with-custom-compilers
 
                $(use_enable test backend-test-runs)
                $(use_enable debug)

diff --git a/sys-cluster/otf2/otf2-2.3-r2.ebuild 
b/sys-cluster/otf2/otf2-3.0.ebuild
similarity index 58%
rename from sys-cluster/otf2/otf2-2.3-r2.ebuild
rename to sys-cluster/otf2/otf2-3.0.ebuild
index 8bc469478..d311a9f03 100644
--- a/sys-cluster/otf2/otf2-2.3-r2.ebuild
+++ b/sys-cluster/otf2/otf2-3.0.ebuild
@@ -12,7 +12,7 @@ HOMEPAGE="https://www.vi-hps.org/projects/score-p";
 
SRC_URI="https://perftools.pages.jsc.fz-juelich.de/cicd/otf2/tags/${P}/${P}.tar.gz";
 
 LICENSE="BSD"
-SLOT="0"
+SLOT="0/3.0"
 KEYWORDS="~amd64"
 IUSE="debug sionlib test"
 
@@ -31,23 +31,48 @@ PATCHES=( "${FILESDIR}/${P}-respect-flags.patch" )
 
 src_configure() {
        tc-export CC CXX FC F77 CPP
-
-       export MPICC=/usr/bin/mpicc
-       export MPICXX=/usr/bin/mpicxx
-       export MPIF77=/usr/bin/mpif77
-       export MPIFC=/usr/bin/mpifc
-
-       export MPI_CFLAGS="${CFLAGS}"
-       export MPI_CXXFLAGS="${CXXFLAGS}"
-       export MPI_CPPFLAGS="${CPPFLAGS}"
-       export MPI_F77LAGS="${F77FLAGS}"
-       export MPI_FCLAGS="${FCFLAGS}"
-       export MPI_LDFLAGS="${LDFLAGS}"
+       rm build-config/common/platforms/platform-* || die
+
+       cat > build-config/common/platforms/platform-backend-user-provided 
<<-EOF || die
+       CC=${CC}
+       CXX=${CXX}
+       FC=${FC}
+       F77=${F77}
+       CPP=${CPP}
+       CXXCPP=${CPP}
+       EOF
+
+       cat > build-config/common/platforms/platform-frontend-user-provided 
<<-EOF || die
+       CC_FOR_BUILD=${CC}
+       F77_FOR_BUILD=${F77}
+       FC_FOR_BUILD=${FC}
+       CXX_FOR_BUILD=${CXX}
+       LDFLAGS_FOR_BUILD=${LDFLAGS}
+       CFLAGS_FOR_BUILD=${CFLAGS}
+       CXXFLAGS_FOR_BUILD=${CXXFLAGS}
+       CPPFLAGS_FOR_BUILD=${CPPFLAGS}
+       FCFLAGS_FOR_BUILD=${FCFLAGS}
+       FFLAGS_FOR_BUILD=${FFLAGS}
+       EOF
+
+       cat > build-config/common/platforms/platform-mpi-user-provided <<-EOF 
|| die
+       MPICC=mpicc
+       MPICXX=mpicxx
+       MPIF77=mpif77
+       MPIFC=mpif90
+       MPI_CPPFLAGS=${CPPFLAGS}
+       MPI_CFLAGS=${CFLAGS}
+       MPI_CXXFLAGS=${CXXFLAGS}
+       MPI_FFLAGS=${FFLAGS}
+       MPI_FCFLAGS=${FCFLAGS}
+       MPI_LDFLAGS=${LDFLAGS}
+       EOF
 
        local myconf=(
                --disable-platform-mic
                --disable-static
                --enable-shared
+               --with-custom-compilers
 
                $(use_enable test backend-test-runs)
                $(use_enable debug)

Reply via email to