diff options
author | Jung-uk Kim <jkim@FreeBSD.org> | 2013-01-28 22:25:05 +0000 |
---|---|---|
committer | Jung-uk Kim <jkim@FreeBSD.org> | 2013-01-28 22:25:05 +0000 |
commit | 5294672175d24713b4ba86eb01f310644319780c (patch) | |
tree | 9b80f7f3b07311122787645234d5af560e1d85de /misc | |
parent | bccfce66c30af1e265cfba896d47d493f4e7918d (diff) | |
download | ports-5294672175d24713b4ba86eb01f310644319780c.tar.gz ports-5294672175d24713b4ba86eb01f310644319780c.zip |
Notes
Diffstat (limited to 'misc')
-rw-r--r-- | misc/bibletime/Makefile | 9 | ||||
-rw-r--r-- | misc/sword/Makefile | 6 | ||||
-rw-r--r-- | misc/sword/files/patch-configure | 31 | ||||
-rw-r--r-- | misc/sword/files/patch-src__modules__swmodule.cpp | 94 |
4 files changed, 130 insertions, 10 deletions
diff --git a/misc/bibletime/Makefile b/misc/bibletime/Makefile index 7b2ac4841777..6fe4f1086dc6 100644 --- a/misc/bibletime/Makefile +++ b/misc/bibletime/Makefile @@ -1,13 +1,8 @@ -# New ports collection makefile for: bibletime-devel -# Date created: 2008-08-12 -# Whom: Thomas Abthorpe <tabthorpe@FreeBSD.org> -# # $FreeBSD$ -# PORTNAME= bibletime PORTVERSION= 2.9.1 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= misc kde MASTER_SITES= SF/${PORTNAME}/BibleTime%202/BibleTime%202%20source%20code @@ -19,7 +14,7 @@ LICENSE_FILE= ${WRKSRC}/LICENSE RUN_DEPENDS= ${LOCALBASE}/lib/libsword-1.6.2.so:${PORTSDIR}/misc/sword BUILD_DEPENDS:= ${RUN_DEPENDS} -LIB_DEPENDS= clucene.0:${PORTSDIR}/textproc/clucene +LIB_DEPENDS= clucene-core:${PORTSDIR}/textproc/clucene USE_BZIP2= yes USE_OPENSSL= yes diff --git a/misc/sword/Makefile b/misc/sword/Makefile index 1c1004a4387c..41038497e1c5 100644 --- a/misc/sword/Makefile +++ b/misc/sword/Makefile @@ -3,7 +3,7 @@ PORTNAME= sword PORTVERSION= 1.6.2 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= misc MASTER_SITES= ftp://ftp.crosswire.org/pub/sword/source/v1.6/ \ http://crosswire.org/ftpmirror/pub/sword/source/v1.6/ \ @@ -45,9 +45,9 @@ CONFIGURE_ARGS+= --without-curl .endif .if ${PORT_OPTIONS:MCLUCENE} -LIB_DEPENDS+= clucene:${PORTSDIR}/textproc/clucene \ +LIB_DEPENDS+= clucene-core:${PORTSDIR}/textproc/clucene \ icudata:${PORTSDIR}/devel/icu -CONFIGURE_ARGS+= --with-clucene --with-icu +CONFIGURE_ARGS+= --with-clucene=${LOCALBASE} --with-icu PLIST_SUB+= ICU="" ICUVER="`${LOCALBASE}/bin/icu-config --version`" .else CONFIGURE_ARGS+= --without-clucene --without-icu diff --git a/misc/sword/files/patch-configure b/misc/sword/files/patch-configure new file mode 100644 index 000000000000..33c1572444a9 --- /dev/null +++ b/misc/sword/files/patch-configure @@ -0,0 +1,31 @@ +--- configure.orig 2010-10-22 17:14:28.000000000 -0400 ++++ configure 2013-01-10 19:07:36.000000000 -0500 +@@ -16347,25 +16347,13 @@ + for flag in $with_clucene; do + if test -z "$clucene_set_failed"; then + if test -e "$flag/include/CLucene.h"; then +-# 64-bit checks first +- if test -e "$flag/lib64/libclucene.la" || test -e "$flag/lib64/libclucene.so"; then ++ if test -e "$flag/lib/libclucene-core.la" || test -e "$flag/lib/libclucene-core.so"; then + clucene_set_failed=$flag +- CLUCENE_LIBS="-L$flag/lib64 -lclucene" ++ CLUCENE_LIBS="-L$flag/lib -lclucene-core" + if test -e "$flag/include/CLucene/clucene-config.h"; then + CLUCENE_CXXFLAGS="-I$flag/include" + else +- CLUCENE_CXXFLAGS="-I$flag/include -I$flag/lib64" +- fi +- else +-# 32-bit checks +- if test -e "$flag/lib/libclucene.la" || test -e "$flag/lib/libclucene.so"; then +- clucene_set_failed=$flag +- CLUCENE_LIBS="-L$flag/lib -lclucene" +- if test -e "$flag/include/CLucene/clucene-config.h"; then +- CLUCENE_CXXFLAGS="-I$flag/include" +- else +- CLUCENE_CXXFLAGS="-I$flag/include -I$flag/lib" +- fi ++ CLUCENE_CXXFLAGS="-I$flag/include -I$flag/lib" + fi + fi + fi diff --git a/misc/sword/files/patch-src__modules__swmodule.cpp b/misc/sword/files/patch-src__modules__swmodule.cpp new file mode 100644 index 000000000000..87cd9c61e56c --- /dev/null +++ b/misc/sword/files/patch-src__modules__swmodule.cpp @@ -0,0 +1,94 @@ +--- src/modules/swmodule.cpp.orig 2009-12-28 13:03:22.000000000 -0500 ++++ src/modules/swmodule.cpp 2013-01-10 18:59:59.000000000 -0500 +@@ -40,7 +40,6 @@ + + #ifdef USELUCENE + #include <CLucene.h> +-#include <CLucene/CLBackwards.h> + + //Lucence includes + //#include "CLucene.h" +@@ -59,6 +58,9 @@ + + using std::vector; + ++extern size_t lucene_utf8towcs(wchar_t *, const char *, size_t maxslen); ++extern size_t lucene_wcstoutf8 (char *, const wchar_t *, size_t maxslen); ++ + SWORD_NAMESPACE_START + + SWDisplay SWModule::rawdisp; +@@ -521,7 +523,7 @@ + + // iterate thru each good module position that meets the search + bool checkBounds = getKey()->isBoundSet(); +- for (long i = 0; i < h->length(); i++) { ++ for (unsigned long i = 0; i < h->length(); i++) { + Document &doc = h->doc(i); + + // set a temporary verse key to this module position +@@ -1144,7 +1146,7 @@ + + lucene_utf8towcs(wcharBuffer, keyText, MAX_CONV_SIZE); //keyText must be utf8 + // doc->add( *(new Field("key", wcharBuffer, Field::STORE_YES | Field::INDEX_TOKENIZED))); +- doc->add( *Field::Text(_T("key"), wcharBuffer ) ); ++ doc->add(*_CLNEW Field(_T("key"), wcharBuffer, Field::STORE_YES | Field::INDEX_TOKENIZED) ); + + + if (includeKeyInSearch) { +@@ -1155,11 +1157,11 @@ + } + + lucene_utf8towcs(wcharBuffer, content, MAX_CONV_SIZE); //content must be utf8 +- doc->add( *Field::UnStored(_T("content"), wcharBuffer) ); ++ doc->add(*_CLNEW Field(_T("content"), wcharBuffer, Field::STORE_NO | Field::INDEX_TOKENIZED)); + + if (strong.length() > 0) { + lucene_utf8towcs(wcharBuffer, strong, MAX_CONV_SIZE); +- doc->add( *Field::UnStored(_T("lemma"), wcharBuffer) ); ++ doc->add(*_CLNEW Field(_T("lemma"), wcharBuffer, Field::STORE_NO | Field::INDEX_TOKENIZED) ); + //printf("setting fields (%s).\ncontent: %s\nlemma: %s\n", (const char *)*key, content, strong.c_str()); + } + +@@ -1280,12 +1282,12 @@ + + //printf("proxBuf after (%s).\nprox: %s\nproxLem: %s\n", (const char *)*key, proxBuf.c_str(), proxLem.c_str()); + +- doc->add( *Field::UnStored(_T("prox"), wcharBuffer) ); ++ doc->add(*_CLNEW Field(_T("prox"), wcharBuffer, Field::STORE_NO | Field::INDEX_TOKENIZED) ); + good = true; + } + if (proxLem.length() > 0) { + lucene_utf8towcs(wcharBuffer, proxLem, MAX_CONV_SIZE); //keyText must be utf8 +- doc->add( *Field::UnStored(_T("proxlem"), wcharBuffer) ); ++ doc->add(*_CLNEW Field(_T("proxlem"), wcharBuffer, Field::STORE_NO | Field::INDEX_TOKENIZED) ); + good = true; + } + if (good) { +@@ -1303,20 +1305,20 @@ + //coreWriter->optimize(); + coreWriter->close(); + ++ d = FSDirectory::getDirectory(target.c_str()); + if (IndexReader::indexExists(target.c_str())) { +- d = FSDirectory::getDirectory(target.c_str(), false); + if (IndexReader::isLocked(d)) { + IndexReader::unlock(d); + } +- +- fsWriter = new IndexWriter( d, an, false); +- } else { +- d = FSDirectory::getDirectory(target.c_str(), true); ++ fsWriter = new IndexWriter(d, an, false); ++ } ++ else { + fsWriter = new IndexWriter(d, an, true); + } + + Directory *dirs[] = { ramDir, 0 }; +- fsWriter->addIndexes(dirs); ++ lucene::util::ConstValueArray< lucene::store::Directory *>dirsa(dirs, 1); ++ fsWriter->addIndexes(dirsa); + fsWriter->close(); + + delete ramDir; |