diff --git a/textproc/randlm/Makefile b/textproc/randlm/Makefile index 08a7c11132fd..31849bcfbbbe 100644 --- a/textproc/randlm/Makefile +++ b/textproc/randlm/Makefile @@ -1,39 +1,38 @@ # Created by: Dmitry Sivachenko PORTNAME= randlm PORTVERSION= 0.2.5 PORTREVISION= 19 CATEGORIES= textproc MASTER_SITES= SF/${PORTNAME} MAINTAINER= demon@FreeBSD.org COMMENT= Toolkit for building randomized language models LICENSE= GPLv3+ LICENSE_FILE= ${WRKSRC}/COPYING BROKEN_aarch64= fails to compile: invalid output constraint =a in assembler BROKEN_armv6= fails to compile: invalid output constraint =a in assembler -BROKEN_powerpc64= fails to compile: 'itr' does not name a type BROKEN_riscv64= fails to compile: invalid output constraint =a in assembler BUILD_DEPENDS= ${LOCALBASE}/include/google/sparse_hash_map:devel/sparsehash LIB_DEPENDS= libboost_thread.so:devel/boost-libs RUN_DEPENDS= ${LOCALBASE}/include/google/sparse_hash_map:devel/sparsehash USES= autoreconf libtool localbase:ldflags compiler:c++11-lang USE_CXXSTD= gnu++98 USE_LDCONFIG= yes GNU_CONFIGURE= yes MAKE_JOBS_UNSAFE=yes INSTALL_TARGET= install-strip post-patch: cd ${WRKSRC}/hadoop && ${MV} strings.cpp strings.cc && ${MV} strings.h s.h ${REINPLACE_CMD} -e s#strings.h#s.h# ${WRKSRC}/hadoop/r_compute_ngram_counts.cpp ${WRKSRC}/hadoop/m_compute_ngram_counts_batch.cpp @${REINPLACE_CMD} -e 's,-L./,,' -e 's,-lLDHT,libLDHT.la,' \ -e 's,-lticpp,libticpp.la,' -e 's,-lRandLM,libRandLM.la,' \ ${WRKSRC}/src/LDHT/Makefile.am \ ${WRKSRC}/src/RandLM/Makefile.am .include diff --git a/textproc/randlm/files/patch-src-LDHT-Util.h b/textproc/randlm/files/patch-src-LDHT-Util.h index 4d03aae6710f..c3eb320265ef 100644 --- a/textproc/randlm/files/patch-src-LDHT-Util.h +++ b/textproc/randlm/files/patch-src-LDHT-Util.h @@ -1,13 +1,31 @@ ---- src/LDHT/Util.h.orig 2012-03-30 14:53:05.000000000 +0400 -+++ src/LDHT/Util.h 2014-08-30 18:08:50.000000000 +0400 +--- src/LDHT/Util.h.orig 2012-03-30 10:53:05 UTC ++++ src/LDHT/Util.h @@ -10,6 +10,10 @@ #include #include #include +#include +#include +#include +#include #define V(expr) std::cerr << __FILE__ << ":" \ << __LINE__ << " " \ +@@ -43,6 +47,9 @@ class Util { (public) + static uint64_t hash(uint64_t a, uint64_t b, uint64_t P, uint8_t* e); + static uint64_t hash(uint64_t a, uint64_t b, uint64_t P, uint64_t e); + static inline uint64_t rdtsc() { ++#if defined(__powerpc__) ++ return __builtin_readcyclecounter(); ++#else + uint32_t lo, hi; + __asm__ __volatile__( + "xorl %%eax,%%eax\n" +@@ -52,6 +59,7 @@ class Util { (public) + : + : "%ebx", "%ecx"); + return static_cast(hi) << 32 | lo; ++#endif + }; + }; +