svn commit: r395830 - in head/biology/avida: . files
Alexey Dokuchaev
danfe at FreeBSD.org
Wed Sep 2 12:29:11 UTC 2015
Author: danfe
Date: Wed Sep 2 12:29:09 2015
New Revision: 395830
URL: https://svnweb.freebsd.org/changeset/ports/395830
Log:
- Unbreak on PowerPC by using atomicops implementation for Linux and GCC
__sync_* functions family
- Remove BROKEN_ia64: it never had been first-class architecture, killed
officially in -CURRENT for a while now
- Sanitize installation commands and sort the knobs while I am here
Added:
head/biology/avida/files/patch-libs_apto_include_apto_core_Atomic.h (contents, props changed)
Modified:
head/biology/avida/Makefile
Modified: head/biology/avida/Makefile
==============================================================================
--- head/biology/avida/Makefile Wed Sep 2 10:35:25 2015 (r395829)
+++ head/biology/avida/Makefile Wed Sep 2 12:29:09 2015 (r395830)
@@ -12,7 +12,7 @@ COMMENT= Auto-adaptive genetic system de
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 defaul
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}
Added: head/biology/avida/files/patch-libs_apto_include_apto_core_Atomic.h
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/biology/avida/files/patch-libs_apto_include_apto_core_Atomic.h Wed Sep 2 12:29:09 2015 (r395830)
@@ -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
More information about the svn-ports-head
mailing list