summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wendler <polynomial-c@gentoo.org>2021-03-30 09:45:26 +0200
committerLars Wendler <polynomial-c@gentoo.org>2021-03-30 09:46:29 +0200
commitfe0e67436f07e5925a6f7d2a2efa31a5724f1bbb (patch)
treec9b41841909e0994762bc1eecc46ea5338ea4549 /sys-apps/sg3_utils
parentdev-java/easymock: EAPI 7 (diff)
downloadgentoo-fe0e67436f07e5925a6f7d2a2efa31a5724f1bbb.tar.gz
gentoo-fe0e67436f07e5925a6f7d2a2efa31a5724f1bbb.tar.bz2
gentoo-fe0e67436f07e5925a6f7d2a2efa31a5724f1bbb.zip
Revert "sys-apps/sg3_utils: Removed old"
This reverts commit c61d54adec2c539872bd05b5c28703e61a2787a0 until sys-apps/rescan-scsi-bus has been last-rited Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
Diffstat (limited to 'sys-apps/sg3_utils')
-rw-r--r--sys-apps/sg3_utils/Manifest1
-rw-r--r--sys-apps/sg3_utils/files/sg3_utils-1.42-sysmacros.patch31
-rw-r--r--sys-apps/sg3_utils/sg3_utils-1.42.ebuild44
3 files changed, 76 insertions, 0 deletions
diff --git a/sys-apps/sg3_utils/Manifest b/sys-apps/sg3_utils/Manifest
index c9b155de994b..fb01d7cf889f 100644
--- a/sys-apps/sg3_utils/Manifest
+++ b/sys-apps/sg3_utils/Manifest
@@ -1,3 +1,4 @@
+DIST sg3_utils-1.42.tgz 1219231 BLAKE2B dd9ea2c324cb6f4c0ce770c90b7980da5e998bddc3a2be43a0aa9bea88dfe34291d0f58b393b2a5ac680c05dc673802ec9fae1ead37107bc49fa33bc7c4df503 SHA512 d16b65e36b2bccb4fc4c189f97e71fa38e6619f37d668a4ddd74a52c715fa62325288d9737812ed19c80547059dbd27be5a20565e27e1aabb571e8f5f8ac53ad
DIST sg3_utils-1.44.tar.xz 922152 BLAKE2B 8596ef78fbb7ade5a969f485b0f4ff63863dc8a5ff58fe630cffa91900ba9946b47ddf857346aa3904da8502afa4928f54baf99428344d2e561a90e52c8533ed SHA512 4f4d5536ebed62f2c81c55741043d9ac3f4610a4dd6ef2e3125f041afd57aae03a32c2affe84a960c9f61fb6f84784bc901c756a8c36c1bc97082fa61e73ae8d
DIST sg3_utils-1.45.tar.xz 989864 BLAKE2B 2d0a9e0edf514c8c7a566798f8087fc27d15d31cc8df39073dd97cff569da396b24236e0c231781625379b2ecefe7c99716d5d9c7dc104b15e150cb4e3c43e75 SHA512 fa25dedc447154d33937248a856af9a7ef380dda282a681d465a57d7dfc24b6c0409fa06aabf8cc28ba191e91db80fed0757b45212eddf713855574b48a97868
DIST sg3_utils-1.46.tar.xz 1031972 BLAKE2B bf425b97247a5f5bae06a84d68066e2e2ec107a5c6d410f6d04a8879be22a07d5f5d0718674072458e654a4de3facb575522962beb2297a1fb4a7fe0df01b977 SHA512 576531da5022c5c2b3099bb28b3806a86d03594f572b8e72c5d451253e5b88761654027315749362b5037dd6108b691bd74566482b9c5078e3b1e5a2bb6e1a67
diff --git a/sys-apps/sg3_utils/files/sg3_utils-1.42-sysmacros.patch b/sys-apps/sg3_utils/files/sg3_utils-1.42-sysmacros.patch
new file mode 100644
index 000000000000..e8440fb8c322
--- /dev/null
+++ b/sys-apps/sg3_utils/files/sg3_utils-1.42-sysmacros.patch
@@ -0,0 +1,31 @@
+From 13ff34d408cf69339ce1f28756f5c7b5ad5f528b Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Mon, 18 Apr 2016 18:36:09 -0400
+Subject: [PATCH] include sys/sysmacros.h for major/minor funcs
+
+These functions are not part of any official spec, and glibc has always
+kept them in sys/sysmacros.h. As glibc moves to conform to POSIX, and
+more alternative C libraries come up, we need to include this header
+explicitly to get the prototypes. Otherwise we fail to build like:
+
+sg_map26.o: In function 'nd_match_scandir_select':
+sg_map26.c:(.text+0x37b): undefined reference to 'major'
+---
+ include/sg_lib.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/include/sg_lib.h b/include/sg_lib.h
+index b3e741b..a0e483c 100644
+--- a/include/sg_lib.h
++++ b/include/sg_lib.h
+@@ -32,6 +32,7 @@
+
+ #include <stdio.h>
+ #include <stdint.h>
++#include <sys/sysmacros.h>
+
+ #ifdef __cplusplus
+ extern "C" {
+--
+2.7.4
+
diff --git a/sys-apps/sg3_utils/sg3_utils-1.42.ebuild b/sys-apps/sg3_utils/sg3_utils-1.42.ebuild
new file mode 100644
index 000000000000..56b30e539729
--- /dev/null
+++ b/sys-apps/sg3_utils/sg3_utils-1.42.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils multilib ltprune
+
+DESCRIPTION="Apps for querying the sg SCSI interface"
+HOMEPAGE="http://sg.danny.cz/sg/"
+SRC_URI="http://sg.danny.cz/sg/p/${P}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha amd64 arm ~arm64 ~hppa ~ia64 ~mips ppc ppc64 ~s390 sparc x86"
+IUSE="static-libs"
+
+DEPEND="sys-devel/libtool"
+RDEPEND=""
+PDEPEND=">=sys-apps/rescan-scsi-bus-1.24"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.26-stdint.patch #580236
+ epatch "${FILESDIR}"/${PN}-1.42-sysmacros.patch #580236
+}
+
+src_configure() {
+ econf $(use_enable static-libs static)
+}
+
+src_install() {
+ default
+ dodoc COVERAGE doc/README examples/*.txt
+ newdoc scripts/README README.scripts
+
+ # Better fix for bug 231089; some packages look for sgutils2
+ local path lib
+ path="/usr/$(get_libdir)"
+ for lib in "${ED}"${path}/libsgutils2.*; do
+ lib=${lib##*/}
+ dosym "${lib}" "${path}/${lib/libsgutils2/libsgutils}"
+ done
+
+ prune_libtool_files
+}