Remove ctpp2 dependency.
kiwix-lib doesn't use ctpp2 anymore but mustache. So remove ctpp2 dependency and add mustache.
This commit is contained in:
parent
c12988a811
commit
8005aff6c0
|
@ -50,6 +50,7 @@ build_script:
|
|||
- IF "%USE_CACHE%" NEQ "1" appveyor\install_icu.cmd
|
||||
- IF "%USE_CACHE%" NEQ "1" appveyor\install_pugixml.cmd
|
||||
- IF "%USE_CACHE%" NEQ "1" appveyor\install_aria2.cmd
|
||||
- IF "%USE_CACHE%" NEQ "1" appveyor\install_mustache.cmd
|
||||
- IF "%USE_CACHE%" NEQ "1" %MINGW64_RUN% "cd /c/projects/kiwix-build && appveyor/create_cache.sh"
|
||||
- appveyor\install_libzim.cmd
|
||||
- appveyor\install_kiwix-lib.cmd
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
REM ========================================================
|
||||
REM Install mustache.hpp
|
||||
curl -fsSL -o%EXTRA_DIR%\include\mustache.hpp https://raw.githubusercontent.com/kainjow/mustache/v3.2.1/mustache.hpp || exit /b 1
|
|
@ -6,12 +6,12 @@ from . import (
|
|||
android_sdk,
|
||||
aria2,
|
||||
armhf,
|
||||
ctpp2,
|
||||
flatpak,
|
||||
gradle,
|
||||
gumbo,
|
||||
icu4c,
|
||||
ios_fat_lib,
|
||||
mustache,
|
||||
kiwix_android,
|
||||
kiwix_custom_app,
|
||||
kiwix_desktop,
|
||||
|
|
|
@ -12,13 +12,13 @@ class AllBaseDependencies(Dependency):
|
|||
class Builder(NoopBuilder):
|
||||
@classmethod
|
||||
def get_dependencies(cls, platformInfo, allDeps):
|
||||
base_deps = ['zlib', 'lzma', 'xapian-core', 'pugixml', 'libcurl', 'icu4c']
|
||||
base_deps = ['zlib', 'lzma', 'xapian-core', 'pugixml', 'libcurl', 'icu4c', 'mustache']
|
||||
# zimwriterfs
|
||||
if platformInfo.build not in ('android', 'win32'):
|
||||
base_deps += ['libmagic', 'gumbo']
|
||||
# kiwix-tools
|
||||
if (platformInfo.build != 'android' and
|
||||
neutralEnv('distname') != 'Darwin'):
|
||||
base_deps += ['libmicrohttpd', 'ctpp2c', 'ctpp2']
|
||||
base_deps += ['libmicrohttpd']
|
||||
|
||||
return base_deps
|
||||
|
|
|
@ -1,54 +0,0 @@
|
|||
from .base import (
|
||||
Dependency,
|
||||
ReleaseDownload,
|
||||
CMakeBuilder)
|
||||
|
||||
from kiwixbuild.utils import Remotefile, pj, run_command
|
||||
|
||||
class CTPP2(Dependency):
|
||||
name = "ctpp2"
|
||||
|
||||
class Source(ReleaseDownload):
|
||||
name = "ctpp2"
|
||||
source_dir = "ctpp2-2.8.3"
|
||||
archive = Remotefile('ctpp2-2.8.3.tar.gz',
|
||||
'a83ffd07817adb575295ef40fbf759892512e5a63059c520f9062d9ab8fb42fc')
|
||||
patches = ["ctpp2_include.patch",
|
||||
"ctpp2_no_src_modification.patch",
|
||||
"ctpp2_fix-static-libname.patch",
|
||||
"ctpp2_mingw32.patch",
|
||||
"ctpp2_dll_export_VMExecutable.patch",
|
||||
"ctpp2_win_install_lib_in_lib_dir.patch",
|
||||
"ctpp2_iconv_support.patch",
|
||||
"ctpp2_compile_ctpp2c_static.patch",
|
||||
]
|
||||
|
||||
class Builder(CMakeBuilder):
|
||||
@property
|
||||
def configure_option(self):
|
||||
libprefix = self.buildEnv.libprefix
|
||||
options = "-DMD5_SUPPORT=OFF -DICONV_SUPPORT=OFF"
|
||||
if libprefix.startswith('lib'):
|
||||
libprefix = libprefix[3:]
|
||||
options += " -DLIB_SUFFIX={}".format(libprefix)
|
||||
return options
|
||||
|
||||
|
||||
class CTPP2C(CTPP2):
|
||||
name = "ctpp2c"
|
||||
force_native_build = True
|
||||
|
||||
class Builder(CTPP2.Builder):
|
||||
make_target = "ctpp2c"
|
||||
|
||||
@property
|
||||
def build_path(self):
|
||||
return super().build_path+"_native"
|
||||
|
||||
def _install(self, context):
|
||||
context.try_skip(self.build_path)
|
||||
command = "cp {ctpp2c}* {install_dir}".format(
|
||||
ctpp2c=pj(self.build_path, 'ctpp2c'),
|
||||
install_dir=pj(self.buildEnv.install_dir, 'bin')
|
||||
)
|
||||
run_command(command, self.build_path, context, buildEnv=self.buildEnv)
|
|
@ -12,23 +12,13 @@ class Kiwixlib(Dependency):
|
|||
git_dir = "kiwix-lib"
|
||||
|
||||
class Builder(MesonBuilder):
|
||||
@classmethod
|
||||
def get_dependencies(cls, platformInfo, allDeps):
|
||||
base_dependencies = ["pugixml", "libzim", "zlib", "lzma", "libcurl", "icu4c"]
|
||||
if (platformInfo.build != 'android' and
|
||||
neutralEnv('distname') != 'Darwin'):
|
||||
base_dependencies += ['ctpp2c', 'ctpp2']
|
||||
return base_dependencies
|
||||
|
||||
dependencies = ["pugixml", "libzim", "zlib", "lzma", "libcurl", "icu4c", "mustache"]
|
||||
|
||||
@property
|
||||
def configure_option(self):
|
||||
if self.buildEnv.platformInfo.build == 'flatpak':
|
||||
return ""
|
||||
base_option = "-Dctpp2-install-prefix={buildEnv.install_dir}"
|
||||
if self.buildEnv.platformInfo.build == 'android':
|
||||
base_option += ' -Dandroid=true'
|
||||
return base_option
|
||||
return '-Dandroid=true'
|
||||
return ''
|
||||
|
||||
@property
|
||||
def library_type(self):
|
||||
|
|
|
@ -0,0 +1,26 @@
|
|||
from .base import (
|
||||
Dependency,
|
||||
ReleaseDownload,
|
||||
Builder as BaseBuilder)
|
||||
|
||||
from kiwixbuild.utils import Remotefile, pj
|
||||
from shutil import copy2
|
||||
|
||||
class Mustache(Dependency):
|
||||
name = "mustache"
|
||||
|
||||
class Source(ReleaseDownload):
|
||||
archive = Remotefile('Mustache-3.2.1.tar.gz',
|
||||
'0d17298a81c08f12ebc446cdee387268a395d34bb724050fe67d5ce8c4e98b7a',
|
||||
'https://github.com/kainjow/Mustache/archive/v3.2.1.tar.gz')
|
||||
patches = ['mustache_virtual_destructor.patch']
|
||||
|
||||
class Builder(BaseBuilder):
|
||||
def build(self):
|
||||
self.command('copy_header', self._copy_header)
|
||||
|
||||
def _copy_header(self, context):
|
||||
context.try_skip(self.build_path)
|
||||
copy2(pj(self.source_path, 'mustache.hpp'),
|
||||
pj(self.buildEnv.install_dir, 'include'))
|
||||
|
|
@ -9,8 +9,6 @@ PACKAGE_NAME_MAPPERS = {
|
|||
'icu4c': True,
|
||||
'qt': True,
|
||||
'qtwebengine': True,
|
||||
'ctpp2': True,
|
||||
'ctpp2c': True,
|
||||
'uuid': True,
|
||||
'libxml2': True,
|
||||
'libssl': True,
|
||||
|
@ -20,7 +18,6 @@ PACKAGE_NAME_MAPPERS = {
|
|||
'COMMON': _fedora_common,
|
||||
'uuid': ['libuuid-devel'],
|
||||
'xapian-core': None, # Not the right version on fedora 25
|
||||
'ctpp2': None,
|
||||
'pugixml': None, # ['pugixml-devel'] but package doesn't provide pkg-config file
|
||||
'libmicrohttpd': ['libmicrohttpd-devel'],
|
||||
'zlib': ['zlib-devel'],
|
||||
|
@ -69,8 +66,6 @@ PACKAGE_NAME_MAPPERS = {
|
|||
'COMMON': _debian_common + ['libbz2-dev', 'libmagic-dev'],
|
||||
'zlib': ['zlib1g-dev'],
|
||||
'uuid': ['uuid-dev'],
|
||||
'ctpp2': ['libctpp2-dev'],
|
||||
'ctpp2c': ['ctpp2-utils'],
|
||||
'libmicrohttpd': ['libmicrohttpd-dev', 'ccache'],
|
||||
'qt' : ['libqt5gui5', 'qtbase5-dev', 'qt5-default'],
|
||||
'qtwebengine' : ['qtwebengine5-dev'],
|
||||
|
@ -80,8 +75,6 @@ PACKAGE_NAME_MAPPERS = {
|
|||
'COMMON': _debian_common + ['libbz2-dev', 'libmagic-dev'],
|
||||
'zlib': ['zlib1g-dev'],
|
||||
'uuid': ['uuid-dev'],
|
||||
'ctpp2': ['libctpp2-dev'],
|
||||
'ctpp2c': ['ctpp2-utils'],
|
||||
},
|
||||
'debian_i586_dyn': {
|
||||
'COMMON': _debian_common + ['libc6-dev:i386', 'libstdc++-6-dev:i386', 'gcc-multilib', 'g++-multilib'],
|
||||
|
@ -91,23 +84,18 @@ PACKAGE_NAME_MAPPERS = {
|
|||
},
|
||||
'debian_win32_dyn': {
|
||||
'COMMON': _debian_common + ['g++-mingw-w64-i686', 'gcc-mingw-w64-i686', 'gcc-mingw-w64-base', 'mingw-w64-tools'],
|
||||
'ctpp2c': ['ctpp2-utils'],
|
||||
},
|
||||
'debian_win32_static': {
|
||||
'COMMON': _debian_common + ['g++-mingw-w64-i686', 'gcc-mingw-w64-i686', 'gcc-mingw-w64-base', 'mingw-w64-tools'],
|
||||
'ctpp2c': ['ctpp2-utils'],
|
||||
},
|
||||
'debian_armhf_static': {
|
||||
'COMMON': _debian_common,
|
||||
'ctpp2c': ['ctpp2-utils'],
|
||||
},
|
||||
'debian_armhf_dyn': {
|
||||
'COMMON': _debian_common,
|
||||
'ctpp2c': ['ctpp2-utils'],
|
||||
},
|
||||
'debian_android': {
|
||||
'COMMON': _debian_common + ['default-jdk'],
|
||||
'ctpp2c': ['ctpp2-utils'],
|
||||
},
|
||||
'Darwin_native_dyn': {
|
||||
'COMMON': ['autoconf', 'automake', 'libtool', 'cmake', 'pkg-config'],
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
34a35,39
|
||||
> #ifdef _WIN32
|
||||
> #include <Windows.h>
|
||||
> #else
|
||||
> #include <unistd.h>
|
||||
> #endif
|
|
@ -1,37 +0,0 @@
|
|||
diff -u ctpp2-2.8.3/CMakeLists.txt ctpp2-2.8.3-static/CMakeLists.txt
|
||||
--- ctpp2-2.8.3/CMakeLists.txt 2017-07-12 11:53:28.656535071 +0200
|
||||
+++ ctpp2-2.8.3-static/CMakeLists.txt 2017-07-12 11:52:15.358692988 +0200
|
||||
@@ -464,7 +464,8 @@
|
||||
|
||||
# CTPP Compiler
|
||||
ADD_EXECUTABLE(ctpp2c tests/CTPP2Compiler.cpp)
|
||||
-TARGET_LINK_LIBRARIES(ctpp2c ctpp2)
|
||||
+TARGET_LINK_LIBRARIES(ctpp2c ctpp2-static)
|
||||
+TARGET_LINK_LIBRARIES(ctpp2c "-static")
|
||||
|
||||
# CTPP2 Interpreter
|
||||
ADD_EXECUTABLE(ctpp2i tests/CTPP2Interpreter.cpp)
|
||||
@@ -794,7 +795,6 @@
|
||||
DESTINATION .)
|
||||
|
||||
INSTALL(TARGETS ctpp2vm
|
||||
- ctpp2c
|
||||
ctpp2i
|
||||
ctpp2json
|
||||
DESTINATION .)
|
||||
@@ -806,7 +806,6 @@
|
||||
# Install Manpages
|
||||
INSTALL(FILES
|
||||
man/ctpp2-config.1
|
||||
- man/ctpp2c.1
|
||||
man/ctpp2i.1
|
||||
man/ctpp2json.1
|
||||
man/ctpp2vm.1
|
||||
@@ -904,7 +903,6 @@
|
||||
|
||||
# Install binaries
|
||||
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/ctpp2vm
|
||||
- ${CMAKE_CURRENT_BINARY_DIR}/ctpp2c
|
||||
${CMAKE_CURRENT_BINARY_DIR}/ctpp2i
|
||||
${CMAKE_CURRENT_BINARY_DIR}/ctpp2json
|
||||
${CMAKE_CURRENT_BINARY_DIR}/ctpp2-config
|
|
@ -1,12 +0,0 @@
|
|||
diff -ur ctpp2-2.8.3/include/CTPP2VMExecutable.hpp ctpp2-2.8.3.patched/include/CTPP2VMExecutable.hpp
|
||||
--- ctpp2-2.8.3/include/CTPP2VMExecutable.hpp 2012-08-02 09:22:44.000000000 +0200
|
||||
+++ ctpp2-2.8.3.patched/include/CTPP2VMExecutable.hpp 2017-01-17 11:47:08.332691919 +0100
|
||||
@@ -52,7 +52,7 @@
|
||||
@struct VMExecutable CTPP2VMExecutable.hpp <CTPP2VMExecutable.hpp>
|
||||
@brief CTPP Executable file
|
||||
*/
|
||||
-struct VMExecutable
|
||||
+struct CTPP2DECL VMExecutable
|
||||
{
|
||||
/** CTPP magic number */
|
||||
UCHAR_8 magic[4]; // 'CTPP' xor 0xFFFFFFFF
|
|
@ -1,29 +0,0 @@
|
|||
Description: Fix the name of static library
|
||||
Upstream named the static library in unusual way this patch names the
|
||||
static library in simpler way which suits Debian infrastructure.
|
||||
Author: Vasudev Kamath <kamathvasudev@gmail.com>
|
||||
Forwarded: no
|
||||
Last-Update: 2012-12-19
|
||||
|
||||
--- a/ctpp2.spec
|
||||
+++ b/ctpp2.spec
|
||||
@@ -60,7 +60,7 @@
|
||||
%files devel
|
||||
%defattr(-,root,root,-)
|
||||
%{_includedir}/ctpp2
|
||||
-%{_libdir}/libctpp2-st.a
|
||||
+%{_libdir}/libctpp2.a
|
||||
|
||||
%changelog
|
||||
* Sat Nov 10 2012 Alexander Pankov <pianist@usrsrc.ru> - 2.8.3-0
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -426,7 +426,7 @@
|
||||
# Lib binary
|
||||
#
|
||||
ADD_LIBRARY(ctpp2-static STATIC ${LIBSRCS})
|
||||
-SET_TARGET_PROPERTIES(ctpp2-static PROPERTIES OUTPUT_NAME ctpp2-st)
|
||||
+SET_TARGET_PROPERTIES(ctpp2-static PROPERTIES OUTPUT_NAME ctpp2)
|
||||
SET_TARGET_PROPERTIES(ctpp2-static PROPERTIES LINKER_LANGUAGE CXX)
|
||||
|
||||
ADD_LIBRARY(ctpp2 SHARED ${LIBSRCS})
|
|
@ -1,20 +0,0 @@
|
|||
diff -ur ctpp2-2.8.3/src/CTPP2StringIconvOutputCollector.cpp ctpp2-2.8.3.iconv/src/CTPP2StringIconvOutputCollector.cpp
|
||||
--- ctpp2-2.8.3/src/CTPP2StringIconvOutputCollector.cpp 2017-02-07 10:42:40.567806420 +0100
|
||||
+++ ctpp2-2.8.3.iconv/src/CTPP2StringIconvOutputCollector.cpp 2017-01-30 15:22:19.734186564 +0100
|
||||
@@ -38,6 +38,8 @@
|
||||
namespace CTPP // C++ Template Engine
|
||||
{
|
||||
|
||||
+
|
||||
+#ifdef ICONV_SUPPORT
|
||||
//
|
||||
// Constructor
|
||||
//
|
||||
@@ -114,5 +116,7 @@
|
||||
return 0;
|
||||
}
|
||||
|
||||
+#endif //ICONV_SUPPORT
|
||||
+
|
||||
} // namespace CTPP
|
||||
// End.
|
|
@ -1,53 +0,0 @@
|
|||
Seulement dans ctpp2-2.8.3.patched/: BitIndexTest
|
||||
Seulement dans ctpp2-2.8.3.patched/: CDT2JSONBenchmark
|
||||
Seulement dans ctpp2-2.8.3.patched/: CDTPerfTest
|
||||
Seulement dans ctpp2-2.8.3.patched/: CDTTest
|
||||
Seulement dans ctpp2-2.8.3.patched/: CMakeCache.txt
|
||||
Seulement dans ctpp2-2.8.3.patched/: CMakeFiles
|
||||
Seulement dans ctpp2-2.8.3.patched/: cmake_install.cmake
|
||||
Seulement dans ctpp2-2.8.3.patched/: cmd_compile_ctpp2.log
|
||||
Seulement dans ctpp2-2.8.3.patched/: cmd_configure_ctpp2.log
|
||||
Seulement dans ctpp2-2.8.3.patched/: cmd_install_ctpp2.log
|
||||
Seulement dans ctpp2-2.8.3.patched/: cmd_patch_ctpp2.log
|
||||
Seulement dans ctpp2-2.8.3.patched/: .compile_ok
|
||||
Seulement dans ctpp2-2.8.3.patched/: .configure_ok
|
||||
Seulement dans ctpp2-2.8.3.patched/: CTestTestfile.cmake
|
||||
Seulement dans ctpp2-2.8.3.patched/: ctpp2c
|
||||
Seulement dans ctpp2-2.8.3.patched/: ctpp2-config
|
||||
Seulement dans ctpp2-2.8.3.patched/: CTPP2DTOATest
|
||||
Seulement dans ctpp2-2.8.3.patched/: ctpp2i
|
||||
Seulement dans ctpp2-2.8.3.patched/: ctpp2json
|
||||
Seulement dans ctpp2-2.8.3.patched/: ctpp2vm
|
||||
Seulement dans ctpp2-2.8.3.patched/: CTPP2VMTest
|
||||
Seulement dans ctpp2-2.8.3.patched/: .extract_ok
|
||||
Seulement dans ctpp2-2.8.3.patched/: HashTest
|
||||
diff -ru ctpp2-2.8.3/include/CTPP2SourceLoader.hpp ctpp2-2.8.3.patched/include/CTPP2SourceLoader.hpp
|
||||
--- ctpp2-2.8.3/include/CTPP2SourceLoader.hpp 2012-08-02 09:22:44.000000000 +0200
|
||||
+++ ctpp2-2.8.3.patched/include/CTPP2SourceLoader.hpp 2016-12-09 14:26:49.965635367 +0100
|
||||
@@ -32,6 +32,11 @@
|
||||
#ifndef _CTPP2_SOURCE_LOADER_HPP__
|
||||
#define _CTPP2_SOURCE_LOADER_HPP__ 1
|
||||
|
||||
+#ifdef _WIN32
|
||||
+#include <Windows.h>
|
||||
+#else
|
||||
+ #include <unistd.h>
|
||||
+#endif
|
||||
#include "CTPP2Types.h"
|
||||
|
||||
/**
|
||||
Seulement dans ctpp2-2.8.3.patched/include: CTPP2SysHeaders.h
|
||||
Seulement dans ctpp2-2.8.3.patched/: install_manifest.txt
|
||||
Seulement dans ctpp2-2.8.3.patched/: .install_ok
|
||||
Seulement dans ctpp2-2.8.3.patched/: libctpp2.so
|
||||
Seulement dans ctpp2-2.8.3.patched/: libctpp2.so.2
|
||||
Seulement dans ctpp2-2.8.3.patched/: libctpp2.so.2.8.3
|
||||
Seulement dans ctpp2-2.8.3.patched/: libctpp2-st.a
|
||||
Seulement dans ctpp2-2.8.3.patched/: Makefile
|
||||
Seulement dans ctpp2-2.8.3.patched/: .patch_ok
|
||||
Seulement dans ctpp2-2.8.3.patched/: simple-compiler
|
||||
Seulement dans ctpp2-2.8.3.patched/: simple-vm
|
||||
Seulement dans ctpp2-2.8.3.patched/: StaticTextTest
|
||||
Seulement dans ctpp2-2.8.3.patched/: template_language.html
|
||||
Seulement dans ctpp2-2.8.3.patched/: VMArgStackTest
|
||||
Seulement dans ctpp2-2.8.3.patched/: VMCodeStackTest
|
|
@ -1,109 +0,0 @@
|
|||
diff -ur ctpp2-2.8.3/include/CTPP2SourceLoader.hpp ctpp2-2.8.3.patched/include/CTPP2SourceLoader.hpp
|
||||
--- ctpp2-2.8.3/include/CTPP2SourceLoader.hpp 2017-01-09 17:00:57.542353340 +0100
|
||||
+++ ctpp2-2.8.3.patched/include/CTPP2SourceLoader.hpp 2017-01-09 16:54:04.467316656 +0100
|
||||
@@ -33,7 +33,7 @@
|
||||
#define _CTPP2_SOURCE_LOADER_HPP__ 1
|
||||
|
||||
#ifdef _WIN32
|
||||
-#include <Windows.h>
|
||||
+#include <windows.h>
|
||||
#else
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
diff -ur ctpp2-2.8.3/src/CTPP2DTOA.cpp ctpp2-2.8.3.patched/src/CTPP2DTOA.cpp
|
||||
--- ctpp2-2.8.3/src/CTPP2DTOA.cpp 2012-11-11 00:50:01.000000000 +0100
|
||||
+++ ctpp2-2.8.3.patched/src/CTPP2DTOA.cpp 2017-01-09 16:53:13.184181977 +0100
|
||||
@@ -158,8 +158,8 @@
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
|
||||
-#ifdef _MSC_VER
|
||||
- #include <WinSock2.h>
|
||||
+#if defined(_MSC_VER) || defined(__MINGW32__)
|
||||
+ #include <winsock2.h>
|
||||
#ifndef BIG_ENDIAN
|
||||
#define BIG_ENDIAN BIGENDIAN
|
||||
#endif
|
||||
diff -ur ctpp2-2.8.3/src/CTPP2StringIconvOutputCollector.cpp ctpp2-2.8.3.patched/src/CTPP2StringIconvOutputCollector.cpp
|
||||
--- ctpp2-2.8.3/src/CTPP2StringIconvOutputCollector.cpp 2012-08-02 09:22:44.000000000 +0200
|
||||
+++ ctpp2-2.8.3.patched/src/CTPP2StringIconvOutputCollector.cpp 2017-01-09 16:56:11.162179732 +0100
|
||||
@@ -85,7 +85,7 @@
|
||||
size_t iDstLength = CTPP_ESCAPE_BUFFER_LEN;
|
||||
|
||||
char aDstData[CTPP_ESCAPE_BUFFER_LEN];
|
||||
-#if defined(linux) || defined(__APPLE__)
|
||||
+#if defined(linux) || defined(__APPLE__) || defined(__MINGW32__)
|
||||
char * aSrcData = (char *)vData;
|
||||
#else
|
||||
const char * aSrcData = (const char *)vData;
|
||||
diff -ur ctpp2-2.8.3/src/functions/FnHostname.cpp ctpp2-2.8.3.patched/src/functions/FnHostname.cpp
|
||||
--- ctpp2-2.8.3/src/functions/FnHostname.cpp 2012-11-10 21:40:36.000000000 +0100
|
||||
+++ ctpp2-2.8.3.patched/src/functions/FnHostname.cpp 2017-01-09 16:58:53.987435623 +0100
|
||||
@@ -34,8 +34,8 @@
|
||||
#include "CTPP2Logger.hpp"
|
||||
#include "FnHostname.hpp"
|
||||
|
||||
-#ifdef _MSC_VER
|
||||
-#include <Winsock2.h>
|
||||
+#if defined(_MSC_VER) || defined(__MINGW32__)
|
||||
+#include <winsock2.h>
|
||||
#else
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
diff -ur ctpp2-2.8.3/src/functions/FnIconv.cpp ctpp2-2.8.3.patched/src/functions/FnIconv.cpp
|
||||
--- ctpp2-2.8.3/src/functions/FnIconv.cpp 2012-08-02 09:22:44.000000000 +0200
|
||||
+++ ctpp2-2.8.3.patched/src/functions/FnIconv.cpp 2017-01-09 16:58:28.948857601 +0100
|
||||
@@ -173,7 +173,7 @@
|
||||
size_t iDstLength = CTPP_ESCAPE_BUFFER_LEN;
|
||||
|
||||
char aDstData[CTPP_ESCAPE_BUFFER_LEN];
|
||||
-#if defined(linux) || defined(__APPLE__)
|
||||
+#if defined(linux) || defined(__APPLE__) || defined(__MINGW32__)
|
||||
char * aSrcData = (char *)sWhat.data();
|
||||
#else
|
||||
const char * aSrcData = (const char *)sWhat.data();
|
||||
diff -ur ctpp2-2.8.3/src/functions/FnRandom.cpp ctpp2-2.8.3.patched/src/functions/FnRandom.cpp
|
||||
--- ctpp2-2.8.3/src/functions/FnRandom.cpp 2012-11-10 21:36:30.000000000 +0100
|
||||
+++ ctpp2-2.8.3.patched/src/functions/FnRandom.cpp 2017-01-09 16:59:59.879325141 +0100
|
||||
@@ -37,7 +37,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <time.h>
|
||||
|
||||
-#ifdef _MSC_VER
|
||||
+#if defined(_MSC_VER) || defined(__MINGW32__)
|
||||
#define random() rand()
|
||||
#define INT_64(x) (INT_64)(x)
|
||||
#define srandomdev() srand( (unsigned)time(NULL) );
|
||||
@@ -51,7 +51,7 @@
|
||||
//
|
||||
FnRandom::FnRandom()
|
||||
{
|
||||
-#if defined(__FreeBSD__) || defined(_MSC_VER)
|
||||
+#if defined(__FreeBSD__) || defined(_MSC_VER) || defined(__MINGW32__)
|
||||
srandomdev();
|
||||
#else
|
||||
srandom(time(NULL));
|
||||
diff -ur ctpp2-2.8.3/include/CTPP2GlobalDefines.h ctpp2-2.8.3.patche/include/CTPP2GlobalDefines.h
|
||||
--- ctpp2-2.8.3/include/CTPP2GlobalDefines.h 2012-08-02 09:22:44.000000000 +0200
|
||||
+++ ctpp2-2.8.3.patched/include/CTPP2GlobalDefines.h 2017-04-24 10:59:54.236256866 +0200
|
||||
@@ -92,7 +92,7 @@
|
||||
/*
|
||||
* Header files
|
||||
*/
|
||||
-#ifndef WIN32
|
||||
+#if !defined(WIN32) && !defined(__MINGW32__)
|
||||
|
||||
#ifndef HAVE_SYS_TIME_H
|
||||
#error "Cannot find header file `sys/time.h'"
|
||||
diff -ur ctpp2-2.8.3/include/CTPP2SysTypes.h ctpp2-2.8.3.patche/include/CTPP2SysTypes.h
|
||||
--- ctpp2-2.8.3/include/CTPP2SysTypes.h 2012-08-02 09:22:44.000000000 +0200
|
||||
+++ ctpp2-2.8.3.patched/include/CTPP2SysTypes.h 2017-04-24 11:00:42.284545293 +0200
|
||||
@@ -227,7 +227,7 @@
|
||||
typedef UCCHAR_8 * UCCHAR_P;
|
||||
|
||||
|
||||
-#elif WIN32 /* FreeBSD End, start of Win32 declarations */
|
||||
+#elif WIN32 || __MINGW32__ /* FreeBSD End, start of Win32 declarations */
|
||||
|
||||
/**
|
||||
@var typedef __int16 INT_16
|
|
@ -1,40 +0,0 @@
|
|||
diff -ru ctpp2-2.8.3.orig/CMakeLists.txt ctpp2-2.8.3/CMakeLists.txt
|
||||
--- ctpp2-2.8.3.orig/CMakeLists.txt 2012-11-10 21:45:57.000000000 +0100
|
||||
+++ ctpp2-2.8.3/CMakeLists.txt 2017-01-09 13:40:09.952086862 +0100
|
||||
@@ -343,7 +343,8 @@
|
||||
# ################################################################################
|
||||
# Sources
|
||||
#
|
||||
-CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/CTPP2SysHeaders.h.cmake ${CMAKE_CURRENT_SOURCE_DIR}/include/CTPP2SysHeaders.h)
|
||||
+CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/CTPP2SysHeaders.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/CTPP2SysHeaders.h)
|
||||
+include_directories("${CMAKE_CURRENT_BINARY_DIR}")
|
||||
#
|
||||
SET(LIBSRCS
|
||||
src/CDT.cpp
|
||||
@@ -704,7 +705,7 @@
|
||||
include/CTPP2StringOutputCollector.hpp
|
||||
include/CTPP2SymbolTable.hpp
|
||||
include/CTPP2Syntax.h
|
||||
- include/CTPP2SysHeaders.h
|
||||
+ ${CMAKE_CURRENT_BINARY_DIR}/CTPP2SysHeaders.h
|
||||
include/CTPP2SysTypes.h
|
||||
include/CTPP2SyscallFactory.hpp
|
||||
include/CTPP2Types.h
|
||||
@@ -899,14 +900,14 @@
|
||||
")
|
||||
|
||||
# Write file
|
||||
- FILE(WRITE ctpp2-config ${CTPP_COMPILER_HELPER})
|
||||
+ FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/ctpp2-config ${CTPP_COMPILER_HELPER})
|
||||
|
||||
# Install binaries
|
||||
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/ctpp2vm
|
||||
${CMAKE_CURRENT_BINARY_DIR}/ctpp2c
|
||||
${CMAKE_CURRENT_BINARY_DIR}/ctpp2i
|
||||
${CMAKE_CURRENT_BINARY_DIR}/ctpp2json
|
||||
- ctpp2-config
|
||||
+ ${CMAKE_CURRENT_BINARY_DIR}/ctpp2-config
|
||||
DESTINATION bin
|
||||
PERMISSIONS OWNER_EXECUTE OWNER_READ OWNER_WRITE
|
||||
GROUP_EXECUTE GROUP_READ
|
||||
Seulement dans ctpp2-2.8.3.orig/include: CTPP2SysHeaders.h
|
|
@ -1,12 +0,0 @@
|
|||
diff -ur ctpp2-2.8.3/CMakeLists.txt ctpp2-2.8.3.patched/CMakeLists.txt
|
||||
--- ctpp2-2.8.3/CMakeLists.txt 2017-01-17 10:09:06.259494234 +0100
|
||||
+++ ctpp2-2.8.3.patched/CMakeLists.txt 2017-01-17 11:48:18.427522886 +0100
|
||||
@@ -785,7 +785,7 @@
|
||||
|
||||
INSTALL(TARGETS ctpp2-static DESTINATION lib${LIB_SUFFIX})
|
||||
|
||||
- INSTALL(TARGETS ctpp2 DESTINATION .)
|
||||
+ INSTALL(TARGETS ctpp2 DESTINATION lib${LIB_SUFFIX})
|
||||
|
||||
FILE(WRITE ctpp2-config.cmd ${CTPP_COMPILER_HELPER})
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
diff -u mustache/mustache.hpp mustache.patched/mustache.hpp
|
||||
--- mustache/mustache.hpp 2018-07-23 05:13:12.000000000 +0200
|
||||
+++ mustache.patched/mustache.hpp 2019-01-07 18:08:24.601917507 +0100
|
||||
@@ -423,6 +423,7 @@
|
||||
template <typename string_type>
|
||||
class basic_context {
|
||||
public:
|
||||
+ virtual ~basic_context() = default;
|
||||
virtual void push(const basic_data<string_type>* data) = 0;
|
||||
virtual void pop() = 0;
|
||||
|
|
@ -35,7 +35,7 @@ release_versions = {
|
|||
|
||||
# This is the "version" of the whole base_deps_versions dict.
|
||||
# Change this when you change base_deps_versions.
|
||||
base_deps_meta_version = '12'
|
||||
base_deps_meta_version = '13'
|
||||
|
||||
|
||||
base_deps_versions = {
|
||||
|
@ -43,7 +43,7 @@ base_deps_versions = {
|
|||
'lzma' : '5.2.3',
|
||||
'uuid' : '1.43.4',
|
||||
'xapian-core' : '1.4.7',
|
||||
'ctpp2' : '2.8.3',
|
||||
'mustache' : '3.2',
|
||||
'pugixml' : '1.2',
|
||||
'libmicrohttpd' : '0.9.46',
|
||||
'gumbo' : '0.10.1',
|
||||
|
|
|
@ -30,8 +30,6 @@ RUN \
|
|||
libmagic-dev \
|
||||
zlib1g-dev \
|
||||
uuid-dev \
|
||||
ctpp2-utils \
|
||||
libctpp2-dev \
|
||||
libmicrohttpd-dev \
|
||||
aria2 \
|
||||
# Qt packages
|
||||
|
|
Loading…
Reference in New Issue