diff options
author | Yury G. Kudryashov <urkud.urkud@gmail.com> | 2012-08-30 00:31:26 +0400 |
---|---|---|
committer | Yury G. Kudryashov <urkud.urkud@gmail.com> | 2012-08-31 12:03:25 +0400 |
commit | 28f0597bd60378b9b323d0b31799bf07f64d0a4e (patch) | |
tree | 116bd38b67a84e5ce687483c33ec3c50e76191d3 /pkgs/development/libraries/clucene-core | |
parent | 34bafa4893df4aaf18538155711b24ce191400a6 (diff) | |
download | nixlib-28f0597bd60378b9b323d0b31799bf07f64d0a4e.tar nixlib-28f0597bd60378b9b323d0b31799bf07f64d0a4e.tar.gz nixlib-28f0597bd60378b9b323d0b31799bf07f64d0a4e.tar.bz2 nixlib-28f0597bd60378b9b323d0b31799bf07f64d0a4e.tar.lz nixlib-28f0597bd60378b9b323d0b31799bf07f64d0a4e.tar.xz nixlib-28f0597bd60378b9b323d0b31799bf07f64d0a4e.tar.zst nixlib-28f0597bd60378b9b323d0b31799bf07f64d0a4e.zip |
Add clucene-core.2.x
Diffstat (limited to 'pkgs/development/libraries/clucene-core')
4 files changed, 115 insertions, 0 deletions
diff --git a/pkgs/development/libraries/clucene-core/2.x.nix b/pkgs/development/libraries/clucene-core/2.x.nix new file mode 100644 index 000000000000..72460184df21 --- /dev/null +++ b/pkgs/development/libraries/clucene-core/2.x.nix @@ -0,0 +1,27 @@ +{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"; + }; + + buildNativeInputs = [ cmake ]; + + buildInputs = [ boost zlib ]; + + cmakeFlags = [ "-DBUILD_CONTRIBS=ON" "-DBUILD_CONTRIBS_LIB=ON" ]; + + patches = # From debian + [ ./Fix-pkgconfig-file-by-adding-clucene-shared-library.patch + ./Fixing_ZLIB_configuration_in_shared_CMakeLists.patch + ./Install-contribs-lib.patch + ]; + + meta = { + description = "CLucene is a port of the very popular Java Lucene text search engine API. Core package, 2.x branch."; + homepage = http://clucene.sourceforge.net; + }; +} diff --git a/pkgs/development/libraries/clucene-core/Fix-pkgconfig-file-by-adding-clucene-shared-library.patch b/pkgs/development/libraries/clucene-core/Fix-pkgconfig-file-by-adding-clucene-shared-library.patch new file mode 100644 index 000000000000..80e49a8e712e --- /dev/null +++ b/pkgs/development/libraries/clucene-core/Fix-pkgconfig-file-by-adding-clucene-shared-library.patch @@ -0,0 +1,19 @@ +From 7be4a19b76d98260cf95040a47935f854a4ba7a4 Mon Sep 17 00:00:00 2001 +From: Valentin Rusu <kde@rusu.info> +Date: Sat, 17 Dec 2011 13:47:58 +0100 +Subject: [PATCH] Fix .pc file by adding clucene-shared library + +--- + src/core/libclucene-core.pc.cmake | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/src/core/libclucene-core.pc.cmake ++++ b/src/core/libclucene-core.pc.cmake +@@ -6,6 +6,6 @@ includedir=${prefix}/include:${prefix}/i + Name: libclucene + Description: CLucene - a C++ search engine, ported from the popular Apache Lucene + Version: @CLUCENE_VERSION_MAJOR@.@CLUCENE_VERSION_MINOR@.@CLUCENE_VERSION_REVISION@.@CLUCENE_VERSION_PATCH@ +-Libs: -L${prefix}/@LIB_DESTINATION@/ -lclucene-core ++Libs: -L${prefix}/@LIB_DESTINATION@/ -lclucene-core -lclucene-shared + Cflags: -I${prefix}/include -I${prefix}/include/CLucene/ext + ~ diff --git a/pkgs/development/libraries/clucene-core/Fixing_ZLIB_configuration_in_shared_CMakeLists.patch b/pkgs/development/libraries/clucene-core/Fixing_ZLIB_configuration_in_shared_CMakeLists.patch new file mode 100644 index 000000000000..f5f44a7fa2c4 --- /dev/null +++ b/pkgs/development/libraries/clucene-core/Fixing_ZLIB_configuration_in_shared_CMakeLists.patch @@ -0,0 +1,20 @@ +From 772481ca94071ddfe65102a451926e4f9aeb4d2c Mon Sep 17 00:00:00 2001 +From: Veit Jahns <idolum@users.sourceforge.net> +Date: Thu, 26 May 2011 13:35:28 +0200 +Subject: [PATCH] Fixing ZLIB configuration in shared's CMakeLists + +--- + src/shared/CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/src/shared/CMakeLists.txt ++++ b/src/shared/CMakeLists.txt +@@ -42,7 +42,7 @@ INCLUDE (CheckAtomicFunctions) + find_package(ZLIB) + IF ( ZLIB_FOUND ) + SET ( EXTRA_LIBS ${EXTRA_LIBS} ${ZLIB_LIBRARY} ) +-ELSEIF ( ZLIB_FOUND ) ++ELSE ( ZLIB_FOUND ) + MESSAGE( "ZLIB not found, using local: ${clucene-ext_SOURCE_DIR}/zlib" ) + SET(ZLIB_INCLUDE_DIR ${clucene-ext_SOURCE_DIR}/zlib ) + SET(ZLIB_LIBRARY ${clucene-ext_BINARY_DIR}) diff --git a/pkgs/development/libraries/clucene-core/Install-contribs-lib.patch b/pkgs/development/libraries/clucene-core/Install-contribs-lib.patch new file mode 100644 index 000000000000..899411fe02b4 --- /dev/null +++ b/pkgs/development/libraries/clucene-core/Install-contribs-lib.patch @@ -0,0 +1,49 @@ +Description: contribs-lib is not built and installed even with config +Author: Vitaliy Filippov +Bug: https://sourceforge.net/tracker/index.php?func=detail&aid=3392466&group_id=80013&atid=558446 + +--- + CMakeLists.txt | 2 +- + src/contribs-lib/CMakeLists.txt | 17 +++++++++++++++++ + 2 files changed, 18 insertions(+), 1 deletion(-) + +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -163,7 +163,7 @@ IF ( BUILD_CONTRIBS ) + SET(BUILD_CONTRIBS_LIB 1) + ENDIF ( BUILD_CONTRIBS ) + IF ( BUILD_CONTRIBS_LIB ) +- ADD_SUBDIRECTORY (src/contribs-lib EXCLUDE_FROM_ALL) ++ ADD_SUBDIRECTORY (src/contribs-lib) + ENDIF ( BUILD_CONTRIBS_LIB ) + + +--- a/src/contribs-lib/CMakeLists.txt ++++ b/src/contribs-lib/CMakeLists.txt +@@ -106,9 +106,26 @@ add_library(clucene-contribs-lib SHARED + ) + TARGET_LINK_LIBRARIES(clucene-contribs-lib ${clucene_contrib_extra_libs}) + ++#install public headers. ++FOREACH(file ${HEADERS}) ++ get_filename_component(apath ${file} PATH) ++ get_filename_component(aname ${file} NAME) ++ file(RELATIVE_PATH relpath ${CMAKE_SOURCE_DIR}/src/contribs-lib ${apath}) ++ IF ( NOT aname MATCHES "^_.*" ) ++ install(FILES ${file} ++ DESTINATION include/${relpath} ++ COMPONENT development) ++ ENDIF ( NOT aname MATCHES "^_.*" ) ++ENDFOREACH(file) ++ + #set properties on the libraries + SET_TARGET_PROPERTIES(clucene-contribs-lib PROPERTIES + VERSION ${CLUCENE_VERSION} + SOVERSION ${CLUCENE_SOVERSION} + COMPILE_DEFINITIONS_DEBUG _DEBUG + ) ++ ++#and install library ++install(TARGETS clucene-contribs-lib ++ DESTINATION ${LIB_DESTINATION} ++ COMPONENT runtime ) |