From 47f8775beb21aa2d8a8684c2abb0ca2b9d053ad7 Mon Sep 17 00:00:00 2001 From: Johannes Date: Sat, 15 Jun 2019 12:49:00 +0200 Subject: [PATCH] pijul: fix build --- srcpkgs/pijul/patches/bindgen.patch | 10 ++++++++++ srcpkgs/pijul/template | 15 ++++++++++++--- 2 files changed, 22 insertions(+), 3 deletions(-) create mode 100644 srcpkgs/pijul/patches/bindgen.patch diff --git a/srcpkgs/pijul/patches/bindgen.patch b/srcpkgs/pijul/patches/bindgen.patch new file mode 100644 index 00000000000..dd124b79c2f --- /dev/null +++ b/srcpkgs/pijul/patches/bindgen.patch @@ -0,0 +1,10 @@ +patch bindgen to use BINDGEN_EXTRA_CLANG_ARGS variable to set sysroot for cross builds +https://github.com/jnbr/rust-bindgen/tree/0.43.2-clang_args + +--- Cargo.toml.orig 2019-06-15 02:33:02.105715462 +0200 ++++ Cargo.toml 2019-06-15 02:36:33.905701785 +0200 +@@ -6,3 +6,4 @@ + "libpijul:0.12.0" = { path = "libpijul" } + "line:0.1.15" = { path = "line" } + "diffs:0.3.0" = { path = "diffs" } ++"bindgen:0.43.2" = {git = 'https://github.com/jnbr/rust-bindgen', rev = "1467ac97c669c1ddda8117ccf1d398609b0e6fa9"} diff --git a/srcpkgs/pijul/template b/srcpkgs/pijul/template index 29a70927713..b76bd1d3f4c 100644 --- a/srcpkgs/pijul/template +++ b/srcpkgs/pijul/template @@ -1,9 +1,9 @@ # Template file for 'pijul' pkgname=pijul version=0.12.0 -revision=1 +revision=2 build_style=cargo -hostmakedepends="pkg-config" +hostmakedepends="pkg-config clang" makedepends="libsodium-devel libressl-devel nettle-devel" short_desc="Distributed version control system based on patches" maintainer="Toyam Cox " @@ -12,7 +12,16 @@ homepage="https://pijul.org/" distfiles="https://pijul.org/releases/pijul-${version}.tar.gz" checksum=987820fa2a6fe92a9f516f5e9b41ad59a597973e72cb0c7a44ca0f38e741a7e6 -broken="Links clang to build. Can't build on arm* with clang." +if [ "$CROSS_BUILD" ]; then + export HOST_CC="$BUILD_CC" + export HOST_CFLAGS="$BUILD_CFLAGS" + export BINDGEN_EXTRA_CLANG_ARGS="--sysroot=$XBPS_CROSS_BASE" +fi + +pre_build() { + cargo update --package openssl-sys --precise 0.9.46 + cargo update --package openssl --precise 0.10.22 +} # We only want to install the binary, so don't run cargo install do_install() {