commit:     21c320c1a5455367d0df77c43005b26a8685cdff
Author:     Jakov Smolic <jakov.smolic <AT> sartura <DOT> hr>
AuthorDate: Thu Jan  7 10:08:22 2021 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Thu Jan  7 10:08:22 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=21c320c1

net-libs/libiscsi: Port to EAPI 7

* Disable static-libs
* Fix build with gcc-10

Closes: https://bugs.gentoo.org/708526
Signed-off-by: Jakov Smolic <jakov.smolic <AT> sartura.hr>
Signed-off-by: David Seifert <soap <AT> gentoo.org>

 .../files/libiscsi-1.18.0-fno-common.patch         | 14 +++++++++++++
 net-libs/libiscsi/libiscsi-1.18.0.ebuild           | 23 ++++++++++++++--------
 2 files changed, 29 insertions(+), 8 deletions(-)

diff --git a/net-libs/libiscsi/files/libiscsi-1.18.0-fno-common.patch 
b/net-libs/libiscsi/files/libiscsi-1.18.0-fno-common.patch
new file mode 100644
index 00000000000..e5ce2f7bd49
--- /dev/null
+++ b/net-libs/libiscsi/files/libiscsi-1.18.0-fno-common.patch
@@ -0,0 +1,14 @@
+https://bugs.gentoo.org/708526
+Taken from: https://github.com/sahlberg/libiscsi/pull/307
+Author: wanghonghao <[email protected]>
+--- a/include/iser-private.h
++++ b/include/iser-private.h
+@@ -159,7 +159,7 @@ struct iser_tx_desc {
+ struct iser_cm_hdr {
+       uint8_t      flags;
+       uint8_t      rsvd[3];
+-} __packed;
++};
+ 
+ struct iser_pdu {
+       struct iscsi_pdu              iscsi_pdu;

diff --git a/net-libs/libiscsi/libiscsi-1.18.0.ebuild 
b/net-libs/libiscsi/libiscsi-1.18.0.ebuild
index 652b0b2953a..d5f2c942c2d 100644
--- a/net-libs/libiscsi/libiscsi-1.18.0.ebuild
+++ b/net-libs/libiscsi/libiscsi-1.18.0.ebuild
@@ -1,22 +1,29 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=6
+EAPI=7
 
 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"
+       KEYWORDS="~alpha amd64 ~arm arm64 ~hppa ~ia64 ~ppc ppc64 ~sparc x86"
+fi
+
 DESCRIPTION="iscsi client library and utilities"
 HOMEPAGE="https://github.com/sahlberg/libiscsi";
-SRC_URI="https://github.com/sahlberg/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
 
 SLOT="0"
 LICENSE="GPL-2 LGPL-2"
-KEYWORDS="~alpha amd64 ~arm arm64 ~hppa ~ia64 ~ppc ppc64 ~sparc x86"
-IUSE="static-libs"
 
 RDEPEND="dev-libs/libgcrypt:0="
 DEPEND="${RDEPEND}"
 
+PATCHES=( "${FILESDIR}"/${P}-fno-common.patch )
+
 src_prepare() {
        default
        eautoreconf
@@ -25,11 +32,11 @@ src_prepare() {
 src_configure() {
        econf \
                --enable-manpages \
-               --disable-werror \
-               $(use_enable static-libs static)
+               --disable-static \
+               --disable-werror
 }
 
 src_install() {
        default
-       find "${D}" -name '*.la' -delete || die
+       find "${ED}" -name '*.la' -delete || die
 }

Reply via email to