summaryrefslogtreecommitdiff
path: root/app-admin/longrun
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
commit8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch)
tree7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /app-admin/longrun
parent30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff)
gentoo resync : 14.07.2018
Diffstat (limited to 'app-admin/longrun')
-rw-r--r--app-admin/longrun/Manifest6
-rw-r--r--app-admin/longrun/files/0.9-makefile_cflags.patch13
-rw-r--r--app-admin/longrun/files/0.9-replace-loff_t.patch35
-rw-r--r--app-admin/longrun/longrun-0.9-r4.ebuild70
-rw-r--r--app-admin/longrun/metadata.xml13
5 files changed, 137 insertions, 0 deletions
diff --git a/app-admin/longrun/Manifest b/app-admin/longrun/Manifest
new file mode 100644
index 000000000000..016068bc56a5
--- /dev/null
+++ b/app-admin/longrun/Manifest
@@ -0,0 +1,6 @@
+AUX 0.9-makefile_cflags.patch 305 BLAKE2B 7b2c0df4162b44c723286b86f1cdff3de6761def2139d737c3dc7ac754b6e8b9f5674528a12334316fbc922f4b9d961d2e53e0e7c085f69a16952395feaef36e SHA512 3aaf8b9a21364264734de21505a5c2e5327bc443a25e26db55af87b49bec6b9a767bce9abdcf24ee0af2e43579460a36caaffa1d6d57b7420192685194f4979d
+AUX 0.9-replace-loff_t.patch 992 BLAKE2B 81c94054ba9ab75cd6c9f71e10c78b6f921695e9b0273aa35a394bade52d1183e588a3a5c8b894c1c16cf5c3c620f1777ab56e591fdb68ed6e70927c4aa89f2c SHA512 6eb0e828afcd6265babd4cefd50191610095c8d6309b75089ecf3f34363231bf8a2b68c3db0d3938904951035232b9bafcb2029de832e9c7515922dad3ceac1b
+DIST longrun-0.9.tar.bz2 11539 BLAKE2B a308dc7f350399da0bf593e2eee8109a90103b298d943976f0da143c52105362aa100763dcdd3cacd4c3244cdd5a7eb9a1b355aa803a69a2225ea18c6e5a60dd SHA512 6b38160f54d0cb9124c46c0e3ba22faf4ba4376ef58f7db40aabbab20836b1551dd839d28e5bf49540a5ce0e13312bd1d7332cc59ce45fa49f81d0b9746ef055
+DIST longrun_0.9-19.diff.gz 14697 BLAKE2B 98a7497679df5be0346a37b6119a9418c7fba80672eb2c345784628c3517c6f1fbc8d953abe2696a3b576310cd489e5c1d3595153bbfa9d82dfb44697c246116 SHA512 591519183017dd84d6f78554eea9f215be9346efc3f30889f5a25d01c6b68bd5a949507b9a0c871f9aca0b49e415c4fa261821d4158b24c93481394403b83e35
+EBUILD longrun-0.9-r4.ebuild 1766 BLAKE2B 6e0cece68b00d87f1d8d96059aea5f964c3215d90a48493f88358374ce09bc1798e53e4df6a9e613d918f790ffb26be3cb718ecf8550ac39de2a141f11a321e8 SHA512 447e4e55c29db55c4b105681a485e682bc7158f1a1caf4b7e3b95a572014a893ead7170290ec50b95d6fc5eda42de2ee6d81ccb501e97e532956dc368f05ff4d
+MISC metadata.xml 437 BLAKE2B 932878fe62012a5285dfc19f3e2a2d8a3f0eff2809dca919e58b81e2c82e256c1cf7fd4a8b477919973ed76ec0481ec00f25de43b78f054ae6f016948f5969d0 SHA512 1962bfa09950f194062baddd9996a84ba6264c1ed76e4e93d376a9935500a35377ea36c24fc55668d59f8488b9d3cdfe56139b91cc179d52e184f7f164d23ab9
diff --git a/app-admin/longrun/files/0.9-makefile_cflags.patch b/app-admin/longrun/files/0.9-makefile_cflags.patch
new file mode 100644
index 000000000000..8848dc667866
--- /dev/null
+++ b/app-admin/longrun/files/0.9-makefile_cflags.patch
@@ -0,0 +1,13 @@
+--- a/Makefile
++++ b/Makefile
+@@ -2,8 +2,8 @@
+
+ all: longrun README stamp-po
+
+-longrun: longrun.c
+- gcc -DLOCALEDIR=\"$(LOCALEDIR)\" -g -O2 -W -Wall -o longrun longrun.c
++CFLAGS += -W -Wall
++CPPFLAGS += -DLOCALEDIR=\"$(LOCALEDIR)\"
+
+ README: longrun.1
+ groff -Tascii -man longrun.1 | col -bx > README
diff --git a/app-admin/longrun/files/0.9-replace-loff_t.patch b/app-admin/longrun/files/0.9-replace-loff_t.patch
new file mode 100644
index 000000000000..589c0947b155
--- /dev/null
+++ b/app-admin/longrun/files/0.9-replace-loff_t.patch
@@ -0,0 +1,35 @@
+Use off_t instead of loff_t. Both pread() and pwrite() take
+off_t not loff_t types. This breaks the build on musl. See
+
+https://bugs.gentoo.org/show_bug.cgi?id=541694
+
+diff -Naur longrun.orig/longrun.c longrun/longrun.c
+--- longrun.orig/longrun.c 2015-03-07 19:05:19.166652462 +0000
++++ longrun/longrun.c 2015-03-07 19:06:05.419651899 +0000
+@@ -181,7 +181,7 @@
+ }
+
+ /* note: if an output is NULL, then don't set it */
+-void read_msr(loff_t address, int *lower, int *upper)
++void read_msr(off_t address, int *lower, int *upper)
+ {
+ uint32_t data[2];
+
+@@ -193,7 +193,7 @@
+ if (upper) *upper = data[1];
+ }
+
+-void write_msr(loff_t address, int lower, int upper)
++void write_msr(off_t address, int lower, int upper)
+ {
+ uint32_t data[2];
+
+@@ -206,7 +206,7 @@
+ }
+
+ /* note: if an output is NULL, then don't set it */
+-void read_cpuid(loff_t address, int *eax, int *ebx, int *ecx, int *edx)
++void read_cpuid(off_t address, int *eax, int *ebx, int *ecx, int *edx)
+ {
+ uint32_t data[4];
+
diff --git a/app-admin/longrun/longrun-0.9-r4.ebuild b/app-admin/longrun/longrun-0.9-r4.ebuild
new file mode 100644
index 000000000000..0508c52ea188
--- /dev/null
+++ b/app-admin/longrun/longrun-0.9-r4.ebuild
@@ -0,0 +1,70 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit linux-info toolchain-funcs
+
+DESCRIPTION="A utility to control Transmeta's Crusoe and Efficeon processors"
+HOMEPAGE="http://freshmeat.net/projects/longrun/"
+
+DEBIAN_PATCH_VERSION="19"
+DEBIAN_PATCH="${PN}_${PV}-${DEBIAN_PATCH_VERSION}.diff"
+SRC_URI="
+ mirror://kernel/linux/utils/cpu/crusoe/${P}.tar.bz2
+ mirror://debian/pool/main/l/${PN}/${DEBIAN_PATCH}.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="-ppc x86"
+IUSE=""
+
+DEPEND="sys-apps/groff"
+
+S=${WORKDIR}/${PN}
+
+CONFIG_CHECK="~X86_MSR ~X86_CPUID"
+ERROR_X86_MSR="
+Longrun needs a MSR device to function. Please select
+MSR under Processor type and features. It can be build
+directly into the kernel or as a module."
+ERROR_X86_CPUID="
+Longrun needs a CPUID device to function. Please select
+CPUID under Processor type and features. It can be
+build directly into the kernel or as a module."
+
+PATCHES=(
+ "${WORKDIR}"/${DEBIAN_PATCH}
+ "${FILESDIR}"/${PV}-makefile_cflags.patch
+ "${FILESDIR}"/${PV}-replace-loff_t.patch
+)
+
+src_configure() {
+ tc-export CC
+}
+
+src_install() {
+ default
+ dodoc MAKEDEV-cpuid-msr
+}
+
+pkg_postinst() {
+ if linux_config_exists; then
+ if linux_chkconfig_module X86_MSR; then
+ elog "You have compiled MSR as a module."
+ elog "You need to load it before using Longrun."
+ elog "The module is called msr."
+ elog
+ fi
+
+ if linux_chkconfig_module X86_CPUID; then
+ elog "You have compiled CPUID as a module."
+ elog "You need to load it before using Longrun."
+ elog "The module is called cpuid."
+ fi
+ else
+ elog "You have no kernel configuration available."
+ elog "Longrun needs both CPUID and MSR capabilites,"
+ elog "in the kernel you intend to run it under."
+ fi
+}
diff --git a/app-admin/longrun/metadata.xml b/app-admin/longrun/metadata.xml
new file mode 100644
index 000000000000..fcfeedac0c13
--- /dev/null
+++ b/app-admin/longrun/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <!-- maintainer-needed -->
+ <longdescription>
+ Longrun is a user space utility program for controlling the Longrun
+ thermal and power save functionalities found in the processors made
+ by Transmeta.
+ </longdescription>
+ <upstream>
+ <remote-id type="freshmeat">longrun</remote-id>
+ </upstream>
+</pkgmetadata>