2012-08-29 22:31:26 +02:00
|
|
|
{stdenv, fetchurl, cmake, boost, zlib}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "clucene-core-2.3.3.4";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://sourceforge/clucene/${name}.tar.gz";
|
|
|
|
sha256 = "1arffdwivig88kkx685pldr784njm0249k0rb1f1plwavlrw9zfx";
|
|
|
|
};
|
|
|
|
|
2012-12-28 19:20:09 +01:00
|
|
|
nativeBuildInputs = [ cmake ];
|
2012-08-29 22:31:26 +02:00
|
|
|
|
|
|
|
buildInputs = [ boost zlib ];
|
|
|
|
|
2018-11-07 03:00:26 +01:00
|
|
|
cmakeFlags = [
|
|
|
|
"-DBUILD_CONTRIBS=ON"
|
|
|
|
"-DBUILD_CONTRIBS_LIB=ON"
|
|
|
|
"-DCMAKE_BUILD_WITH_INSTALL_NAME_DIR=ON"
|
2018-12-10 23:47:27 +01:00
|
|
|
] ++ stdenv.lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
|
|
|
|
"-D_CL_HAVE_GCC_ATOMIC_FUNCTIONS=0"
|
|
|
|
"-D_CL_HAVE_NAMESPACES_EXITCODE=0"
|
|
|
|
"-D_CL_HAVE_NO_SNPRINTF_BUG_EXITCODE=0"
|
|
|
|
"-D_CL_HAVE_NO_SNWPRINTF_BUG_EXITCODE=0"
|
|
|
|
"-D_CL_HAVE_TRY_BLOCKS_EXITCODE=0"
|
|
|
|
"-D_CL_HAVE_PTHREAD_MUTEX_RECURSIVE=0"
|
|
|
|
"-DLUCENE_STATIC_CONSTANT_SYNTAX_EXITCODE=0"
|
2018-11-07 03:00:26 +01:00
|
|
|
];
|
2012-08-29 22:31:26 +02:00
|
|
|
|
|
|
|
patches = # From debian
|
|
|
|
[ ./Fix-pkgconfig-file-by-adding-clucene-shared-library.patch
|
|
|
|
./Fixing_ZLIB_configuration_in_shared_CMakeLists.patch
|
|
|
|
./Install-contribs-lib.patch
|
2015-02-04 08:40:17 +01:00
|
|
|
] ++ stdenv.lib.optionals stdenv.isDarwin [ ./fix-darwin.patch ];
|
2012-08-29 22:31:26 +02:00
|
|
|
|
2018-11-07 03:00:26 +01:00
|
|
|
# fails with "Unable to find executable:
|
|
|
|
# /build/clucene-core-2.3.3.4/build/bin/cl_test"
|
|
|
|
doCheck = false;
|
2018-08-08 20:29:59 +02:00
|
|
|
|
2019-04-30 03:28:43 +02:00
|
|
|
NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.cc.isClang "-Wno-error=c++11-narrowing";
|
2019-04-23 04:36:35 +02:00
|
|
|
|
2018-09-30 11:19:50 +02:00
|
|
|
meta = with stdenv.lib; {
|
2013-10-06 11:49:53 +02:00
|
|
|
description = "Core library for full-featured text search engine";
|
|
|
|
longDescription = ''
|
|
|
|
CLucene is a high-performance, scalable, cross platform, full-featured,
|
|
|
|
open-source indexing and searching API. Specifically, CLucene is the guts
|
|
|
|
of a search engine, the hard stuff. You write the easy stuff: the UI and
|
|
|
|
the process of selecting and parsing your data files to pump them into
|
|
|
|
the search engine yourself, and any specialized queries to pull it back
|
|
|
|
for display or further processing.
|
|
|
|
|
|
|
|
CLucene is a port of the very popular Java Lucene text search engine API.
|
|
|
|
'';
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "http://clucene.sourceforge.net";
|
2018-09-30 11:19:50 +02:00
|
|
|
platforms = platforms.unix;
|
|
|
|
license = with licenses; [ asl20 lgpl2 ];
|
2012-08-29 22:31:26 +02:00
|
|
|
};
|
|
|
|
}
|