From 57c108f2fbb1b5ed071bfb7af53d2af02bc1dbda Mon Sep 17 00:00:00 2001 From: Doan Tran Cong Danh Date: Tue, 11 Jun 2019 21:28:20 +0700 Subject: [PATCH] notmuch: add binding for ruby cross-compiling ruby binding is failed for now. --- srcpkgs/notmuch-ruby | 1 + srcpkgs/notmuch/template | 20 ++++++++++++++++++-- 2 files changed, 19 insertions(+), 2 deletions(-) create mode 120000 srcpkgs/notmuch-ruby diff --git a/srcpkgs/notmuch-ruby b/srcpkgs/notmuch-ruby new file mode 120000 index 00000000000..67778b7eb37 --- /dev/null +++ b/srcpkgs/notmuch-ruby @@ -0,0 +1 @@ +notmuch \ No newline at end of file diff --git a/srcpkgs/notmuch/template b/srcpkgs/notmuch/template index 33405821bd6..ced670a59d4 100644 --- a/srcpkgs/notmuch/template +++ b/srcpkgs/notmuch/template @@ -26,6 +26,11 @@ case "$XBPS_TARGET_MACHINE" in *) _args="--without-emacs";; esac +if [ ! "$CROSS_BUILD" ]; then + makedepends+=" ruby-devel" + subpackages+=" notmuch-ruby" +fi + do_configure() { ./configure --prefix=/usr \ --bashcompletiondir=/usr/share/bash-completion/completions \ @@ -35,7 +40,6 @@ do_configure() { do_build() { make ${makejobs} V=1 make -C contrib/notmuch-mutt - make -C bindings cd bindings/python python2 setup.py build --build-base=build-2 python3 setup.py build --build-base=build-3 @@ -43,11 +47,15 @@ do_build() { do_install() { make DESTDIR=${DESTDIR} install - cd bindings/python + pushd bindings/python python2 setup.py build --build-base=build-2 \ install --prefix=/usr --root=${DESTDIR} python3 setup.py build --build-base=build-3 \ install --prefix=/usr --root=${DESTDIR} + popd + if [ ! "$CROSS_BUILD" ]; then + make DESTDIR=${DESTDIR} -C bindings/ruby install + fi } libnotmuch_package() { @@ -109,3 +117,11 @@ notmuch-python3_package() { vmove ${py3_sitelib} } } + +notmuch-ruby_package() { + depends="libnotmuch>=${version}_${revision} ruby" + short_desc+=" - Ruby bindings" + pkg_install() { + vmove usr/lib/ruby + } +}