summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--net-libs/libiscsi/files/libiscsi-1.19.0-fix-rdma-automagic.patch26
-rw-r--r--net-libs/libiscsi/libiscsi-1.19.0-r1.ebuild51
-rw-r--r--net-libs/libiscsi/metadata.xml3
3 files changed, 80 insertions, 0 deletions
diff --git a/net-libs/libiscsi/files/libiscsi-1.19.0-fix-rdma-automagic.patch b/net-libs/libiscsi/files/libiscsi-1.19.0-fix-rdma-automagic.patch
new file mode 100644
index 000000000000..987544ffca68
--- /dev/null
+++ b/net-libs/libiscsi/files/libiscsi-1.19.0-fix-rdma-automagic.patch
@@ -0,0 +1,26 @@
+diff --git a/configure.ac b/configure.ac
+index 5fe1deb..9efe153 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -140,6 +140,8 @@ if test x"$libiscsi_cv_HAVE_SG_IO" = x"yes"; then
+ AC_DEFINE(HAVE_SG_IO,1,[Whether we have SG_IO support])
+ fi
+
++AC_ARG_WITH([rdma], AS_HELP_STRING([--with-rdma], [Build with rdma support]))
++
+ AC_CACHE_CHECK([for iSER support],libiscsi_cv_HAVE_LINUX_ISER,[
+ AC_TRY_COMPILE([
+ #include <infiniband/verbs.h>
+@@ -147,10 +149,10 @@ AC_TRY_COMPILE([
+ #include <rdma/rdma_verbs.h>],
+ [int ibv = IBV_WC_SEND;],
+ libiscsi_cv_HAVE_LINUX_ISER=yes,libiscsi_cv_HAVE_LINUX_ISER=no)])
+-if test x"$libiscsi_cv_HAVE_LINUX_ISER" = x"yes"; then
++if test x"$libiscsi_cv_HAVE_LINUX_ISER" = x"yes" && test "x$with_rdma" = "xyes"; then
+ AC_DEFINE(HAVE_LINUX_ISER,1,[Whether we have iSER support])
+ fi
+-AM_CONDITIONAL([HAVE_LINUX_ISER], [test $libiscsi_cv_HAVE_LINUX_ISER = yes])
++AM_CONDITIONAL([HAVE_LINUX_ISER], [test "x$with_rdma" = "xyes"])
+
+ AC_CACHE_CHECK([whether libcunit is available],
+ [ac_cv_have_cunit],
diff --git a/net-libs/libiscsi/libiscsi-1.19.0-r1.ebuild b/net-libs/libiscsi/libiscsi-1.19.0-r1.ebuild
new file mode 100644
index 000000000000..b44971289d2f
--- /dev/null
+++ b/net-libs/libiscsi/libiscsi-1.19.0-r1.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools
+
+if [[ ${PV} == *9999 ]] ; then
+ EGIT_REPO_URI="https://github.com/sahlberg/${PN}.git"
+ inherit git-r3
+else
+ SRC_URI="https://github.com/sahlberg/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+ SRC_URI+=" https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}-remove-ld-iscsi.patch.bz2"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
+fi
+
+DESCRIPTION="iscsi client library and utilities"
+HOMEPAGE="https://github.com/sahlberg/libiscsi"
+
+LICENSE="GPL-2 LGPL-2"
+SLOT="0"
+IUSE="rdma"
+
+RDEPEND="dev-libs/libgcrypt:0=
+ rdma? ( sys-cluster/rdma-core )"
+DEPEND="${RDEPEND}"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.18.0-fno-common.patch
+ "${FILESDIR}"/${PN}-1.18.0-fno-common-2.patch
+ "${FILESDIR}"/${PN}-1.18.0-fno-common-3.patch
+ "${FILESDIR}"/${PN}-1.19.0-fix-rdma-automagic.patch
+ "${WORKDIR}"/${P}-remove-ld-iscsi.patch
+)
+
+src_prepare() {
+ default
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --enable-manpages \
+ $(use_with rdma) \
+ --disable-werror
+}
+
+src_install() {
+ default
+ find "${ED}" -name '*.la' -delete || die
+}
diff --git a/net-libs/libiscsi/metadata.xml b/net-libs/libiscsi/metadata.xml
index fae5428e41b5..afb733ae6305 100644
--- a/net-libs/libiscsi/metadata.xml
+++ b/net-libs/libiscsi/metadata.xml
@@ -5,4 +5,7 @@
<upstream>
<remote-id type="github">sahlberg/libiscsi</remote-id>
</upstream>
+ <use>
+ <flag name="rdma">Enable infiniband support via <pkg>sys-fabric/librdmacm</pkg></flag>
+ </use>
</pkgmetadata>