1 |
commit: fe0e67436f07e5925a6f7d2a2efa31a5724f1bbb |
2 |
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Mar 30 07:45:26 2021 +0000 |
4 |
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Mar 30 07:46:29 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fe0e6743 |
7 |
|
8 |
Revert "sys-apps/sg3_utils: Removed old" |
9 |
|
10 |
This reverts commit c61d54adec2c539872bd05b5c28703e61a2787a0 |
11 |
until sys-apps/rescan-scsi-bus has been last-rited |
12 |
|
13 |
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org> |
14 |
|
15 |
sys-apps/sg3_utils/Manifest | 1 + |
16 |
.../sg3_utils/files/sg3_utils-1.42-sysmacros.patch | 31 +++++++++++++++ |
17 |
sys-apps/sg3_utils/sg3_utils-1.42.ebuild | 44 ++++++++++++++++++++++ |
18 |
3 files changed, 76 insertions(+) |
19 |
|
20 |
diff --git a/sys-apps/sg3_utils/Manifest b/sys-apps/sg3_utils/Manifest |
21 |
index c9b155de994..fb01d7cf889 100644 |
22 |
--- a/sys-apps/sg3_utils/Manifest |
23 |
+++ b/sys-apps/sg3_utils/Manifest |
24 |
@@ -1,3 +1,4 @@ |
25 |
+DIST sg3_utils-1.42.tgz 1219231 BLAKE2B dd9ea2c324cb6f4c0ce770c90b7980da5e998bddc3a2be43a0aa9bea88dfe34291d0f58b393b2a5ac680c05dc673802ec9fae1ead37107bc49fa33bc7c4df503 SHA512 d16b65e36b2bccb4fc4c189f97e71fa38e6619f37d668a4ddd74a52c715fa62325288d9737812ed19c80547059dbd27be5a20565e27e1aabb571e8f5f8ac53ad |
26 |
DIST sg3_utils-1.44.tar.xz 922152 BLAKE2B 8596ef78fbb7ade5a969f485b0f4ff63863dc8a5ff58fe630cffa91900ba9946b47ddf857346aa3904da8502afa4928f54baf99428344d2e561a90e52c8533ed SHA512 4f4d5536ebed62f2c81c55741043d9ac3f4610a4dd6ef2e3125f041afd57aae03a32c2affe84a960c9f61fb6f84784bc901c756a8c36c1bc97082fa61e73ae8d |
27 |
DIST sg3_utils-1.45.tar.xz 989864 BLAKE2B 2d0a9e0edf514c8c7a566798f8087fc27d15d31cc8df39073dd97cff569da396b24236e0c231781625379b2ecefe7c99716d5d9c7dc104b15e150cb4e3c43e75 SHA512 fa25dedc447154d33937248a856af9a7ef380dda282a681d465a57d7dfc24b6c0409fa06aabf8cc28ba191e91db80fed0757b45212eddf713855574b48a97868 |
28 |
DIST sg3_utils-1.46.tar.xz 1031972 BLAKE2B bf425b97247a5f5bae06a84d68066e2e2ec107a5c6d410f6d04a8879be22a07d5f5d0718674072458e654a4de3facb575522962beb2297a1fb4a7fe0df01b977 SHA512 576531da5022c5c2b3099bb28b3806a86d03594f572b8e72c5d451253e5b88761654027315749362b5037dd6108b691bd74566482b9c5078e3b1e5a2bb6e1a67 |
29 |
|
30 |
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 |
31 |
new file mode 100644 |
32 |
index 00000000000..e8440fb8c32 |
33 |
--- /dev/null |
34 |
+++ b/sys-apps/sg3_utils/files/sg3_utils-1.42-sysmacros.patch |
35 |
@@ -0,0 +1,31 @@ |
36 |
+From 13ff34d408cf69339ce1f28756f5c7b5ad5f528b Mon Sep 17 00:00:00 2001 |
37 |
+From: Mike Frysinger <vapier@g.o> |
38 |
+Date: Mon, 18 Apr 2016 18:36:09 -0400 |
39 |
+Subject: [PATCH] include sys/sysmacros.h for major/minor funcs |
40 |
+ |
41 |
+These functions are not part of any official spec, and glibc has always |
42 |
+kept them in sys/sysmacros.h. As glibc moves to conform to POSIX, and |
43 |
+more alternative C libraries come up, we need to include this header |
44 |
+explicitly to get the prototypes. Otherwise we fail to build like: |
45 |
+ |
46 |
+sg_map26.o: In function 'nd_match_scandir_select': |
47 |
+sg_map26.c:(.text+0x37b): undefined reference to 'major' |
48 |
+--- |
49 |
+ include/sg_lib.h | 1 + |
50 |
+ 1 file changed, 1 insertion(+) |
51 |
+ |
52 |
+diff --git a/include/sg_lib.h b/include/sg_lib.h |
53 |
+index b3e741b..a0e483c 100644 |
54 |
+--- a/include/sg_lib.h |
55 |
++++ b/include/sg_lib.h |
56 |
+@@ -32,6 +32,7 @@ |
57 |
+ |
58 |
+ #include <stdio.h> |
59 |
+ #include <stdint.h> |
60 |
++#include <sys/sysmacros.h> |
61 |
+ |
62 |
+ #ifdef __cplusplus |
63 |
+ extern "C" { |
64 |
+-- |
65 |
+2.7.4 |
66 |
+ |
67 |
|
68 |
diff --git a/sys-apps/sg3_utils/sg3_utils-1.42.ebuild b/sys-apps/sg3_utils/sg3_utils-1.42.ebuild |
69 |
new file mode 100644 |
70 |
index 00000000000..56b30e53972 |
71 |
--- /dev/null |
72 |
+++ b/sys-apps/sg3_utils/sg3_utils-1.42.ebuild |
73 |
@@ -0,0 +1,44 @@ |
74 |
+# Copyright 1999-2020 Gentoo Authors |
75 |
+# Distributed under the terms of the GNU General Public License v2 |
76 |
+ |
77 |
+EAPI=5 |
78 |
+ |
79 |
+inherit eutils multilib ltprune |
80 |
+ |
81 |
+DESCRIPTION="Apps for querying the sg SCSI interface" |
82 |
+HOMEPAGE="http://sg.danny.cz/sg/" |
83 |
+SRC_URI="http://sg.danny.cz/sg/p/${P}.tgz" |
84 |
+ |
85 |
+LICENSE="GPL-2" |
86 |
+SLOT="0" |
87 |
+KEYWORDS="~alpha amd64 arm ~arm64 ~hppa ~ia64 ~mips ppc ppc64 ~s390 sparc x86" |
88 |
+IUSE="static-libs" |
89 |
+ |
90 |
+DEPEND="sys-devel/libtool" |
91 |
+RDEPEND="" |
92 |
+PDEPEND=">=sys-apps/rescan-scsi-bus-1.24" |
93 |
+ |
94 |
+src_prepare() { |
95 |
+ epatch "${FILESDIR}"/${PN}-1.26-stdint.patch #580236 |
96 |
+ epatch "${FILESDIR}"/${PN}-1.42-sysmacros.patch #580236 |
97 |
+} |
98 |
+ |
99 |
+src_configure() { |
100 |
+ econf $(use_enable static-libs static) |
101 |
+} |
102 |
+ |
103 |
+src_install() { |
104 |
+ default |
105 |
+ dodoc COVERAGE doc/README examples/*.txt |
106 |
+ newdoc scripts/README README.scripts |
107 |
+ |
108 |
+ # Better fix for bug 231089; some packages look for sgutils2 |
109 |
+ local path lib |
110 |
+ path="/usr/$(get_libdir)" |
111 |
+ for lib in "${ED}"${path}/libsgutils2.*; do |
112 |
+ lib=${lib##*/} |
113 |
+ dosym "${lib}" "${path}/${lib/libsgutils2/libsgutils}" |
114 |
+ done |
115 |
+ |
116 |
+ prune_libtool_files |
117 |
+} |