The combined diff is too large to send as an attachment. Below is the patch to Make.inc, placeholders are reinplaced in the post-patch phase.
Portfile
Description: Binary data
diff -ur spooles.2.2.orig/Make.inc spooles.2.2/Make.inc --- spooles.2.2.orig/Make.inc 1999-01-18 15:48:55.000000000 -0600 +++ spooles.2.2/Make.inc 2018-11-17 09:36:12.000000000 -0600 @@ -12,7 +12,7 @@ # for solaris # # CC = gcc - CC = /usr/lang-4.0/bin/cc + CC = @@CC@@ # # for sgi # @@ -28,14 +28,14 @@ # # OPTLEVEL = # OPTLEVEL = -g -v - OPTLEVEL = -O +# OPTLEVEL = -O # OPTLEVEL = -xO5 -v # OPTLEVEL = -O3 # OPTLEVEL = -O4 # CFLAGS = -Wall -g # CFLAGS = -Wall -pg # CFLAGS = $(OPTLEVEL) -D_POSIX_C_SOURCE=199506L - CFLAGS = $(OPTLEVEL) + CFLAGS = @@CFLAGS@@ # CFLAGS = -Wall $(OPTLEVEL) # #---------------------------------------- @@ -43,15 +43,15 @@ # set any load flags # # LDFLAGS = -Wl,+parallel -Wl,+tm,spp2000 # for hp exemplar - LDFLAGS = + LDFLAGS = @@LDFLAGS@@ # #--------------------------------------------------------------------- # # set any thread libraries # # THREAD_LIBS = -# THREAD_LIBS = -D_REENTRANT=199506L -lpthread - THREAD_LIBS = -D_POSIX_C_SOURCE=199506L -lpthread + THREAD_LIBS = -D_REENTRANT=199506L -lpthread +# THREAD_LIBS = -D_POSIX_C_SOURCE=199506L -lpthread # THREAD_LIBS = -lpthread # #--------------------------------------------------------------------- @@ -79,15 +79,15 @@ # set the ranlib environment # (if ranlib is not needed, we echo the library name) # -# RANLIB = ranlib - RANLIB = echo + RANLIB = ranlib +# RANLIB = echo # #--------------------------------------------------------------------- # # set suffix rule *.c --> *.o # -.c.o : - $(PURIFY) $(CC) -c $(CFLAGS) $< +#.c.o : +# $(PURIFY) $(CC) -c $(CFLAGS) $< # #--------------------------------------------------------------------- # @@ -102,8 +102,8 @@ # # MPI install library # -# MPI_INSTALL_DIR = - MPI_INSTALL_DIR = /usr/local/mpich-1.0.13 + MPI_INSTALL_DIR = @@PREFIX@@ +# MPI_INSTALL_DIR = /usr/local/mpich-1.0.13 # #--------------------------------------------------------------------- # @@ -115,7 +115,7 @@ # # for solaris # - MPI_LIB_PATH = -L$(MPI_INSTALL_DIR)/lib/solaris/ch_p4 + MPI_LIB_PATH = -L$(MPI_INSTALL_DIR)/lib/mpich-mp # # for hp # @@ -142,6 +142,6 @@ # MPI include path # # MPI_INCLUDE_DIR = - MPI_INCLUDE_DIR = -I$(MPI_INSTALL_DIR)/include + MPI_INCLUDE_DIR = -I$(MPI_INSTALL_DIR)/include/mpich-mp # #--------------------------------------------------------------------- Mark Brethen mark.bret...@gmail.com > On Nov 25, 2018, at 2:11 AM, Ryan Schmidt <ryandes...@macports.org> wrote: > > How specifically have you patched it? A diff would be more useful for seeing > that. > > I do see the line "CC = $(CC)", which is a no-op: it assigns CC to itself. So > that's not useful. > > > On Nov 17, 2018, at 09:37, Mark Brethen wrote: > >> I’ve patched the Make.inc file. Does it look correct? >> <Make.inc> >> >> Mark Brethen >> mark.bret...@gmail.com >> >> >> >>> On Nov 16, 2018, at 8:20 PM, Mark Brethen <mark.bret...@gmail.com> wrote: >>> >>> So is this port a good candidate for the mpi port group? If not then I’ll >>> just whitelist a compiler if the mpi variant is chosen. >>> >>> >>> Mark Brethen >>> mark.bret...@gmail.com >>> >>> >>> >>>> On Nov 16, 2018, at 5:08 PM, Mark Brethen <mark.bret...@gmail.com> wrote: >>>> >>>> From the SPOOLES documentation: >>>> >>>> The SPOOLES library operates in serial, multithreaded and MPI >>>> environments. The code for these three environments is fairly segregated. >>>> The MPI directory contains all source and driver code for MPI programs. >>>> The MT directory contains all source and driver code for multithreaded >>>> programs. All other directories contain serial code.2 The MPI source code >>>> is compiled into a spoolesMPI.a library. The multithreaded source code is >>>> compiled into a spoolesMT.a library. The serial code is compiled into a >>>> spooles.a library. >>>> >>>> I would like to offer the user the option of MT or MPI. The build phase >>>> would look something like this: >>>> >>>> if defined(WITH_MPI) >>>> cd ${WRKSRC}/MPI/src ; ${SETENV} ${MAKE_ENV} ${MAKE_CMD} -f >>>> makeGlobalLib >>>> cd ${WRKSRC}_SHARED/MPI/src; ${SETENV} ${MAKE_ENV} ${MAKE_CMD} >>>> -f makeGlobalLib >>>> cd ${WRKSRC}_SHARED ; ld -Bshareable -o libspooles.so.1 -x >>>> -soname libspooles.so.1 --whole-archive spooles.a >>>> >>>> else >>>> cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} ${MAKE_CMD} global -f >>>> makefile >>>> cd ${WRKSRC}/MT/src; ${SETENV} ${MAKE_ENV} ${MAKE_CMD} -f >>>> makeGlobalLib >>>> cd ${WRKSRC}_SHARED; ${SETENV} ${MAKE_ENV} ${MAKE_CMD} global >>>> -f makefile) >>>> cd ${WRKSRC}_SHARED/MT/src; ${SETENV} ${MAKE_ENV} ${MAKE_CMD} >>>> -f makeGlobalLib >>>> cd ${WRKSRC}_SHARED ; ld -Bshareable -o libspooles.so.1 -x >>>> -soname libspooles.so.1 --whole-archive spooles.a >>>> endif >>>> >>>> There’s probably an easy way to do this using the MPI portgroup. Can you >>>> suggest some ports to look at as an example? >>>> >>>> >>>> Mark Brethen >>>> mark.bret...@gmail.com >>>> >>>> >>>> >>> >> >