commit:     7898fcc9ea4390b949182a968176d252b9392738
Author:     Felix Janda <felix.janda <AT> posteo <DOT> de>
AuthorDate: Sun Jun  7 18:52:11 2015 +0000
Commit:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Mon Jun  8 12:27:27 2015 +0000
URL:        https://gitweb.gentoo.org/proj/hardened-dev.git/commit/?id=7898fcc9

sys-apps/hdparm: Bump to 9.45

 sys-apps/hdparm/files/hdparm-9.45-musl.patch | 35 +++++++++++++++++++++++
 sys-apps/hdparm/hdparm-9.45-r99.ebuild       | 42 ++++++++++++++++++++++++++++
 2 files changed, 77 insertions(+)

diff --git a/sys-apps/hdparm/files/hdparm-9.45-musl.patch 
b/sys-apps/hdparm/files/hdparm-9.45-musl.patch
new file mode 100644
index 0000000..a9fe0aa
--- /dev/null
+++ b/sys-apps/hdparm/files/hdparm-9.45-musl.patch
@@ -0,0 +1,35 @@
+diff -ur a/hdparm-9.45/fallocate.c b/hdparm-9.45/fallocate.c
+--- a/hdparm-9.45/fallocate.c  2010-10-04 20:38:39.000000000 -0100
++++ b/hdparm-9.45/fallocate.c  2015-01-28 21:19:59.201795557 -0100
+@@ -27,7 +27,7 @@
+       err = EINVAL;
+ #else
+       int fd;
+-      loff_t offset = 0, len;
++      off_t offset = 0, len;
+       int mode = 0;
+ 
+       fd = open(path, O_WRONLY|O_CREAT|O_EXCL, 0600);
+diff -ur a/hdparm-9.45/hdparm.h b/hdparm-9.45/hdparm.h
+--- a/hdparm-9.45/hdparm.h     2014-09-27 14:31:18.000000000 -0100
++++ b/hdparm-9.45/hdparm.h     2015-01-28 21:19:08.662427386 -0100
+@@ -1,7 +1,7 @@
+ /* Some prototypes for extern functions. */
+ 
+ //#undef __KERNEL_STRICT_NAMES
+-#include <linux/types.h>
++#include <sys/types.h>
+ 
+ #if !defined(__GNUC__) && !defined(__attribute__)
+ #define __attribute__(x)
+diff -ur a/hdparm-9.45/sysfs.c b/hdparm-9.45/sysfs.c
+--- a/hdparm-9.45/sysfs.c      2010-10-04 20:39:20.000000000 -0100
++++ b/hdparm-9.45/sysfs.c      2015-01-28 21:19:25.692214485 -0100
+@@ -13,6 +13,7 @@
+ #include <fcntl.h>
+ #include <errno.h>
+ #include <dirent.h>
++#include <limits.h>
+ #include <sys/stat.h>
+ #include <linux/types.h>
+ 

diff --git a/sys-apps/hdparm/hdparm-9.45-r99.ebuild 
b/sys-apps/hdparm/hdparm-9.45-r99.ebuild
new file mode 100644
index 0000000..d0826b0
--- /dev/null
+++ b/sys-apps/hdparm/hdparm-9.45-r99.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/hdparm/hdparm-9.45.ebuild,v 1.2 
2015/06/02 11:38:26 zlogene Exp $
+
+EAPI="4"
+
+inherit toolchain-funcs flag-o-matic
+
+DESCRIPTION="Utility to change hard drive performance parameters"
+HOMEPAGE="http://sourceforge.net/projects/hdparm/";
+SRC_URI="mirror://sourceforge/hdparm/${P}.tar.gz"
+
+LICENSE="BSD GPL-2" # GPL-2 only
+SLOT="0"
+KEYWORDS="amd64 ~arm ~mips ~ppc ~x86"
+IUSE="static"
+
+src_prepare() {
+       use static && append-ldflags -static
+       sed -i \
+               -e "/^CFLAGS/ s:-O2:${CFLAGS}:" \
+               -e "/^LDFLAGS/ s:-s:${LDFLAGS}:" \
+               Makefile || die "sed"
+       epatch "${FILESDIR}"/${P}-musl.patch
+}
+
+src_compile() {
+       emake STRIP=: CC="$(tc-getCC)"
+}
+
+src_install() {
+       into /
+       dosbin hdparm contrib/idectl
+
+       newinitd "${FILESDIR}"/hdparm-init-8 hdparm
+       newconfd "${FILESDIR}"/hdparm-conf.d.3 hdparm
+
+       doman hdparm.8
+       dodoc hdparm.lsm Changelog README.acoustic hdparm-sysconfig
+       docinto wiper
+       dodoc wiper/{README.txt,wiper.sh}
+}

Reply via email to