mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-23 12:10:06 +02:00
Strigi: add working recipe.
This commit is contained in:
105
app-misc/strigi/patches/strigi-0.7.5.patch
Normal file
105
app-misc/strigi/patches/strigi-0.7.5.patch
Normal file
@@ -0,0 +1,105 @@
|
||||
From 963443070677dc28be0edba24053dede8560fb2e Mon Sep 17 00:00:00 2001
|
||||
From: Augustin Cavalier <waddlesplash@gmail.com>
|
||||
Date: Mon, 14 Jul 2014 16:33:25 -0400
|
||||
Subject: [PATCH] Fix Strigi on Haiku.
|
||||
|
||||
---
|
||||
libstreamanalyzer/lib/saxeventanalyzer.cpp | 2 +-
|
||||
strigiclient/lib/CMakeLists.txt | 1 -
|
||||
strigiclient/lib/searchclient/CMakeLists.txt | 4 +++-
|
||||
strigidaemon/CMakeLists.txt | 2 +-
|
||||
strigidaemon/bin/daemon/eventlistener/eventlistenerqueue.cpp | 2 +-
|
||||
strigidaemon/bin/daemon/strigithread.cpp | 3 ++-
|
||||
6 files changed, 8 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/libstreamanalyzer/lib/saxeventanalyzer.cpp b/libstreamanalyzer/lib/saxeventanalyzer.cpp
|
||||
index 1e5b386..d37857c 100644
|
||||
--- a/libstreamanalyzer/lib/saxeventanalyzer.cpp
|
||||
+++ b/libstreamanalyzer/lib/saxeventanalyzer.cpp
|
||||
@@ -27,7 +27,7 @@
|
||||
#include <cstring>
|
||||
|
||||
#ifndef LIBXML_THREAD_ENABLED
|
||||
-#error Strigi needs a thread safe version of libxml2
|
||||
+#warning Strigi needs a thread safe version of libxml2
|
||||
#endif
|
||||
|
||||
using namespace Strigi;
|
||||
diff --git a/strigiclient/lib/CMakeLists.txt b/strigiclient/lib/CMakeLists.txt
|
||||
index ba07497..c5be26d 100644
|
||||
--- a/strigiclient/lib/CMakeLists.txt
|
||||
+++ b/strigiclient/lib/CMakeLists.txt
|
||||
@@ -1,4 +1,3 @@
|
||||
if(NOT WIN32)
|
||||
add_subdirectory(htmlgui)
|
||||
endif(NOT WIN32)
|
||||
-add_subdirectory(searchclient)
|
||||
diff --git a/strigiclient/lib/searchclient/CMakeLists.txt b/strigiclient/lib/searchclient/CMakeLists.txt
|
||||
index 9ddce18..061f481 100644
|
||||
--- a/strigiclient/lib/searchclient/CMakeLists.txt
|
||||
+++ b/strigiclient/lib/searchclient/CMakeLists.txt
|
||||
@@ -1,4 +1,6 @@
|
||||
-add_subdirectory(qtdbus)
|
||||
+if(ENABLE_DBUS)
|
||||
+ add_subdirectory(qtdbus)
|
||||
+endif(ENABLE_DBUS)
|
||||
# disable searchclient for now
|
||||
if(NOT WIN32)
|
||||
add_subdirectory(filterwidget)
|
||||
diff --git a/strigidaemon/CMakeLists.txt b/strigidaemon/CMakeLists.txt
|
||||
index 759b72c..53d774a 100644
|
||||
--- a/strigidaemon/CMakeLists.txt
|
||||
+++ b/strigidaemon/CMakeLists.txt
|
||||
@@ -115,7 +115,7 @@ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/LibSearchClientConfig.cmake
|
||||
DESTINATION ${LIB_DESTINATION}/libsearchclient)
|
||||
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/dummy.cpp "")
|
||||
add_executable(strigidaemon dummy.cpp)
|
||||
-target_link_libraries(strigidaemon libstrigidaemon)
|
||||
+target_link_libraries(strigidaemon libstrigidaemon network)
|
||||
install(TARGETS strigidaemon
|
||||
RUNTIME DESTINATION bin)
|
||||
# library
|
||||
diff --git a/strigidaemon/bin/daemon/eventlistener/eventlistenerqueue.cpp b/strigidaemon/bin/daemon/eventlistener/eventlistenerqueue.cpp
|
||||
index 9fcdcb1..88dae45 100644
|
||||
--- a/strigidaemon/bin/daemon/eventlistener/eventlistenerqueue.cpp
|
||||
+++ b/strigidaemon/bin/daemon/eventlistener/eventlistenerqueue.cpp
|
||||
@@ -27,7 +27,7 @@
|
||||
#include <iostream>
|
||||
#include <stdio.h>
|
||||
|
||||
-#if defined(__SUNPRO_CC)
|
||||
+#if defined(__SUNPRO_CC) || defined(__HAIKU__)
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
diff --git a/strigidaemon/bin/daemon/strigithread.cpp b/strigidaemon/bin/daemon/strigithread.cpp
|
||||
index f2ddaed..ce87f70 100644
|
||||
--- a/strigidaemon/bin/daemon/strigithread.cpp
|
||||
+++ b/strigidaemon/bin/daemon/strigithread.cpp
|
||||
@@ -30,7 +30,6 @@
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/resource.h>
|
||||
-#include <sys/syscall.h>
|
||||
|
||||
// define two enums and a constant for use of ioprio
|
||||
enum {
|
||||
@@ -107,6 +106,7 @@ threadstarter(void *d) {
|
||||
param.sched_priority = 0;
|
||||
StrigiThread* thread = static_cast<StrigiThread*>(d);
|
||||
|
||||
+#ifndef __HAIKU__
|
||||
#ifndef __APPLE__
|
||||
if (thread->getPriority() > 0) {
|
||||
#ifndef SCHED_BATCH
|
||||
@@ -138,6 +138,7 @@ threadstarter(void *d) {
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
+#endif
|
||||
|
||||
// start the actual work
|
||||
thread->run(0);
|
||||
--
|
||||
1.8.3.4
|
||||
|
||||
@@ -1,40 +0,0 @@
|
||||
--- strigi-0.7.8-orig/strigidaemon/CMakeLists.txt 2013-01-25 17:49:35.005767168 +0000
|
||||
+++ strigi-0.7.8/strigidaemon/CMakeLists.txt 2013-02-13 00:55:35.019660800 +0000
|
||||
@@ -126,6 +126,6 @@
|
||||
DESTINATION ${LIB_DESTINATION}/cmake/LibSearchClient)
|
||||
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/dummy.cpp "")
|
||||
add_executable(strigidaemon dummy.cpp)
|
||||
-target_link_libraries(strigidaemon libstrigidaemon)
|
||||
+target_link_libraries(strigidaemon libstrigidaemon network)
|
||||
install(TARGETS strigidaemon
|
||||
RUNTIME DESTINATION bin)
|
||||
|
||||
--- strigi-0.7.8-orig/strigidaemon/bin/daemon/strigithread.cpp 2013-01-25 17:49:35.020971520 +0000
|
||||
+++ strigi-0.7.8/strigidaemon/bin/daemon/strigithread.cpp 2013-02-13 00:52:47.447741952 +0000
|
||||
@@ -30,7 +30,9 @@
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/resource.h>
|
||||
+#ifndef __HAIKU__
|
||||
#include <sys/syscall.h>
|
||||
+#endif
|
||||
|
||||
// define two enums and a constant for use of ioprio
|
||||
enum {
|
||||
@@ -108,6 +110,7 @@
|
||||
StrigiThread* thread = static_cast<StrigiThread*>(d);
|
||||
|
||||
#ifndef __APPLE__
|
||||
+#ifndef __HAIKU__
|
||||
if (thread->getPriority() > 0) {
|
||||
// renice the thread
|
||||
int r = setpriority(PRIO_PROCESS, 0, thread->getPriority());
|
||||
@@ -139,7 +142,7 @@
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
-
|
||||
+#endif
|
||||
// start the actual work
|
||||
thread->run(0);
|
||||
STRIGI_LOG_DEBUG(string("strigi.daemon.") + thread->name + ".threadstarter", "end of thread");
|
||||
106
app-misc/strigi/strigi-0.7.5.recipe
Normal file
106
app-misc/strigi/strigi-0.7.5.recipe
Normal file
@@ -0,0 +1,106 @@
|
||||
SUMMARY="Desktop search daemon."
|
||||
DESCRIPTION="Strigi is a desktop search daemon, which is operating \
|
||||
system-independent and desktop-independent. Strigi's goals are to be fast, \
|
||||
use a small amount of RAM, and use flexible backends and plug-ins. Like most \
|
||||
desktop search systems, Strigi can extract information from files, such as \
|
||||
the length of an audio clip, the contents of a document, or the resolution \
|
||||
of a picture; plugins determine what filetypes it is capable of handling."
|
||||
HOMEPAGE="http://strigi.sourceforge.net"
|
||||
SRC_URI="http://downloads.sourceforge.net/project/strigi/strigi/strigi-0.7.5.tar.bz2"
|
||||
CHECKSUM_SHA256="111f5e3ede171292302b906418af0175445ca01958d40fb54879f80620b5189b"
|
||||
REVISION="1"
|
||||
LICENSE="GNU LGPL v2.1"
|
||||
COPYRIGHT="2011 Jos van den Oever"
|
||||
ARCHITECTURES="x86"
|
||||
if [ $effectiveTargetArchitecture != x86_gcc2 ]; then
|
||||
# x86_gcc2 is fine as primary target architecture as long as we're building
|
||||
# for a different secondary architecture.
|
||||
ARCHITECTURES="$ARCHITECTURES x86_gcc2"
|
||||
fi
|
||||
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
PATCHES="strigi-0.7.5.patch"
|
||||
|
||||
PROVIDES="
|
||||
strigi${secondaryArchSuffix} = $portVersion
|
||||
lib:libstreamanalyzer$secondaryArchSuffix = $portVersion
|
||||
lib:libstreams$secondaryArchSuffix = $portVersion
|
||||
lib:libsearchclient$secondaryArchSuffix = $portVersion
|
||||
lib:libstrigihtmlgui$secondaryArchSuffix = $portVersion
|
||||
cmd:deepfind
|
||||
cmd:deepgrep
|
||||
cmd:rdfindexer
|
||||
cmd:strigicmd
|
||||
cmd:strigidaemon
|
||||
cmd:xmlindexer
|
||||
"
|
||||
|
||||
REQUIRES="
|
||||
haiku${secondaryArchSuffix} >= $haikuVersion
|
||||
lib:libz$secondaryArchSuffix
|
||||
lib:libbz2$secondaryArchSuffix
|
||||
lib:libiconv$secondaryArchSuffix
|
||||
lib:libxml2$secondaryArchSuffix
|
||||
cmd:perl
|
||||
"
|
||||
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:cmake
|
||||
cmd:pkg_config$secondaryArchSuffix
|
||||
cmd:perl
|
||||
cmd:make
|
||||
cmd:g++${secondaryArchSuffix}
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel >= $haikuVersion
|
||||
devel:libz$secondaryArchSuffix
|
||||
devel:libbz2$secondaryArchSuffix
|
||||
devel:libiconv$secondaryArchSuffix
|
||||
devel:libxml2$secondaryArchSuffix
|
||||
"
|
||||
|
||||
PROVIDES_devel="
|
||||
strigi${secondaryArchSuffix}_devel = $portVersion
|
||||
devel:libstreamanalyzer$secondaryArchSuffix = $portVersion
|
||||
devel:libstreams$secondaryArchSuffix = $portVersion
|
||||
devel:libsearchclient$secondaryArchSuffix = $portVersion
|
||||
devel:libstrigihtmlgui$secondaryArchSuffix = $portVersion
|
||||
"
|
||||
|
||||
REQUIRES_devel="
|
||||
haiku${secondaryArchSuffix}_devel >= $haikuVersion
|
||||
"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
cmake -DCMAKE_INSTALL_PREFIX=$prefix -DCMAKE_BUILD_TYPE=Release \
|
||||
-DENABLE_DBUS=off
|
||||
make $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
make install
|
||||
|
||||
# Clean up after CMake
|
||||
mkdir -p $includeDir
|
||||
mkdir -p $libDir
|
||||
|
||||
mkdir -p $developLibDir/pkgconfig/
|
||||
mv -f $prefix/lib/pkgconfig/* $developLibDir/pkgconfig/
|
||||
rm -rf $prefix/lib/pkgconfig/
|
||||
|
||||
mv -f $prefix/lib/*.so* $libDir
|
||||
cp -rf $prefix/include/* $includeDir/
|
||||
rm -rf $prefix/include/
|
||||
|
||||
prepareInstalledDevelLibs \
|
||||
libstreamanalyzer \
|
||||
libstreams \
|
||||
libsearchclient \
|
||||
libstrigihtmlgui
|
||||
packageEntries devel \
|
||||
$developDir
|
||||
}
|
||||
Reference in New Issue
Block a user