mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-25 12:22:37 +03:00
Add clucene-core.2.x
This commit is contained in:
parent
34bafa4893
commit
28f0597bd6
27
pkgs/development/libraries/clucene-core/2.x.nix
Normal file
27
pkgs/development/libraries/clucene-core/2.x.nix
Normal file
@ -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;
|
||||||
|
};
|
||||||
|
}
|
@ -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
|
||||||
|
~
|
@ -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})
|
@ -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 )
|
@ -3368,6 +3368,8 @@ let
|
|||||||
|
|
||||||
clppcre = builderDefsPackage (import ../development/libraries/cl-ppcre) { };
|
clppcre = builderDefsPackage (import ../development/libraries/cl-ppcre) { };
|
||||||
|
|
||||||
|
clucene_core_2 = callPackage ../development/libraries/clucene-core/2.x.nix { };
|
||||||
|
|
||||||
clucene_core = callPackage ../development/libraries/clucene-core { };
|
clucene_core = callPackage ../development/libraries/clucene-core { };
|
||||||
|
|
||||||
cluceneCore = clucene_core; # !!! remove this
|
cluceneCore = clucene_core; # !!! remove this
|
||||||
|
Loading…
Reference in New Issue
Block a user