rspamd: fix cross build.
This commit is contained in:
parent
3189bf12fb
commit
f0d0c31ae1
2 changed files with 43 additions and 3 deletions
21
srcpkgs/rspamd/files/TryRunResults.cmake
Normal file
21
srcpkgs/rspamd/files/TryRunResults.cmake
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
# This file was generated by CMake because it detected TRY_RUN() commands
|
||||||
|
# in crosscompiling mode. It will be overwritten by the next CMake run.
|
||||||
|
# Copy it to a safe location, set the variables to appropriate values
|
||||||
|
# and use it then to preset the CMake cache (using -C).
|
||||||
|
|
||||||
|
|
||||||
|
# _CAN_RUN
|
||||||
|
# indicates whether the executable would have been able to run on its
|
||||||
|
# target platform. If so, set _CAN_RUN to
|
||||||
|
# the exit code (in many cases 0 for success), otherwise enter "FAILED_TO_RUN".
|
||||||
|
# The _CAN_COMPILE variable holds the build result for this TRY_RUN().
|
||||||
|
#
|
||||||
|
# Source file : /builddir/rspamd-0.9.9/build/pthread_setpshared.c
|
||||||
|
# Executable : /builddir/rspamd-0.9.9/build/CMakeFiles/cmTryCompileExec2709940551-_CAN_RUN
|
||||||
|
# Run arguments :
|
||||||
|
# Called from: [1] /builddir/rspamd-0.9.9/CMakeLists.txt
|
||||||
|
|
||||||
|
set( _CAN_RUN
|
||||||
|
"0"
|
||||||
|
CACHE STRING "Result from TRY_RUN" FORCE)
|
||||||
|
|
|
@ -1,14 +1,17 @@
|
||||||
# Template file for 'rspamd'
|
# Template file for 'rspamd'
|
||||||
pkgname=rspamd
|
pkgname=rspamd
|
||||||
version=0.9.9
|
version=0.9.9
|
||||||
revision=1
|
revision=2
|
||||||
build_style=cmake
|
build_style=cmake
|
||||||
configure_args="-DRSPAMD_USER=rspamd \
|
configure_args="
|
||||||
-DRSPAMD_GROUP=rspamd \
|
-DRSPAMD_USER=rspamd \
|
||||||
-DCONFDIR=/etc/rspamd
|
-DCONFDIR=/etc/rspamd
|
||||||
-DDBDIR=/var/lib/rspamd"
|
-DDBDIR=/var/lib/rspamd"
|
||||||
hostmakedepends="cmake pkg-config"
|
hostmakedepends="cmake pkg-config"
|
||||||
makedepends="LuaJIT-devel glib-devel libressl-devel gmime-devel libevent-devel sqlite-devel hiredis-devel"
|
makedepends="LuaJIT-devel glib-devel libressl-devel gmime-devel libevent-devel sqlite-devel hiredis-devel"
|
||||||
|
if [ "$CROSS_BUILD" ]; then
|
||||||
|
hostmakedepends+=" $makedepends"
|
||||||
|
fi
|
||||||
short_desc="Fast, free and open-source spam filtering system"
|
short_desc="Fast, free and open-source spam filtering system"
|
||||||
maintainer="Enno Boland <gottox@voidlinux.eu>"
|
maintainer="Enno Boland <gottox@voidlinux.eu>"
|
||||||
license="BSD"
|
license="BSD"
|
||||||
|
@ -38,6 +41,22 @@ conf_files="
|
||||||
/etc/rspamd/worker-controller.inc
|
/etc/rspamd/worker-controller.inc
|
||||||
/etc/rspamd/worker-normal.inc"
|
/etc/rspamd/worker-normal.inc"
|
||||||
|
|
||||||
|
pre_configure() {
|
||||||
|
if [ "$CROSS_BUILD" ]; then
|
||||||
|
configure_args+=" -C $FILESDIR/TryRunResults.cmake"
|
||||||
|
mkdir -p build_native
|
||||||
|
( cd build_native; LD= CC= CFLAGS= LDFLAGS= cmake .. )
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
pre_build() {
|
||||||
|
if [ "$CROSS_BUILD" ]; then
|
||||||
|
make -C build_native/contrib/snowball
|
||||||
|
sed -i "s#\./snowball#../../../build_native/contrib/snowball/snowball#g" \
|
||||||
|
build/contrib/snowball/CMakeFiles/stemmer.dir/build.make
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
post_install() {
|
post_install() {
|
||||||
vsv rspamd
|
vsv rspamd
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue