diff --git a/biology/phyml/Makefile b/biology/phyml/Makefile index fc4d36b518b9..b5feff3eaae3 100644 --- a/biology/phyml/Makefile +++ b/biology/phyml/Makefile @@ -1,61 +1,61 @@ PORTNAME= phyml DISTVERSIONPREFIX= v DISTVERSION= 3.3.20220408 +PORTREVISION= 1 PORTEPOCH= 1 CATEGORIES= biology MAINTAINER= ports@FreeBSD.org COMMENT= Simple, fast, and accurate algorithm to estimate large phylogenies WWW= https://github.com/stephaneguindon/phyml LICENSE= GPLv3 LICENSE_FILE= ${WRKSRC}/COPYING USES= autoreconf libtool pkgconfig USE_GITHUB= yes GH_ACCOUNT= stephaneguindon GNU_CONFIGURE= yes CONFIGURE_ARGS= --disable-beagle --disable-native PLIST_FILES= bin/phyml${BIN_SUFFIX} PORTDOCS= * PORTEXAMPLES= * OPTIONS_DEFINE= DOCS EXAMPLES OPTIONS_RADIO= MPI OPTIONS_RADIO_MPI= MPICH OPENMPI MPICH_LIB_DEPENDS= libmpich.so:net/mpich MPICH_MAKE_ARGS= CC="${LOCALBASE}/bin/mpicc" OPENMPI_LIB_DEPENDS= libmpi.so:net/openmpi OPENMPI_MAKE_ARGS= CC="${LOCALBASE}/mpi/openmpi/bin/mpicc" .include .if ${PORT_OPTIONS:MMPICH} || ${PORT_OPTIONS:MOPENMPI} CONFIGURE_ARGS+= --enable-mpi BIN_SUFFIX= -mpi .else CONFIGURE_ARGS+= --disable-mpi BIN_SUFFIX= # none .endif -post-patch: .if ${ARCH} != amd64 && ${ARCH} != i386 +post-patch: @${REINPLACE_CMD} -e 's|VECTOR_FLAG=-march=native|dnl &|' ${WRKSRC}/configure.ac .endif - @${REINPLACE_CMD} -e 's|malloc.h|stdlib.h|' ${WRKSRC}/src/utilities.h post-install-DOCS-on: @${MKDIR} ${STAGEDIR}${DOCSDIR} (cd ${WRKSRC}/doc && ${INSTALL_DATA} *.pdf \ ${STAGEDIR}${DOCSDIR}) post-install-EXAMPLES-on: @${MKDIR} ${STAGEDIR}${EXAMPLESDIR} @(cd ${WRKSRC}/examples && ${COPYTREE_SHARE} . \ ${STAGEDIR}${EXAMPLESDIR}) .include diff --git a/biology/phyml/files/patch-src_io.c b/biology/phyml/files/patch-src_io.c new file mode 100644 index 000000000000..6085f3541ebe --- /dev/null +++ b/biology/phyml/files/patch-src_io.c @@ -0,0 +1,41 @@ +--- src/io.c.orig 2023-05-07 20:50:29 UTC ++++ src/io.c +@@ -1157,7 +1157,7 @@ void Get_Nexus_Data(FILE *fp, option *io) + + int Get_Token(FILE *fp, char *token) + { +- char c; ++ int c; + + c = ' '; + +@@ -1518,7 +1518,8 @@ align **Read_Seq_Interleaved(option *io) + + int Read_One_Line_Seq(align ***data, int num_otu, FILE *in) + { +- char c = ' '; ++ char c_; ++ int c = ' '; + int nchar = 0; + + while(1) +@@ -1552,7 +1553,9 @@ int Read_One_Line_Seq(align ***data, int num_otu, FILE + } + + nchar++; +- Uppercase(&c); ++ c_ = c; ++ Uppercase(&c_); ++ c = c_; + + if(c == '.') + { +@@ -1617,7 +1620,7 @@ char *Return_Tree_String_Phylip(FILE *fp_input_tree) + { + char *line; + int i; +- char c; ++ int c; + int open,maxopen; + + if(fp_input_tree == NULL) diff --git a/biology/phyml/files/patch-src_utilities.c b/biology/phyml/files/patch-src_utilities.c new file mode 100644 index 000000000000..2f95b278dd6a --- /dev/null +++ b/biology/phyml/files/patch-src_utilities.c @@ -0,0 +1,44 @@ +--- src/utilities.c.orig 2022-04-08 15:01:10 UTC ++++ src/utilities.c +@@ -3209,18 +3209,20 @@ void Bootstrap(t_tree *tree) + boot_tree->io->print_json_trace = NO; + boot_tree->n_root = NULL; + boot_tree->e_root = NULL; ++ boot_tree->l_ev = tree->l_ev; ++ boot_tree->p_lk_left_pi = tree->p_lk_left_pi; ++ ++#if (defined(__AVX__) || defined(__AVX2__) || defined(__SSE__) || defined(__SSE2__) || defined(__SSE3__)) + boot_tree->_tPij1 = tree->_tPij1; + boot_tree->_tPij2 = tree->_tPij2; + boot_tree->_pmat1plk1 = tree->_pmat1plk1; + boot_tree->_pmat2plk2 = tree->_pmat2plk2; + boot_tree->_plk0 = tree->_plk0; +- boot_tree->l_ev = tree->l_ev; +- boot_tree->p_lk_left_pi = tree->p_lk_left_pi; + boot_tree->_l_ev = tree->_l_ev; + boot_tree->_r_ev = tree->_r_ev; + boot_tree->_prod_left = tree->_prod_left; + boot_tree->_prod_rght = tree->_prod_rght; +- ++#endif + + Set_Both_Sides(YES,boot_tree); + +@@ -8902,7 +8904,7 @@ t_edge *Find_Root_Edge(FILE *fp_input_tree, t_tree *tr + int l_r, r_l; + int score; + char *line; +- char c; ++ int c; + t_edge *root_edge; + + line = (char *)mCalloc(T_MAX_LINE,sizeof(char)); +@@ -9206,7 +9208,7 @@ void Translate_Tax_Names(char **tax_names, t_tree *tre + void Skip_Comment(FILE *fp) + { + int in_comment; +- char c; ++ int c; + + in_comment = 1; + do diff --git a/biology/phyml/files/patch-src_utilities.h b/biology/phyml/files/patch-src_utilities.h new file mode 100644 index 000000000000..6edbbcb01460 --- /dev/null +++ b/biology/phyml/files/patch-src_utilities.h @@ -0,0 +1,13 @@ +--- src/utilities.h.orig 2022-04-08 15:01:10 UTC ++++ src/utilities.h +@@ -31,8 +31,8 @@ the GNU public licence. See http://www.opensource.org + #include + #include + #include +-/* #include */ +-/* #include */ ++/* #include */ ++/* #include */ + + #if (defined(__AVX__) || defined(__AVX2__)) + #include