svn commit: r395826 - in head/biology/crux: . files

Alexey Dokuchaev danfe at FreeBSD.org
Wed Sep 2 09:23:06 UTC 2015


Author: danfe
Date: Wed Sep  2 09:23:05 2015
New Revision: 395826
URL: https://svnweb.freebsd.org/changeset/ports/395826

Log:
  Unbreak the build on PowerPC, it had nothing to do with "error in pthreads":
  configure script was passing `-faltivec' to the compiler, while this flag is
  non-standard and only supported on Mac OS X/Darwin systems.
  
  Also replace Apple-specific Altivec detection with querying the "hw.altivec"
  sysctl instead.

Added:
  head/biology/crux/files/patch-lib_Crux_CxPpc.c   (contents, props changed)
Modified:
  head/biology/crux/Makefile

Modified: head/biology/crux/Makefile
==============================================================================
--- head/biology/crux/Makefile	Wed Sep  2 08:54:03 2015	(r395825)
+++ head/biology/crux/Makefile	Wed Sep  2 09:23:05 2015	(r395826)
@@ -13,8 +13,6 @@ COMMENT=	Software toolkit for phylogenet
 LICENSE=	BSD2CLAUSE BSD3CLAUSE
 LICENSE_COMB=	multi
 
-BROKEN_powerpc=	does not build on powerpc: error in pthreads
-
 USES=		fortran gmake python tar:bzip2
 USE_CSTD=	gnu99
 GNU_CONFIGURE=	yes
@@ -26,11 +24,13 @@ CPPFLAGS+=	-I${LOCALBASE}/include
 LDFLAGS+=	-L${LOCALBASE}/lib
 
 OPTIONS_DEFINE=		SYS_LINALG
+
 SYS_LINALG_DESC=	Enable system ATLAS/LAPACK
 SYS_LINALG_LIB_DEPENDS=	libatlas.so:${PORTSDIR}/math/atlas
 SYS_LINALG_CONFIGURE_ENABLE=	sys-linalg
 
 post-patch:
+	@${REINPLACE_CMD} -e '/altivec/s|-f|-m|' ${WRKSRC}/configure
 	@${REINPLACE_CMD} -e \
 		's|\([[:blank:]]\)\($$(BINDIR)\)|\1$$(DESTDIR)\2| ; \
 		 s|\([[:blank:]]\)\($$(DATADIR)\)|\1$$(DESTDIR)\2| ; \

Added: head/biology/crux/files/patch-lib_Crux_CxPpc.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/biology/crux/files/patch-lib_Crux_CxPpc.c	Wed Sep  2 09:23:05 2015	(r395826)
@@ -0,0 +1,18 @@
+--- lib/Crux/CxPpc.c.orig	2009-09-19 04:31:04 UTC
++++ lib/Crux/CxPpc.c
+@@ -8,14 +8,11 @@ bool CxgPpcUseAltivec;
+ void
+ CxPpcCpuInit(void)
+ {
+-    int mib[2];
+     int result, error;
+     size_t len;
+ 
+-    mib[0] = CTL_HW;
+-    mib[1] = HW_VECTORUNIT;
+     len = sizeof(result);
+-    error = sysctl(mib, 2, &result, &len, NULL, 0);
++    error = sysctlbyname("hw.altivec", &result, &len, NULL, 0);
+     if (error != 0)
+     {
+ 	CxgPpcUseAltivec = false;


More information about the svn-ports-all mailing list