diff options
| author | Palica <palica+gitlab@liguros.net> | 2020-06-23 22:35:08 +0200 |
|---|---|---|
| committer | Palica <palica+gitlab@liguros.net> | 2020-06-23 22:35:08 +0200 |
| commit | ecdac123787b96ce6649f0f91da12ea6458cc2b1 (patch) | |
| tree | b89c74d9e6fe6e8aebc4c77bcbeb4ab73214127d /app-laptop | |
| parent | 1be72aa41cf41dedadeecf59dca9f01de6381f5e (diff) | |
| download | baldeagleos-repo-ecdac123787b96ce6649f0f91da12ea6458cc2b1.tar.gz baldeagleos-repo-ecdac123787b96ce6649f0f91da12ea6458cc2b1.tar.xz baldeagleos-repo-ecdac123787b96ce6649f0f91da12ea6458cc2b1.zip | |
Updating liguros repo
Diffstat (limited to 'app-laptop')
88 files changed, 2503 insertions, 0 deletions
diff --git a/app-laptop/dispad/Manifest b/app-laptop/dispad/Manifest new file mode 100644 index 000000000000..50b1d3f53c25 --- /dev/null +++ b/app-laptop/dispad/Manifest @@ -0,0 +1 @@ +DIST dispad-0.3.1.tar.gz 97952 BLAKE2B 87c9866a396e9319aca5b4b68db6be4f937412e09b444736fd27e0a0150b7a19c56b87b60fda83881b902dfba042ca3cede18226562996912d20147ad8e4069e SHA512 fa9666e79de31f79f3567ae3b529c6df3cf56c134c1fe30d62b7d863d623c89abd6b1153de972507a3795c20001f11caf1e49926a402d145a048014aa97cd400 diff --git a/app-laptop/dispad/dispad-0.3.1-r1.ebuild b/app-laptop/dispad/dispad-0.3.1-r1.ebuild new file mode 100644 index 000000000000..3a53465f2887 --- /dev/null +++ b/app-laptop/dispad/dispad-0.3.1-r1.ebuild @@ -0,0 +1,28 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit autotools + +DESCRIPTION="Daemon to disable trackpads while typing" +HOMEPAGE="https://github.com/BlueDragonX/dispad" +SRC_URI="https://github.com/BlueDragonX/dispad/tarball/v${PV/_/-} -> ${P}.tar.gz" + +S="${WORKDIR}/BlueDragonX-dispad-dbb9be3" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +DEPEND=" + dev-libs/confuse + x11-libs/libX11 + x11-libs/libXi" +RDEPEND="${DEPEND}" + +src_prepare() { + default + eautoreconf -i +} diff --git a/app-laptop/dispad/metadata.xml b/app-laptop/dispad/metadata.xml new file mode 100644 index 000000000000..2bee5db894ee --- /dev/null +++ b/app-laptop/dispad/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <!-- maintainer-needed --> + <upstream> + <remote-id type="github">BlueDragonX/dispad</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/app-laptop/hdaps-gl/Manifest b/app-laptop/hdaps-gl/Manifest new file mode 100644 index 000000000000..ba7b321f3219 --- /dev/null +++ b/app-laptop/hdaps-gl/Manifest @@ -0,0 +1 @@ +DIST hdaps-gl-0.0.7.tar.xz 226516 BLAKE2B e7de2fa72021e0a98a3e4a9c4501aa8ff05252de29bdc378ae31e0ea741513e6f2205696cacb7169d03c4e3f818e5b24f661bf9119d9afe8daa5bea90a248367 SHA512 4a8eaa556488ae8b0941f51a76e97cbbdc1b7b66aef14ea55e36197a2ad92c7b6fee0617bc71e85ae9320b09b5c903ce053ad9cb78f931618a4c806d5298887b diff --git a/app-laptop/hdaps-gl/hdaps-gl-0.0.7.ebuild b/app-laptop/hdaps-gl/hdaps-gl-0.0.7.ebuild new file mode 100644 index 000000000000..d87d1dcc0dc0 --- /dev/null +++ b/app-laptop/hdaps-gl/hdaps-gl-0.0.7.ebuild @@ -0,0 +1,19 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +DESCRIPTION="OpenGL visualization for HDAPS data" +HOMEPAGE="https://github.com/linux-thinkpad/hdaps-gl" +SRC_URI="https://github.com/linux-thinkpad/hdaps-gl/releases/download/${PV}/${P}.tar.xz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 x86" +IUSE="" + +BDEPEND="" +DEPEND="media-libs/freeglut + media-libs/glu + virtual/opengl" +RDEPEND="${DEPEND}" diff --git a/app-laptop/hdaps-gl/metadata.xml b/app-laptop/hdaps-gl/metadata.xml new file mode 100644 index 000000000000..e82f99692a64 --- /dev/null +++ b/app-laptop/hdaps-gl/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>mjo@gentoo.org</email> + <name>Michael Orlitzky</name> + </maintainer> + <upstream> + <remote-id type="github">linux-thinkpad/hdaps-gl</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/app-laptop/hdapsd/Manifest b/app-laptop/hdapsd/Manifest new file mode 100644 index 000000000000..935f092ee2df --- /dev/null +++ b/app-laptop/hdapsd/Manifest @@ -0,0 +1 @@ +DIST hdapsd-20141203.tar.gz 128818 BLAKE2B 0219e30e032032dfd729e97f526eb7402fe4cb72245589ef03cca28f75a6e1f2cbfa55c5aa5599b24f496bbe662467077415fbec47caa1db17d6108e07292daa SHA512 19c1a8b362f15864b71f4fb221c0993b43b3b2d965d5826af06fb9f6b0e345e5da99181493e13e230c7fe77060ae5b373027e8ec90a511566a6ccaef43998178 diff --git a/app-laptop/hdapsd/files/hdapsd.conf-20141024 b/app-laptop/hdapsd/files/hdapsd.conf-20141024 new file mode 100644 index 000000000000..a83d8bb181ac --- /dev/null +++ b/app-laptop/hdapsd/files/hdapsd.conf-20141024 @@ -0,0 +1,24 @@ +# Configuration for the HDAPS daemon (hdapsd). All settings here are +# optional and will override those set in /etc/hdapsd.conf (if hdapsd +# was built with libconfig support). + +# The list of the disk devices that hdapsd should monitor. Usually +# this is "hda", "sda", or "hda sda". The hdaps daemon will attempt to +# auto-detect your drive if this is left empty. Empty by default. +# +#DISKLIST="sda" + +# Hdapsd sensitivity. The lower the threshold, the earlier the heads +# are parked when movement is detected. The default is determined by +# hdapsd, and is currently 15. +# +#THRESHOLD="10" + +# Log to syslog? Disabled by default. +# +#SYSLOG="true" + +# Set any extra options here, like -a for "adaptive mode". Empty by +# default. +# +#OPTIONS="-a" diff --git a/app-laptop/hdapsd/files/hdapsd.init-20141024 b/app-laptop/hdapsd/files/hdapsd.init-20141024 new file mode 100644 index 000000000000..6113b60b7d7c --- /dev/null +++ b/app-laptop/hdapsd/files/hdapsd.init-20141024 @@ -0,0 +1,76 @@ +#!/sbin/openrc-run +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License, v2 + +description="Hard Drive Active Protection System daemon" +command="/usr/sbin/hdapsd" +pidfile="/run/hdapsd.pid" + +# Always daemonize when started by OpenRC, and don't make the pidfile +# configurable. Even if the user sets something dumb for the pidfile +# in /etc/hdapsd.conf, we want it to work! Fortunately the settings +# passed on the command-line override the config file. +command_args="--background --pidfile=${pidfile}" + + +depend() { + need localmount +} + +checkconfig() { + # An empty DISKLIST is allowed because the disk will be + # auto-detected. + for DISK in ${DISKLIST}; do + if [ ! -b /dev/${DISK} ]; then + eerror "Could not find disk /dev/${DISK}!" + eerror "Adjust the DISK setting in /etc/conf.d/hdapsd" + return 1 + fi + + if [ ! -e /sys/block/${DISK}/queue/protect ] && \ + [ ! -e /sys/block/${DISK}/device/unload_heads ] ; then + eerror "No protect entry for ${DISK}!" + eerror "Make sure your kernel is patched with the blk_freeze patch" + return 1 + fi + done + + # Load the tp_smapi module first. This is not a requirement, but + # it helps hdapsd's adaptive mode. + if [ ! -e /sys/devices/platform/smapi ] ; then + modprobe tp_smapi 2>/dev/null + fi + + if [ ! -d /sys/devices/platform/hdaps ] ; then + ebegin "Loading hdaps module" + modprobe hdaps + eend $? || return 1 + fi +} + +start() { + checkconfig || return 1 + + for DISK in ${DISKLIST}; do + command_args="${command_args} -d ${DISK}" + done + + # Since all of these settings are now optional, we append them + # only if we need to. + if [ ! -z "${THRESHOLD}" ] ; then + command_args="${command_args} --sensitivity ${THRESHOLD}" + fi + + if [ ! -z "${SYSLOG}" ] ; then + command_args="${command_args} --syslog" + fi + + if [ ! -z "${OPTIONS}" ] ; then + command_args="${command_args} ${OPTIONS}" + fi + + ebegin "Starting the ${description}" + start-stop-daemon --start --exec "${command}" --pidfile "${pidfile}" \ + -- ${command_args} + eend $? +} diff --git a/app-laptop/hdapsd/hdapsd-20141203.ebuild b/app-laptop/hdapsd/hdapsd-20141203.ebuild new file mode 100644 index 000000000000..ca4d09f54cee --- /dev/null +++ b/app-laptop/hdapsd/hdapsd-20141203.ebuild @@ -0,0 +1,72 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit linux-info readme.gentoo systemd + +DESCRIPTION="IBM ThinkPad Hard Drive Active Protection System (HDAPS) daemon" +HOMEPAGE="https://github.com/evgeni/hdapsd/" +SRC_URI="https://github.com/evgeni/${PN}/releases/download/${PV}/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 x86" +IUSE="libconfig" + +DEPEND="libconfig? ( dev-libs/libconfig )" +RDEPEND="${DEPEND}" + +pkg_setup() { + # We require the hdaps module which can either come from either the + # kernel itself (CONFIG_SENSORS_HDAPS) or from the tp_smapi package. + if ! has_version app-laptop/tp_smapi[hdaps]; then + CONFIG_CHECK="~SENSORS_HDAPS" + ERROR_SENSORS_HDAPS="${P} requires app-laptop/tp_smapi[hdaps] or " + ERROR_SENSORS_HDAPS+="kernel support for CONFIG_SENSORS_HDAPS enabled" + linux-info_pkg_setup + fi +} + +src_configure() { + econf \ + $(use_enable libconfig) \ + --with-systemdsystemunitdir=$(systemd_get_unitdir) \ + --docdir="/usr/share/doc/${PF}" +} + +src_install() { + default + newconfd "${FILESDIR}/hdapsd.conf-20141024" hdapsd + newinitd "${FILESDIR}/hdapsd.init-20141024" hdapsd + readme.gentoo_create_doc +} + +pkg_postinst() { + [[ -z $(ls "${ROOT}"sys/block/*/queue/protect 2>/dev/null) ]] && \ + [[ -z $(ls "${ROOT}"sys/block/*/device/unload_heads 2>/dev/null) ]] && \ + ewarn "Your kernel does NOT support shock protection." + + readme.gentoo_print_elog +} + +DISABLE_AUTOFORMATTING=1 +DOC_CONTENTS=" +${PN} requires a kernel module to function properly. The recommended +approach is to install app-laptop/tp_smapi[hdaps], but the in-tree +module provided by CONFIG_SENSORS_HDAPS may work as well. + +Common daemon parameters can be set in ${EROOT}etc/conf.d/${PN}. If the +package was installed with USE=libconfig, then the parameters can also +be set in ${EROOT}etc/${PN}.conf, although the former will take +precedence over the latter if both are used. + +You can change the default sampling rate by modifing + + /sys/devices/platform/hdaps/sampling_rate + +and you may need to enable shock protection manually by running + + # echo -1 > /sys/block/<disk>/device/unload_heads + +as root. +" diff --git a/app-laptop/hdapsd/metadata.xml b/app-laptop/hdapsd/metadata.xml new file mode 100644 index 000000000000..cbfaecf4b668 --- /dev/null +++ b/app-laptop/hdapsd/metadata.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>junghans@gentoo.org</email> + <name>Christoph Junghans</name> + </maintainer> + <maintainer type="person"> + <email>mjo@gentoo.org</email> + <name>Michael Orlitzky</name> + </maintainer> + <use> + <flag name="libconfig"> + Require <pkg>dev-libs/libconfig</pkg> to allow the daemon to + read a configuration file at startup + </flag> + </use> + <upstream> + <remote-id type="github">evgeni/hdapsd</remote-id> + <remote-id type="sourceforge">hdaps</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/app-laptop/i8kutils/Manifest b/app-laptop/i8kutils/Manifest new file mode 100644 index 000000000000..aa67d983e3cb --- /dev/null +++ b/app-laptop/i8kutils/Manifest @@ -0,0 +1 @@ +DIST i8kutils_1.42.tar.xz 37544 BLAKE2B ca8ec63252f43b269ba2a5565fce275aaa6542ebe6f4824d12b194cb0ae8b09dbe354c743ad78af8bcb897e411f1739df464e6c5603d470842de4b59be753984 SHA512 148e8788c50cbaa22f1dd3b72867839f5bc2d91cda70aee74f7c9a3d8542386a44652c5eb8dd9eba0e30400fc6bb72855d3cc7f2dc4284c2529b9cba2eac485b diff --git a/app-laptop/i8kutils/files/i8k.conf b/app-laptop/i8kutils/files/i8k.conf new file mode 100644 index 000000000000..c5bd389b294a --- /dev/null +++ b/app-laptop/i8kutils/files/i8k.conf @@ -0,0 +1,31 @@ +# Config file for /etc/init.d/i8k + +# Parameters: +# +# i8kbuttons Parameters +# ===================== +# VOLUME_UP : command for i8kbuttons to run on volume up key +# VOLUME_DOWN : command for i8kbuttons to run on volume down key +# VOLUME_MUTE : command for i8kbuttons to run on mute key +# BUTTON_REPEAT : repeat rate, in milliseconds, for i8kbuttons keypresses +# +# If VOLUME_* commands are not defined, i8kbuttons will not be started +# +# i8kmon Parameters +# ================= +# NOMON : if set, i8kmon will not be started +# NOAUTO : if set, i8kmon will not control the fans +# TIMEOUT : timeout, in seconds, at which i8kmon will check/update status +# (default is 2) + +# for ALSA +MIXER="/usr/bin/amixer -q set Master" +VOLUME_UP="$MIXER 1+" +VOLUME_DOWN="$MIXER 1-" +VOLUME_MUTE="$MIXER toggle" + +# for aumix (no mute support) +#VOLUME_UP="aumix -v +4" +#VOLUME_DOWN="aumix -v -4" + +BUTTON_REPEAT=100 diff --git a/app-laptop/i8kutils/files/i8k.init-r1 b/app-laptop/i8kutils/files/i8k.init-r1 new file mode 100644 index 000000000000..1e1cb7ca0c94 --- /dev/null +++ b/app-laptop/i8kutils/files/i8k.init-r1 @@ -0,0 +1,50 @@ +#!/sbin/openrc-run + +depend() { + after alsasound + after modules +} + +checkconfig() { + if [ ! -e /proc/i8k ] ; then + eerror "The i8k driver is not installed" + return 1 + fi +} + +start() { + checkconfig || return 1 + if [ -n "$VOLUME_UP$VOLUME_DOWN$VOLUME_MUTE" ] ; then + ebegin "Starting i8kbuttons" + start-stop-daemon --start --quiet --pidfile /var/run/i8kbuttons.pid \ + --make-pidfile --exec /usr/bin/i8kbuttons --background \ + -- ${VOLUME_UP:+-u "${VOLUME_UP}"} \ + ${VOLUME_DOWN:+-d "$VOLUME_DOWN"} \ + ${VOLUME_MUTE:+-m "$VOLUME_MUTE"} \ + ${BUTTON_REPEAT:+-r "$BUTTON_REPEAT"} + eend $? + fi + if [ ! -n "$NOMON" ]; then + ebegin "Starting i8kmon" + start-stop-daemon --start -b --quiet \ + --pidfile /var/run/i8kmon.pid \ + --make-pidfile \ + --exec /usr/bin/i8kmon --background \ + --name "tclsh /usr/bin/i8kmon" \ + -- -d ${NOAUTO:+-na} ${TIMEOUT:+-t $TIMEOUT} + eend $? + fi +} + +stop() { + if [ -n "$VOLUME_UP$VOLUME_DOWN$VOLUME_MUTE" ] ; then + ebegin "Stopping i8kbuttons" + start-stop-daemon --stop --quiet --pidfile /var/run/i8kbuttons.pid + eend $? + fi + if [ ! -n "$NOMON" ]; then + ebegin "Stopping i8kmon" + start-stop-daemon --stop --quiet --pidfile /var/run/i8kmon.pid + eend $? + fi +} diff --git a/app-laptop/i8kutils/files/i8kmon.service b/app-laptop/i8kutils/files/i8kmon.service new file mode 100644 index 000000000000..3b80f46334af --- /dev/null +++ b/app-laptop/i8kutils/files/i8kmon.service @@ -0,0 +1,9 @@ +[Unit] +Description=Dell laptop thermal monitoring +ConditionPathExists=/proc/i8k + +[Service] +ExecStart=/usr/bin/i8kmon -d + +[Install] +WantedBy=multi-user.target diff --git a/app-laptop/i8kutils/files/i8kutils-1.42-Makefile.patch b/app-laptop/i8kutils/files/i8kutils-1.42-Makefile.patch new file mode 100644 index 000000000000..7dc56d91aa3e --- /dev/null +++ b/app-laptop/i8kutils/files/i8kutils-1.42-Makefile.patch @@ -0,0 +1,34 @@ +Fix a race condition causing parallel builds to sometimes fail. + +Both probe_i8k_calls_time and i8kctl contain a main() function, though +i8kctl's is omitted when built with -DLIB so they can link without a +conflict. i8kctl is also a standalone exe so it is built twice, with +and without -DLIB. When building in parallel you can get into a +situation where the object file created by the probe_i8k_calls_time +target gets overwritten with the one from i8kctl and bad things happen. +Nothing actually uses the i8kctl.o that has main() so we can just not +build it. + +Also move CFLAGS, CC, LDFLAGS respect out of the ebuild. + +--- a/Makefile ++++ b/Makefile +@@ -17,13 +17,13 @@ ccflags-y = -Wall + + all: i8kctl probe_i8k_calls_time + +-i8kctl: i8kctl.c i8kctl.o +- gcc -Wall i8kctl.c -o i8kctl ++i8kctl: i8kctl.c ++ $(CC) -Wall ${CFLAGS} -o i8kctl i8kctl.c + + probe_i8k_calls_time: probe_i8k_calls_time.c +- gcc -Wall -c -g -DLIB i8kctl.c +- gcc -Wall -c -g -DLIB probe_i8k_calls_time.c +- gcc -o probe_i8k_calls_time i8kctl.o probe_i8k_calls_time.o ++ $(CC) -Wall ${CFLAGS} -c -DLIB i8kctl.c ++ $(CC) -Wall ${CFLAGS} -c -DLIB probe_i8k_calls_time.c ++ $(CC) -Wall ${CFLAGS} ${LDFLAGS} -o probe_i8k_calls_time i8kctl.o probe_i8k_calls_time.o + + i8k: + make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules diff --git a/app-laptop/i8kutils/files/i8kutils-gcc5.patch b/app-laptop/i8kutils/files/i8kutils-gcc5.patch new file mode 100644 index 000000000000..258b95f595f6 --- /dev/null +++ b/app-laptop/i8kutils/files/i8kutils-gcc5.patch @@ -0,0 +1,28 @@ +Fix build with GCC 5. + +x86_64-pc-linux-gnu-gcc -O2 -march=native -g -pipe -c -o i8kctl.o i8kctl.c +gcc -Wall -c -Wl,--hash-style=gnu -Wl,-O1 -Wl,--as-needed -DLIB i8kctl.c +gcc -Wall -c -Wl,--hash-style=gnu -Wl,-O1 -Wl,--as-needed -DLIB probe_i8k_calls_time.c +gcc -o probe_i8k_calls_time i8kctl.o probe_i8k_calls_time.o +probe_i8k_calls_time.o: In function `main': +probe_i8k_calls_time.c:(.text+0x62): undefined reference to `timestamp' +probe_i8k_calls_time.c:(.text+0x82): undefined reference to `timestamp' +probe_i8k_calls_time.c:(.text+0xa2): undefined reference to `timestamp' +probe_i8k_calls_time.c:(.text+0xbf): undefined reference to `timestamp' +probe_i8k_calls_time.c:(.text+0xdc): undefined reference to `timestamp' +probe_i8k_calls_time.o:probe_i8k_calls_time.c:(.text+0xf9): more undefined references to `timestamp' follow +collect2: error: ld returned 1 exit status +Makefile:24: recipe for target 'probe_i8k_calls_time' failed + + +--- a/probe_i8k_calls_time.c ++++ b/probe_i8k_calls_time.c +@@ -13,7 +13,7 @@ double t; + + struct timespec tmst; + +-inline double timestamp() ++double timestamp() + { + clock_gettime(CLOCK_REALTIME, &tmst); + t = tmst.tv_nsec; diff --git a/app-laptop/i8kutils/i8kutils-1.42.ebuild b/app-laptop/i8kutils/i8kutils-1.42.ebuild new file mode 100644 index 000000000000..a18ef111995f --- /dev/null +++ b/app-laptop/i8kutils/i8kutils-1.42.ebuild @@ -0,0 +1,52 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit eutils systemd toolchain-funcs + +DESCRIPTION="Dell Inspiron and Latitude utilities" +HOMEPAGE="https://launchpad.net/i8kutils" +SRC_URI="https://launchpad.net/i8kutils/trunk/${PV}/+download/${P/-/_}.tar.xz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="amd64 x86" +IUSE="tk" + +DEPEND="tk? ( dev-lang/tk:0 )" +RDEPEND="${DEPEND} + sys-power/acpi" + +S="${WORKDIR}/${PN}" + +DOCS=( README.i8kutils ) + +src_prepare() { + epatch "${FILESDIR}/${PN}-gcc5.patch" + epatch "${FILESDIR}/${P}-Makefile.patch" + + tc-export CC +} + +src_install() { + dobin i8kctl i8kfan + doman i8kctl.1 + dodoc README.i8kutils + + newinitd "${FILESDIR}"/i8k.init-r1 i8k + newconfd "${FILESDIR}"/i8k.conf i8k + + if use tk; then + dobin i8kmon + doman i8kmon.1 + dodoc i8kmon.conf + systemd_dounit "${FILESDIR}"/i8kmon.service + else + cat >> "${ED}"/etc/conf.d/i8k <<- EOF + + # i8kmon disabled because the package was installed without USE=tk + NOMON=1 + EOF + fi +} diff --git a/app-laptop/i8kutils/metadata.xml b/app-laptop/i8kutils/metadata.xml new file mode 100644 index 000000000000..8dfa6e34daf5 --- /dev/null +++ b/app-laptop/i8kutils/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <!-- maintainer-needed --> + <upstream> + <remote-id type="launchpad">i8kutils</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/app-laptop/ibam/Manifest b/app-laptop/ibam/Manifest new file mode 100644 index 000000000000..ea2c7bc1ebd7 --- /dev/null +++ b/app-laptop/ibam/Manifest @@ -0,0 +1,2 @@ +DIST ibam-0.5.2.tar.gz 22149 BLAKE2B a3d9398dc34004203643d3198a3994ef3b432b909bdf9713a91a1d938a19ab9d0345105a60f3357288c2f3d2a325498a0787138e50fb445f1ea11851f1d7de1c SHA512 c70d728a2f1250ed291e663bd9f4e9ba01308fce14edf1ffd1902057de7e5527548bd06e2e3caaaeabc064d0ee123f536a626fd50b84092f6fc9201fc6bdba58 +DIST ibam_0.5.2-2.1.diff.gz 6115 BLAKE2B 8a1ada53ed39a379f11158583b337166d74d17de808a44e3d3fb225eecef5e3f3b782088072f94dbad387b258254ccbe3fdce7d5655ff201c41d66dbeb7c6d61 SHA512 f6707e42626891aa87697bc28f124345f9f1d0dfb35620f6386dc1dca6b9c5e3a73571bf04e933091c1995d1156925029c0199c5caace497ff891c93f9011ac3 diff --git a/app-laptop/ibam/files/ibam-0.5.2-build.patch b/app-laptop/ibam/files/ibam-0.5.2-build.patch new file mode 100644 index 000000000000..665e50798b18 --- /dev/null +++ b/app-laptop/ibam/files/ibam-0.5.2-build.patch @@ -0,0 +1,42 @@ +--- /Makefile ++++ /Makefile +@@ -17,8 +17,8 @@ + # + IBAM_VERSION=0.5.2 + +-CC=g++ +-CFLAGS=-O3 -DIBAM_VERSION=\"$(IBAM_VERSION)\" -Wall ++CXX?=g++ ++CXXFLAGS+=-DIBAM_VERSION=\"$(IBAM_VERSION)\" -Wall + + PREFIX=/usr + +@@ -30,23 +30,23 @@ + all: ibam + + ibam: ibam.cpp ibam.inl ibam.hpp +- $(CC) $(CFLAGS) ibam.cpp -o ibam ++ $(CXX) $(LDFLAGS) $(CXXFLAGS) ibam.cpp -o ibam + + krell: ibam-krell.so + + ibam-krell.so: ibam-krell.o +- $(CC) $(CFLAGS) -fPIC -shared -Wl -o ibam-krell.so ibam-krell.o ++ $(CXX) $(LDFLAGS) $(CXXFLAGS) -fPIC -shared -o ibam-krell.so ibam-krell.o + + ibam-krell.o: ibam-krell.cpp ibam.hpp ibam.inl +- $(CC) $(CFLAGS) -fPIC `pkg-config gtk+-2.0 --cflags` `gdk-pixbuf-config --cflags` -c ibam-krell.cpp ++ $(CXX) $(CXXFLAGS) -fPIC `pkg-config gtk+-2.0 --cflags` `gdk-pixbuf-config --cflags` -c ibam-krell.cpp + + krell1: ibam-krell1.so + + ibam-krell1.so: ibam-krell1.o +- $(CC) $(CFLAGS) -shared -Wl -o ibam-krell1.so ibam-krell1.o ++ $(CXX) $(LDFLAGS) $(CXXFLAGS) -shared -o ibam-krell1.so ibam-krell1.o + + ibam-krell1.o: ibam-krell1.cpp ibam.hpp ibam.inl +- $(CC) $(CFLAGS) -fPIC `gtk-config --cflags` `imlib-config --cflags-gdk` -c ibam-krell1.cpp ++ $(CXX) $(CXXFLAGS) -fPIC `gtk-config --cflags` `imlib-config --cflags-gdk` -c ibam-krell1.cpp + + install: ibam + $(INSTALL) ./ibam $(PREFIX)/local/bin/ diff --git a/app-laptop/ibam/ibam-0.5.2-r4.ebuild b/app-laptop/ibam/ibam-0.5.2-r4.ebuild new file mode 100644 index 000000000000..2076603b9f60 --- /dev/null +++ b/app-laptop/ibam/ibam-0.5.2-r4.ebuild @@ -0,0 +1,63 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="6" + +PATCH_LEVEL="2.1" + +inherit toolchain-funcs + +DESCRIPTION="Intelligent Battery Monitor" +HOMEPAGE="http://ibam.sourceforge.net/" +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz + mirror://debian/pool/main/${PN:0:1}/${PN}/${PN}_${PV}-${PATCH_LEVEL}.diff.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="gkrellm" + +RDEPEND=" + gkrellm? ( + app-admin/gkrellm + x11-libs/gdk-pixbuf + x11-libs/gtk+:2 + )" +DEPEND=" + ${RDEPEND} + gkrellm? ( virtual/pkgconfig )" + +src_prepare() { + eapply \ + "${FILESDIR}"/${P}-build.patch \ + "${WORKDIR}"/${PN}_${PV}-${PATCH_LEVEL}.diff + + eapply debian/patches/02*.dpatch + eapply debian/patches/03*.dpatch + eapply debian/patches/05*.dpatch + + eapply_user +} + +src_compile() { + tc-export CXX + emake + use gkrellm && emake krell +} + +src_install() { + dobin ibam + dodoc CHANGES README REPORT + + if use gkrellm; then + insinto /usr/$(get_libdir)/gkrellm2/plugins + doins ibam-krell.so + fi +} + +pkg_postinst() { + elog + elog "You will need to install sci-visualization/gnuplot if you wish to use" + elog "the --plot argument to ibam." + elog +} diff --git a/app-laptop/ibam/metadata.xml b/app-laptop/ibam/metadata.xml new file mode 100644 index 000000000000..a90cb9d38b68 --- /dev/null +++ b/app-laptop/ibam/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <!-- maintainer-needed --> + <use> + <flag name="gkrellm">Enable building of app-admin/gkrellm module</flag> + </use> + <upstream> + <remote-id type="sourceforge">ibam</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/app-laptop/laptop-mode-tools/Manifest b/app-laptop/laptop-mode-tools/Manifest new file mode 100644 index 000000000000..c1a42249479b --- /dev/null +++ b/app-laptop/laptop-mode-tools/Manifest @@ -0,0 +1 @@ +DIST laptop-mode-tools_1.72.2.tar.gz 121437 BLAKE2B 1fdcdb88183156e4983b4561218164df5dde9fc91e85ab0ec1e6a401d3e5c5e70597a97e16c476949e80a674c34683eac6429e64e76c7921bd28f560e4ffe3cb SHA512 9a3960bad518aa73350b72ce30aeb80f3cbb1bf0fd6a11d5afe396b25c2b73f3b3d2fe7de0741eb94c9e3467c85a99741dc7acfd85339b9eb1daca09d3f8c56a diff --git a/app-laptop/laptop-mode-tools/files/0001-Fix-case-sensitive-name-for-lmt.py.patch b/app-laptop/laptop-mode-tools/files/0001-Fix-case-sensitive-name-for-lmt.py.patch new file mode 100644 index 000000000000..14d2801240f4 --- /dev/null +++ b/app-laptop/laptop-mode-tools/files/0001-Fix-case-sensitive-name-for-lmt.py.patch @@ -0,0 +1,46 @@ +From f1c44c8fca177b399bc5cb889ff2dfba2427ae30 Mon Sep 17 00:00:00 2001 +From: Ritesh Raj Sarraf <rrs@debian.org> +Date: Mon, 5 Feb 2018 08:51:26 +0530 +Subject: [PATCH] Fix case sensitive name for lmt.py + +Closes: https://github.com/rickysarraf/laptop-mode-tools/issues/124 +--- + gui/{LMT.py => lmt.py} | 0 + install.sh | 2 +- + laptop-mode-tools.spec | 2 +- + 3 files changed, 2 insertions(+), 2 deletions(-) + rename gui/{LMT.py => lmt.py} (100%) + +diff --git a/gui/LMT.py b/gui/lmt.py +similarity index 100% +rename from gui/LMT.py +rename to gui/lmt.py +diff --git a/install.sh b/install.sh +index 5692646..b68424f 100755 +--- a/install.sh ++++ b/install.sh +@@ -209,7 +209,7 @@ if ( ! $INSTALL -m 644 gui/laptop-mode-tools.svg "$DESTDIR/usr/share/pixmaps" ) + exit 11 + fi + +-if ( ! $INSTALL -m 644 gui/LMT.py "$DESTDIR/usr/share/laptop-mode-tools" ) ; then ++if ( ! $INSTALL -m 644 gui/lmt.py "$DESTDIR/usr/share/laptop-mode-tools" ) ; then + echo "$0: Failed to install $DESTDIR/usr/share/laptop-mode-tools/lmt.py"; + exit 11 + fi +diff --git a/laptop-mode-tools.spec b/laptop-mode-tools.spec +index 2e4a164..72fa751 100644 +--- a/laptop-mode-tools.spec ++++ b/laptop-mode-tools.spec +@@ -83,7 +83,7 @@ fi + #%{_usr}/sbin/* + %{_sbindir}/* + %{_usr}/share/applications/laptop-mode-tools.desktop +-%{_usr}/share/laptop-mode-tools/LMT.py ++%{_usr}/share/laptop-mode-tools/lmt.py + %{_usr}/share/laptop-mode-tools/modules/* + %{_usr}/share/laptop-mode-tools/module-helpers/* + %{_usr}/share/pixmaps/laptop-mode-tools.svg +-- +2.19.2 + diff --git a/app-laptop/laptop-mode-tools/files/laptop_mode.init-1.4 b/app-laptop/laptop-mode-tools/files/laptop_mode.init-1.4 new file mode 100644 index 000000000000..eef819913cc6 --- /dev/null +++ b/app-laptop/laptop-mode-tools/files/laptop_mode.init-1.4 @@ -0,0 +1,52 @@ +#!/sbin/openrc-run +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +extra_started_commands="reload" + +depend() { + need localmount + use acpid hald + after bootmisc +} + +checkconfig() { + if [ ! -f /proc/sys/vm/laptop_mode ] ; then + eerror "Kernel does not support laptop_mode" + return 1 + fi +} + +start() { + checkconfig || return 1 + + ebegin "Starting laptop_mode" + # bug #342049 fix + # check if dir exists and creates if it doesn't + checkpath -q -d -m 755 /var/run/laptop-mode-tools + touch /var/run/laptop-mode-tools/enabled + /usr/sbin/laptop_mode auto >/dev/null + eend $? +} + +stop() { + ebegin "Stopping laptop_mode" + rm -f /var/run/laptop-mode-tools/enabled + /usr/sbin/laptop_mode stop >/dev/null + eend $? +} + +reload() { + if ! service_started "${SVCNAME}" ; then + eerror "${SVCNAME} has not yet been started" + return 1 + fi + + ebegin "Reloading laptop_mode" + /usr/sbin/laptop_mode stop >/dev/null + rm -f /var/run/laptop-mode-tools/* + /usr/sbin/laptop_mode auto force >/dev/null + eend $? +} + +# vim: set ts=4 : diff --git a/app-laptop/laptop-mode-tools/laptop-mode-tools-1.72.2-r1.ebuild b/app-laptop/laptop-mode-tools/laptop-mode-tools-1.72.2-r1.ebuild new file mode 100644 index 000000000000..a9ae177ba5ad --- /dev/null +++ b/app-laptop/laptop-mode-tools/laptop-mode-tools-1.72.2-r1.ebuild @@ -0,0 +1,98 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit multilib systemd udev + +MY_P="${PN}_${PV}" + +DESCRIPTION="Linux kernel laptop_mode user-space utilities" +HOMEPAGE="https://github.com/rickysarraf/laptop-mode-tools/wiki" +SRC_URI="https://github.com/rickysarraf/${PN}/releases/download/${PV}/${MY_P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 ppc x86" +IUSE="+acpi apm bluetooth" + +RDEPEND="sys-apps/iproute2 + sys-apps/ethtool + sys-apps/which + || ( + sys-apps/sdparm + sys-apps/hdparm + ) + acpi? ( sys-power/acpid ) + apm? ( sys-apps/apmd ) + bluetooth? ( net-wireless/bluez:= )" + +PATCHES=( + "${FILESDIR}/0001-Fix-case-sensitive-name-for-lmt.py.patch" +) + +S="${WORKDIR}/${MY_P}" + +src_prepare() { + default + # This should avoid conflict with pm-powersave wrt #327443 and #396703 + cat <<-EOF > "${T}"/${PN} + HOOK_BLACKLIST="00powersave" + EOF +} + +src_compile() { :; } + +src_install() { + DESTDIR="${D}" \ + INIT_D="none" \ + MAN_D="/usr/share/man" \ + LIB_D="/usr/$(get_libdir)" \ + UDEV_D="$(get_udevdir)" \ + SYSTEMD_UNIT_D="$(systemd_get_systemunitdir)" \ + TMPFILES_D="/usr/lib/tmpfiles.d" \ + ACPI="$(use acpi && echo force || echo disabled)" \ + PMU="$(false && echo force || echo disabled)" \ + APM="$(use apm && echo force || echo disabled)" \ + SYSTEMD=yes \ + sh ./install.sh || die + + dodoc Documentation/*.txt README.md + newinitd "${FILESDIR}"/laptop_mode.init-1.4 laptop_mode + + # See src_prepare() + insinto /etc/pm/config.d + doins "${T}"/${PN} +} + +pkg_postinst() { + if use acpi || use apm; then + if use acpi; then + daemon_name="acpid" + elif use apm; then + deamon_name="apmd" + fi + if [ "$(rc-config list default | grep laptop_mode)" = "" ] || [ "$(rc-config list default | grep ${daemon_name} )" = "" ]; then + ewarn "To enable automatic power state event handling," + ewarn "e.g. enabling laptop_mode after unplugging the battery," + ewarn "both laptop_mode and the ${daemon_name} daemon must be" + ewarn "added to default runlevel:" + if [ "$(rc-config list default | grep laptop_mode)" = "" ]; then + ewarn "# rc-update add laptop_mode default" + fi + if [ "$(rc-config list default | grep ${daemon_name} )" = "" ]; then + ewarn "# rc-update add ${daemon_name} default" + fi + fi + else + ewarn "Without USE=\"acpi\" or USE=\"apm\" ${PN} can not" + ewarn "automatically disable laptop_mode on low battery." + ewarn + ewarn "This means you can lose up to 10 minutes of work if running" + ewarn "out of battery while laptop_mode is enabled." + ewarn + ewarn "Please see laptop-mode.txt in /usr/share/doc/${PF} for further" + ewarn "information." + ewarn + fi +} diff --git a/app-laptop/laptop-mode-tools/metadata.xml b/app-laptop/laptop-mode-tools/metadata.xml new file mode 100644 index 000000000000..7986c43ea6f2 --- /dev/null +++ b/app-laptop/laptop-mode-tools/metadata.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <!-- maintainer-needed --> + <use> + <flag name="apm">Add APM (Advanced Power Management) support</flag> + </use> + <upstream> + <maintainer status="active"> + <email>gentoo-lmt@researchut.com</email> + <name>Ritesh Raj Sarraf</name> + </maintainer> + <remote-id type="github">rickysarraf/laptop-mode-tools</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/app-laptop/mbpfan/Manifest b/app-laptop/mbpfan/Manifest new file mode 100644 index 000000000000..4a597c58c6d4 --- /dev/null +++ b/app-laptop/mbpfan/Manifest @@ -0,0 +1,2 @@ +DIST mbpfan-2.1.1.tar.gz 40637 BLAKE2B bdd17a9a883cc9af3cb7d55a2c8594c435fb367f0c6b5dec2b3da85747e2c2af591ed1dabf082cbbc31ac92ce5b2dc5194d8a50836c87cd784f238322ab09d9f SHA512 c1bf81c5e2f2f4f710a8455c65f10dc2dc2255319a7dbf4367c31884eece8d9909d28f3a00e5fc4d964d65254b36202a2a2b666d0ef04ea04153baded6039449 +DIST mbpfan-2.2.1.tar.gz 40455 BLAKE2B 0932919b4808fa41d64c326f0d202650be25798ca692b4c17cc94a88f3287ccdd10d74c27f95ac8ef7d900f0067b3c40dc8798d99210b89c01b8cb0d63187b98 SHA512 ce358047910bd6996e1d47fe08e1825863e043fc9a33b3c4922ea537e58dd7508fc45c651816125e7b32472cbb3d06afa4a487daba5b910a8580623def938a71 diff --git a/app-laptop/mbpfan/mbpfan-2.1.1.ebuild b/app-laptop/mbpfan/mbpfan-2.1.1.ebuild new file mode 100644 index 000000000000..9a83fb13fa83 --- /dev/null +++ b/app-laptop/mbpfan/mbpfan-2.1.1.ebuild @@ -0,0 +1,44 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit linux-info systemd toolchain-funcs + +DESCRIPTION="A simple daemon to control fan speed on all Macbook/Macbook Pros" +HOMEPAGE="https://github.com/dgraziotin/mbpfan" +LICENSE="GPL-3+" +SLOT="0" +RESTRICT="test" # will fail if the hardware is unavailable, not useful + +if [[ "${PV}" = 9999 ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/dgraziotin/${PN}.git" + KEYWORDS="" +else + SRC_URI="https://github.com/dgraziotin/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64" +fi + +CONFIG_CHECK="~SENSORS_APPLESMC ~SENSORS_CORETEMP" + +src_compile() { + emake CC="$(tc-getCC)" +} + +src_install() { + emake DESTDIR="${ED}" install + + # Remove the empty systemd unit directory + # It doesn't actually install the unit file + rmdir --ignore-fail-on-non-empty -p "${ED%/}/lib/systemd/system" || die + # Actually install the sytstemd unit file + systemd_dounit ${PN}.service + # Install openrc init file + newinitd ${PN}.init.gentoo ${PN} + + # make install doesn't install the docs in the right place + rm -rf "${ED%/}/usr/share/doc/${PN}" || die + + einstalldocs +} diff --git a/app-laptop/mbpfan/mbpfan-2.2.1.ebuild b/app-laptop/mbpfan/mbpfan-2.2.1.ebuild new file mode 100644 index 000000000000..b530d9569fa7 --- /dev/null +++ b/app-laptop/mbpfan/mbpfan-2.2.1.ebuild @@ -0,0 +1,47 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit linux-info systemd toolchain-funcs + +DESCRIPTION="A simple daemon to control fan speed on all Macbook/Macbook Pros" +HOMEPAGE="https://github.com/dgraziotin/mbpfan" +LICENSE="GPL-3+" +SLOT="0" +RESTRICT="test" # will fail if the hardware is unavailable, not useful + +if [[ "${PV}" = 9999 ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/dgraziotin/${PN}.git" + KEYWORDS="" +else + SRC_URI="https://github.com/dgraziotin/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64" +fi + +CONFIG_CHECK="~SENSORS_APPLESMC ~SENSORS_CORETEMP" + +src_compile() { + emake CC="$(tc-getCC)" +} + +src_install() { + emake DESTDIR="${ED}" install + + # Decompress the man page to enable PM auto compression + gzip -d "${ED}"/usr/share/man/man8/mbpfan.8.gz || die + + # Remove the empty systemd unit directory + # It doesn't actually install the unit file + rmdir --ignore-fail-on-non-empty -p "${ED%/}/lib/systemd/system" || die + # Actually install the sytstemd unit file + systemd_dounit ${PN}.service + # Install openrc init file + newinitd ${PN}.init.gentoo ${PN} + + # make install doesn't install the docs in the right place + rm -rf "${ED%/}/usr/share/doc/${PN}" || die + + einstalldocs +} diff --git a/app-laptop/mbpfan/mbpfan-9999.ebuild b/app-laptop/mbpfan/mbpfan-9999.ebuild new file mode 100644 index 000000000000..b530d9569fa7 --- /dev/null +++ b/app-laptop/mbpfan/mbpfan-9999.ebuild @@ -0,0 +1,47 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit linux-info systemd toolchain-funcs + +DESCRIPTION="A simple daemon to control fan speed on all Macbook/Macbook Pros" +HOMEPAGE="https://github.com/dgraziotin/mbpfan" +LICENSE="GPL-3+" +SLOT="0" +RESTRICT="test" # will fail if the hardware is unavailable, not useful + +if [[ "${PV}" = 9999 ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/dgraziotin/${PN}.git" + KEYWORDS="" +else + SRC_URI="https://github.com/dgraziotin/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64" +fi + +CONFIG_CHECK="~SENSORS_APPLESMC ~SENSORS_CORETEMP" + +src_compile() { + emake CC="$(tc-getCC)" +} + +src_install() { + emake DESTDIR="${ED}" install + + # Decompress the man page to enable PM auto compression + gzip -d "${ED}"/usr/share/man/man8/mbpfan.8.gz || die + + # Remove the empty systemd unit directory + # It doesn't actually install the unit file + rmdir --ignore-fail-on-non-empty -p "${ED%/}/lib/systemd/system" || die + # Actually install the sytstemd unit file + systemd_dounit ${PN}.service + # Install openrc init file + newinitd ${PN}.init.gentoo ${PN} + + # make install doesn't install the docs in the right place + rm -rf "${ED%/}/usr/share/doc/${PN}" || die + + einstalldocs +} diff --git a/app-laptop/mbpfan/metadata.xml b/app-laptop/mbpfan/metadata.xml new file mode 100644 index 000000000000..c5c960bad99b --- /dev/null +++ b/app-laptop/mbpfan/metadata.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>gokturk@gentoo.org</email> + <name>Göktürk Yüksek</name> + </maintainer> + <longdescription> + mbpfan is a daemon that uses input from coretemp module and sets + the fan speed using the applesmc module. This is an enhanced + version of Allan McRae mbpfan. This enhanced version assumes any + number of processors and fans. + </longdescription> + <upstream> + <bugs-to>https://github.com/dgraziotin/mbpfan/issues</bugs-to> + <remote-id type="github">dgraziotin/mbpfan</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/app-laptop/metadata.xml b/app-laptop/metadata.xml new file mode 100644 index 000000000000..bee35931772d --- /dev/null +++ b/app-laptop/metadata.xml @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE catmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<catmetadata> + <longdescription lang="en"> + The app-laptop category contains packages which are designed to work + with certain kinds of laptop or notebook computer. + </longdescription> + <longdescription lang="de"> + Die Kategorie app-laptop enthält Pakete für das Arbeiten mit verschiedenen + Notebook- und Laptop-Modellen. + </longdescription> + <longdescription lang="es"> + La categoría app-laptop contiene paquetes diseñados para trabajar + con ciertas clases de laptops ó computadoras portátiles. + </longdescription> + <longdescription lang="ja"> + app-laptopカテゴリには様々なラップトップとノートブックコンピュータで + 使うパッケージが含まれます。 + </longdescription> + <longdescription lang="nl"> + De app-laptop categorie bevat applicaties voor laptopgebruikers. + </longdescription> + <longdescription lang="vi"> + Nhóm app-laptop chứa các gói danh cho các loại máy + tính laptop và notebook. + </longdescription> + <longdescription lang="it"> + La categoria app-laptop contiene pacchetti progettaati per lavorare con alcuni + tipi di laptop o notebook. + </longdescription> + <longdescription lang="pt"> + A categoria app-laptop contém pacotes que são desenhados para + trabalhar com certos tipos de laptops e notebooks. + </longdescription> + <longdescription lang="pl"> + Kategoria app-laptop zawiera pakiety ściśle związane z pracą na + laptopach i notebookach. + </longdescription> +</catmetadata> + diff --git a/app-laptop/msi-keyboard/Manifest b/app-laptop/msi-keyboard/Manifest new file mode 100644 index 000000000000..8931d70a6960 --- /dev/null +++ b/app-laptop/msi-keyboard/Manifest @@ -0,0 +1 @@ +DIST msi-keyboard-1.0.tar.gz 15182 BLAKE2B 4c084e1522da926e541b18d0e59044aeb83873516b3ec5b5bd980883b923acee21842c3612910d84008f66556b6c9e2f9d0c7e588f6aecf242a0e54d72e9c3a3 SHA512 542f74b8eb77db4ef0b26fc5c671bc7446d37b88e13855927d5cdd68c688f933e46b5a377d0f5ec496c1e35694789ae82694d31fc70f04d5059fe60f2ea9d24a diff --git a/app-laptop/msi-keyboard/files/msi-keyboard-1.0-makefile.patch b/app-laptop/msi-keyboard/files/msi-keyboard-1.0-makefile.patch new file mode 100644 index 000000000000..08cdaa79e235 --- /dev/null +++ b/app-laptop/msi-keyboard/files/msi-keyboard-1.0-makefile.patch @@ -0,0 +1,20 @@ +--- a/Makefile 2019-08-19 22:40:43.258528097 +0200 ++++ b/Makefile 2019-08-19 23:00:30.786462412 +0200 +@@ -1,6 +1,4 @@ + CC=g++ +-CFLAGS=-c -Wall +-LDFLAGS=-lhidapi-libusb + SOURCES=main.cpp Keyboard.cpp Color.cpp + OBJECTS=$(SOURCES:.cpp=.o) + EXECUTABLE=msi-keyboard +@@ -11,8 +9,7 @@ + rm $(OBJECTS) $(EXECUTABLE) + + $(EXECUTABLE): $(OBJECTS) +- $(CC) $(LDFLAGS) $(OBJECTS) -o $@ ++ $(CC) $(CFLAGS) -lhidapi-libusb $(LDFLAGS) $(OBJECTS) -o $@ + + .cpp.o: +- $(CC) $(CFLAGS) $< -o $@ +- ++ $(CC) $(CFLAGS) -c $< -o $@ diff --git a/app-laptop/msi-keyboard/metadata.xml b/app-laptop/msi-keyboard/metadata.xml new file mode 100644 index 000000000000..a7a5c6dbced7 --- /dev/null +++ b/app-laptop/msi-keyboard/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>zohran.londais@gmail.com</email> + </maintainer> + <maintainer type="project"> + <email>proxy-maint@gentoo.org</email> + <name>Proxy Maintainers</name> + </maintainer> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/app-laptop/msi-keyboard/msi-keyboard-1.0.ebuild b/app-laptop/msi-keyboard/msi-keyboard-1.0.ebuild new file mode 100644 index 000000000000..7e074cc86a8a --- /dev/null +++ b/app-laptop/msi-keyboard/msi-keyboard-1.0.ebuild @@ -0,0 +1,26 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit udev + +DESCRIPTION="Control backlight of MSI laptop keyboards" +HOMEPAGE="https://github.com/makkarpov/msi-keyboard" +SRC_URI="https://github.com/makkarpov/msi-keyboard/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64" + +RDEPEND="dev-libs/hidapi" + +PATCHES=( + "${FILESDIR}"/${P}-makefile.patch +) + +src_install() { + udev_dorules 99-msi-keyboard.rules + udev_reload + dobin msi-keyboard +} diff --git a/app-laptop/pbbuttonsd/Manifest b/app-laptop/pbbuttonsd/Manifest new file mode 100644 index 000000000000..797ddc84c0fe --- /dev/null +++ b/app-laptop/pbbuttonsd/Manifest @@ -0,0 +1 @@ +DIST pbbuttonsd-0.8.1a.tar.gz 589747 BLAKE2B a0410b7f165e8a0f5b6efa8fa86cc32a84e62da08141d285442d48f0e541d4d6d063e61a7e48aa7901135c4fc9640a7968be821619b3741ce30ba1497015aad4 SHA512 4aaf674872982925f7aa8e06a363f50830f13d9491f4a3b850c1852a8a6d4b2c72164f839c482eed059703dd25d900fe3bb774f78e7039ac2464ea7a1837bf99 diff --git a/app-laptop/pbbuttonsd/files/pbbuttonsd-0.8.1-cpufreq.patch b/app-laptop/pbbuttonsd/files/pbbuttonsd-0.8.1-cpufreq.patch new file mode 100644 index 000000000000..89ab72a8947f --- /dev/null +++ b/app-laptop/pbbuttonsd/files/pbbuttonsd-0.8.1-cpufreq.patch @@ -0,0 +1,20 @@ +--- a/scripts/scripts.d/cpufreq ++++ b/scripts/scripts.d/cpufreq +@@ -18,7 +18,7 @@ + case "$1" in + powersave|custom) + case "$KVER" in +- 2.6.*) ++ "2.6."*|"3."*) + if [ -d /sys ]; then + echo -n "userspace" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor + cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_min_freq > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq +@@ -41,7 +41,7 @@ + ;; + performance) + case "$KVER" in +- 2.6.*) ++ "2.6."*|"3."*) + if [ -d /sys ]; then + echo -n "userspace" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor + cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_min_freq > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq diff --git a/app-laptop/pbbuttonsd/files/pbbuttonsd-0.8.1-fnmode.patch b/app-laptop/pbbuttonsd/files/pbbuttonsd-0.8.1-fnmode.patch new file mode 100644 index 000000000000..3c4ed71cb367 --- /dev/null +++ b/app-laptop/pbbuttonsd/files/pbbuttonsd-0.8.1-fnmode.patch @@ -0,0 +1,23 @@ +--- a/src/module_pmac.c ++++ b/src/module_pmac.c +@@ -990,7 +990,9 @@ + } + } else { + if ((fd = open ("/sys/module/usbhid/parameters/pb_fnmode", O_RDONLY)) < 0) +- fd = open ("/sys/module/hid/parameters/pb_fnmode", O_RDONLY); ++ if ((fd = open ("/sys/module/hid/parameters/pb_fnmode", O_RDONLY)) < 0) ++ fd = open("/sys/module/hid_apple/parameters/fnmode", O_RDONLY); ++ + + if (fd >= 0) { + if ((n = read (fd, ADBBuffer, ADB_BUFSIZE-1)) > 0) { +@@ -1025,7 +1027,8 @@ + } + } else { + if ((fd = open ("/sys/module/usbhid/parameters/pb_fnmode", O_WRONLY)) < 0) +- fd = open ("/sys/module/hid/parameters/pb_fnmode", O_WRONLY); ++ if ((fd = open ("/sys/module/hid/parameters/pb_fnmode", O_WRONLY)) < 0) ++ fd = open ("/sys/module/hid_apple/parameters/fnmode", O_WRONLY); + + if (fd >= 0) { + sprintf ((char*)ADBBuffer, "%d", config); diff --git a/app-laptop/pbbuttonsd/files/pbbuttonsd-0.8.1-g++.patch b/app-laptop/pbbuttonsd/files/pbbuttonsd-0.8.1-g++.patch new file mode 100644 index 000000000000..de43b800128f --- /dev/null +++ b/app-laptop/pbbuttonsd/files/pbbuttonsd-0.8.1-g++.patch @@ -0,0 +1,11 @@ +--- a/src/Makefile.in ++++ b/src/Makefile.in +@@ -319,7 +319,7 @@ + -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) + pbbuttonsd$(EXEEXT): $(pbbuttonsd_OBJECTS) $(pbbuttonsd_DEPENDENCIES) + @rm -f pbbuttonsd$(EXEEXT) +- $(CXXLINK) $(pbbuttonsd_LDFLAGS) $(pbbuttonsd_OBJECTS) $(pbbuttonsd_LDADD) $(LIBS) ++ $(LINK) $(pbbuttonsd_LDFLAGS) $(pbbuttonsd_OBJECTS) $(pbbuttonsd_LDADD) $(LIBS) + + mostlyclean-compile: + -rm -f *.$(OBJEXT) diff --git a/app-laptop/pbbuttonsd/files/pbbuttonsd-0.8.1-laptopmode.sh.patch b/app-laptop/pbbuttonsd/files/pbbuttonsd-0.8.1-laptopmode.sh.patch new file mode 100644 index 000000000000..c29efe3122ac --- /dev/null +++ b/app-laptop/pbbuttonsd/files/pbbuttonsd-0.8.1-laptopmode.sh.patch @@ -0,0 +1,29 @@ +--- a/scripts/scripts.d/laptopmode.sh ++++ b/scripts/scripts.d/laptopmode.sh +@@ -122,7 +122,7 @@ + ) + ) + case "$KLEVEL" in +- "2.4"|"2.6") ++ "2.4"|"2.6"|"3."*) + true + ;; + *) +@@ -222,7 +222,7 @@ + echo "1" > /proc/sys/vm/laptop_mode + echo "30 500 0 0 $AGE $AGE 60 20 0" > /proc/sys/vm/bdflush + ;; +- "2.6") ++ "2.6"|"3."*) + echo "5" > /proc/sys/vm/laptop_mode + echo "$AGE" > /proc/sys/vm/dirty_writeback_centisecs + echo "$AGE" > /proc/sys/vm/dirty_expire_centisecs +@@ -268,7 +268,7 @@ + "2.4") + echo "30 500 0 0 $U_AGE $B_AGE 60 20 0" > /proc/sys/vm/bdflush + ;; +- "2.6") ++ "2.6"|"3."*) + echo "$U_AGE" > /proc/sys/vm/dirty_writeback_centisecs + echo "$B_AGE" > /proc/sys/vm/dirty_expire_centisecs + echo "$DEF_DIRTY_RATIO" > /proc/sys/vm/dirty_ratio diff --git a/app-laptop/pbbuttonsd/files/pbbuttonsd-0.8.1-lm.patch b/app-laptop/pbbuttonsd/files/pbbuttonsd-0.8.1-lm.patch new file mode 100644 index 000000000000..794de96244cb --- /dev/null +++ b/app-laptop/pbbuttonsd/files/pbbuttonsd-0.8.1-lm.patch @@ -0,0 +1,11 @@ +--- a/src/Makefile.in ++++ b/src/Makefile.in +@@ -255,7 +255,7 @@ + module_peep.c module_peep.h debug.h \ + tcp.c tcp.h + +-pbbuttonsd_LDADD = -lpbb $(INTLLIBS) $(PB_OBJECTS) $(PB_LIBS) @PACKAGE_LIBS@ ++pbbuttonsd_LDADD = -lpbb -lm $(INTLLIBS) $(PB_OBJECTS) $(PB_LIBS) @PACKAGE_LIBS@ + pbbuttonsd_LDFLAGS = -L$(top_srcdir)/libpbbipc + pbbuttonsd_DEPENDENCIES = $(PB_OBJECTS) + @DEBUG_TRUE@AM_CFLAGS1 = -DDEBUG diff --git a/app-laptop/pbbuttonsd/files/pbbuttonsd-0.8.1-lz.patch b/app-laptop/pbbuttonsd/files/pbbuttonsd-0.8.1-lz.patch new file mode 100644 index 000000000000..93cebe1d5c6e --- /dev/null +++ b/app-laptop/pbbuttonsd/files/pbbuttonsd-0.8.1-lz.patch @@ -0,0 +1,25 @@ +--- a/configure.in ++++ b/configure.in +@@ -33,6 +33,9 @@ + PB_OBJECTS= + PB_LIBS= + ++### Setup PKG_CONFIG ++PKG_PROG_PKG_CONFIG ++ + if test "x$laptop" != "x"; then + ac_laptop=$laptop + elif test "x$LAPTOP" != "x"; then +@@ -59,10 +62,9 @@ + AC_CHECK_HEADERS([smbios/SystemInfo.h], + AC_DEFINE_UNQUOTED(WITH_SMBIOS, 1, [SMBIOS available]), + AC_MSG_ERROR([SMBios library not available. Please install development files for libsmbios.]), [/* dummy */]) +- AC_CHECK_HEADERS([pci/pci.h sys/io.h], ac_macbook=yes, +- AC_MSG_ERROR([Please install development files for libpci and direct I/O.]), [/* dummy */]) ++ PKG_CHECK_MODULES(LIBPCI, libpci) + PB_OBJECTS+=" driver_backlight_x1600.$OBJEXT driver_backlight_gma950.$OBJEXT module_acpi.$OBJEXT module_imac.$OBJEXT" +- PB_LIBS+=" -lpci -lsmbios" ++ PB_LIBS+=" -lsmbios $LIBPCI_LIBS" + LCD_FADINGSPEED="448" + LCD_AUTOADJMODE="linear" + LCD_AUTOADJPARMBAT="0,10,80,30" diff --git a/app-laptop/pbbuttonsd/files/pbbuttonsd.rc6 b/app-laptop/pbbuttonsd/files/pbbuttonsd.rc6 new file mode 100644 index 000000000000..ba5e167790d0 --- /dev/null +++ b/app-laptop/pbbuttonsd/files/pbbuttonsd.rc6 @@ -0,0 +1,19 @@ +#!/sbin/openrc-run +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +depend() { + use alsasound +} + +start() { + ebegin "Starting pbbuttonsd" + /usr/bin/pbbuttonsd -d > /dev/null + eend $? +} + +stop() { + ebegin "Stopping pbbuttonsd" + start-stop-daemon --stop --quiet --exec /usr/bin/pbbuttonsd + eend $? +} diff --git a/app-laptop/pbbuttonsd/files/wireless b/app-laptop/pbbuttonsd/files/wireless new file mode 100644 index 000000000000..b110b3819a68 --- /dev/null +++ b/app-laptop/pbbuttonsd/files/wireless @@ -0,0 +1,7 @@ +#!/bin/sh +### Restart the wireless device on Gentoo +### Useful for bcm43xx/b43 which doesn't reconnect on resume + +### Uncomment the line below and properly set the device variable +WIRELESS="net.wlan0" +# /etc/init.d/${WIRELESS} restart diff --git a/app-laptop/pbbuttonsd/metadata.xml b/app-laptop/pbbuttonsd/metadata.xml new file mode 100644 index 000000000000..2d68ec58ea63 --- /dev/null +++ b/app-laptop/pbbuttonsd/metadata.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>ppc@gentoo.org</email> + <name>Gentoo Linux PowerPC Development</name> + </maintainer> + <use> + <flag name="ibam">Enable support for Intelligent Battery Monitoring</flag> + <flag name="macbook">Enable support for the Macbook and Macbook Pro</flag> + </use> + <upstream> + <remote-id type="sourceforge">pbbuttons</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/app-laptop/pbbuttonsd/pbbuttonsd-0.8.1a.ebuild b/app-laptop/pbbuttonsd/pbbuttonsd-0.8.1a.ebuild new file mode 100644 index 000000000000..8a17130c0544 --- /dev/null +++ b/app-laptop/pbbuttonsd/pbbuttonsd-0.8.1a.ebuild @@ -0,0 +1,137 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +inherit autotools flag-o-matic + +DESCRIPTION="Handles power management and special keys on laptops" +HOMEPAGE="http://pbbuttons.berlios.de" +SRC_URI="mirror://sourceforge/pbbuttons/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ppc ~x86" +IUSE="acpi alsa doc ibam macbook oss static-libs" + +RDEPEND=" + >=dev-libs/glib-2.6 + alsa? ( >=media-libs/alsa-lib-1.0 ) + macbook? ( + sys-apps/pciutils + sys-libs/libsmbios + ) +" +DEPEND=" + ${RDEPEND} + doc? ( app-doc/doxygen ) +" +PATCHES=( + "${FILESDIR}/${PN}-0.8.1-cpufreq.patch" + "${FILESDIR}/${PN}-0.8.1-fnmode.patch" + "${FILESDIR}/${PN}-0.8.1-laptopmode.sh.patch" + "${FILESDIR}/${PN}-0.8.1-lm.patch" + "${FILESDIR}/${PN}-0.8.1-lz.patch" +) + +src_prepare() { + ### Don't link with g++ if we don't use ibam + if ! use ibam; then + eapply "${FILESDIR}/${PN}-0.8.1-g++.patch" + fi + + default + + eautoconf +} + +src_configure() { + # Fix crash bug on some systems + replace-flags -O? -O1 + + if use macbook; then + laptop=macbook + elif use x86 || use amd64; then + if use acpi; then + laptop=acpi + else + laptop=i386 + fi + # Default to PowerBook + else + laptop=powerbook + fi + + laptop=$laptop \ + econf \ + $(use_with alsa) \ + $(use_with doc doxygen_docs) \ + $(use_with ibam) \ + $(use_with oss) + +} + +src_compile() { + # Thanks to Stefan Bruda for this workaround + # Using -j1 fixes a parallel build issue with the docs + if use doc; then + emake -j1 + else + emake + fi +} + +src_install() { + dodir /etc/power + use ibam && dodir /var/lib/ibam + + default + + use static-libs || rm "${D}"/usr/$(get_libdir)/libpbb.a + + newinitd "${FILESDIR}/pbbuttonsd.rc6" pbbuttonsd + dodoc README + use doc && dodoc -r doc/ + + dodir /etc/power/resume.d + dodir /etc/power/suspend.d + dodir /etc/power/scripts.d + exeinto /etc/power/scripts.d + doexe "${FILESDIR}"/wireless + ln -s "${D}"/etc/power/scripts.d/wireless "${D}"/etc/power/resume.d/wireless +} + +pkg_postinst() { + if [ -e /etc/pbbuttonsd.conf ]; then + ewarn "The pbbuttonsd.cnf file replaces /etc/pbuttonsd.conf with a new" + ewarn "file (/etc/pbbuttonsd.conf) and a new format. Please check the" + ewarn "manual page with 'man pbbuttonsd.cnf' for details." + ewarn + fi + + if use macbook; then + ewarn "Macbook and Macbook Pro users should make sure to have applesmc" + ewarn "loaded before starting pbbuttonsdm otherwise auto-adjustments" + ewarn "will not work and pbbuttonsd may segfault." + ewarn + fi + + ewarn "Ensure that the evdev kernel module is loaded otherwise" + ewarn "pbbuttonsd won't work. SysV IPC is also required." + ewarn + ewarn "If you need extra security, you can tell pbbuttonsd to only accept" + ewarn "input from one user. You can set the userallowed option in" + ewarn "/etc/pbbuttonsd.cnf to limit access." + ewarn + + if use ibam; then + elog "To properly initialize the IBaM battery database, you will" + elog "need to perform a full discharge/charge cycle. For more" + elog "details, please see the pbbuttonsd man page." + elog + fi + + elog "A script is now available to reset your wirless connection on resume." + elog "Simply uncomment the commented command and set the correct device to" + elog "use it. You can find the script in /etc/power/resume.d/wireless" + +} diff --git a/app-laptop/pommed/Manifest b/app-laptop/pommed/Manifest new file mode 100644 index 000000000000..f84eb5768853 --- /dev/null +++ b/app-laptop/pommed/Manifest @@ -0,0 +1 @@ +DIST pommed-1.39.tar.gz 995020 BLAKE2B b96169b3fa3f3f8cd8ce122af07ba6e13f2bd0969cd6f3aff8b2755dd1295ec581746ac3a5f692710bf8ad25ec1ca76819dcaa2d26681f5299548eb9693334f3 SHA512 26568e359d8ef853710b1d86f397981e87245a84b2ff006964035ea8643e97df44fe52b01841d085eb8dd1aee586e1c8b60c44089f463e2a64b2b95c010a9d10 diff --git a/app-laptop/pommed/files/pommed-1.39.patch b/app-laptop/pommed/files/pommed-1.39.patch new file mode 100644 index 000000000000..1215606c35cb --- /dev/null +++ b/app-laptop/pommed/files/pommed-1.39.patch @@ -0,0 +1,89 @@ +diff --git a/gpomme/Makefile b/gpomme/Makefile +index 0874b48..a3ab64a 100644 +--- a/gpomme/Makefile ++++ b/gpomme/Makefile +@@ -1,5 +1,3 @@ +-CC = gcc +- + GTK_CFLAGS = $(shell pkg-config --cflags gtk+-2.0) + GTK_LIBS = $(shell pkg-config --libs gtk+-2.0) + +@@ -14,7 +12,7 @@ CONFUSE_LIBS = $(shell pkg-config libconfuse --libs) + + INOTIFY_CFLAGS = $(shell test -e /usr/include/sys/inotify.h || echo -DNO_SYS_INOTIFY_H) + +-CFLAGS = -g -O2 -Wall $(DBUS_CFLAGS) $(DBUSGLIB_CFLAGS) $(GTK_CFLAGS) $(CONFUSE_CFLAGS) $(INOTIFY_CFLAGS) ++CFLAGS += -Wall $(DBUS_CFLAGS) $(DBUSGLIB_CFLAGS) $(GTK_CFLAGS) $(CONFUSE_CFLAGS) $(INOTIFY_CFLAGS) + LDLIBS = -lpthread -lX11 $(DBUS_LIBS) $(DBUSGLIB_LIBS) $(GTK_LIBS) $(CONFUSE_LIBS) + + SOURCES = gpomme.c theme.c conffile.c \ +@@ -30,6 +28,7 @@ all: gpomme mo + mo: $(MOFILES) + + gpomme: $(OBJS) ++ ${CC} -o $@ ${OBJS} ${LDLIBS} ${LDFLAGS} + + gpomme.o: gpomme.c gpomme.h theme.h ../client-common/dbus-client.h ../client-common/video-client.h + +diff --git a/pommed/Makefile b/pommed/Makefile +index 5f3cbf9..3425a2a 100644 +--- a/pommed/Makefile ++++ b/pommed/Makefile +@@ -1,7 +1,5 @@ + ARCH ?= $(shell uname -m) + +-CC = gcc +- + DBUS_CFLAGS = $(shell pkg-config dbus-1 --cflags) -DDBUS_API_SUBJECT_TO_CHANGE + DBUS_LIBS = $(shell pkg-config dbus-1 --libs) + +@@ -18,7 +16,7 @@ INOTIFY_CFLAGS = $(shell test -e /usr/include/sys/inotify.h || echo -DNO_SYS_INO + + TIMERFD_CFLAGS = $(shell test -e /usr/include/sys/timerfd.h || echo -DNO_SYS_TIMERFD_H) + +-CFLAGS = -g -O2 -Wall $(DBUS_CFLAGS) $(ALSA_CFLAGS) $(AUDIOFILE_CFLAGS) $(CONFUSE_CFLAGS) $(INOTIFY_CFLAGS) $(TIMERFD_CFLAGS) ++CFLAGS += -Wall $(DBUS_CFLAGS) $(ALSA_CFLAGS) $(AUDIOFILE_CFLAGS) $(CONFUSE_CFLAGS) $(INOTIFY_CFLAGS) $(TIMERFD_CFLAGS) + + LDLIBS = -pthread -lrt $(DBUS_LIBS) $(ALSA_LIBS) $(AUDIOFILE_LIBS) $(CONFUSE_LIBS) + +@@ -54,6 +52,7 @@ ifeq ($(LIBPCI_SHARED), true) + + CFLAGS += $(LIBPCI_CFLAGS) + LDLIBS += $(LIBPCI_LIBS) ++ LIBS = $(LIBPCI_LIBS) + else + LIB_OBJS += /usr/lib/libpci.a + LDLIBS += -lz +@@ -73,6 +72,7 @@ OBJS = $(SOURCES:%.c=%.o) + + + pommed: $(OBJS) $(LIB_OBJS) ++ ${CC} -o $@ ${OBJS} ${LDLIBS} ${LDFLAGS} + + pommed.o: pommed.c pommed.h evloop.h kbd_backlight.h lcd_backlight.h cd_eject.h evdev.h conffile.h audio.h dbus.h beep.h + +diff --git a/wmpomme/Makefile b/wmpomme/Makefile +index cc7a438..6c4bee1 100644 +--- a/wmpomme/Makefile ++++ b/wmpomme/Makefile +@@ -1,11 +1,9 @@ +-CC = gcc +- + DBUS_CFLAGS = $(shell pkg-config dbus-1 --cflags) -DDBUS_API_SUBJECT_TO_CHANGE + DBUS_LIBS = $(shell pkg-config dbus-1 --libs) + + TIMERFD_CFLAGS = $(shell test -e /usr/include/sys/timerfd.h || echo -DNO_SYS_TIMERFD_H) + +-CFLAGS = -g -O2 -Wall $(DBUS_CFLAGS) $(TIMERFD_CFLAGS) ++CFLAGS += -Wall $(DBUS_CFLAGS) $(TIMERFD_CFLAGS) + LDLIBS = -lrt -lXpm -lXext -lX11 $(DBUS_LIBS) + + SOURCES = wmgeneral.c wmpomme.c \ +@@ -15,6 +13,7 @@ SOURCES = wmgeneral.c wmpomme.c \ + OBJS = $(SOURCES:%.c=%.o) + + wmpomme: $(OBJS) ++ ${CC} -o $@ ${OBJS} ${LDLIBS} ${LDFLAGS} + + wmpomme.o: wmpomme.c wmgeneral.h wmpomme-master.xpm ../client-common/dbus-client.h + diff --git a/app-laptop/pommed/files/pommed.rc b/app-laptop/pommed/files/pommed.rc new file mode 100644 index 000000000000..23904fc7d3a0 --- /dev/null +++ b/app-laptop/pommed/files/pommed.rc @@ -0,0 +1,19 @@ +#!/sbin/openrc-run +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +depend() { + need dbus alsasound +} + +start() { + ebegin "Running pommed daemon" + start-stop-daemon --start --quiet --exec /usr/bin/pommed + eend $? +} + +stop() { + ebegin "Stopping pommed daemon" + start-stop-daemon --stop --pidfile /var/run/pommed.pid + eend $? +} diff --git a/app-laptop/pommed/files/pommed.service b/app-laptop/pommed/files/pommed.service new file mode 100644 index 000000000000..8407c1db9550 --- /dev/null +++ b/app-laptop/pommed/files/pommed.service @@ -0,0 +1,10 @@ +[Unit] +Description=MacBook Hotkey Event Handler + +[Service] +Type=dbus +BusName=org.pommed +ExecStart=/usr/bin/pommed -f + +[Install] +WantedBy=multi-user.target diff --git a/app-laptop/pommed/metadata.xml b/app-laptop/pommed/metadata.xml new file mode 100644 index 000000000000..fcfcd25cc47d --- /dev/null +++ b/app-laptop/pommed/metadata.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="person"> + <email>naota@gentoo.org</email> +</maintainer> +<longdescription> pommed handles the hotkeys found on the Apple MacBook Pro, +MacBook and PowerBook laptops and adjusts the LCD backlight, sound volume, +keyboard backlight or ejects the CD-ROM drive accordingly. +pommed also monitors the ambient light sensors to automatically light up the +keyboard backlight on the MacBook Pro and the latest PowerBook. +Optional support for the Apple Remote control is available.</longdescription> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/app-laptop/pommed/pommed-1.39-r1.ebuild b/app-laptop/pommed/pommed-1.39-r1.ebuild new file mode 100644 index 000000000000..f1350763190b --- /dev/null +++ b/app-laptop/pommed/pommed-1.39-r1.ebuild @@ -0,0 +1,107 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit eutils toolchain-funcs linux-info systemd + +DESCRIPTION="Manage screen and keyboard backlight on Apple MacBook Pro/PowerBook" +HOMEPAGE="http://technologeek.org/projects/pommed/index.html" +ALIOTH_NUMBER="3583" +SRC_URI="http://alioth.debian.org/frs/download.php/${ALIOTH_NUMBER}/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 ppc x86" +IUSE="gtk X" + +COMMON_DEPEND="media-libs/alsa-lib + x86? ( sys-apps/pciutils ) + amd64? ( sys-apps/pciutils ) + dev-libs/confuse + >=sys-apps/dbus-1.1 + dev-libs/dbus-glib + sys-libs/zlib + media-libs/audiofile + gtk? ( x11-libs/gtk+:2 ) + X? ( x11-libs/libX11 + x11-libs/libXext + x11-libs/libXpm )" +DEPEND="${COMMON_DEPEND} + virtual/pkgconfig" +RDEPEND="${COMMON_DEPEND} + media-sound/alsa-utils + virtual/eject" + +pkg_setup() { + if ! use ppc; then + linux-info_pkg_setup + + CONFIG_CHECK="~DMIID" + check_extra_config + fi +} + +src_prepare() { + epatch "${FILESDIR}/${P}.patch" +} + +src_compile() { + cd "${S}"/pommed + emake CC="$(tc-getCC)" OFLIB=1 + + if use gtk; then + cd "${S}"/gpomme + local POFILES="" + for LANG in ${LINGUAS}; do + if [ -f po/${LANG}.po ]; then + POFILES="${POFILES} po/${LANG}.po" + fi + done + emake CC="$(tc-getCC)" POFILES="${POFILES}" + fi + if use X; then + cd "${S}"/wmpomme + emake CC="$(tc-getCC)" + fi +} + +src_install() { + insinto /etc + if use x86 || use amd64; then + newins pommed.conf.mactel pommed.conf + elif use ppc; then + newins pommed.conf.pmac pommed.conf + fi + + insinto /etc/dbus-1/system.d + newins dbus-policy.conf pommed.conf + + insinto /usr/share/pommed + doins pommed/data/*.wav + + dobin pommed/pommed + + newinitd "${FILESDIR}"/pommed.rc pommed + systemd_dounit "${FILESDIR}"/${PN}.service + + dodoc AUTHORS ChangeLog README TODO + + if use gtk ; then + dobin gpomme/gpomme + for LANG in ${LINGUAS}; do + if [ -f gpomme/po/${LANG}.mo ]; then + einfo "Installing lang ${LANG}" + insinto /usr/share/locale/${LANG}/LC_MESSAGES/ + doins gpomme/po/${LANG}.mo + fi + done + + domenu gpomme/gpomme.desktop gpomme/gpomme-c.desktop + insinto /usr/share/gpomme/ + doins -r gpomme/themes + fi + + if use X ; then + dobin wmpomme/wmpomme + fi +} diff --git a/app-laptop/radeontool/Manifest b/app-laptop/radeontool/Manifest new file mode 100644 index 000000000000..f1caa9271324 --- /dev/null +++ b/app-laptop/radeontool/Manifest @@ -0,0 +1 @@ +DIST radeontool-1.6.3.tar.bz2 367487 BLAKE2B 0af4f7ce5f638b1ebfa191439f048bd3687ecec0085621b931890f07154fd40349c7d5eab57cb58fb75a6b0c9ebb687728332e3b72826f9b57b2272f67691eca SHA512 937ddf3e2b7dc35b9bc872d770b184303ac9e8199c0de6c17d187acfc5c398abc0cec2071c1af5ad16b0df2976418e06db8b1f90775fe59a8a80bdb3f8e2dca6 diff --git a/app-laptop/radeontool/metadata.xml b/app-laptop/radeontool/metadata.xml new file mode 100644 index 000000000000..d85b4252fc33 --- /dev/null +++ b/app-laptop/radeontool/metadata.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<!-- maintainer-needed --> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/app-laptop/radeontool/radeontool-1.6.3.ebuild b/app-laptop/radeontool/radeontool-1.6.3.ebuild new file mode 100644 index 000000000000..edd777f7ac49 --- /dev/null +++ b/app-laptop/radeontool/radeontool-1.6.3.ebuild @@ -0,0 +1,24 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit eutils toolchain-funcs + +DESCRIPTION="Manage the backlight, external video output and registers of ATI Radeon cards" + +HOMEPAGE="https://cgit.freedesktop.org/~airlied/radeontool/" +SRC_URI="https://people.freedesktop.org/~airlied/${PN}/${P}.tar.bz2" + +LICENSE="ZLIB" +SLOT="0" +KEYWORDS="amd64 ppc x86" + +IUSE="" + +RDEPEND=">=x11-libs/libpciaccess-0.12.0" +DEPEND="${RDEPEND} + virtual/pkgconfig" + +src_install() { + emake install DESTDIR="${D}" +} diff --git a/app-laptop/spicctrl/Manifest b/app-laptop/spicctrl/Manifest new file mode 100644 index 000000000000..e0c38682820a --- /dev/null +++ b/app-laptop/spicctrl/Manifest @@ -0,0 +1 @@ +DIST spicctrl-1.9.tar.bz2 10917 BLAKE2B c26101bb13bd512434b076b9fc6467189c7cb60f7b4a8dd0eede7b18b888d2b418c505896f2b52724df5ea7fab50b336f5843369a9ef4d19e642adc0f8399a01 SHA512 7b1d7862a51dd3321fe84cc5921d71a8f0b978755cbd7c31e54a59ad1c9d3f781d649436bd9b7fba71446a593ad7e925470731f5bd135350942fb0c03fbd4d3e diff --git a/app-laptop/spicctrl/files/spicctrl-1.9-makefile.patch b/app-laptop/spicctrl/files/spicctrl-1.9-makefile.patch new file mode 100644 index 000000000000..a49a29c30fb5 --- /dev/null +++ b/app-laptop/spicctrl/files/spicctrl-1.9-makefile.patch @@ -0,0 +1,11 @@ +--- Makefile.orig 2012-11-20 12:38:41.528871594 +0400 ++++ Makefile 2012-11-20 12:39:42.630871103 +0400 +@@ -14,7 +14,7 @@ + all: spicctrl + + spicctrl: $(OBJ) +- $(CC) -o spicctrl $(OBJ) $(LIBS) ++ $(CC) $(CFLAGS) $(LDFLAGS) -o spicctrl $(OBJ) $(LIBS) + + clean: + rm -f $(OBJ) spicctrl *~ diff --git a/app-laptop/spicctrl/metadata.xml b/app-laptop/spicctrl/metadata.xml new file mode 100644 index 000000000000..d85b4252fc33 --- /dev/null +++ b/app-laptop/spicctrl/metadata.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<!-- maintainer-needed --> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/app-laptop/spicctrl/spicctrl-1.9-r1.ebuild b/app-laptop/spicctrl/spicctrl-1.9-r1.ebuild new file mode 100644 index 000000000000..d1aceef29615 --- /dev/null +++ b/app-laptop/spicctrl/spicctrl-1.9-r1.ebuild @@ -0,0 +1,28 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=4 + +inherit base toolchain-funcs + +DESCRIPTION="tool for the sonypi-Device (found in Sony Vaio Notebooks)" +HOMEPAGE="http://www.popies.net/sonypi/" +SRC_URI="http://www.popies.net/sonypi/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 -ppc x86" +IUSE="" + +DEPEND="" +RDEPEND="" + +PATCHES=( "${FILESDIR}/${P}-makefile.patch" ) + +src_compile() { + emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" +} + +src_install() { + dobin spicctrl +} diff --git a/app-laptop/thinkfan/Manifest b/app-laptop/thinkfan/Manifest new file mode 100644 index 000000000000..d4062ea1542f --- /dev/null +++ b/app-laptop/thinkfan/Manifest @@ -0,0 +1,2 @@ +DIST thinkfan-0.9.3.tar.gz 39527 BLAKE2B e6a6d09493d94b4de9ada20dcc4b0251c5f2c148f7faa7f69c04fe2a279a9cfe253a0ea1a01fe94ed108e8731e2ba01edef5df10dfb887ea961a356dff733854 SHA512 d2a29f9cae636c22b66958f8ec50cb60a162d745c3967257bb5e20cc9e152894d4e8a66f897ffa4e49353eba4a42e3499bb9e554719974284089a46cfc6280d7 +DIST thinkfan-1.0.2.tar.gz 77653 BLAKE2B 1b40553380f9b873883f0dc587665f24cd2e07de7a7e743cb9f99a3282f380da2258265a612b1c97d2945fed31aee0d6cbc30ea2a18c0b212e877e7635eda336 SHA512 d9133538096a7c5757f599adfebc8217aa7334a102573d6757f03b5c012a09d600be923930fd9d62f4afa591f5eb7a70a1c328004bddef85494d1a7ce56b648f diff --git a/app-laptop/thinkfan/metadata.xml b/app-laptop/thinkfan/metadata.xml new file mode 100644 index 000000000000..3cf6cbcd03e9 --- /dev/null +++ b/app-laptop/thinkfan/metadata.xml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>zlogene@gentoo.org</email> + <name>Mikle Kolyada</name> + </maintainer> + <use> + <flag name="atasmart">include libatasmart support to get disc temperature</flag> + <flag name="nvidia">allow thinkfan to read GPU temperature from the proprietary nVidia driver</flag> + <flag name="yaml">use YAML format for config file</flag> + </use> + <upstream> + <remote-id type="sourceforge">thinkfan</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/app-laptop/thinkfan/thinkfan-0.9.3.ebuild b/app-laptop/thinkfan/thinkfan-0.9.3.ebuild new file mode 100644 index 000000000000..ca8dc1c15153 --- /dev/null +++ b/app-laptop/thinkfan/thinkfan-0.9.3.ebuild @@ -0,0 +1,50 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit cmake-utils readme.gentoo-r1 systemd + +DESCRIPTION="simple fan control program for thinkpads" +HOMEPAGE="http://thinkfan.sourceforge.net" +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="amd64 x86" +IUSE="atasmart" + +DEPEND="atasmart? ( dev-libs/libatasmart )" +RDEPEND="${DEPEND}" + +src_prepare() { + cmake-utils_src_prepare + + sed -e "s:#!/sbin/runscript:#!/sbin/openrc-run:" \ + -i rcscripts/thinkfan.gentoo + + sed -e "s:share/doc/${PN}:share/doc/${PF}:" \ + -e "s:thinkfan.1:src/thinkfan.1:" \ + -i CMakeLists.txt +} + +src_configure() { + local mycmakeargs+=( + "-DCMAKE_BUILD_TYPE:STRING=Debug" + "-DUSE_ATASMART=$(usex atasmart)" + ) + + cmake-utils_src_configure +} + +src_install() { + cmake-utils_src_install + + newinitd rcscripts/${PN}.gentoo ${PN} + systemd_dounit rcscripts/${PN}.service + + readme.gentoo_create_doc +} + +DOC_CONTENTS="Please read the documentation and copy an +appropriate file to /etc/thinkfan.conf." diff --git a/app-laptop/thinkfan/thinkfan-1.0.2.ebuild b/app-laptop/thinkfan/thinkfan-1.0.2.ebuild new file mode 100644 index 000000000000..59f5d7fce4b9 --- /dev/null +++ b/app-laptop/thinkfan/thinkfan-1.0.2.ebuild @@ -0,0 +1,42 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit cmake-utils readme.gentoo-r1 + +DESCRIPTION="simple fan control program for thinkpads" +HOMEPAGE="http://thinkfan.sourceforge.net" +SRC_URI="https://github.com/vmatare/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="amd64 x86" +IUSE="atasmart nvidia +yaml" + +DEPEND="atasmart? ( dev-libs/libatasmart ) + yaml? ( dev-cpp/yaml-cpp )" +RDEPEND="${DEPEND} + nvidia? ( x11-drivers/nvidia-drivers )" + +DOC_CONTENTS=" + Please read the documentation and copy an appropriate + file to /etc/thinkfan.conf. +" + +src_configure() { + local mycmakeargs+=( + -DCMAKE_INSTALL_DOCDIR=/usr/share/doc/${PF} + -DUSE_NVML="$(usex nvidia)" + -DUSE_ATASMART="$(usex atasmart)" + -DUSE_YAML="$(usex yaml)" + ) + + cmake-utils_src_configure +} + +src_install() { + cmake-utils_src_install + + readme.gentoo_create_doc +} diff --git a/app-laptop/tp_smapi/Manifest b/app-laptop/tp_smapi/Manifest new file mode 100644 index 000000000000..86ff549068b9 --- /dev/null +++ b/app-laptop/tp_smapi/Manifest @@ -0,0 +1 @@ +DIST tp_smapi-0.43.tgz 40122 BLAKE2B e14caa05d741d14b03c56c57badc5900a47735bc58966b5195ca34269a6227ecc50518ee5ce8cf47a4aacb314a0ed0332b987098f3be024b6af9024df6efdf9b SHA512 ec2e40a248e7eb5bff2ad9e57087058a8b4706d564bd340daba5a4700ad8a5389d1f9ec29984516a1167827ae55c28240dafb558df29e1f758a4f7af80caa1e7 diff --git a/app-laptop/tp_smapi/files/tp_smapi-0.40-confd b/app-laptop/tp_smapi/files/tp_smapi-0.40-confd new file mode 100644 index 000000000000..7c80f35e390b --- /dev/null +++ b/app-laptop/tp_smapi/files/tp_smapi-0.40-confd @@ -0,0 +1,20 @@ +# /etc/conf.d/smapi: config file for /etc/init.d/smapi + +# use '/etc/init.d/smapi info' at any time to check the thresholds +# currently used by the driver +# Note that the kernel does some sanity checking on the values and +# will not accept any combination of values you may try to set up. +# (i.e. stop value lower than start) So if the output of info does +# not match what you wanted the driver probably did not like your +# configuration. + +# default thresholds for '/etc/init.d/smapi start' +SMAPI_THRESH_START="30" +SMAPI_THRESH_STOP="85" +# values to be used for '/etc/init.d/smapi low' +SMAPI_LOW_THRESH_START="${SMAPI_THRESH_START}" +SMAPI_LOW_THRESH_STOP="${SMAPI_THRESH_STOP}" + +# values to be used for '/etc/init.d/smapi high' +SMAPI_HIGH_THRESH_START="95" +SMAPI_HIGH_THRESH_STOP="100" diff --git a/app-laptop/tp_smapi/files/tp_smapi-0.40-initd b/app-laptop/tp_smapi/files/tp_smapi-0.40-initd new file mode 100644 index 000000000000..3b8c10d9274a --- /dev/null +++ b/app-laptop/tp_smapi/files/tp_smapi-0.40-initd @@ -0,0 +1,92 @@ +#!/sbin/openrc-run +# Copyright (C) 2011 Henning Schild <henning@wh9.tu-dresden.de> +# Copyright (C) 2011 Sebastian Pipping <sebastian@pipping.org> +# +# Distributed under the terms of the GNU General Public License, v2 or later + +extra_started_commands="low high info" + +SMAPI_SYSFS="/sys/devices/platform/smapi" +BATS="BAT0 BAT1" + +depend() { + after modules +} + +start() { + local state1 + local state2 + + ebegin "Making sure that module 'tp_smapi' is loaded" + modprobe tp_smapi + state1=$? + eend ${state1} + + ebegin "Checking for \"${SMAPI_SYSFS}\"" + test -d "${SMAPI_SYSFS}" + state2=$? + eend ${state2} + + if [ "${state1}" -ne "0" ] || [ "${state2}" -ne "0" ]; then + return 1 + fi + + ebegin "Starting ${SVCNAME}" + set_all ${SMAPI_THRESH_START} ${SMAPI_THRESH_STOP} + eend $? +} + +stop() { + einfo "Nothing required to be done to stop ${SVCNAME}" +} + +require_started() { + if ! service_started; then + "${RC_SERVICE}" start || return $? + fi +} + +high() { + require_started + + einfo "Switching ${SVCNAME} to high thesholds" + set_all ${SMAPI_HIGH_THRESH_START} ${SMAPI_HIGH_THRESH_STOP} +} + +low() { + require_started + + einfo "Switching ${SVCNAME} to low thesholds" + set_all ${SMAPI_LOW_THRESH_START} ${SMAPI_LOW_THRESH_STOP} +} + +set_all() { + local tstart=$1 + local tstop=$2 + local bat + + for bat in ${BATS}; do + ebegin " setting thresholds for ${bat}: $tstart $tstop" + echo ${tstart} > ${SMAPI_SYSFS}/${bat}/start_charge_thresh + echo ${tstop} > ${SMAPI_SYSFS}/${bat}/stop_charge_thresh + eend $? + done +} + +info() { + local presence + local tstart + local tstop + local bat + + require_started + + for bat in ${BATS}; do + tstart=$(cat ${SMAPI_SYSFS}/${bat}/start_charge_thresh) + tstop=$(cat ${SMAPI_SYSFS}/${bat}/stop_charge_thresh) + if [ "$(cat ${SMAPI_SYSFS}/${bat}/installed)" -eq "1" ]; then + presence=" [installed]" + fi + einfo "${bat}: ${tstart} ${tstop}${presence}" + done +} diff --git a/app-laptop/tp_smapi/metadata.xml b/app-laptop/tp_smapi/metadata.xml new file mode 100644 index 000000000000..bf3dce9a3a2f --- /dev/null +++ b/app-laptop/tp_smapi/metadata.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + + <maintainer type="person"> + <email>mjo@gentoo.org</email> + <name>Michael Orlitzky</name> + </maintainer> + + <use> + <flag name="hdaps">Install a compatible HDAPS module</flag> + </use> + + <upstream> + <remote-id type="github">evgeni/tp_smapi</remote-id> + <remote-id type="sourceforge">tpctl</remote-id> + </upstream> + + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/app-laptop/tp_smapi/tp_smapi-0.43.ebuild b/app-laptop/tp_smapi/tp_smapi-0.43.ebuild new file mode 100644 index 000000000000..99b675c4c0f3 --- /dev/null +++ b/app-laptop/tp_smapi/tp_smapi-0.43.ebuild @@ -0,0 +1,74 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit flag-o-matic linux-mod + +DESCRIPTION="IBM ThinkPad SMAPI BIOS driver" +HOMEPAGE="https://github.com/evgeni/tp_smapi" +SRC_URI="https://github.com/evgeni/tp_smapi/releases/download/tp-smapi/${PV}/${P}.tgz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 x86" + +IUSE="hdaps" + +# We need dmideode if the kernel does not support +# DMI_DEV_TYPE_OEM_STRING in dmi.h. +DEPEND="sys-apps/dmidecode" +RDEPEND="${DEPEND}" + +# This code is factored out of both pkg_pretend() and pkg_setup() +# because the PMS states that ebuilds may not call phase functions +# directly (see the "List of functions" section). This was bug #596616 +# and #596622. +tp_smapi_pkg_pretend() { + linux-mod_pkg_setup + + MODULE_NAMES="thinkpad_ec(extra:) tp_smapi(extra:)" + BUILD_PARAMS="KSRC=${KV_DIR} KBUILD=${KV_OUT_DIR}" + BUILD_TARGETS="default" + + if use hdaps; then + CONFIG_CHECK="~INPUT_UINPUT" + WARNING_INPUT_UINPUT="Your kernel needs uinput for the hdaps module to perform better" + # Why call this twice? + linux-info_pkg_setup + + MODULE_NAMES="${MODULE_NAMES} hdaps(extra:)" + BUILD_PARAMS="${BUILD_PARAMS} HDAPS=1" + + CONFIG_CHECK="~!SENSORS_HDAPS" + ERROR_SENSORS_HDAPS="${P} with USE=hdaps conflicts with in-kernel HDAPS (CONFIG_SENSORS_HDAPS)" + linux-info_pkg_setup + fi +} + +pkg_pretend() { + tp_smapi_pkg_pretend +} + +pkg_setup() { + # run again as pkg_pretend is not var safe + tp_smapi_pkg_pretend +} + +src_compile() { + # Kernel Makefiles may pull in -mpreferred-stack-boundary=3 + # which requires that SSE disabled or compilation will fail. + # So we need to ensure that appended user CLAGS do not re-enable SSE + # https://bugs.gentoo.org/show_bug.cgi?id=492964 + replace-flags '-msse*' '' + replace-flags '-mssse3' '' + + linux-mod_src_compile +} + +src_install() { + linux-mod_src_install + einstalldocs + newinitd "${FILESDIR}/${PN}-0.40-initd" smapi + newconfd "${FILESDIR}/${PN}-0.40-confd" smapi +} diff --git a/app-laptop/tpacpi-bat/Manifest b/app-laptop/tpacpi-bat/Manifest new file mode 100644 index 000000000000..90b6bd0984e4 --- /dev/null +++ b/app-laptop/tpacpi-bat/Manifest @@ -0,0 +1,4 @@ +DIST tpacpi-bat-1.1.tar.gz 17781 BLAKE2B 73e9cef77f5eb889e653dab05b3f9502795833221d007319abad0017b70dc3c60d1a2e7649f1003e9eb16da94efa185b195e42789b528b5c5b62738abaff9e3a SHA512 7b8838e6db7f98cd5bb674a99dbb880ba6574529de68d97ce704bf225ba416183971aae3c2dd623bc8750767c54a2a52cd0b525bce70640ecf0b307fdba03821 +DIST tpacpi-bat-2.1.tar.gz 17753 BLAKE2B c470cfdb98c2873ca44dad9cb0fc31e6bc97c8832735003b707ee191c65dba3cd9c0422513b4a93aae26692a154675cb94e02d30b721d498610bf21711bcf1e6 SHA512 7ed4974d84c3f1ddc9fd5cd6d7f103a11e2f808a223692749e3ae0ec2e888b62083d577214e27634cd76e9b616a6b8d5cb5474ddb64f73972d08641051c5c6f8 +DIST tpacpi-bat-3.0.tar.gz 18137 BLAKE2B db0db2c06d5bc78eb028cb0db2532e5500cce2370c23ab3bf1e49433b83ed2be7cfffe080e46c3699838ff00025d516dd37e071081f79c7d5d6293f4f49730d4 SHA512 2beab3e5495f028b53d673a4243a2128f4ff85e19e18ac7d53663a1d62e20b271442d6c2c8f19cb41d618ddf7ebb4d9b8390f7f185f77bdca33c69bb19463128 +DIST tpacpi-bat-3.1.tar.gz 18584 BLAKE2B 5f1e890f33be4e0d176bda486d9e4363d56a7a933677eb69bedca9ec42e8af5a0e5494f8447702d33ffecda3d1d4a447a56f7aeb9480a3b855a24bce45028d38 SHA512 cdc9e0c0ded96281678199783b4c48ff85a497c90b244a7ce2276b54d7ae4bfa7eb430214bcdb6fabd7478796507b0fbe7fed4b1ab4bc4cdd7bd5ae25f943a77 diff --git a/app-laptop/tpacpi-bat/files/tpacpi-bat.confd.0 b/app-laptop/tpacpi-bat/files/tpacpi-bat.confd.0 new file mode 100644 index 000000000000..94da0a3eb12a --- /dev/null +++ b/app-laptop/tpacpi-bat/files/tpacpi-bat.confd.0 @@ -0,0 +1,15 @@ +# /etc/conf.d/tpacpi-bat: config file for /etc/init.d/tpacpi-bat + +# use '/etc/init.d/tpacpi-bat info' at any time to check the thresholds +# currently used by the driver + +# default thresholds for '/etc/init.d/tpacpi-bat start' +TPACPI_BAT_THRESH_START="30" +TPACPI_BAT_THRESH_STOP="85" +# values to be used for '/etc/init.d/tpacpi-bat low' +TPACPI_BAT_LOW_THRESH_START="${TPACPI_BAT_THRESH_START}" +TPACPI_BAT_LOW_THRESH_STOP="${TPACPI_BAT_THRESH_STOP}" + +# values to be used for '/etc/init.d/tpacpi-bat high' +TPACPI_BAT_HIGH_THRESH_START="95" +TPACPI_BAT_HIGH_THRESH_STOP="99" #see bug #485526 diff --git a/app-laptop/tpacpi-bat/files/tpacpi-bat.confd.1 b/app-laptop/tpacpi-bat/files/tpacpi-bat.confd.1 new file mode 100644 index 000000000000..f1faf1d7fd47 --- /dev/null +++ b/app-laptop/tpacpi-bat/files/tpacpi-bat.confd.1 @@ -0,0 +1,19 @@ +# /etc/conf.d/tpacpi-bat: config file for /etc/init.d/tpacpi-bat + +# use '/etc/init.d/tpacpi-bat info' at any time to check the thresholds +# currently used by the driver + +# list of batteries the script should manage +# for example: BATS="1 2" +BATS="1" + +# default thresholds for '/etc/init.d/tpacpi-bat start' +TPACPI_BAT_THRESH_START="30" +TPACPI_BAT_THRESH_STOP="85" +# values to be used for '/etc/init.d/tpacpi-bat low' +TPACPI_BAT_LOW_THRESH_START="${TPACPI_BAT_THRESH_START}" +TPACPI_BAT_LOW_THRESH_STOP="${TPACPI_BAT_THRESH_STOP}" + +# values to be used for '/etc/init.d/tpacpi-bat high' +TPACPI_BAT_HIGH_THRESH_START="95" +TPACPI_BAT_HIGH_THRESH_STOP="99" #see bug #485526 diff --git a/app-laptop/tpacpi-bat/files/tpacpi-bat.initd.1 b/app-laptop/tpacpi-bat/files/tpacpi-bat.initd.1 new file mode 100644 index 000000000000..d9f5de7fb3dd --- /dev/null +++ b/app-laptop/tpacpi-bat/files/tpacpi-bat.initd.1 @@ -0,0 +1,78 @@ +#!/sbin/openrc-run +# Copyright (C) 2012-2016 Christoph Junghans <junghans@gentoo.org> +# +# Distributed under the terms of the GNU General Public License, v2 or later + +extra_started_commands="low high info" + +BATS="1" + +depend() { + after modules +} + +start() { + local state1 + + ebegin "Making sure that module 'acpi_call' is loaded" + modprobe acpi_call + state1=$? + eend ${state1} + + [ "${state1}" -ne "0" ] && return 1 + + ebegin "Starting ${SVCNAME}" + set_all ${TPACPI_BAT_THRESH_START} ${TPACPI_BAT_THRESH_STOP} + eend $? +} + +stop() { + einfo "Nothing required to be done to stop ${SVCNAME}" +} + +require_started() { + if ! service_started; then + "${RC_SERVICE}" start || return $? + fi +} + +high() { + require_started + + einfo "Switching ${SVCNAME} to high thesholds" + set_all ${TPACPI_BAT_HIGH_THRESH_START} ${TPACPI_BAT_HIGH_THRESH_STOP} +} + +low() { + require_started + + einfo "Switching ${SVCNAME} to low thesholds" + set_all ${TPACPI_BAT_LOW_THRESH_START} ${TPACPI_BAT_LOW_THRESH_STOP} +} + +set_all() { + local tstart=$1 + local tstop=$2 + local bat + + for bat in ${BATS}; do + ebegin " setting thresholds for ${bat}: $tstart $tstop" + /usr/bin/tpacpi-bat -s startThreshold ${bat} ${tstart} + /usr/bin/tpacpi-bat -s stopThreshold ${bat} ${tstop} + eend $? + done +} + +info() { + local tstart + local tstop + local bat + + require_started + + for bat in ${BATS}; do + tstart=$(/usr/bin/tpacpi-bat -g startThreshold ${bat}) + tstop=$(/usr/bin/tpacpi-bat -g stopThreshold ${bat}) + einfo "Battery ${bat}: ${tstart} ${tstop}" + done +} diff --git a/app-laptop/tpacpi-bat/files/tpacpi-bat.initd.2 b/app-laptop/tpacpi-bat/files/tpacpi-bat.initd.2 new file mode 100644 index 000000000000..7c92b739193d --- /dev/null +++ b/app-laptop/tpacpi-bat/files/tpacpi-bat.initd.2 @@ -0,0 +1,76 @@ +#!/sbin/openrc-run +# Copyright (C) 2012-2016 Christoph Junghans <junghans@gentoo.org> +# +# Distributed under the terms of the GNU General Public License, v2 or later + +extra_started_commands="low high info" + +depend() { + after modules +} + +start() { + local state1 + + ebegin "Making sure that module 'acpi_call' is loaded" + modprobe acpi_call + state1=$? + eend ${state1} + + [ "${state1}" -ne "0" ] && return 1 + + ebegin "Starting ${SVCNAME}" + set_all ${TPACPI_BAT_THRESH_START} ${TPACPI_BAT_THRESH_STOP} + eend $? +} + +stop() { + einfo "Nothing required to be done to stop ${SVCNAME}" +} + +require_started() { + if ! service_started; then + "${RC_SERVICE}" start || return $? + fi +} + +high() { + require_started + + einfo "Switching ${SVCNAME} to high thesholds" + set_all ${TPACPI_BAT_HIGH_THRESH_START} ${TPACPI_BAT_HIGH_THRESH_STOP} +} + +low() { + require_started + + einfo "Switching ${SVCNAME} to low thesholds" + set_all ${TPACPI_BAT_LOW_THRESH_START} ${TPACPI_BAT_LOW_THRESH_STOP} +} + +set_all() { + local tstart=$1 + local tstop=$2 + local bat + + for bat in ${BATS}; do + ebegin " setting thresholds for ${bat}: $tstart $tstop" + /usr/bin/tpacpi-bat -s startThreshold ${bat} ${tstart} + /usr/bin/tpacpi-bat -s stopThreshold ${bat} ${tstop} + eend $? + done +} + +info() { + local tstart + local tstop + local bat + + require_started + + for bat in ${BATS}; do + tstart=$(/usr/bin/tpacpi-bat -g startThreshold ${bat}) + tstop=$(/usr/bin/tpacpi-bat -g stopThreshold ${bat}) + einfo "Battery ${bat}: ${tstart} ${tstop}" + done +} diff --git a/app-laptop/tpacpi-bat/metadata.xml b/app-laptop/tpacpi-bat/metadata.xml new file mode 100644 index 000000000000..cc8b2e031a4a --- /dev/null +++ b/app-laptop/tpacpi-bat/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>junghans@gentoo.org</email> + <name>Christoph Junghans</name> + </maintainer> + <upstream> + <remote-id type="github">teleshoes/tpacpi-bat</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/app-laptop/tpacpi-bat/tpacpi-bat-1.1-r1.ebuild b/app-laptop/tpacpi-bat/tpacpi-bat-1.1-r1.ebuild new file mode 100644 index 000000000000..e23197335543 --- /dev/null +++ b/app-laptop/tpacpi-bat/tpacpi-bat-1.1-r1.ebuild @@ -0,0 +1,33 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit eutils systemd + +if [ "${PV}" = "9999" ]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/teleshoes/tpacpi-bat.git" + KEYWORDS="" +else + SRC_URI="https://github.com/teleshoes/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64" +fi +DESCRIPTION="Control battery thresholds of recent ThinkPads, not supported by tp_smapi" +HOMEPAGE="https://github.com/teleshoes/tpacpi-bat" + +LICENSE="GPL-3" +SLOT="0" +IUSE="" + +DEPEND="" +RDEPEND="sys-power/acpi_call + dev-lang/perl" + +src_install() { + dodoc README battery_asl + dobin tpacpi-bat + newinitd "${FILESDIR}"/${PN}.initd.1 ${PN} + newconfd "${FILESDIR}"/${PN}.confd.0 ${PN} + systemd_newunit tpacpi.service ${PN}.service +} diff --git a/app-laptop/tpacpi-bat/tpacpi-bat-2.1.ebuild b/app-laptop/tpacpi-bat/tpacpi-bat-2.1.ebuild new file mode 100644 index 000000000000..e23197335543 --- /dev/null +++ b/app-laptop/tpacpi-bat/tpacpi-bat-2.1.ebuild @@ -0,0 +1,33 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit eutils systemd + +if [ "${PV}" = "9999" ]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/teleshoes/tpacpi-bat.git" + KEYWORDS="" +else + SRC_URI="https://github.com/teleshoes/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64" +fi +DESCRIPTION="Control battery thresholds of recent ThinkPads, not supported by tp_smapi" +HOMEPAGE="https://github.com/teleshoes/tpacpi-bat" + +LICENSE="GPL-3" +SLOT="0" +IUSE="" + +DEPEND="" +RDEPEND="sys-power/acpi_call + dev-lang/perl" + +src_install() { + dodoc README battery_asl + dobin tpacpi-bat + newinitd "${FILESDIR}"/${PN}.initd.1 ${PN} + newconfd "${FILESDIR}"/${PN}.confd.0 ${PN} + systemd_newunit tpacpi.service ${PN}.service +} diff --git a/app-laptop/tpacpi-bat/tpacpi-bat-3.0-r1.ebuild b/app-laptop/tpacpi-bat/tpacpi-bat-3.0-r1.ebuild new file mode 100644 index 000000000000..350f9db837ce --- /dev/null +++ b/app-laptop/tpacpi-bat/tpacpi-bat-3.0-r1.ebuild @@ -0,0 +1,33 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit systemd + +if [ "${PV}" = "9999" ]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/teleshoes/tpacpi-bat.git" + KEYWORDS="" +else + SRC_URI="https://github.com/teleshoes/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64" +fi +DESCRIPTION="Control battery thresholds of recent ThinkPads, not supported by tp_smapi" +HOMEPAGE="https://github.com/teleshoes/tpacpi-bat" + +LICENSE="GPL-3" +SLOT="0" +IUSE="" + +DEPEND="" +RDEPEND="sys-power/acpi_call + dev-lang/perl" + +src_install() { + dodoc README battery_asl + dobin tpacpi-bat + newinitd "${FILESDIR}"/${PN}.initd.2 ${PN} + newconfd "${FILESDIR}"/${PN}.confd.1 ${PN} + systemd_newunit tpacpi.service ${PN}.service +} diff --git a/app-laptop/tpacpi-bat/tpacpi-bat-3.0.ebuild b/app-laptop/tpacpi-bat/tpacpi-bat-3.0.ebuild new file mode 100644 index 000000000000..e23197335543 --- /dev/null +++ b/app-laptop/tpacpi-bat/tpacpi-bat-3.0.ebuild @@ -0,0 +1,33 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit eutils systemd + +if [ "${PV}" = "9999" ]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/teleshoes/tpacpi-bat.git" + KEYWORDS="" +else + SRC_URI="https://github.com/teleshoes/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64" +fi +DESCRIPTION="Control battery thresholds of recent ThinkPads, not supported by tp_smapi" +HOMEPAGE="https://github.com/teleshoes/tpacpi-bat" + +LICENSE="GPL-3" +SLOT="0" +IUSE="" + +DEPEND="" +RDEPEND="sys-power/acpi_call + dev-lang/perl" + +src_install() { + dodoc README battery_asl + dobin tpacpi-bat + newinitd "${FILESDIR}"/${PN}.initd.1 ${PN} + newconfd "${FILESDIR}"/${PN}.confd.0 ${PN} + systemd_newunit tpacpi.service ${PN}.service +} diff --git a/app-laptop/tpacpi-bat/tpacpi-bat-3.1.ebuild b/app-laptop/tpacpi-bat/tpacpi-bat-3.1.ebuild new file mode 100644 index 000000000000..6364a4ee745f --- /dev/null +++ b/app-laptop/tpacpi-bat/tpacpi-bat-3.1.ebuild @@ -0,0 +1,34 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit systemd + +if [ "${PV}" = "9999" ]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/teleshoes/tpacpi-bat.git" + KEYWORDS="" +else + SRC_URI="https://github.com/teleshoes/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64" +fi +DESCRIPTION="Control battery thresholds of recent ThinkPads, not supported by tp_smapi" +HOMEPAGE="https://github.com/teleshoes/tpacpi-bat" + +LICENSE="GPL-3" +SLOT="0" +IUSE="" + +DEPEND="" +RDEPEND="sys-power/acpi_call + dev-lang/perl" + +src_install() { + dodoc README.md battery_asl + dobin tpacpi-bat + newinitd "${FILESDIR}"/${PN}.initd.2 ${PN} + newconfd "${FILESDIR}"/${PN}.confd.1 ${PN} + systemd_newunit examples/systemd_fixed_threshold/tpacpi.service \ + ${PN}.service +} diff --git a/app-laptop/tpacpi-bat/tpacpi-bat-9999.ebuild b/app-laptop/tpacpi-bat/tpacpi-bat-9999.ebuild new file mode 100644 index 000000000000..6364a4ee745f --- /dev/null +++ b/app-laptop/tpacpi-bat/tpacpi-bat-9999.ebuild @@ -0,0 +1,34 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit systemd + +if [ "${PV}" = "9999" ]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/teleshoes/tpacpi-bat.git" + KEYWORDS="" +else + SRC_URI="https://github.com/teleshoes/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64" +fi +DESCRIPTION="Control battery thresholds of recent ThinkPads, not supported by tp_smapi" +HOMEPAGE="https://github.com/teleshoes/tpacpi-bat" + +LICENSE="GPL-3" +SLOT="0" +IUSE="" + +DEPEND="" +RDEPEND="sys-power/acpi_call + dev-lang/perl" + +src_install() { + dodoc README.md battery_asl + dobin tpacpi-bat + newinitd "${FILESDIR}"/${PN}.initd.2 ${PN} + newconfd "${FILESDIR}"/${PN}.confd.1 ${PN} + systemd_newunit examples/systemd_fixed_threshold/tpacpi.service \ + ${PN}.service +} diff --git a/app-laptop/tpb/Manifest b/app-laptop/tpb/Manifest new file mode 100644 index 000000000000..e98bd63368f6 --- /dev/null +++ b/app-laptop/tpb/Manifest @@ -0,0 +1 @@ +DIST tpb-0.6.4.tar.gz 280316 BLAKE2B c629840245d2e749f3669e274da72baffb2856f969346d1f1feed3e45b9909f1ba12d125e48baa4cd29d021a04cba9cddec35edad80bd3ccff1ffea1423157a3 SHA512 1a12f4231b86bc3da2867670d5800f8f99f347743cf40b229c92485b6fe52e12b0222356d95d071ec26162ac778d2fe40867b4e635701620bc52236dbdb7b76a diff --git a/app-laptop/tpb/files/tpb-0.6.4-nvram.patch b/app-laptop/tpb/files/tpb-0.6.4-nvram.patch new file mode 100644 index 000000000000..1ead9cbe5929 --- /dev/null +++ b/app-laptop/tpb/files/tpb-0.6.4-nvram.patch @@ -0,0 +1,34 @@ +diff -Naur tpb-0.6.4-org/src/tpb.c tpb-0.6.4/src/tpb.c +--- tpb-0.6.4-org/src/tpb.c 2005-07-18 16:15:59.000000000 +0200 ++++ tpb-0.6.4/src/tpb.c 2008-05-13 15:15:34.000000000 +0200 +@@ -523,10 +523,10 @@ + /* determine the state of the brightness buttons {{{ */ + if(thinkpad_state.brightness_level != last_thinkpad_state.brightness_level) { + if(cfg.verbose == STATE_ON) { +- printf(_("Brightness changed: Level %d\n"), thinkpad_state.brightness_level * 100 / 7); ++ printf(_("Brightness changed: Level %d\n"), thinkpad_state.brightness_level * 100 / 15); + } + if(cfg.callback != NULL) { +- snprintf(callback_cmd, sizeof(callback_cmd), "%s brightness %d", cfg.callback, thinkpad_state.brightness_level * 100 / 7); ++ snprintf(callback_cmd, sizeof(callback_cmd), "%s brightness %d", cfg.callback, thinkpad_state.brightness_level * 100 / 15); + if(fork_app(callback_cmd) != 0) { + _exit(0); + } +@@ -537,7 +537,7 @@ + if(osd_ptr != NULL && + ((cfg.osd == STATE_OFF && cfg.osdbrightness == STATE_ON) || (cfg.osd == STATE_ON && cfg.osdbrightness != STATE_OFF))) { + xosd_display(osd_ptr, 0, XOSD_string, _("Brightness")); +- xosd_display(osd_ptr, 1, XOSD_percentage, thinkpad_state.brightness_level * 100 / 7); ++ xosd_display(osd_ptr, 1, XOSD_percentage, thinkpad_state.brightness_level * 100 / 15); + } + } + #endif /* HAVE_LIBXOSD */ /* }}} */ +@@ -1031,7 +1031,7 @@ + thinkpad_state->hibernate_toggle = (thinkpad_state->hibernate_toggle & ~0x01) | (( buffer[0x58] & 0x01) ); + thinkpad_state->display_state = (( buffer[0x59] & 0x03) ); + thinkpad_state->expand_toggle = (thinkpad_state->expand_toggle & ~0x01) | (( buffer[0x59] & 0x10) >> 4); +- thinkpad_state->brightness_level = (( buffer[0x5E] & 0x07) ); ++ thinkpad_state->brightness_level = (( buffer[0x5E] & 0x0F) ); + thinkpad_state->brightness_toggle = (thinkpad_state->brightness_toggle & ~0x01) | (( buffer[0x5E] & 0x20) >> 5); + thinkpad_state->volume_level = (( buffer[0x60] & 0x0f) ); + thinkpad_state->volume_toggle = (thinkpad_state->volume_toggle & ~0x01) | (( buffer[0x60] & 0x80) >> 7); diff --git a/app-laptop/tpb/files/tpb-configure-fix.diff b/app-laptop/tpb/files/tpb-configure-fix.diff new file mode 100644 index 000000000000..7dc4683d158b --- /dev/null +++ b/app-laptop/tpb/files/tpb-configure-fix.diff @@ -0,0 +1,16 @@ +diff -aur tpb-0.5.1/configure tpb-0.5.1-patched/configure +--- tpb-0.5.1/configure 2003-04-10 04:06:26.000000000 -0400 ++++ tpb-0.5.1-patched/configure 2003-06-30 12:06:41.000000000 -0400 +@@ -790,10 +790,10 @@ + + # additional options + # Check whether --enable-xosd or --disable-xosd was given. +-if test "${enable_xosd+set}" = set; then +- enableval="$enable_xosd" ++if test "x${enable_xosd}" = xno; then + enable_xosd=no + else ++ enableval="$enable_xosd" + enable_xosd=yes + fi + diff --git a/app-laptop/tpb/metadata.xml b/app-laptop/tpb/metadata.xml new file mode 100644 index 000000000000..d85b4252fc33 --- /dev/null +++ b/app-laptop/tpb/metadata.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<!-- maintainer-needed --> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/app-laptop/tpb/tpb-0.6.4-r1.ebuild b/app-laptop/tpb/tpb-0.6.4-r1.ebuild new file mode 100644 index 000000000000..f8bff7aa3280 --- /dev/null +++ b/app-laptop/tpb/tpb-0.6.4-r1.ebuild @@ -0,0 +1,38 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit linux-info eutils + +DESCRIPTION="IBM ThinkPad buttons utility" +HOMEPAGE="https://savannah.nongnu.org/projects/tpb/" +SRC_URI="https://savannah.nongnu.org/download/tpb/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 -ppc x86" +IUSE="nls xosd" + +RDEPEND="x11-libs/libXt + x11-libs/libXext + xosd? ( >=x11-libs/xosd-2.2.0 )" +DEPEND="${RDEPEND}" + +CONFIG_CHECK="~NVRAM" +ERROR_NVRAM="${P} requires /dev/nvram support (CONFIG_NVRAM)" + +src_prepare() { + epatch "${FILESDIR}"/${PN}-configure-fix.diff + epatch "${FILESDIR}"/${P}-nvram.patch +} + +src_configure() { + econf \ + $(use_enable nls) \ + $(use_enable xosd) +} + +src_install() { + default + dodoc doc/{callback_example.sh,nvram.txt,tpbrc} +} |
