mirror of
https://github.com/simon987/sist2.git
synced 2025-04-10 05:56:46 +00:00
Build libmobi with cmake, update to 0.10
This commit is contained in:
parent
ceb7265639
commit
901035da15
3
.gitmodules
vendored
3
.gitmodules
vendored
@ -7,3 +7,6 @@
|
|||||||
[submodule "third-party/libscan/third-party/antiword"]
|
[submodule "third-party/libscan/third-party/antiword"]
|
||||||
path = third-party/libscan/third-party/antiword
|
path = third-party/libscan/third-party/antiword
|
||||||
url = https://github.com/simon987/antiword
|
url = https://github.com/simon987/antiword
|
||||||
|
[submodule "third-party/libscan/third-party/libmobi"]
|
||||||
|
path = third-party/libscan/third-party/libmobi
|
||||||
|
url = https://github.com/bfabiszewski/libmobi
|
||||||
|
2
sist2-vue/dist/js/index.js
vendored
2
sist2-vue/dist/js/index.js
vendored
File diff suppressed because one or more lines are too long
2
src/index/static_generated.c
vendored
2
src/index/static_generated.c
vendored
File diff suppressed because one or more lines are too long
@ -27,10 +27,6 @@
|
|||||||
|
|
||||||
#define UNUSED(x) __attribute__((__unused__)) x
|
#define UNUSED(x) __attribute__((__unused__)) x
|
||||||
|
|
||||||
#define MD5_STR_LENGTH 33
|
|
||||||
#define SHA1_STR_LENGTH 41
|
|
||||||
#define SHA1_DIGEST_LENGTH 20
|
|
||||||
|
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
|
2
src/web/static_generated.c
vendored
2
src/web/static_generated.c
vendored
File diff suppressed because one or more lines are too long
36
third-party/libscan/CMakeLists.txt
vendored
36
third-party/libscan/CMakeLists.txt
vendored
@ -7,6 +7,11 @@ option(BUILD_TESTS "Build tests" on)
|
|||||||
|
|
||||||
add_subdirectory(third-party/antiword)
|
add_subdirectory(third-party/antiword)
|
||||||
|
|
||||||
|
set(USE_LIBXML2 OFF)
|
||||||
|
set(USE_XMLWRITER OFF)
|
||||||
|
set(BUILD_SHARED_LIBS OFF)
|
||||||
|
add_subdirectory(third-party/libmobi)
|
||||||
|
|
||||||
add_library(
|
add_library(
|
||||||
scan
|
scan
|
||||||
libscan/util.c libscan/util.h
|
libscan/util.c libscan/util.h
|
||||||
@ -113,35 +118,15 @@ target_compile_options(
|
|||||||
-g
|
-g
|
||||||
)
|
)
|
||||||
|
|
||||||
include(ExternalProject)
|
|
||||||
find_program(MAKE_EXE NAMES gmake nmake make)
|
|
||||||
ExternalProject_Add(
|
|
||||||
libmobi
|
|
||||||
GIT_REPOSITORY https://github.com/simon987/libmobi.git
|
|
||||||
GIT_TAG "public"
|
|
||||||
|
|
||||||
UPDATE_COMMAND ""
|
|
||||||
PATCH_COMMAND ""
|
|
||||||
TEST_COMMAND ""
|
|
||||||
CONFIGURE_COMMAND ./autogen.sh && ./configure
|
|
||||||
INSTALL_COMMAND ""
|
|
||||||
|
|
||||||
PREFIX "third-party/ext_libmobi"
|
|
||||||
SOURCE_DIR "third-party/ext_libmobi/src/libmobi"
|
|
||||||
BINARY_DIR "third-party/ext_libmobi/src/libmobi"
|
|
||||||
|
|
||||||
BUILD_COMMAND ${MAKE_EXE} -j 8 --silent
|
|
||||||
)
|
|
||||||
|
|
||||||
SET(MOBI_LIB_DIR ${CMAKE_CURRENT_BINARY_DIR}/third-party/ext_libmobi/src/libmobi/src/.libs/)
|
|
||||||
SET(MOBI_INCLUDE_DIR ${CMAKE_CURRENT_BINARY_DIR}/third-party/ext_libmobi/src/libmobi/src/)
|
|
||||||
|
|
||||||
if (SIST_DEBUG)
|
if (SIST_DEBUG)
|
||||||
SET(FFMPEG_DEBUG "--enable-debug=3" "--disable-optimizations")
|
SET(FFMPEG_DEBUG "--enable-debug=3" "--disable-optimizations")
|
||||||
else()
|
else()
|
||||||
SET(FFMPEG_DEBUG "")
|
SET(FFMPEG_DEBUG "")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
include(ExternalProject)
|
||||||
|
find_program(MAKE_EXE NAMES gmake nmake make)
|
||||||
|
|
||||||
ExternalProject_Add(
|
ExternalProject_Add(
|
||||||
ffmpeg
|
ffmpeg
|
||||||
GIT_REPOSITORY https://git.ffmpeg.org/ffmpeg.git
|
GIT_REPOSITORY https://git.ffmpeg.org/ffmpeg.git
|
||||||
@ -187,10 +172,10 @@ SET(WPD_INCLUDE_DIR ${CMAKE_CURRENT_BINARY_DIR}/third-party/ext_libwpd/src/libwp
|
|||||||
|
|
||||||
add_dependencies(
|
add_dependencies(
|
||||||
scan
|
scan
|
||||||
libmobi
|
|
||||||
ffmpeg
|
ffmpeg
|
||||||
antiword
|
antiword
|
||||||
libwpd
|
libwpd
|
||||||
|
mobi
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(
|
target_link_libraries(
|
||||||
@ -208,8 +193,6 @@ target_link_libraries(
|
|||||||
${MUPDF_LIB}
|
${MUPDF_LIB}
|
||||||
openjp2
|
openjp2
|
||||||
|
|
||||||
${MOBI_LIB_DIR}/libmobi.a
|
|
||||||
|
|
||||||
${WPD_LIB_DIR}/libwpd-0.9.a
|
${WPD_LIB_DIR}/libwpd-0.9.a
|
||||||
${WPD_LIB_DIR}/libwpd-stream-0.9.a
|
${WPD_LIB_DIR}/libwpd-stream-0.9.a
|
||||||
|
|
||||||
@ -246,6 +229,7 @@ target_link_libraries(
|
|||||||
${GUMBO_LIB}
|
${GUMBO_LIB}
|
||||||
dl
|
dl
|
||||||
antiword
|
antiword
|
||||||
|
mobi
|
||||||
unofficial::pcre::pcre unofficial::pcre::pcre16 unofficial::pcre::pcre32 unofficial::pcre::pcrecpp
|
unofficial::pcre::pcre unofficial::pcre::pcre16 unofficial::pcre::pcre32 unofficial::pcre::pcrecpp
|
||||||
)
|
)
|
||||||
|
|
||||||
|
2
third-party/libscan/libscan/mobi/scan_mobi.c
vendored
2
third-party/libscan/libscan/mobi/scan_mobi.c
vendored
@ -1,6 +1,6 @@
|
|||||||
#include "scan_mobi.h"
|
#include "scan_mobi.h"
|
||||||
|
|
||||||
#include <mobi.h>
|
#include "../../third-party/libmobi/src/mobi.h"
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include "stdlib.h"
|
#include "stdlib.h"
|
||||||
|
|
||||||
|
1
third-party/libscan/libscan/scan.h
vendored
1
third-party/libscan/libscan/scan.h
vendored
@ -48,7 +48,6 @@ typedef int scan_code_t;
|
|||||||
#define CTX_LOG_FATALF(filepath, fmt, ...) ctx->logf(filepath, LEVEL_FATAL, fmt, __VA_ARGS__); exit(-1);
|
#define CTX_LOG_FATALF(filepath, fmt, ...) ctx->logf(filepath, LEVEL_FATAL, fmt, __VA_ARGS__); exit(-1);
|
||||||
#define CTX_LOG_FATAL(filepath, str) ctx->log(filepath, LEVEL_FATAL, str); exit(-1);
|
#define CTX_LOG_FATAL(filepath, str) ctx->log(filepath, LEVEL_FATAL, str); exit(-1);
|
||||||
|
|
||||||
#define MD5_STR_LENGTH 33
|
|
||||||
#define SIST_DOC_ID_LEN MD5_STR_LENGTH
|
#define SIST_DOC_ID_LEN MD5_STR_LENGTH
|
||||||
#define SIST_INDEX_ID_LEN MD5_STR_LENGTH
|
#define SIST_INDEX_ID_LEN MD5_STR_LENGTH
|
||||||
|
|
||||||
|
1
third-party/libscan/third-party/libmobi
vendored
Submodule
1
third-party/libscan/third-party/libmobi
vendored
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit 395dbde361a80353a9ed8b65d01d6066554142b3
|
Loading…
x
Reference in New Issue
Block a user