summaryrefslogtreecommitdiff
path: root/sys-block/libzbc
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-08-25 10:45:55 +0100
committerV3n3RiX <venerix@redcorelinux.org>2020-08-25 10:45:55 +0100
commit3cf7c3ef441822c889356fd1812ebf2944a59851 (patch)
treec513fe68548b40365c1c2ebfe35c58ad431cdd77 /sys-block/libzbc
parent05b8b0e0af1d72e51a3ee61522941bf7605cd01c (diff)
gentoo resync : 25.08.2020
Diffstat (limited to 'sys-block/libzbc')
-rw-r--r--sys-block/libzbc/Manifest3
-rw-r--r--sys-block/libzbc/files/libzbc-5.5.1-gcc-10.patch64
-rw-r--r--sys-block/libzbc/libzbc-5.5.1.ebuild5
3 files changed, 69 insertions, 3 deletions
diff --git a/sys-block/libzbc/Manifest b/sys-block/libzbc/Manifest
index 0a02341761df..360e78044a89 100644
--- a/sys-block/libzbc/Manifest
+++ b/sys-block/libzbc/Manifest
@@ -1,4 +1,5 @@
+AUX libzbc-5.5.1-gcc-10.patch 2745 BLAKE2B d652144129c02bad8fa39b1587d54726e36c892b124c69084844737aa7604e16a00574569e95e6a0913f43002c4ff7240cbff017440b76842e013fdf25de6172 SHA512 d51a926e6db51df874f6cfdb73a7e85a4dd9a837fef62e6727f5e32b31fde8b9e1a2df0c06cdec0b5a9b53ab275761331566bf73f57811cbf39ebd91ee571212
AUX libzbc-no-automagic-gtk-dep.patch 976 BLAKE2B 211a33a5eac0239526f050de30187b3392e953a257457de88c47eab39b9db518b2f9f7ea3110f6fd294ed2f54270f9a2cd25cdc38620ce7a62f2e3e68af088a6 SHA512 b1278b7d91bfabb577488016749a69714958601219a47a31794af4a22361a8f2621bdb1a964beaf78d7c73d00f934647a66e90681853abbcb5f8c7e969d981c7
DIST libzbc-5.5.1.tar.gz 128638 BLAKE2B 3cb636f29ff29bb87c86bd800231a1b45f517822e5785af599a6385705dffa1e90574e4bd2c1b310d5a0dab094cf6e878fc80b6178ea4eb028d5d1d174e7559a SHA512 cb060d06839ea207ed2e32e940348176dd0eff2279cbdb72f565bef177eb4a195feea67c4d1ed5f455e3839475e0f4557a45774129e3d9e009ea38f9134ae159
-EBUILD libzbc-5.5.1.ebuild 635 BLAKE2B 0e2f5d2ad0c2ce0479bccff31bcc92d8514f4d58ab5cab3a46c975f957eeca5f66d20e9ec8e2f115fb6a6cc071bf9ec5ab1dd191b1b343f407d6142f6fc55b25 SHA512 9ba5483efb32d96a8053f99d471a956df60e0c481991f9d61de6df9ab428ef4debff6d48e06a8d5e298c46633cd22777a385512766e44cd973a509c3a85d1d8a
+EBUILD libzbc-5.5.1.ebuild 708 BLAKE2B c842ae5e3128499e11159a560f584d5799e3b297395b39c5acb528863b440f3f1bb13267bebfca9bb05a9b83d6ccd06d892066860f9ad7c2f5e99b11cec8d277 SHA512 2dae1278857df691d8205cd4fb38eaa5b65e30c15a9998d89ca2621cdca56ff4083d696d0cd20b7b13cd61c27a9cae6e840cd7fa9035f49d6e7ac9a8759fa108
MISC metadata.xml 836 BLAKE2B 360b17822ed9256339bb8a81993814aebd63925acc8b600d75851a2a1834ac6714f84f036882617f789362e06b5b58beec89e2ae5a5b01a88c67b7122311972f SHA512 6a53f78f3fb53d3ac0a97eac47710d5fcdf23db95c98f58ee1c296eef7bbbd218f79cd151eed6424a917ae69775bf2eb42916c7a51c7ac82dffd4e8e5b9ef451
diff --git a/sys-block/libzbc/files/libzbc-5.5.1-gcc-10.patch b/sys-block/libzbc/files/libzbc-5.5.1-gcc-10.patch
new file mode 100644
index 000000000000..78511bf521d2
--- /dev/null
+++ b/sys-block/libzbc/files/libzbc-5.5.1-gcc-10.patch
@@ -0,0 +1,64 @@
+https://github.com/hgst/libzbc/commit/1f3a63432bb5a4ca47a5839181c8f13512848b6c
+https://bugs.gentoo.org/707808
+
+From 1f3a63432bb5a4ca47a5839181c8f13512848b6c Mon Sep 17 00:00:00 2001
+From: Jan Engelhardt <jengelh@inai.de>
+Date: Mon, 16 Mar 2020 08:01:44 +0100
+Subject: [PATCH] build: avoid double definition of zbc_log_drv etc.
+
+When -fno-common is in use, what compiler writers are trying to make
+a standard, libzbc fails to build.
+
+$ make V=1
+Making all in .
+make[1]: Entering directory '~/libzbc'
+/bin/sh ./libtool --tag=CC --mode=link gcc -fPIC -fno-common -O2 -g -pthread -Wl,--version-script,./exports -release '5.8.5' -o libzbc.la -rpath /usr/lib lib/libzbc_la-zbc.lo lib/libzbc_la-zbc_block.lo lib/libzbc_la-zbc_sg.lo lib/libzbc_la-zbc_scsi.lo lib/libzbc_la-zbc_ata.lo lib/libzbc_la-zbc_fake.lo
+libtool: link: gcc -shared -fPIC -DPIC lib/.libs/libzbc_la-zbc.o lib/.libs/libzbc_la-zbc_block.o lib/.libs/libzbc_la-zbc_sg.o lib/.libs/libzbc_la-zbc_scsi.o lib/.libs/libzbc_la-zbc_ata.o lib/.libs/libzbc_la-zbc_fake.o -O2 -g -pthread -Wl,--version-script -Wl,./exports -pthread -Wl,-soname -Wl,libzbc-5.8.5.so -o .libs/libzbc-5.8.5.so
+/usr/lib64/gcc/x86_64-suse-linux/9/../../../../x86_64-suse-linux/bin/ld: lib/.libs/libzbc_la-zbc_block.o:~/libzbc/lib/zbc.h:269: multiple definition of `zbc_log_level'; lib/.libs/libzbc_la-zbc.o:~/libzbc/lib/zbc.h:269: first defined here
+/usr/lib64/gcc/x86_64-suse-linux/9/../../../../x86_64-suse-linux/bin/ld: lib/.libs/libzbc_la-zbc_block.o:~/libzbc/lib/zbc.h:195: multiple definition of `zbc_fake_drv'; lib/.libs/libzbc_la-zbc.o:~/libzbc/lib/zbc.h:195: first defined here
+
+References: https://bugzilla.suse.com/show_bug.cgi?id=1160244
+---
+ lib/zbc.h | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/lib/zbc.h b/lib/zbc.h
+index 7dec298..73d76db 100644
+--- a/lib/zbc.h
++++ b/lib/zbc.h
+@@ -177,22 +177,22 @@ static inline void zbc_set_errno(enum zbc_sk sk, enum zbc_asc_ascq asc_ascq)
+ /**
+ * Block device driver (requires kernel support).
+ */
+-struct zbc_drv zbc_block_drv;
++extern struct zbc_drv zbc_block_drv;
+
+ /**
+ * ZAC (ATA) device driver (uses SG_IO).
+ */
+-struct zbc_drv zbc_ata_drv;
++extern struct zbc_drv zbc_ata_drv;
+
+ /**
+ * ZBC (SCSI) device driver (uses SG_IO).
+ */
+-struct zbc_drv zbc_scsi_drv;
++extern struct zbc_drv zbc_scsi_drv;
+
+ /**
+ * ZBC emulation driver (file or block device).
+ */
+-struct zbc_drv zbc_fake_drv;
++extern struct zbc_drv zbc_fake_drv;
+
+ #define container_of(ptr, type, member) \
+ ((type *)((char *)(ptr)-(unsigned long)(&((type *)0)->member)))
+@@ -266,7 +266,7 @@ enum {
+ /**
+ * Library log level.
+ */
+-int zbc_log_level;
++extern int zbc_log_level;
+
+ #define zbc_print(stream,format,args...) \
+ do { \
diff --git a/sys-block/libzbc/libzbc-5.5.1.ebuild b/sys-block/libzbc/libzbc-5.5.1.ebuild
index 5c726ff8a47f..df4ed34ffdbf 100644
--- a/sys-block/libzbc/libzbc-5.5.1.ebuild
+++ b/sys-block/libzbc/libzbc-5.5.1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
@@ -11,7 +11,7 @@ SRC_URI="https://github.com/hgst/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="BSD-2 GPL-3 LGPL-3"
SLOT="0"
-KEYWORDS="~amd64 ~x86"
+KEYWORDS="~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86"
IUSE="gtk"
DEPEND="virtual/pkgconfig
@@ -20,6 +20,7 @@ DEPEND="virtual/pkgconfig
PATCHES=(
"${FILESDIR}/libzbc-no-automagic-gtk-dep.patch"
+ "${FILESDIR}/${P}-gcc-10.patch"
)
src_prepare() {