pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

fasttree: Unbreak on Darwin, with openmp support



Module Name:	pkgsrc-wip
Committed By:	Jason Bacon <bacon%NetBSD.org@localhost>
Pushed By:	outpaddling
Date:		Wed Dec 4 07:21:53 2024 -0600
Changeset:	f1090251ba437f9ae6163742504edff8e51cf7d3

Modified Files:
	fasttree/DESCR
	fasttree/Makefile
	fasttree/files/Makefile

Log Message:
fasttree: Unbreak on Darwin, with openmp support

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=f1090251ba437f9ae6163742504edff8e51cf7d3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 fasttree/DESCR          |  7 ++++---
 fasttree/Makefile       | 16 +++++++++++++++-
 fasttree/files/Makefile |  2 +-
 3 files changed, 20 insertions(+), 5 deletions(-)

diffs:
diff --git a/fasttree/DESCR b/fasttree/DESCR
index fbc3d3f8cb..ee83304f50 100644
--- a/fasttree/DESCR
+++ b/fasttree/DESCR
@@ -1,3 +1,4 @@
-FastTree infers approximately-maximum-likelihood phylogenetic trees from
-alignments of nucleotide or protein sequences. FastTree can handle alignments
-with up to a million of sequences in a reasonable amount of time and memory.
+FastTree infers approximately-maximum-likelihood phylogenetic trees
+from alignments of nucleotide or protein sequences. FastTree can
+handle alignments with up to a million of sequences in a reasonable
+amount of time and memory.
diff --git a/fasttree/Makefile b/fasttree/Makefile
index 3ea0fa10a0..f75c039bf6 100644
--- a/fasttree/Makefile
+++ b/fasttree/Makefile
@@ -17,10 +17,24 @@ LICENSE=	gnu-gpl-v2
 
 WRKSRC=		${WRKDIR}
 
-CFLAGS=		-fopenmp -DNO_SSE
+# CFLAGS=		-fopenmp -DNO_SSE
 
 INSTALLATION_DIRS=	bin
 
+.include "../../mk/bsd.prefs.mk"
+
+# Xcode supports -Xpreprocessor -fopenmp, but does not supply OpenMP libs
+# parallel/openmp installs an entire llvm
+# Maybe a libomp package would suffice?
+.if ${OPSYS} == Darwin
+SUBST_CLASSES+=		openmp
+SUBST_SED.openmp=	-e 's|-fopenmp|-Xpreprocessor &|g'
+SUBST_STAGE.openmp=	pre-configure
+SUBST_FILES.openmp=	Makefile
+LDFLAGS+= 		-L${PREFIX}/lib -lomp -lm
+.include "../../parallel/openmp/buildlink3.mk"
+.endif
+
 do-extract:
 	${CP} ${DISTDIR}/${DISTFILES} ${WRKSRC}
 	${CP} ${FILESDIR}/Makefile ${WRKSRC}
diff --git a/fasttree/files/Makefile b/fasttree/files/Makefile
index ada070cda5..3898356bc5 100644
--- a/fasttree/files/Makefile
+++ b/fasttree/files/Makefile
@@ -15,7 +15,7 @@ DESTDIR ?=	.
 all:	${BIN}
 
 ${BIN}: ${SRC} Makefile
-	${CC} ${CFLAGS} ${SRC} -o ${BIN} -lm
+	${CC} ${CFLAGS} ${SRC} -o ${BIN} ${LDFLAGS} -lm
 
 install: ${BIN}
 	${MKDIR} -p ${DESTDIR}${PREFIX}/bin


Home | Main Index | Thread Index | Old Index