Skip to content

Commit

Permalink
sys-apps/sg3_utils: Restore 1.42
Browse files Browse the repository at this point in the history
Package-Manager: Portage-3.0.18, Repoman-3.0.3
Signed-off-by: David Seifert <[email protected]>
  • Loading branch information
SoapGentoo committed May 14, 2021
1 parent 6d49673 commit 3aabc77
Show file tree
Hide file tree
Showing 3 changed files with 77 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sys-apps/sg3_utils/Manifest
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
DIST sg3_utils-1.42.tgz 1219231 BLAKE2B dd9ea2c324cb6f4c0ce770c90b7980da5e998bddc3a2be43a0aa9bea88dfe34291d0f58b393b2a5ac680c05dc673802ec9fae1ead37107bc49fa33bc7c4df503 SHA512 d16b65e36b2bccb4fc4c189f97e71fa38e6619f37d668a4ddd74a52c715fa62325288d9737812ed19c80547059dbd27be5a20565e27e1aabb571e8f5f8ac53ad
DIST sg3_utils-1.45.tar.xz 989864 BLAKE2B 2d0a9e0edf514c8c7a566798f8087fc27d15d31cc8df39073dd97cff569da396b24236e0c231781625379b2ecefe7c99716d5d9c7dc104b15e150cb4e3c43e75 SHA512 fa25dedc447154d33937248a856af9a7ef380dda282a681d465a57d7dfc24b6c0409fa06aabf8cc28ba191e91db80fed0757b45212eddf713855574b48a97868
DIST sg3_utils-1.46.tar.xz 1031800 BLAKE2B 034af23d10da49938979ea4d0041c6ce4309b9ceac13f06bd524011dccf285e88fbc5f4c3f261ec3e316db86278ccff235015de43d98b0b62ff05a2f98df0850 SHA512 0b4caab97ccc11fb45e88219e460b37c6ff69b8f3c79e513279aef51783ff22399d141253abdbf55db198db0815bc39d30e9b1e3bd7dda5e15c5f4dae3fe89cf
31 changes: 31 additions & 0 deletions sys-apps/sg3_utils/files/sg3_utils-1.42-sysmacros.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
From 13ff34d408cf69339ce1f28756f5c7b5ad5f528b Mon Sep 17 00:00:00 2001
From: Mike Frysinger <[email protected]>
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

44 changes: 44 additions & 0 deletions sys-apps/sg3_utils/sg3_utils-1.42.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=5

inherit epatch 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
}

0 comments on commit 3aabc77

Please sign in to comment.