textproc/randlm: GC obsoleted port. Software is not maintained and does not build with recent versions of boost.

This commit is contained in:
Dmitry Sivachenko
2025-08-28 05:01:14 +00:00
parent 8004b9cd13
commit f263f441a6
15 changed files with 0 additions and 286 deletions

View File

@@ -1744,7 +1744,6 @@
SUBDIR += quarto
SUBDIR += quickwit
SUBDIR += rand
SUBDIR += randlm
SUBDIR += rapidxml
SUBDIR += raptor2
SUBDIR += rarian

View File

@@ -1,37 +0,0 @@
PORTNAME= randlm
PORTVERSION= 0.2.5
PORTREVISION= 29
CATEGORIES= textproc
MASTER_SITES= SF/${PORTNAME}
MAINTAINER= demon@FreeBSD.org
COMMENT= Toolkit for building randomized language models
WWW= https://sourceforge.net/projects/randlm/
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_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 <bsd.port.mk>

View File

@@ -1,2 +0,0 @@
SHA256 (randlm-0.2.5.tar.gz) = e22e6e969cc971341af1414bf27c8ec0b88796055e5a132c9d4a47b80a3594fa
SIZE (randlm-0.2.5.tar.gz) = 758741

View File

@@ -1,11 +0,0 @@
--- src/LDHT/BitArray.cpp.orig 2017-03-07 01:14:52 UTC
+++ src/LDHT/BitArray.cpp
@@ -115,7 +115,7 @@ uint64_t BitArray::getLength() {
}
bool BitArray::validArrayIndex(uint64_t index) {
- if (index >= 0 && index <= getLength())
+ if (index >= 1 && index <= getLength())
return true;
else
return false;

View File

@@ -1,11 +0,0 @@
--- src/RandLM/BloomMap.cpp.orig 2017-03-07 00:13:58 UTC
+++ src/RandLM/BloomMap.cpp
@@ -272,7 +272,7 @@ namespace randlm {
bool BloomMap::computePaths() {
// determine the path lengths based on distribution for codes of each type
- assert(stats_counters_ && root_ == NULL && max_code_ > 0);
+ assert(stats_counters_ && root_ == NULL && max_code_ != NULL);
code_to_leaf_ = new uint64_t*[num_events_];
code_to_path_len_ = new int*[num_events_];
code_to_bound_ = new int*[num_events_];

View File

@@ -1,11 +0,0 @@
--- src/RandLM/LogFreqBloomFilter.cpp.orig 2017-03-07 00:13:45 UTC
+++ src/RandLM/LogFreqBloomFilter.cpp
@@ -207,7 +207,7 @@ namespace randlm {
int LogFreqBloomFilter::getMaxHashes(int event_idx) {
// simple for unary encoding
- assert(max_alpha_ > 0 && max_k_ > 0 && max_code_ > 0);
+ assert(max_alpha_ > 0 && max_k_ > 0 && max_code_ != NULL);
return max_alpha_ + (max_k_ * max_code_[event_idx]);
}

View File

@@ -1,11 +0,0 @@
--- src/RandLM/RandLM.cpp.orig 2017-03-07 02:01:18 UTC
+++ src/RandLM/RandLM.cpp
@@ -66,7 +66,7 @@ namespace randlm {
smoothing_name = kStupidBackoffSmoothing;
break;
case kWittenBellSmoothingCode:
- smoothing_name == kWittenBellSmoothing;
+ smoothing_name = kWittenBellSmoothing;
break;
case kBackoffSmoothingCode:
smoothing_name = kBackoffSmoothing;

View File

@@ -1,11 +0,0 @@
--- src/LDHT/TableChunkLocator.h.orig 2017-03-07 01:06:04 UTC
+++ src/LDHT/TableChunkLocator.h
@@ -21,7 +21,7 @@ public:
int num_cells,
int num_chunks) = 0;
virtual int locateTableChunkForKey(uint64_t key) = 0;
-
+ virtual ~TableChunkLocator(){};
};
} // namespace LDHT.

View File

@@ -1,11 +0,0 @@
--- ./src/LDHT/MurmurHash3.cpp.bak 2012-03-30 14:53:05.000000000 +0400
+++ ./src/LDHT/MurmurHash3.cpp 2014-08-30 17:56:33.000000000 +0400
@@ -29,7 +29,7 @@
#else // defined(_MSC_VER)
-#define FORCE_INLINE __attribute__((always_inline))
+#define FORCE_INLINE inline __attribute__((always_inline))
inline uint32_t rotl32 ( uint32_t x, int8_t r )
{

View File

@@ -1,31 +0,0 @@
--- src/LDHT/Util.h.orig 2012-03-30 10:53:05 UTC
+++ src/LDHT/Util.h
@@ -10,6 +10,10 @@
#include <cstdlib>
#include <cstring>
#include <stdint.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
#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<uint64_t>(hi) << 32 | lo;
+#endif
};
};

View File

@@ -1,20 +0,0 @@
--- src/RandLM/LogFreqSketch.cpp.orig 2012-03-30 13:53:30.000000000 +0400
+++ src/RandLM/LogFreqSketch.cpp 2014-09-01 18:22:05.000000000 +0400
@@ -162,7 +162,7 @@ namespace randlm {
bool LogFreqSketch::load(RandLMFile* fin) {
// just maximum m
- return fin->read((char*)&maximum_m_, sizeof(maximum_m_));;
+ return fin->read((char*)&maximum_m_, sizeof(maximum_m_)).good();
}
bool LogFreqSketch::save(RandLMFile* fout) {
@@ -170,7 +170,7 @@ namespace randlm {
assert(LogFreqBloomFilter::save(fout)); // saves RandLMStruct first
assert(OnlineRandLMStruct::save(fout));
// just maximum m
- return fout->write((char*)&maximum_m_, sizeof(maximum_m_));;
+ return fout->write((char*)&maximum_m_, sizeof(maximum_m_)).good();
}
}

View File

@@ -1,34 +0,0 @@
--- src/RandLM/RandLMFilter.h.orig 2014-09-01 18:07:56.000000000 +0400
+++ src/RandLM/RandLMFilter.h 2014-09-01 18:08:39.000000000 +0400
@@ -289,7 +289,7 @@ namespace randlm {
std::cerr << "Saved ResizedBitFilter. Rho = " << rho() << "." << std::endl;
assert(fout->write((char*)&old_addresses_, sizeof(old_addresses_)));
assert(fout->write((char*)&a_, sizeof(a_)));
- return fout->write((char*)&b_, sizeof(b_));
+ return fout->write((char*)&b_, sizeof(b_)).good();
}
protected:
bool load(RandLMFile* fin) {
@@ -297,7 +297,7 @@ namespace randlm {
std::cerr << "Loaded ResizedBitFilter. Rho = " << rho() << "." << std::endl;
assert(fin->read((char*)&old_addresses_, sizeof(old_addresses_)));
assert(fin->read((char*)&a_, sizeof(a_)));
- return fin->read((char*)&b_, sizeof(b_));
+ return fin->read((char*)&b_, sizeof(b_)).good();
}
// member data
uint64_t old_addresses_; // size of pre-resized filter
@@ -342,11 +342,11 @@ namespace randlm {
}
bool save(RandLMFile* fout) {
assert(Filter<T>::save(fout));
- return fout->write((char*)&wrap_around_, sizeof(wrap_around_));
+ return fout->write((char*)&wrap_around_, sizeof(wrap_around_)).good();
}
private:
bool load(RandLMFile* fin) {
- return fin->read((char*)&wrap_around_, sizeof(wrap_around_));
+ return fin->read((char*)&wrap_around_, sizeof(wrap_around_)).good();
}
inline bool incrementSubCell(int bit, int len, T* cell) {
// increment counter consisting of bits [startbit, startbit + len - 1] rest stays unchanged

View File

@@ -1,11 +0,0 @@
--- src/RandLM/RandLMTypes.h.orig 2014-09-01 18:20:25.000000000 +0400
+++ src/RandLM/RandLMTypes.h 2014-09-01 18:21:06.000000000 +0400
@@ -21,7 +21,7 @@
#include <string>
#include <stdint.h>
-#define iterate(c,i) for(typeof(c.begin()) i = c.begin(); i != c.end(); i++)
+#define iterate(c,i) for(auto i = c.begin(); i != c.end(); i++)
namespace randlm {

View File

@@ -1 +0,0 @@
A toolkit for bulding randomized language models.

View File

@@ -1,83 +0,0 @@
bin/buildlm
bin/countngrams
bin/m_compute_ngram_counts_batch
bin/querylm
bin/r_compute_ngram_counts
include/LDHT/BitArray.h
include/LDHT/BloomFilter.h
include/LDHT/Client.h
include/LDHT/ClientLocal.h
include/LDHT/FactoryCollection.h
include/LDHT/HashFunction.h
include/LDHT/HashFunctionFactory.h
include/LDHT/HashFunctionUniversal.h
include/LDHT/Logic.h
include/LDHT/MethodRegistry.h
include/LDHT/MurmurHash3.h
include/LDHT/NewNgram.h
include/LDHT/Protocol.h
include/LDHT/ProtocolGroup.h
include/LDHT/ProtocolQueue.h
include/LDHT/Quantiser.h
include/LDHT/Server.h
include/LDHT/ServerLocator.h
include/LDHT/ServerLocatorHash.h
include/LDHT/TableChunk.h
include/LDHT/TableChunkFactory.h
include/LDHT/TableChunkLocator.h
include/LDHT/TableChunkLocatorFactory.h
include/LDHT/TableChunkLocatorHash.h
include/LDHT/TableChunkLossyDict.h
include/LDHT/TableDirectory.h
include/LDHT/TableProtocol.h
include/LDHT/TableProtocolLocalAdapter.h
include/LDHT/TableRange.h
include/LDHT/Thread.h
include/LDHT/Transport.h
include/LDHT/TransportPipe.h
include/LDHT/TransportTCP.h
include/LDHT/TypeDef.h
include/LDHT/Util.h
include/LDHT/VarIntStream.h
include/LDHT/ticpp.h
include/LDHT/ticpprc.h
include/LDHT/tinystr.h
include/LDHT/tinyxml.h
include/RandLM/BloomMap.h
include/RandLM/BloomierFilter.h
include/RandLM/CountMinSketch.h
include/RandLM/LogFreqBloomFilter.h
include/RandLM/LogFreqSketch.h
include/RandLM/LossyDict.h
include/RandLM/RandLM.h
include/RandLM/RandLMCache.h
include/RandLM/RandLMFile.h
include/RandLM/RandLMFilter.h
include/RandLM/RandLMHash.h
include/RandLM/RandLMHashCache.h
include/RandLM/RandLMInfo.h
include/RandLM/RandLMParams.h
include/RandLM/RandLMPipeline.h
include/RandLM/RandLMPipelineTool.h
include/RandLM/RandLMPreproc.h
include/RandLM/RandLMPreprocessor.h
include/RandLM/RandLMQuantiser.h
include/RandLM/RandLMStats.h
include/RandLM/RandLMStruct.h
include/RandLM/RandLMTool.h
include/RandLM/RandLMTypes.h
include/RandLM/RandLMUtils.h
include/RandLM/RandLMVocab.h
include/RandLM/fdstream.h
lib/libLDHT.a
lib/libLDHT.so
lib/libLDHT.so.0
lib/libLDHT.so.0.0.0
lib/libRandLM.a
lib/libRandLM.so
lib/libRandLM.so.0
lib/libRandLM.so.0.0.0
lib/libticpp.a
lib/libticpp.so
lib/libticpp.so.0
lib/libticpp.so.0.0.0