Create a real module kiwixbuild and make it installable. Split files.

Make kiwix-build installable using pip.
Module is now called `kiwixbuild` because `kiwix-build` is not a valid
python identifier.

Also split toolchains in separated directory.
This commit is contained in:
Matthieu Gautier
2018-03-27 16:03:33 +02:00
parent 1513204f42
commit 97666b0fc9
36 changed files with 459 additions and 368 deletions

View File

@ -1,30 +0,0 @@
#!/bin/sh
if test -z "$PATH_ORIG" ; then
PATH_ORIG="$PATH"; export PATH_ORIG;
fi;
PATH="{root_path}/bin:$PATH_ORIG"; export PATH;
HOST_CC=gcc; export HOST_CC;
unset PKG_CONFIG_PATH;
ccache=`which ccache`
CC={which:{binaries[c]}}
CXX={which:{binaries[cpp]}}
if [ "x$ccache" != "x" ] ; then
CC="ccache $CC"
CXX="ccache $CXX"
fi
export CC
export CXX
AR={which:{binaries[ar]}}; export AR
STRIP={which:{binaries[strip]}}; export STRIP
CFLAGS=" -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4"; export CFLAGS;
CXXFLAGS=" -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4"; export CXXFLAGS;
exec "$@"

View File

@ -1,7 +0,0 @@
SET(CMAKE_SYSTEM_NAME {host_machine[system]})
SET(CMAKE_ANDROID_STANDALONE_TOOLCHAIN {toolchain.builder.install_path})
SET(CMAKE_C_COMPILER "{toolchain.binaries[CC]}")
SET(CMAKE_CXX_COMPILER "{toolchain.binaries[CXX]}")
SET(CMAKE_FIND_ROOT_PATH {toolchain.root_path})

View File

@ -1,25 +0,0 @@
SET(CMAKE_SYSTEM_NAME {host_machine[system]})
SET(CMAKE_SYSTEM_PROCESSOR {host_machine[cpu_family]})
# specify the cross compiler
SET(CMAKE_C_COMPILER "{toolchain.binaries[CC]}")
SET(CMAKE_CXX_COMPILER "{toolchain.binaries[CXX]}")
SET(CMAKE_RC_COMPILER {toolchain.binaries[WINDRES]})
SET(CMAKE_AR:FILEPATH {toolchain.binaries[AR]})
SET(CMAKE_RANLIB:FILEPATH {toolchain.binaries[RANLIB]})
find_program(CCACHE_FOUND ccache)
if(CCACHE_FOUND)
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache)
endif(CCACHE_FOUND)
# where is the target environment
SET(CMAKE_FIND_ROOT_PATH {toolchain.root_path})
# search for programs in the build host directories
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
# for libraries and headers in the target directories
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)

View File

@ -1,19 +0,0 @@
[binaries]
pkgconfig = 'pkg-config'
c = '{toolchain.binaries[CC]}'
ar = '{toolchain.binaries[AR]}'
cpp = '{toolchain.binaries[CXX]}'
strip = '{toolchain.binaries[STRIP]}'
[properties]
c_link_args = {extra_libs!r}
cpp_link_args = {extra_libs!r}
c_args = {extra_cflags!r}
cpp_args = {extra_cflags!r}
android_abi = '{host_machine[abi]}'
[host_machine]
cpu_family = '{host_machine[cpu_family]}'
cpu = '{host_machine[cpu]}'
system = '{host_machine[lsystem]}'
endian = '{host_machine[endian]}'

View File

@ -1,20 +0,0 @@
[binaries]
pkgconfig = 'pkg-config'
c = '{toolchain.binaries[CC]}'
ar = '{toolchain.binaries[AR]}'
cpp = '{toolchain.binaries[CXX]}'
strip = '{toolchain.binaries[STRIP]}'
{toolchain.exec_wrapper_def}
[properties]
c_link_args = {extra_libs!r}
cpp_link_args = {extra_libs!r}
c_args = {extra_cflags!r}
cpp_args = {extra_cflags!r}
android_abi = '{host_machine[abi]}'
[host_machine]
cpu_family = '{host_machine[cpu_family]}'
cpu = '{host_machine[cpu]}'
system = '{host_machine[lsystem]}'
endian = '{host_machine[endian]}'