From 8e72fd2f7290c0fb006339f768cb86871ff260a8 Mon Sep 17 00:00:00 2001 From: Juergen Buchmueller Date: Fri, 9 Dec 2016 20:40:07 +0100 Subject: [PATCH] rspamd: fix x86_64-musl --- srcpkgs/rspamd/template | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/srcpkgs/rspamd/template b/srcpkgs/rspamd/template index 3db11d6d164..5a966bcc5bf 100644 --- a/srcpkgs/rspamd/template +++ b/srcpkgs/rspamd/template @@ -25,12 +25,6 @@ esac if [ "$CROSS_BUILD" ]; then hostmakedepends+=" $makedepends" - pre_configure() { - configure_args+=" -C $FILESDIR/TryRunResults.cmake" - mkdir -p build_native - ( cd build_native; LD= CC= CFLAGS= LDFLAGS= cmake .. ) - } - pre_build() { make -C build_native/contrib/snowball sed -i "s#\./snowball#../../../build_native/contrib/snowball/snowball#g" \ @@ -38,6 +32,19 @@ if [ "$CROSS_BUILD" ]; then } fi +pre_configure() { + case "$XBPS_TARGET_MACHINE" in + *-musl) # Remove non existing library nsl + sed -i CMakeLists.txt -e "/LIST(APPEND CMAKE_REQUIRED_LIBRARIES nsl)/d" + esac + if [ "$CROSS_BUILD" ]; then + configure_args+=" -C $FILESDIR/TryRunResults.cmake" + mkdir -p build_native + ( cd build_native; LD= CC= CFLAGS= LDFLAGS= cmake .. ) + fi +} + + post_install() { vsv rspamd vlicense LICENSE