aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey Dokuchaev <danfe@FreeBSD.org>2015-09-02 12:29:09 +0000
committerAlexey Dokuchaev <danfe@FreeBSD.org>2015-09-02 12:29:09 +0000
commit4abd2afa2cff1e18ac313069863c2bb8fb99f1b8 (patch)
tree79a3a7a48dec9674e22a8d639a5418fe3e074992
parent052e3152179a31249625364475232036695b5ad8 (diff)
downloadports-4abd2afa2cff1e18ac313069863c2bb8fb99f1b8.tar.gz
ports-4abd2afa2cff1e18ac313069863c2bb8fb99f1b8.zip
Notes
-rw-r--r--biology/avida/Makefile24
-rw-r--r--biology/avida/files/patch-libs_apto_include_apto_core_Atomic.h28
2 files changed, 40 insertions, 12 deletions
diff --git a/biology/avida/Makefile b/biology/avida/Makefile
index eabcb09fb2d8..6ba9b2abca10 100644
--- a/biology/avida/Makefile
+++ b/biology/avida/Makefile
@@ -12,7 +12,7 @@ COMMENT= Auto-adaptive genetic system designed for ALife research
LICENSE= GPLv3
-OPTIONS_DEFINE= DOCS
+BROKEN_sparc64= missing atomics implementation
USES= cmake:outsource ncurses
CMAKE_ARGS= -DAPTO_UNIT_TESTS:BOOL=OFF -DAVD_UNIT_TESTS:BOOL=OFF
@@ -30,9 +30,7 @@ DATA_FILES= analyze.cfg avida.cfg default-gx.org \
instset-heads-sex.cfg instset-heads.cfg instset-smt.cfg \
instset-transsmt.cfg
-BROKEN_ia64= Does not compile: invokes i386 asm
-BROKEN_powerpc= Does not compile: invokes i386 asm
-BROKEN_sparc64= Does not compile: invokes i386 asm
+OPTIONS_DEFINE= DOCS
post-patch:
@${FIND} ${WRKSRC} -name "CMakeLists.txt" | ${XARGS} \
@@ -41,6 +39,8 @@ post-patch:
s| pthread| -pthread|'
@${REINPLACE_CMD} -e '/long long int/s|std::abs|llabs|' \
${WRKSRC}/avida-core/source/main/cPopulationInterface.cc
+ @${REINPLACE_CMD} -e '/__PPC__/s|linux|${OPSYS}|' \
+ ${WRKSRC}/libs/tcmalloc-1.4/src/atomicops.h
pre-build:
.for exec in ${BIN_FILES}
@@ -51,15 +51,15 @@ pre-build:
do-install:
@${MKDIR} ${STAGEDIR}${PREFIX}/lib/${PORTNAME}
.for exec in ${BIN_FILES}
- (cd ${WRKSRC} && ${INSTALL_SCRIPT} ${exec}.sh \
- ${STAGEDIR}${PREFIX}/bin/${exec})
- (cd ${BUILD_WRKSRC}/bin && ${INSTALL_PROGRAM} ${exec} \
- ${STAGEDIR}${PREFIX}/lib/${PORTNAME})
+ ${INSTALL_SCRIPT} ${WRKSRC}/${exec}.sh \
+ ${STAGEDIR}${PREFIX}/bin/${exec}
+ ${INSTALL_PROGRAM} ${BUILD_WRKSRC}/bin/${exec} \
+ ${STAGEDIR}${PREFIX}/lib/${PORTNAME}
.endfor
- (cd ${WRKSRC}/avida-core/support/config && ${INSTALL_DATA} *.cfg \
- ${STAGEDIR}${PREFIX}/lib/${PORTNAME})
- (cd ${WRKSRC}/avida-core/support/config && ${INSTALL_DATA} *.org \
- ${STAGEDIR}${PREFIX}/lib/${PORTNAME})
+ ${INSTALL_DATA} \
+ ${WRKSRC}/avida-core/support/config/*.cfg \
+ ${WRKSRC}/avida-core/support/config/*.org \
+ ${STAGEDIR}${PREFIX}/lib/${PORTNAME}
do-install-DOCS-on:
@${MKDIR} ${STAGEDIR}${DOCSDIR}
diff --git a/biology/avida/files/patch-libs_apto_include_apto_core_Atomic.h b/biology/avida/files/patch-libs_apto_include_apto_core_Atomic.h
new file mode 100644
index 000000000000..0c1ef0eeb909
--- /dev/null
+++ b/biology/avida/files/patch-libs_apto_include_apto_core_Atomic.h
@@ -0,0 +1,28 @@
+--- libs/apto/include/apto/core/Atomic.h.orig 2012-09-29 03:33:38 UTC
++++ libs/apto/include/apto/core/Atomic.h
+@@ -88,6 +88,25 @@ inline void Apto::Atomic::Set(volatile i
+ *atomic = value;
+ }
+
++#elif defined __GNUC__
++
++inline int Apto::Atomic::Add(volatile int* atomic, int value)
++{
++ return __sync_add_and_fetch(atomic, value);
++}
++
++inline int Apto::Atomic::Get(volatile int* atomic)
++{
++ __sync_synchronize();
++ return *atomic;
++}
++
++inline void Apto::Atomic::Set(volatile int* atomic, int value)
++{
++ __sync_synchronize();
++ *atomic = value;
++}
++
+ #else
+
+ // Assuming x86