diff options
author | Jonathan Scruggs <j.scruggs@gmail.com> | 2018-01-30 21:07:42 +0000 |
---|---|---|
committer | Jonathan Scruggs <dracwyrm@gentoo.org> | 2018-01-30 21:27:58 +0000 |
commit | 1c133a7cccdf1f1aff10ec0a00766cb073d72f8b (patch) | |
tree | d470af46bbf9d3da8966a8d7514c5e5c80fd812a /app-misc/ddcutil | |
parent | media-libs/osl: add 1.9.6 release (diff) | |
download | gentoo-1c133a7cccdf1f1aff10ec0a00766cb073d72f8b.tar.gz gentoo-1c133a7cccdf1f1aff10ec0a00766cb073d72f8b.tar.bz2 gentoo-1c133a7cccdf1f1aff10ec0a00766cb073d72f8b.zip |
app-misc/ddcutil: remove pedantic compiler flag
Closes: https://bugs.gentoo.org/645830
Closes: https://github.com/gentoo/gentoo/pull/7003
Diffstat (limited to 'app-misc/ddcutil')
-rw-r--r-- | app-misc/ddcutil/ddcutil-0.8.6-r1.ebuild | 108 | ||||
-rw-r--r-- | app-misc/ddcutil/files/ddcutil-0.8.6-remove-pedantic-cflag.patch | 126 |
2 files changed, 234 insertions, 0 deletions
diff --git a/app-misc/ddcutil/ddcutil-0.8.6-r1.ebuild b/app-misc/ddcutil/ddcutil-0.8.6-r1.ebuild new file mode 100644 index 000000000000..a1402f71b646 --- /dev/null +++ b/app-misc/ddcutil/ddcutil-0.8.6-r1.ebuild @@ -0,0 +1,108 @@ +# Copyright 1999-2018 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" + +SLOT="0" +LICENSE="GPL-2" +KEYWORDS="~amd64 ~x86" +IUSE="drm usb-monitor user-permissions video_cards_nvidia X" +REQUIRED_USE="drm? ( X )" + +RDEPEND="dev-libs/glib:2 + sys-apps/i2c-tools + virtual/udev + drm? ( x11-libs/libdrm ) + usb-monitor? ( + dev-libs/hidapi + virtual/libusb:1 + sys-apps/usbutils + ) + X? ( + x11-libs/libXrandr + x11-libs/libX11 + )" + +DEPEND="${RDEPEND} + virtual/pkgconfig" + +PATCHES=( ${FILESDIR}/${P}-remove-pedantic-cflag.patch ) + +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 + + local myeconfargs=( + $(use_enable drm) + $(use_enable usb-monitor usb) + $(use_enable X x11) + --enable-lib + --disable-cffi + --disable-cython + --disable-swig + ) + + 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/files/ddcutil-0.8.6-remove-pedantic-cflag.patch b/app-misc/ddcutil/files/ddcutil-0.8.6-remove-pedantic-cflag.patch new file mode 100644 index 000000000000..e20cc36459ec --- /dev/null +++ b/app-misc/ddcutil/files/ddcutil-0.8.6-remove-pedantic-cflag.patch @@ -0,0 +1,126 @@ +diff -urN a/src/app_sysenv/Makefile.am b/src/app_sysenv/Makefile.am +--- a/src/app_sysenv/Makefile.am 2018-01-20 06:40:55.000000000 +0000 ++++ b/src/app_sysenv/Makefile.am 2018-01-28 20:16:44.143484825 +0000 +@@ -15,8 +15,8 @@ + + + AM_CFLAGS = -Wall +-AM_CFLAGS += -Werror +-AM_CFLAGS += -Wpedantic ++#AM_CFLAGS += -Werror ++#AM_CFLAGS += -Wpedantic + + if ENABLE_CALLGRAPH_COND + AM_CFLAGS += -fdump-rtl-expand +diff -urN a/src/base/Makefile.am b/src/base/Makefile.am +--- a/src/base/Makefile.am 2018-01-20 06:40:55.000000000 +0000 ++++ b/src/base/Makefile.am 2018-01-28 20:21:31.124936834 +0000 +@@ -4,7 +4,7 @@ + -I$(top_srcdir)/src/public + + AM_CFLAGS = -Wall +-AM_CFLAGS += -Werror ++#AM_CFLAGS += -Werror + # AM_CFLAGS += -Wpedantic + + if ENABLE_CALLGRAPH_COND +diff -urN a/src/cmdline/Makefile.am b/src/cmdline/Makefile.am +--- a/src/cmdline/Makefile.am 2018-01-20 06:40:55.000000000 +0000 ++++ b/src/cmdline/Makefile.am 2018-01-28 20:20:32.178848976 +0000 +@@ -4,7 +4,7 @@ + -I$(top_srcdir)/src/public + + AM_CFLAGS = -Wall +-AM_CFLAGS += -Werror ++#AM_CFLAGS += -Werror + # flags g_option parser structs in cmd_parser_goption.c + # AM_CFLAGS += -Wpedantic + +diff -urN a/src/ddc/Makefile.am b/src/ddc/Makefile.am +--- a/src/ddc/Makefile.am 2018-01-20 06:40:55.000000000 +0000 ++++ b/src/ddc/Makefile.am 2018-01-28 20:18:09.643626498 +0000 +@@ -11,8 +11,8 @@ + + + AM_CFLAGS = -Wall +-AM_CFLAGS += -Werror +-AM_CFLAGS += -Wpedantic ++#AM_CFLAGS += -Werror ++#AM_CFLAGS += -Wpedantic + + if ENABLE_CALLGRAPH_COND + AM_CFLAGS += -fdump-rtl-expand +diff -urN a/src/i2c/Makefile.am b/src/i2c/Makefile.am +--- a/src/i2c/Makefile.am 2018-01-20 06:40:55.000000000 +0000 ++++ b/src/i2c/Makefile.am 2018-01-28 20:17:30.271562118 +0000 +@@ -4,8 +4,8 @@ + -I$(top_srcdir)/src/public + + AM_CFLAGS = -Wall +-AM_CFLAGS += -Werror +-AM_CFLAGS += -Wpedantic ++#AM_CFLAGS += -Werror ++#AM_CFLAGS += -Wpedantic + + if ENABLE_CALLGRAPH_COND + AM_CFLAGS += -fdump-rtl-expand +diff -urN a/src/sample_clients/Makefile.am b/src/sample_clients/Makefile.am +--- a/src/sample_clients/Makefile.am 2018-01-20 06:40:55.000000000 +0000 ++++ b/src/sample_clients/Makefile.am 2018-01-28 20:19:57.230795822 +0000 +@@ -7,7 +7,7 @@ + -I$(top_srcdir)/src + + AM_CFLAGS = -Wall -fPIC +-AM_CFLAGS += -Werror ++#AM_CFLAGS += -Werror + + check_PROGRAMS = + if ENABLE_SHARED_LIB_COND +diff -urN a/src/test/Makefile.am b/src/test/Makefile.am +--- a/src/test/Makefile.am 2018-01-20 06:40:55.000000000 +0000 ++++ b/src/test/Makefile.am 2018-01-28 20:19:03.509712410 +0000 +@@ -12,7 +12,7 @@ + + + +-AM_CFLAGS = -Wall -Werror ++AM_CFLAGS = -Wall + + if ENABLE_CALLGRAPH_COND + AM_CFLAGS += -fdump-rtl-expand +diff -urN a/src/usb/Makefile.am b/src/usb/Makefile.am +--- a/src/usb/Makefile.am 2018-01-20 06:40:55.000000000 +0000 ++++ b/src/usb/Makefile.am 2018-01-28 20:18:26.146653076 +0000 +@@ -5,7 +5,7 @@ + -I$(top_srcdir)/src/public + + AM_CFLAGS = -Wall +-AM_CFLAGS += -Wpedantic ++#AM_CFLAGS += -Wpedantic + + if ENABLE_CALLGRAPH_COND + AM_CFLAGS += -fdump-rtl-expand +diff -urN a/src/util/Makefile.am b/src/util/Makefile.am +--- a/src/util/Makefile.am 2018-01-20 06:40:55.000000000 +0000 ++++ b/src/util/Makefile.am 2018-01-28 20:21:07.245901502 +0000 +@@ -3,7 +3,7 @@ + $(LIBDRM_CFLAGS) + + AM_CFLAGS = -Wall +-AM_CFLAGS += -Werror ++#AM_CFLAGS += -Werror + # -pedantic issues warnings re code that doesn't conform to ISO C + # Alas, -m modifier on sscanf is a POSIX extension, not ISO C + # In combination with -Werror, causes device_util.c to fail compilation +diff -urN a/src/vcp/Makefile.am b/src/vcp/Makefile.am +--- a/src/vcp/Makefile.am 2018-01-20 06:40:55.000000000 +0000 ++++ b/src/vcp/Makefile.am 2018-01-28 20:19:28.024750741 +0000 +@@ -4,7 +4,7 @@ + -I$(top_srcdir)/src/public + + AM_CFLAGS = -Wall +-AM_CFLAGS += -Werror ++#AM_CFLAGS += -Werror + # vcp_feature_codes.c requires extensive changes if -Wpedantic + # AM_CFLAGS += -Wpedantic + |