sys-power/cpudyn: add -std=gnu89 to CFLAGS to restore pre-GCC5 semantics
authorDavid Seifert <soap@gentoo.org>
Sun, 24 Jan 2016 20:41:32 +0000 (21:41 +0100)
committerDavid Seifert <soap@gentoo.org>
Sun, 24 Jan 2016 20:41:50 +0000 (21:41 +0100)
Gentoo-Bug: 570082
* EAPI=6
* Make patch -p1 compatible

Package-Manager: portage-2.2.27

sys-power/cpudyn/cpudyn-1.0.1-r1.ebuild [new file with mode: 0644]
sys-power/cpudyn/files/cpudyn-0.99.0-init_conf_updates.patch

diff --git a/sys-power/cpudyn/cpudyn-1.0.1-r1.ebuild b/sys-power/cpudyn/cpudyn-1.0.1-r1.ebuild
new file mode 100644 (file)
index 0000000..c3dd5ee
--- /dev/null
@@ -0,0 +1,48 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+inherit flag-o-matic toolchain-funcs
+
+DESCRIPTION="A daemon to control laptop power consumption via cpufreq and disk standby"
+HOMEPAGE="http://freecode.com/projects/cpudyn/"
+SRC_URI="http://mnm.uib.es/~gallir/${PN}/download/${P}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
+IUSE=""
+
+S=${WORKDIR}/${PN}
+
+PATCHES=(
+       "${FILESDIR}/${PN}-0.99.0-init_conf_updates.patch"
+)
+
+src_prepare() {
+       # fix #570082 by restoring pre-GCC5 inline semantics
+       append-cflags -std=gnu89
+
+       default
+}
+
+src_compile() {
+       emake LDFLAGS="${LDFLAGS}" CC="$(tc-getCC)" cpudynd
+}
+
+src_install() {
+       dosbin cpudynd
+
+       doman cpudynd.8
+       dodoc INSTALL README VERSION changelog
+       dodoc *.html
+
+       newinitd "${FILESDIR}"/cpudyn.init cpudyn
+       newconfd debian/cpudyn.conf cpudyn
+}
+
+pkg_postinst() {
+       einfo "Configuration file is /etc/conf.d/cpudyn."
+}
index fcfb55294d335d91e8cfa396a166d7863a5846bf..f6aca0b7a9f87dc769da58c18ae306ac4a721152 100644 (file)
@@ -1,5 +1,5 @@
---- gentoo/cpudyn.conf.orig    2004-01-08 17:20:39.575230665 +0100
-+++ gentoo/cpudyn.conf 2004-01-08 17:20:37.450290151 +0100
+--- cpudyn/debian/cpudyn.conf.orig     2004-01-08 17:20:39.575230665 +0100
++++ cpudyn/debian/cpudyn.conf  2004-01-08 17:20:37.450290151 +0100
 @@ -32,6 +32,12 @@
  
  THROTTLING_LOW=7