summaryrefslogtreecommitdiff
path: root/app-misc/ddcutil
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /app-misc/ddcutil
reinit the tree, so we can have metadata
Diffstat (limited to 'app-misc/ddcutil')
-rw-r--r--app-misc/ddcutil/Manifest4
-rw-r--r--app-misc/ddcutil/ddcutil-0.8.4.ebuild104
-rw-r--r--app-misc/ddcutil/metadata.xml34
3 files changed, 142 insertions, 0 deletions
diff --git a/app-misc/ddcutil/Manifest b/app-misc/ddcutil/Manifest
new file mode 100644
index 000000000000..56d3d5e93d1e
--- /dev/null
+++ b/app-misc/ddcutil/Manifest
@@ -0,0 +1,4 @@
+DIST ddcutil-0.8.4.tar.gz 558405 SHA256 7bfa9bd1dad7aac1853cf1070d2becf47156c158b84ae874cd77e8fd7d4e44d5 SHA512 e7bf78295a008607ef520e055873acc0bac6d94b850a6ea1f7d4a4ea9e080d23b4b7d82e5725a220ff120ab1523aa320265ba22671982625c10088521c72a14c WHIRLPOOL 3637a3a03a5a4d402f1ca3dcf0ecee8cd361735cff1ffce4a2e862ad9c87fe12cd09a782c5c2b6bfd53e94547eecf29c344ce918217931593e07a4a207bf241a
+EBUILD ddcutil-0.8.4.ebuild 2943 SHA256 975d16e78aff3742fd91b7f92489d447f63536cf326884310e95bea34956087e SHA512 0d2266c92a30e11e7aa4c71e1a80fc77a5cbc370aed40025881d1764462479c7cc2e7894aac838adf4e95aeac2f7b5c49000ee81b0e6783376c98da70a5be5b1 WHIRLPOOL dd50001bcc6361a403bc485efe9b4c0b4448025dd33dc5b17a432b5b0925223d16a8021856fd4fbe95ce2efae18bf648d1cffb36e3d20ce24a1f01cbb542ca2a
+MISC ChangeLog 756 SHA256 3ff29933fd30bc81aadf45bd7a3c9047fe3721cc22c10728fe0254e7055bfeef SHA512 aefb3bc91b67c481b94cb5518b89c6fa56dc7326e5bc7dcf277d1b940f818832dfde0b209a5747c71252dca36a54d736ec392cf53a4a45ee8fc730cf39ec13e3 WHIRLPOOL e914df41a8773052f089504b9b6cec2c66379616f913eef9d54e9c312ed02f7199c2c0465ae10d4def07b94559255eb105b292e3ce5f9b4b10a7a0be1a88c837
+MISC metadata.xml 1277 SHA256 4ef015ffaacdc3e15213d066501a4709e3629a7d3e8ae7b31a50ad4a03ca42f7 SHA512 e71e364fddc851248f3c87be147b2ac046326172a2726b0614c60136a99223ce12d30999140c35534ff86d024023f80f8a7149a8fe59a8d6bfb2771468b514af WHIRLPOOL 8845c3281a2d3cc5122743d1a99363c47c38a28d2ec288d74eda45e4191266ba7aaab44a8fb894f3b9bfd407fc9848d4d4f2d071eb8cb51639c0542d69076130
diff --git a/app-misc/ddcutil/ddcutil-0.8.4.ebuild b/app-misc/ddcutil/ddcutil-0.8.4.ebuild
new file mode 100644
index 000000000000..5942efa23a3e
--- /dev/null
+++ b/app-misc/ddcutil/ddcutil-0.8.4.ebuild
@@ -0,0 +1,104 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools flag-o-matic linux-info udev user
+
+DESCRIPTION="Program for querying and changing monitor settings"
+HOMEPAGE="http://www.ddcutil.com/"
+SRC_URI="https://github.com/rockowitz/ddcutil/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+# Binary drivers need special instructions compared to the open source counterparts.
+# If a user switches drivers, they will need to set different use flags for
+# Xorg or Wayland or Mesa, so this will trigger the rebuild against
+# the different drivers.
+# Remove ATI/AMD driver since it's masked for removal.
+# Will most likely need to set this for AMDGPU when in portage.
+IUSE="usb-monitor user-permissions video_cards_nvidia"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+RDEPEND="x11-libs/libXrandr
+ x11-libs/libX11
+ dev-libs/glib:2
+ sys-apps/i2c-tools
+ virtual/udev
+ usb-monitor? (
+ dev-libs/hidapi
+ virtual/libusb:1
+ sys-apps/usbutils )"
+DEPEND="virtual/pkgconfig
+ ${RDEPEND}"
+
+pkg_pretend() {
+ # This program needs /dev/ic2-* devices to communicate with the monitor.
+ CONFIG_CHECK="~I2C_CHARDEV"
+ ERROR_I2C_CHARDEV="You must enable I2C_CHARDEV in your kernel to continue"
+ if use usb-monitor; then
+ CONFIG_CHECK+=" ~HIDRAW ~USB_HIDDEV"
+ ERROR_HIDRAW="HIDRAW is needed to support USB monitors"
+ ERROR_I2C_CHARDEV="USB_HIDDEV is needed to support USB monitors"
+ fi
+
+ # Now do the actual checks setup above
+ check_extra_config
+}
+
+src_prepare() {
+ default
+ eautoreconf
+}
+
+src_configure() {
+ # Bug 607818.
+ replace-flags -O3 -O2
+
+ # Python API is still very experimental.
+ local myeconfargs=(
+ $(use_enable usb-monitor usb)
+ --disable-swig
+ --enable-lib
+ )
+
+ econf "${myeconfargs[@]}"
+}
+
+src_install() {
+ default
+ if use user-permissions; then
+ udev_dorules data/etc/udev/rules.d/45-ddcutil-i2c.rules
+ if use usb-monitor; then
+ udev_dorules data/etc/udev/rules.d/45-ddcutil-usb.rules
+ fi
+ fi
+}
+
+pkg_postinst() {
+ if use user-permissions; then
+ enewgroup i2c
+ einfo "To allow non-root users access to the /dev/i2c-* devices, add those"
+ einfo "users to the i2c group: usermod -aG i2c user"
+ einfo "Restart the computer or reload the i2c-dev module to activate"
+ einfo "the new udev rule."
+ einfo "For more information read: http://www.ddcutil.com/i2c_permissions/"
+
+ if use usb-monitor; then
+ enewgroup video
+ einfo "To allow non-root users access to USB monitors, add those users"
+ einfo "to the video group: usermod -aG video user"
+ einfo "Restart the computer, reload the hiddev and hidraw modules, or replug"
+ einfo "the monitor to activate the new udev rule."
+ einfo "For more information read: http://www.ddcutil.com/usb/"
+ fi
+
+ udev_reload
+ fi
+
+ if use video_cards_nvidia; then
+ ewarn "Please read the following webpage on proper usage with the nVidia "
+ ewarn "binary drivers, or it may not work: http://www.ddcutil.com/nvidia/"
+ fi
+}
diff --git a/app-misc/ddcutil/metadata.xml b/app-misc/ddcutil/metadata.xml
new file mode 100644
index 000000000000..3eec1aa83b5c
--- /dev/null
+++ b/app-misc/ddcutil/metadata.xml
@@ -0,0 +1,34 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>j.scruggs@gmail.com</email>
+ <name>Jonathan Scruggs</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <longdescription>
+ ddcutil primarily uses DDC/CI (Display Data Channel Command Interface)
+ to communicate with monitors implementing MCCS (Monitor Control Command
+ Set) over I2C. Normally, the video driver for the monitor exposes the
+ I2C channel as devices named /dev/i2c-n. Alternatively, there is initial
+ support for monitors (such as Apple displays) that implement MCCS using
+ a USB connection.
+ </longdescription>
+ <use>
+ <flag name="user-permissions">
+ Adds a udev rules to allow non-root users in the i2c group to
+ access the /dev/i2c-* devices. If usb-monitor is selected, users
+ will need to be added to the video group to access the USB monitor.
+ Otherwise, only root will be able to use ddcutil.
+ </flag>
+ <flag name="usb-monitor">
+ Adds support for monitors attached via USB.
+ </flag>
+ </use>
+ <upstream>
+ <remote-id type="github">rockowitz/ddcutil</remote-id>
+ </upstream>
+</pkgmetadata>