diff options
author | Chocobo1 | 2016-11-10 16:15:53 +0800 |
---|---|---|
committer | Chocobo1 | 2016-11-10 20:12:36 +0800 |
commit | ecceee83c0a96e89de837f6097db37e315eb11cb (patch) | |
tree | a45ea863df15bf21f0a11a8504ff9bb7e3fa929d | |
download | aur-ecceee83c0a96e89de837f6097db37e315eb11cb.tar.gz |
newpkg: libtorrent-rasterbar-1_0-git 1_0_10.r7.geec6957-1
-rw-r--r-- | .SRCINFO | 21 | ||||
-rw-r--r-- | Fix_out_of_srcdir_build.patch | 49 | ||||
-rw-r--r-- | PKGBUILD | 63 |
3 files changed, 133 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..b4bf80840157 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,21 @@ +pkgbase = libtorrent-rasterbar-1_0-git + pkgdesc = A C++ BitTorrent library that aims to be a good alternative to all the other implementations around (git branch RC_1_0) + pkgver = 1_0_10.r7.geec6957 + pkgrel = 1 + url = http://www.libtorrent.org/ + arch = i686 + arch = x86_64 + license = BSD + makedepends = boost + makedepends = python2 + makedepends = python + depends = boost-libs + provides = libtorrent-rasterbar + conflicts = libtorrent-rasterbar + source = git+https://github.com/arvidn/libtorrent.git#branch=RC_1_0 + source = Fix_out_of_srcdir_build.patch + sha256sums = SKIP + sha256sums = e4dfe4363eb5f196363d3b477377046d6241c7e8277d475dc8f74ef612d77850 + +pkgname = libtorrent-rasterbar-1_0-git + diff --git a/Fix_out_of_srcdir_build.patch b/Fix_out_of_srcdir_build.patch new file mode 100644 index 000000000000..d7bb176a2189 --- /dev/null +++ b/Fix_out_of_srcdir_build.patch @@ -0,0 +1,49 @@ +From ef66f59bb9de005d87f2be17bb4626eb128ea03c Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?D=C4=81vis?= <davispuh@gmail.com> +Date: Mon, 3 Aug 2015 18:14:06 +0300 +Subject: [PATCH] Fix out of srcdir build + +--- + bindings/python/Makefile.am | 6 +++--- + bindings/python/setup.py | 2 +- + 2 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/bindings/python/Makefile.am b/bindings/python/Makefile.am +index b7e6a98..c909ac5 100644 +--- a/bindings/python/Makefile.am ++++ b/bindings/python/Makefile.am +@@ -33,15 +33,15 @@ EXTRA_DIST = \ + if ENABLE_PYTHON_BINDING + + all-local: +- $(PYTHON) setup.py build ++ $(PYTHON) $(srcdir)/setup.py build + + install-exec-local: +- $(PYTHON) setup.py install @PYTHON_INSTALL_PARAMS@ ++ $(PYTHON) $(srcdir)/setup.py install @PYTHON_INSTALL_PARAMS@ + + uninstall-local: + rm -rf $(DESTDIR)$(libdir)/python*/*-packages/*libtorrent* + + clean-local: +- $(PYTHON) setup.py clean --all ++ $(PYTHON) $(srcdir)/setup.py clean --all + + endif +diff --git a/bindings/python/setup.py b/bindings/python/setup.py +index fb857f2..170e73c 100644 +--- a/bindings/python/setup.py ++++ b/bindings/python/setup.py +@@ -95,7 +95,7 @@ else: + flag for flag in get_config_var('OPT').split() if flag != '-Wstrict-prototypes') + + source_list = os.listdir(os.path.join(os.path.dirname(__file__), "src")) +- source_list = [os.path.join("src", s) for s in source_list if s.endswith(".cpp")] ++ source_list = [os.path.abspath(os.path.join(os.path.dirname(__file__), "src", s)) for s in source_list if s.endswith(".cpp")] + + ext = [Extension('libtorrent', + sources = source_list, +-- +2.10.0.windows.1 + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..1fba5638ca1d --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,63 @@ +# Maintainer: Chocobo1 + +pkgname=libtorrent-rasterbar-1_0-git +pkgver=1_0_10.r7.geec6957 +pkgrel=1 +pkgdesc='A C++ BitTorrent library that aims to be a good alternative to all the other implementations around (git branch RC_1_0)' +url='http://www.libtorrent.org/' +arch=('i686' 'x86_64') +license=('BSD') +depends=('boost-libs') +makedepends=('boost' 'python2' 'python') +provides=('libtorrent-rasterbar') +conflicts=('libtorrent-rasterbar') +source=('git+https://github.com/arvidn/libtorrent.git#branch=RC_1_0' + Fix_out_of_srcdir_build.patch) +sha256sums=('SKIP' + 'e4dfe4363eb5f196363d3b477377046d6241c7e8277d475dc8f74ef612d77850') + + +pkgver() { + cd "libtorrent" + + git describe --long --tags | sed 's/^[A-Za-z]*-//;s/\([^-]*-g\)/r\1/;s/-/./g' +} + +prepare() { + mkdir -p py2 py3 + cd "libtorrent" + + patch -p1 -i ../Fix_out_of_srcdir_build.patch + ./autotool.sh +} + +_build() ( + cd "py$1" + + # https://bugs.archlinux.org/task/50745 + _boost="boost_python" + if [ $1 = "3" ]; then _boost="boost_python3"; fi + + # https://github.com/qbittorrent/qBittorrent/issues/5265#issuecomment-220007436 + CXXFLAGS="$CXXFLAGS -std=c++11" \ + PYTHON="/usr/bin/python$1" \ + ../libtorrent/configure \ + --prefix=/usr \ + --enable-python-binding \ + --disable-static \ + --with-libiconv \ + --with-boost-python="$_boost" + + make +) + +build() { + _build 2 + _build 3 +} + +package() { + make -C py2 DESTDIR="$pkgdir" install + make -C py3 DESTDIR="$pkgdir" install + install -Dm644 "libtorrent/COPYING" "$pkgdir/usr/share/licenses/$pkgname/LICENSE" +} |