aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Laskin <alex@lask.in>2018-06-16 08:27:03 +0300
committerLeo <thinkabit.ukim@gmail.com>2019-06-14 09:29:10 -0300
commit2e71e88c2a814ef9e0a8d1206bff0e071dc6d606 (patch)
tree32c761dc9a468114b8053211c2a8dc2533cedd5e
parent127784aeb3384f55fb1795d2c2da3fea715a7fbd (diff)
downloadaports-2e71e88c2a814ef9e0a8d1206bff0e071dc6d606.tar.bz2
aports-2e71e88c2a814ef9e0a8d1206bff0e071dc6d606.tar.xz
testing/ddcutil: new aport
Query and change Linux monitor settings using DDC/CI and USB https://github.com/rockowitz/ddcutil
-rw-r--r--testing/ddcutil/APKBUILD32
-rw-r--r--testing/ddcutil/execinfo.patch76
2 files changed, 108 insertions, 0 deletions
diff --git a/testing/ddcutil/APKBUILD b/testing/ddcutil/APKBUILD
new file mode 100644
index 0000000000..04bc7aa3f6
--- /dev/null
+++ b/testing/ddcutil/APKBUILD
@@ -0,0 +1,32 @@
+# Contributor: Alex Laskin <alex@lask.in>
+# Maintainer: Alex Laskin <alex@lask.in>
+pkgname=ddcutil
+pkgver=0.9.1
+pkgrel=0
+pkgdesc="Query and change Linux monitor settings using DDC/CI and USB"
+url="https://github.com/rockowitz/ddcutil"
+arch="all"
+license="GPL-2.0-only"
+makedepends="linux-headers autoconf automake libtool eudev-dev libusb-dev libxrandr-dev glib-dev"
+subpackages="$pkgname-doc"
+source="$pkgname-$pkgver.tar.gz::https://github.com/rockowitz/ddcutil/archive/v${pkgver}.tar.gz
+ execinfo.patch"
+
+prepare() {
+ default_prepare
+ ./autogen.sh
+}
+
+build() {
+ ./configure \
+ --prefix=/usr \
+ --mandir=/usr/share/man
+ make
+}
+
+package() {
+ make DESTDIR="$pkgdir" install
+ rm -rf "$pkgdir/usr/include" "$pkgdir/usr/lib" "$pkgdir/usr/share/ddcutil"
+}
+sha512sums="b2d5866606a4bc081d89180e910822f2a2a653a2782e3df582536ddc86c7d3dc02309dbb41f8d566f6ebdc5d82d3aa11792a04c28b3d83552b024dfd59891fda ddcutil-0.9.1.tar.gz
+4d99a24bd863f060d74111f6853e039a0dc67a3e1c986ea9fac3a35451caf4e95d8749016800be6f259e4cb451c9db734dcef0b710b542ee3f987586cacb8e04 execinfo.patch"
diff --git a/testing/ddcutil/execinfo.patch b/testing/ddcutil/execinfo.patch
new file mode 100644
index 0000000000..99448d70b0
--- /dev/null
+++ b/testing/ddcutil/execinfo.patch
@@ -0,0 +1,76 @@
+--- ddcutil-0.9.1-clean/src/test/i2c/i2c_io_old.c
++++ ddcutil-0.9.1-patched/src/test/i2c/i2c_io_old.c
+@@ -34,7 +34,9 @@
+
+ #include <assert.h>
+ #include <errno.h>
++#ifdef HAVE_EXECINFO_H
+ #include <execinfo.h>
++#endif
+ #include <fcntl.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+--- ddcutil-0.9.1-clean/src/util/debug_util.c
++++ ddcutil-0.9.1-patched/src/util/debug_util.c
+@@ -26,7 +26,9 @@
+ */
+
+ /** \cond */
++#ifdef HAVE_EXECINFO_H
+ #include <execinfo.h>
++
+ #include <glib-2.0/glib.h>
+ #include <stdbool.h>
+ #include <stdio.h>
+@@ -82,7 +84,6 @@
+ return result;
+ }
+
+-
+ #ifdef OLD
+ /** Show the call stack.
+ *
+@@ -194,5 +195,5 @@
+ g_ptr_array_free(callstack, true);
+ }
+ }
+-
++#endif
+
+--- ddcutil-0.9.1-clean/src/util/debug_util.h
++++ ddcutil-0.9.1-patched/src/util/debug_util.h
+@@ -30,7 +30,9 @@
+
+ #include <glib-2.0/glib.h>
+
++#ifdef HAVE_EXECINFO_H
+ GPtrArray * get_backtrace(int stack_adjust);
+ void show_backtrace(int stack_adjust);
++#endif
+
+ #endif /* DEBUG_UTIL_H_ */
+
+--- ddcutil-0.9.1-clean/src/util/error_info.c
++++ ddcutil-0.9.1-patched/src/util/error_info.c
+@@ -101,7 +101,9 @@
+ bool debug = false;
+ if (debug) {
+ printf("(%s) Starting. erec=%p\n", __func__, erec);
++#ifdef HAVE_EXECINFO_H
+ show_backtrace(2);
++#endif
+ }
+ if (erec) {
+ VALID_DDC_ERROR_PTR(erec);
+
+--- ddcutil-0.9.1-clean/src/util/edid.h
++++ ddcutil-0.9.1-patched/src/util/edid.h
+@@ -36,6 +36,7 @@
+ #include <stdint.h>
+ #include <stdio.h>
+ #include <stdlib.h>
++#include <sys/types.h>
+ /** \endcond */
+
+ #include "coredefs.h"
+