From f72d1720332334e666eef07cce99299e70e684f2 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Sun, 2 Feb 2014 12:05:26 +0100 Subject: [PATCH] libtorrent: proper cross build support. --- .../libtorrent/patches/fix-sysroot-handling.patch | 14 ++++++++++++++ srcpkgs/libtorrent/template | 11 +++++++++-- 2 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 srcpkgs/libtorrent/patches/fix-sysroot-handling.patch diff --git a/srcpkgs/libtorrent/patches/fix-sysroot-handling.patch b/srcpkgs/libtorrent/patches/fix-sysroot-handling.patch new file mode 100644 index 00000000000..b22379dad29 --- /dev/null +++ b/srcpkgs/libtorrent/patches/fix-sysroot-handling.patch @@ -0,0 +1,14 @@ +--sysroot should be enough. + +--- scripts/common.m4.orig 2014-02-02 11:58:17.361448885 +0100 ++++ scripts/common.m4 2014-02-02 11:59:13.048185911 +0100 +@@ -63,8 +63,7 @@ AC_DEFUN([TORRENT_WITH_SYSROOT], [ + else + AC_MSG_RESULT($withval) + +- CXXFLAGS="$CXXFLAGS -isysroot $withval" +- LDFLAGS="$LDFLAGS -Wl,-syslibroot,$withval" ++ CXXFLAGS="$CXXFLAGS --sysroot=$withval" + fi + ]) + ]) diff --git a/srcpkgs/libtorrent/template b/srcpkgs/libtorrent/template index bd3f7f22c19..75a0ff97efe 100644 --- a/srcpkgs/libtorrent/template +++ b/srcpkgs/libtorrent/template @@ -11,8 +11,9 @@ case "$XBPS_TARGET_MACHINE" in *) _endiannes="ac_cv_c_bigendian=yes";; esac -configure_args="--enable-static --disable-debug --without-kqueue --enable-aligned ${_endiannes}" -hostmakedepends="pkg-config" +configure_args="--enable-static --disable-debug --without-kqueue + --enable-aligned ${_endiannes} --with-posix-fallocate have_stat_vfs=yes" +hostmakedepends="automake libtool pkg-config" makedepends="openssl-devel libsigc++-devel" short_desc="BitTorrent library written in C++" maintainer="Juan RP " @@ -21,6 +22,12 @@ license="GPL-2" distfiles="http://libtorrent.rakshasa.no/downloads/$pkgname-$version.tar.gz" checksum=ed2f2dea16c29cac63fa2724f6658786d955f975861fa6811bcf1597ff8a5e4f +pre_configure() { + # Drop cppunit requirement + sed '/AM_PATH_CPPUNIT.*/d' -i configure.ac + autoreconf -fi +} + libtorrent-devel_package() { depends="${sourcepkg}>=${version}_${revision}" short_desc+=" - development files"