aboutsummaryrefslogtreecommitdiff
path: root/astro/boinc-setiathome
diff options
context:
space:
mode:
authorLarry Rosenman <ler@FreeBSD.org>2018-12-18 20:45:44 +0000
committerLarry Rosenman <ler@FreeBSD.org>2018-12-18 20:45:44 +0000
commit589818d6b726794f88ee6293d72fd1181a31106f (patch)
tree4185844418bec56605ed0a7a468cc0aca6e3b4df /astro/boinc-setiathome
parent35cb6b6a4e6e7f560108d81ae6e46b13f95df441 (diff)
astro/boinc-setiathome: Fix build on powerpc64.
Code for AltiVec is written strictly with Mac OS X in mind exclusively and doesn't build on other systems. Disable AltiVec on systems other than Mac OS X, which probably makes this run much slower, but at least it builds. Tested on powerpc64 and amd64. Hardware sponsored by IntegriCloud. PR: 234145 Submitted by: pkubaj@anongoth.pl
Notes
Notes: svn path=/head/; revision=487771
Diffstat (limited to 'astro/boinc-setiathome')
-rw-r--r--astro/boinc-setiathome/Makefile8
-rw-r--r--astro/boinc-setiathome/files/patch-client_Makefile.am11
-rw-r--r--astro/boinc-setiathome/files/patch-client_pulsefind.h10
-rw-r--r--astro/boinc-setiathome/files/patch-client_vector_analyzeFuncs__altivec.cpp11
-rw-r--r--astro/boinc-setiathome/files/patch-client_vector_analyzeFuncs__vector.cpp56
-rw-r--r--astro/boinc-setiathome/files/patch-client_vector_analyzeFuncs__vector.h11
6 files changed, 103 insertions, 4 deletions
diff --git a/astro/boinc-setiathome/Makefile b/astro/boinc-setiathome/Makefile
index 41f448d95854..cc03c507858f 100644
--- a/astro/boinc-setiathome/Makefile
+++ b/astro/boinc-setiathome/Makefile
@@ -3,7 +3,7 @@
PORTNAME= boinc-setiathome
PORTVERSION= 8.00
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= astro
MASTER_SITES= LOCAL/ler/setiathome \
http://www.lerctr.org/setiathome/
@@ -18,13 +18,13 @@ LICENSE_FILE= ${WRKSRC}/COPYING
BROKEN_aarch64= fails to link: vector/analyzeFuncs_vector.cpp:(.data+0x38): undefined symbol 'vfp_GetPowerSpectrum(float (*) [2], float*, int)'
BROKEN_armv6= fails to compile: vector/analyzeFuncs_neon.S:178:17: invalid instruction, did you mean: neg?
BROKEN_armv7= fails to compile: vector/analyzeFuncs_neon.S:178:17: invalid instruction, did you mean: neg?
-BROKEN_powerpc64= fails to compile: analyzeFuncs_altivec.cpp: CoreServices/CoreServices.h: No such file or directory
BUILD_DEPENDS= ${LOCALBASE}/include/fftw3.h:math/fftw3
RUN_DEPENDS= boinc_client:net/boinc-client
LIB_DEPENDS= libfftw3f.so:math/fftw3-float
-USES= autoreconf compiler gmake libtool pkgconfig tar:xz
+USES= autoreconf compiler:c++11-lang gmake gnome libtool pkgconfig \
+ tar:xz
GNU_CONFIGURE= yes
@@ -47,7 +47,7 @@ X11_DESC= Build screensaver (requires net/boinc-client with X11)
OPTIONS_SUB= yes
X11_BUILD_DEPENDS= ${LOCALBASE}/lib/libboinc_graphics2.a:net/boinc-client
-X11_USES= jpeg
+X11_USES= gl jpeg
X11_USE= GL=gl,glu,glut \
XORG=ice,sm,x11,xau,xcb,xext,xi,xdamage,xdmcp,xfixes,xmu,xt,xxf86vm
X11_CONFIGURE_ENABLE= graphics
diff --git a/astro/boinc-setiathome/files/patch-client_Makefile.am b/astro/boinc-setiathome/files/patch-client_Makefile.am
new file mode 100644
index 000000000000..bdad03d4c642
--- /dev/null
+++ b/astro/boinc-setiathome/files/patch-client_Makefile.am
@@ -0,0 +1,11 @@
+--- client/Makefile.am.orig 2018-12-18 10:43:02 UTC
++++ client/Makefile.am
+@@ -203,7 +203,7 @@ if PPC
+ seti_boinc-analyzeFuncs_altivec.o: vector/analyzeFuncs_altivec.cpp
+ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(seti_boinc_CXXFLAGS) $(CXXFLAGS) -DUSE_ALTIVEC \
+- -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -faltivec -mabi=altivec \
++ -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -maltivec -mabi=altivec \
+ -c -o $@ $<; then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
+ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ seti_boinc-analyzeFuncs_vector.o: vector/analyzeFuncs_vector.cpp
diff --git a/astro/boinc-setiathome/files/patch-client_pulsefind.h b/astro/boinc-setiathome/files/patch-client_pulsefind.h
new file mode 100644
index 000000000000..37647db0d6cd
--- /dev/null
+++ b/astro/boinc-setiathome/files/patch-client_pulsefind.h
@@ -0,0 +1,10 @@
+--- client/pulsefind.h.orig 2018-12-18 12:03:47 UTC
++++ client/pulsefind.h
+@@ -82,7 +82,6 @@ extern FoldSet AVXfold_c; // in analyzeFuncs_avx
+ extern FoldSet sse_ben_fold; // in analyzeFuncs_sse.cpp
+ extern FoldSet BHSSEfold; // in analyzeFuncs_sse.cpp
+ extern FoldSet AKSSEfold; // in analyzeFuncs_sse.cpp
+-extern FoldSet AKavfold; // in analyzeFuncs_altivec.cpp
+ extern FoldSet swifold; // in Pulsefind - default set
+ extern FoldSet Foldmain; // in Pulsefind - used set
+
diff --git a/astro/boinc-setiathome/files/patch-client_vector_analyzeFuncs__altivec.cpp b/astro/boinc-setiathome/files/patch-client_vector_analyzeFuncs__altivec.cpp
new file mode 100644
index 000000000000..07a735739ffd
--- /dev/null
+++ b/astro/boinc-setiathome/files/patch-client_vector_analyzeFuncs__altivec.cpp
@@ -0,0 +1,11 @@
+--- client/vector/analyzeFuncs_altivec.cpp.orig 2018-01-14 23:02:12 UTC
++++ client/vector/analyzeFuncs_altivec.cpp
+@@ -31,7 +31,7 @@
+ // This file is empty is USE_ALTIVEC is not defined
+ #include "sah_config.h"
+
+-#if defined(__ppc__) && defined(USE_ALTIVEC)
++#if defined(__ppc__) && defined(USE_ALTIVEC) && defined(__APPLE__)
+
+ #define INVALID_CHIRP 2e+20
+
diff --git a/astro/boinc-setiathome/files/patch-client_vector_analyzeFuncs__vector.cpp b/astro/boinc-setiathome/files/patch-client_vector_analyzeFuncs__vector.cpp
new file mode 100644
index 000000000000..583b73f155cb
--- /dev/null
+++ b/astro/boinc-setiathome/files/patch-client_vector_analyzeFuncs__vector.cpp
@@ -0,0 +1,56 @@
+--- client/vector/analyzeFuncs_vector.cpp.orig 2018-01-14 23:02:12 UTC
++++ client/vector/analyzeFuncs_vector.cpp
+@@ -101,7 +101,7 @@
+ #if defined(HAVE__ISNAN)
+ #define isnotnan(x) (!_isnan(x))
+ #elif defined(HAVE_ISNAN)
+-#define isnotnan(x) (!isnan(x))
++#define isnotnan(x) (!std::isnan(x))
+ #elif defined(HAVE___ISNAN)
+ #define isnotnan(x) (!__isnan(x))
+ #else
+@@ -338,7 +338,7 @@ bool found_baseline_smooth=false;
+
+ GPStb GetPowerSpectrumFuncs[]={
+ v_GetPowerSpectrum, BA_ANY, "v_GetPowerSpectrum",
+-#ifdef USE_ALTIVEC
++#if defined(USE_ALTIVEC) && defined(__APPLE__)
+ v_vGetPowerSpectrum, BA_ALTVC, "v_vGetPowerSpectrum",
+ v_vGetPowerSpectrumG4, BA_ALTVC,"v_vGetPowerSpectrumG4",
+ #endif
+@@ -374,7 +374,7 @@ CDtb ChirpDataFuncs[]={
+ fpu_ChirpData, BA_ANY, "fpu_ChirpData",
+ fpu_opt_ChirpData, BA_ANY, "fpu_opt_ChirpData",
+ #endif
+-#ifdef USE_ALTIVEC
++#if defined(USE_ALTIVEC) && defined(__APPLE__)
+ v_vChirpData, BA_ALTVC, "v_vChirpData",
+ v_vChirpDataG4, BA_ALTVC, "v_vChirpDataG4",
+ v_vChirpDataG5, BA_ALTVC, "v_vChirpDataG5",
+@@ -432,7 +432,7 @@ TPtb TransposeFuncs[]={
+ #ifdef USE_FFTWF
+ fftwf_transpose, BA_ANY, "fftwf_transpose",
+ #endif
+-#ifdef USE_ALTIVEC
++#if defined(USE_ALTIVEC) && defined(__APPLE__)
+ v_vTranspose, BA_ALTVC, "v_vTranspose",
+ #endif
+ #ifdef USE_SSE
+@@ -461,7 +461,7 @@ TPtb TransposeFuncs[]={
+ v_avxTranspose8x8ntw_b, BA_AVX, "v_avxTranspose8x8ntw_b",
+ # endif
+ #endif
+-#if (defined(__arm__) && defined(__VFP_FP__) && !defined(__SOFTFP__)) || defined(__arch64__)
++#if (defined(__arm__) && defined(__VFP_FP__) && !defined(__SOFTFP__)) || defined(__aarch64__)
+ v_pfTranspose2, BA_VFP, "v_pfTranspose2",
+ v_pfTranspose4, BA_VFP, "v_pfTranspose4",
+ v_pfTranspose8, BA_VFP, "v_pfTranspose8",
+@@ -476,7 +476,7 @@ bool found_transpose=false;
+
+ FolSub FoldSubs[] = {
+ &swifold, BA_ANY,
+-#ifdef USE_ALTIVEC
++#if defined(USE_ALTIVEC) && defined(__APPLE__)
+ &AKavfold, BA_ALTVC,
+ #endif
+ #ifdef USE_SSE
diff --git a/astro/boinc-setiathome/files/patch-client_vector_analyzeFuncs__vector.h b/astro/boinc-setiathome/files/patch-client_vector_analyzeFuncs__vector.h
new file mode 100644
index 000000000000..2311ea6ce568
--- /dev/null
+++ b/astro/boinc-setiathome/files/patch-client_vector_analyzeFuncs__vector.h
@@ -0,0 +1,11 @@
+--- client/vector/analyzeFuncs_vector.h.orig 2018-12-18 12:22:10 UTC
++++ client/vector/analyzeFuncs_vector.h
+@@ -275,7 +275,7 @@ extern int v_vGetPowerSpectrumUnrolled2(
+ );
+ #endif
+
+-#ifdef USE_ALTIVEC
++#if defined(USE_ALTIVEC) && defined(__APPLE)
+ extern int v_vGetPowerSpectrumG4(
+ sah_complex * cx_FreqData,
+ float * fp_PowerSpectrum,