Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] Clight[d]: Update to 4.2 and 5.1
@ 2021-02-08  9:38 adriangoransson
  2021-02-08  9:41 ` [PR PATCH] [Updated] " adriangoransson
                   ` (18 more replies)
  0 siblings, 19 replies; 20+ messages in thread
From: adriangoransson @ 2021-02-08  9:38 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1609 bytes --]

There is a new pull request by adriangoransson against master on the void-packages repository

https://github.com/adriangoransson/void-packages master
https://github.com/void-linux/void-packages/pull/28579

Clight[d]: Update to 4.2 and 5.1
<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [X] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/28579.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-master-28579.patch --]
[-- Type: text/x-diff, Size: 6359 bytes --]

From 2e177ac182cec0a164e9610b364e98e24d6bcd8b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Adrian=20G=C3=B6ransson?= <adriangoransson@gmail.com>
Date: Mon, 8 Feb 2021 09:43:59 +0100
Subject: [PATCH 1/2] Clightd: Update to 5.1

---
 srcpkgs/Clightd/files/Clightd/run | 2 +-
 srcpkgs/Clightd/template          | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/Clightd/files/Clightd/run b/srcpkgs/Clightd/files/Clightd/run
index 979d7e955cc..9170543376b 100644
--- a/srcpkgs/Clightd/files/Clightd/run
+++ b/srcpkgs/Clightd/files/Clightd/run
@@ -1,4 +1,4 @@
 #!/bin/sh
 
 sv check dbus >/dev/null || exit 1
-exec /usr/lib/clightd/clightd 2>&1
+exec /usr/libexec/clightd 2>&1
diff --git a/srcpkgs/Clightd/template b/srcpkgs/Clightd/template
index 79013c87829..796afb80f8e 100644
--- a/srcpkgs/Clightd/template
+++ b/srcpkgs/Clightd/template
@@ -1,19 +1,19 @@
 # Template file for 'Clightd'
 pkgname=Clightd
-version=4.2
+version=5.1
 revision=1
 build_style=cmake
 cmake_builddir=build
 configure_args="-DENABLE_DDC=1 -DENABLE_GAMMA=1 -DENABLE_DPMS=1 -DENABLE_SCREEN=1"
 hostmakedepends="pkg-config"
-makedepends="eudev-libudev-devel libmodule-devel polkit-devel elogind-devel libXrandr-devel libXext-devel libX11-devel ddcutil"
+makedepends="eudev-libudev-devel libmodule-devel polkit-devel elogind-devel libXrandr-devel libXext-devel libX11-devel ddcutil libjpeg-turbo-devel wayland-devel libdrm-devel"
 depends="ddcutil"
 short_desc="API to read webcam brightness & alter screen brightness/temperature"
 maintainer="Dominic Monroe <monroef4@googlemail.com>"
 license="GPL-3.0-or-later"
 homepage="https://github.com/FedeDP/Clightd"
 distfiles="https://github.com/FedeDP/Clightd/archive/${version}.tar.gz"
-checksum=39301b0cad2da9adb4b662b64563f35ad5b3724631d81c1db55c311bc10dec67
+checksum=ce5002ed7790fce64e323bd483d8e5dde70a7fa9bbebc8311f514e0d5a64ab10
 
 post_install() {
 	vinstall Scripts/i2c_clightd.conf 644 /usr/lib/modules-load.d/

From b06f6f4bd7d3bafc2bee91e85d459f2e99a0dd16 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Adrian=20G=C3=B6ransson?= <adriangoransson@gmail.com>
Date: Mon, 8 Feb 2021 10:02:07 +0100
Subject: [PATCH 2/2] Clight: Update to 4.2

This update **requires** Clightd >= 5.0.

Removed patch has been merged upstream.
---
 srcpkgs/Clight/patches/bus.c.patch | 81 ------------------------------
 srcpkgs/Clight/template            | 11 +++-
 2 files changed, 9 insertions(+), 83 deletions(-)
 delete mode 100644 srcpkgs/Clight/patches/bus.c.patch

diff --git a/srcpkgs/Clight/patches/bus.c.patch b/srcpkgs/Clight/patches/bus.c.patch
deleted file mode 100644
index a0c4d3a1d6f..00000000000
--- a/srcpkgs/Clight/patches/bus.c.patch
+++ /dev/null
@@ -1,81 +0,0 @@
-diff --git src/modules/bus.c src/modules/bus.c
-index 00f49cf..7e65fef 100644
---- src/modules/bus.c
-+++ src/modules/bus.c
-@@ -2,7 +2,6 @@
- 
- #define GET_BUS(a)  sd_bus *tmp = a->bus; if (!tmp) { tmp = a->type == USER_BUS ? userbus : sysbus; } if (!tmp) { return -1; }
- 
--static int _call(const bus_args *a, const char *signature, va_list args_va, const void **args_ptr, bool expect_reply);
- static void free_bus_structs(sd_bus_error *err, sd_bus_message *m, sd_bus_message *reply);
- static int check_err(int *r, sd_bus_error *err, const char *caller);
- 
-@@ -66,7 +65,10 @@ static void receive(const msg_t *const msg, UNUSED const void* userdata) {
-     }
- }
- 
--static int _call(const bus_args *a, const char *signature, va_list args_va, const void **args_ptr, bool expect_reply) {
-+/*
-+ * Call a method on bus and store its result of type userptr_type in userptr.
-+ */
-+int call(const bus_args *a, const char *signature, ...) {
-     sd_bus_error error = SD_BUS_ERROR_NULL;
-     sd_bus_message *m = NULL, *reply = NULL;
-     GET_BUS(a);
-@@ -76,26 +78,20 @@ static int _call(const bus_args *a, const char *signature, va_list args_va, cons
-         goto finish;
-     }
-     
--    r = sd_bus_message_set_expect_reply(m, expect_reply);
-+    r = sd_bus_message_set_expect_reply(m, a->reply_cb != NULL);
-     if (check_err(&r, &error, a->caller)) {
-         goto finish;
-     }
-     
--    if (args_va) {
--        sd_bus_message_appendv(m, signature, args_va);
--    } else if (args_ptr) {
--        int len = strlen(signature);
--        if (len == 1) {
--            sd_bus_message_append_basic(m, signature[0], args_ptr);
--        } else {
--            for (int i = 0; i < len; i++) {
--                sd_bus_message_append_basic(m, signature[i], args_ptr[i]);
--            }
--        }
-+    if (signature && strlen(signature)) {
-+        va_list args;
-+        va_start(args, signature);
-+        sd_bus_message_appendv(m, signature, args);
-+        va_end(args);
-     }
-     
-     /* Check if we need to wait for a response message */
--    if (expect_reply) {
-+    if (a->reply_cb != NULL) {
-         r = sd_bus_call(tmp, m, 0, &error, &reply);
-         if (check_err(&r, &error, a->caller)) {
-             goto finish;
-@@ -111,22 +107,6 @@ finish:
-     return r;
- }
- 
--/*
-- * Call a method on bus and store its result of type userptr_type in userptr.
-- */
--int call(const bus_args *a, const char *signature, ...) {
--    int r = 0;
--    if (signature) {
--        va_list args;
--        va_start(args, signature);
--        r = _call(a, signature, args, NULL, a->reply_cb != NULL);
--        va_end(args);
--    } else {
--        r = _call(a, signature, NULL, NULL, a->reply_cb != NULL); 
--    }
--    return r;
--}
--
- /*
-  * Add a match on bus on certain signal for cb callback
-  */
diff --git a/srcpkgs/Clight/template b/srcpkgs/Clight/template
index 348c6fdd46a..3659d1c42ec 100644
--- a/srcpkgs/Clight/template
+++ b/srcpkgs/Clight/template
@@ -1,6 +1,6 @@
 # Template file for 'Clight'
 pkgname=Clight
-version=4.1
+version=4.2
 revision=1
 build_style=cmake
 hostmakedepends="pkg-config"
@@ -12,4 +12,11 @@ maintainer="Dominic Monroe <monroef4@googlemail.com>"
 license="GPL-3.0-or-later"
 homepage="https://github.com/FedeDP/Clight"
 distfiles="https://github.com/FedeDP/Clight/archive/${version}.tar.gz"
-checksum=84156f3dfd9ab863be25d3efc8b5d6d6043ba4a0b44259c2a1cee1367b3c97aa
+checksum=fc3c4952c755bad5f4274f69f5cc17142abb51d88d7c615873e3058edc1c1137
+
+do_install() {
+    vcompletion Extra/_clight zsh
+    vcompletion Extra/clight bash
+
+    vbin build/clight
+}

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PR PATCH] [Updated] Clight[d]: Update to 4.2 and 5.1
  2021-02-08  9:38 [PR PATCH] Clight[d]: Update to 4.2 and 5.1 adriangoransson
@ 2021-02-08  9:41 ` adriangoransson
  2021-02-08 11:07 ` adriangoransson
                   ` (17 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: adriangoransson @ 2021-02-08  9:41 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1614 bytes --]

There is an updated pull request by adriangoransson against master on the void-packages repository

https://github.com/adriangoransson/void-packages master
https://github.com/void-linux/void-packages/pull/28579

Clight[d]: Update to 4.2 and 5.1
<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [X] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/28579.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-master-28579.patch --]
[-- Type: text/x-diff, Size: 6350 bytes --]

From 2e177ac182cec0a164e9610b364e98e24d6bcd8b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Adrian=20G=C3=B6ransson?= <adriangoransson@gmail.com>
Date: Mon, 8 Feb 2021 09:43:59 +0100
Subject: [PATCH 1/2] Clightd: Update to 5.1

---
 srcpkgs/Clightd/files/Clightd/run | 2 +-
 srcpkgs/Clightd/template          | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/Clightd/files/Clightd/run b/srcpkgs/Clightd/files/Clightd/run
index 979d7e955cc..9170543376b 100644
--- a/srcpkgs/Clightd/files/Clightd/run
+++ b/srcpkgs/Clightd/files/Clightd/run
@@ -1,4 +1,4 @@
 #!/bin/sh
 
 sv check dbus >/dev/null || exit 1
-exec /usr/lib/clightd/clightd 2>&1
+exec /usr/libexec/clightd 2>&1
diff --git a/srcpkgs/Clightd/template b/srcpkgs/Clightd/template
index 79013c87829..796afb80f8e 100644
--- a/srcpkgs/Clightd/template
+++ b/srcpkgs/Clightd/template
@@ -1,19 +1,19 @@
 # Template file for 'Clightd'
 pkgname=Clightd
-version=4.2
+version=5.1
 revision=1
 build_style=cmake
 cmake_builddir=build
 configure_args="-DENABLE_DDC=1 -DENABLE_GAMMA=1 -DENABLE_DPMS=1 -DENABLE_SCREEN=1"
 hostmakedepends="pkg-config"
-makedepends="eudev-libudev-devel libmodule-devel polkit-devel elogind-devel libXrandr-devel libXext-devel libX11-devel ddcutil"
+makedepends="eudev-libudev-devel libmodule-devel polkit-devel elogind-devel libXrandr-devel libXext-devel libX11-devel ddcutil libjpeg-turbo-devel wayland-devel libdrm-devel"
 depends="ddcutil"
 short_desc="API to read webcam brightness & alter screen brightness/temperature"
 maintainer="Dominic Monroe <monroef4@googlemail.com>"
 license="GPL-3.0-or-later"
 homepage="https://github.com/FedeDP/Clightd"
 distfiles="https://github.com/FedeDP/Clightd/archive/${version}.tar.gz"
-checksum=39301b0cad2da9adb4b662b64563f35ad5b3724631d81c1db55c311bc10dec67
+checksum=ce5002ed7790fce64e323bd483d8e5dde70a7fa9bbebc8311f514e0d5a64ab10
 
 post_install() {
 	vinstall Scripts/i2c_clightd.conf 644 /usr/lib/modules-load.d/

From 1d8b7616c835afe69eeaf9b9a01aa661616eeb32 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Adrian=20G=C3=B6ransson?= <adriangoransson@gmail.com>
Date: Mon, 8 Feb 2021 10:02:07 +0100
Subject: [PATCH 2/2] Clight: Update to 4.2

This update **requires** Clightd >= 5.0.

Removed patch has been merged upstream.
---
 srcpkgs/Clight/patches/bus.c.patch | 81 ------------------------------
 srcpkgs/Clight/template            | 11 +++-
 2 files changed, 9 insertions(+), 83 deletions(-)
 delete mode 100644 srcpkgs/Clight/patches/bus.c.patch

diff --git a/srcpkgs/Clight/patches/bus.c.patch b/srcpkgs/Clight/patches/bus.c.patch
deleted file mode 100644
index a0c4d3a1d6f..00000000000
--- a/srcpkgs/Clight/patches/bus.c.patch
+++ /dev/null
@@ -1,81 +0,0 @@
-diff --git src/modules/bus.c src/modules/bus.c
-index 00f49cf..7e65fef 100644
---- src/modules/bus.c
-+++ src/modules/bus.c
-@@ -2,7 +2,6 @@
- 
- #define GET_BUS(a)  sd_bus *tmp = a->bus; if (!tmp) { tmp = a->type == USER_BUS ? userbus : sysbus; } if (!tmp) { return -1; }
- 
--static int _call(const bus_args *a, const char *signature, va_list args_va, const void **args_ptr, bool expect_reply);
- static void free_bus_structs(sd_bus_error *err, sd_bus_message *m, sd_bus_message *reply);
- static int check_err(int *r, sd_bus_error *err, const char *caller);
- 
-@@ -66,7 +65,10 @@ static void receive(const msg_t *const msg, UNUSED const void* userdata) {
-     }
- }
- 
--static int _call(const bus_args *a, const char *signature, va_list args_va, const void **args_ptr, bool expect_reply) {
-+/*
-+ * Call a method on bus and store its result of type userptr_type in userptr.
-+ */
-+int call(const bus_args *a, const char *signature, ...) {
-     sd_bus_error error = SD_BUS_ERROR_NULL;
-     sd_bus_message *m = NULL, *reply = NULL;
-     GET_BUS(a);
-@@ -76,26 +78,20 @@ static int _call(const bus_args *a, const char *signature, va_list args_va, cons
-         goto finish;
-     }
-     
--    r = sd_bus_message_set_expect_reply(m, expect_reply);
-+    r = sd_bus_message_set_expect_reply(m, a->reply_cb != NULL);
-     if (check_err(&r, &error, a->caller)) {
-         goto finish;
-     }
-     
--    if (args_va) {
--        sd_bus_message_appendv(m, signature, args_va);
--    } else if (args_ptr) {
--        int len = strlen(signature);
--        if (len == 1) {
--            sd_bus_message_append_basic(m, signature[0], args_ptr);
--        } else {
--            for (int i = 0; i < len; i++) {
--                sd_bus_message_append_basic(m, signature[i], args_ptr[i]);
--            }
--        }
-+    if (signature && strlen(signature)) {
-+        va_list args;
-+        va_start(args, signature);
-+        sd_bus_message_appendv(m, signature, args);
-+        va_end(args);
-     }
-     
-     /* Check if we need to wait for a response message */
--    if (expect_reply) {
-+    if (a->reply_cb != NULL) {
-         r = sd_bus_call(tmp, m, 0, &error, &reply);
-         if (check_err(&r, &error, a->caller)) {
-             goto finish;
-@@ -111,22 +107,6 @@ finish:
-     return r;
- }
- 
--/*
-- * Call a method on bus and store its result of type userptr_type in userptr.
-- */
--int call(const bus_args *a, const char *signature, ...) {
--    int r = 0;
--    if (signature) {
--        va_list args;
--        va_start(args, signature);
--        r = _call(a, signature, args, NULL, a->reply_cb != NULL);
--        va_end(args);
--    } else {
--        r = _call(a, signature, NULL, NULL, a->reply_cb != NULL); 
--    }
--    return r;
--}
--
- /*
-  * Add a match on bus on certain signal for cb callback
-  */
diff --git a/srcpkgs/Clight/template b/srcpkgs/Clight/template
index 348c6fdd46a..69870c3a1a5 100644
--- a/srcpkgs/Clight/template
+++ b/srcpkgs/Clight/template
@@ -1,6 +1,6 @@
 # Template file for 'Clight'
 pkgname=Clight
-version=4.1
+version=4.2
 revision=1
 build_style=cmake
 hostmakedepends="pkg-config"
@@ -12,4 +12,11 @@ maintainer="Dominic Monroe <monroef4@googlemail.com>"
 license="GPL-3.0-or-later"
 homepage="https://github.com/FedeDP/Clight"
 distfiles="https://github.com/FedeDP/Clight/archive/${version}.tar.gz"
-checksum=84156f3dfd9ab863be25d3efc8b5d6d6043ba4a0b44259c2a1cee1367b3c97aa
+checksum=fc3c4952c755bad5f4274f69f5cc17142abb51d88d7c615873e3058edc1c1137
+
+do_install() {
+	vcompletion Extra/_clight zsh
+	vcompletion Extra/clight bash
+
+	vbin build/clight
+}

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PR PATCH] [Updated] Clight[d]: Update to 4.2 and 5.1
  2021-02-08  9:38 [PR PATCH] Clight[d]: Update to 4.2 and 5.1 adriangoransson
  2021-02-08  9:41 ` [PR PATCH] [Updated] " adriangoransson
@ 2021-02-08 11:07 ` adriangoransson
  2021-02-08 11:11 ` adriangoransson
                   ` (16 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: adriangoransson @ 2021-02-08 11:07 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1614 bytes --]

There is an updated pull request by adriangoransson against master on the void-packages repository

https://github.com/adriangoransson/void-packages master
https://github.com/void-linux/void-packages/pull/28579

Clight[d]: Update to 4.2 and 5.1
<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [X] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/28579.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-master-28579.patch --]
[-- Type: text/x-diff, Size: 6597 bytes --]

From 42ec57e8538f039c8f54b0cdbecb95d1b8cf5a7f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Adrian=20G=C3=B6ransson?= <adriangoransson@gmail.com>
Date: Mon, 8 Feb 2021 09:43:59 +0100
Subject: [PATCH 1/2] Clightd: Update to 5.1

---
 srcpkgs/Clightd/files/Clightd/run | 2 +-
 srcpkgs/Clightd/template          | 8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/srcpkgs/Clightd/files/Clightd/run b/srcpkgs/Clightd/files/Clightd/run
index 979d7e955cc..9170543376b 100644
--- a/srcpkgs/Clightd/files/Clightd/run
+++ b/srcpkgs/Clightd/files/Clightd/run
@@ -1,4 +1,4 @@
 #!/bin/sh
 
 sv check dbus >/dev/null || exit 1
-exec /usr/lib/clightd/clightd 2>&1
+exec /usr/libexec/clightd 2>&1
diff --git a/srcpkgs/Clightd/template b/srcpkgs/Clightd/template
index 79013c87829..dd9dde32b65 100644
--- a/srcpkgs/Clightd/template
+++ b/srcpkgs/Clightd/template
@@ -1,19 +1,19 @@
 # Template file for 'Clightd'
 pkgname=Clightd
-version=4.2
+version=5.1
 revision=1
 build_style=cmake
 cmake_builddir=build
 configure_args="-DENABLE_DDC=1 -DENABLE_GAMMA=1 -DENABLE_DPMS=1 -DENABLE_SCREEN=1"
-hostmakedepends="pkg-config"
-makedepends="eudev-libudev-devel libmodule-devel polkit-devel elogind-devel libXrandr-devel libXext-devel libX11-devel ddcutil"
+hostmakedepends="pkg-config wayland-devel"
+makedepends="eudev-libudev-devel libmodule-devel polkit-devel elogind-devel libXrandr-devel libXext-devel libX11-devel ddcutil libjpeg-turbo-devel libdrm-devel"
 depends="ddcutil"
 short_desc="API to read webcam brightness & alter screen brightness/temperature"
 maintainer="Dominic Monroe <monroef4@googlemail.com>"
 license="GPL-3.0-or-later"
 homepage="https://github.com/FedeDP/Clightd"
 distfiles="https://github.com/FedeDP/Clightd/archive/${version}.tar.gz"
-checksum=39301b0cad2da9adb4b662b64563f35ad5b3724631d81c1db55c311bc10dec67
+checksum=ce5002ed7790fce64e323bd483d8e5dde70a7fa9bbebc8311f514e0d5a64ab10
 
 post_install() {
 	vinstall Scripts/i2c_clightd.conf 644 /usr/lib/modules-load.d/

From a32eca5ce43b95b00fc7ec0b4fe7160975aaa866 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Adrian=20G=C3=B6ransson?= <adriangoransson@gmail.com>
Date: Mon, 8 Feb 2021 10:02:07 +0100
Subject: [PATCH 2/2] Clight: Update to 4.2

This update **requires** Clightd >= 5.0.

Removed patch has been merged upstream.
---
 srcpkgs/Clight/patches/bus.c.patch | 81 ------------------------------
 srcpkgs/Clight/template            | 13 +++--
 2 files changed, 10 insertions(+), 84 deletions(-)
 delete mode 100644 srcpkgs/Clight/patches/bus.c.patch

diff --git a/srcpkgs/Clight/patches/bus.c.patch b/srcpkgs/Clight/patches/bus.c.patch
deleted file mode 100644
index a0c4d3a1d6f..00000000000
--- a/srcpkgs/Clight/patches/bus.c.patch
+++ /dev/null
@@ -1,81 +0,0 @@
-diff --git src/modules/bus.c src/modules/bus.c
-index 00f49cf..7e65fef 100644
---- src/modules/bus.c
-+++ src/modules/bus.c
-@@ -2,7 +2,6 @@
- 
- #define GET_BUS(a)  sd_bus *tmp = a->bus; if (!tmp) { tmp = a->type == USER_BUS ? userbus : sysbus; } if (!tmp) { return -1; }
- 
--static int _call(const bus_args *a, const char *signature, va_list args_va, const void **args_ptr, bool expect_reply);
- static void free_bus_structs(sd_bus_error *err, sd_bus_message *m, sd_bus_message *reply);
- static int check_err(int *r, sd_bus_error *err, const char *caller);
- 
-@@ -66,7 +65,10 @@ static void receive(const msg_t *const msg, UNUSED const void* userdata) {
-     }
- }
- 
--static int _call(const bus_args *a, const char *signature, va_list args_va, const void **args_ptr, bool expect_reply) {
-+/*
-+ * Call a method on bus and store its result of type userptr_type in userptr.
-+ */
-+int call(const bus_args *a, const char *signature, ...) {
-     sd_bus_error error = SD_BUS_ERROR_NULL;
-     sd_bus_message *m = NULL, *reply = NULL;
-     GET_BUS(a);
-@@ -76,26 +78,20 @@ static int _call(const bus_args *a, const char *signature, va_list args_va, cons
-         goto finish;
-     }
-     
--    r = sd_bus_message_set_expect_reply(m, expect_reply);
-+    r = sd_bus_message_set_expect_reply(m, a->reply_cb != NULL);
-     if (check_err(&r, &error, a->caller)) {
-         goto finish;
-     }
-     
--    if (args_va) {
--        sd_bus_message_appendv(m, signature, args_va);
--    } else if (args_ptr) {
--        int len = strlen(signature);
--        if (len == 1) {
--            sd_bus_message_append_basic(m, signature[0], args_ptr);
--        } else {
--            for (int i = 0; i < len; i++) {
--                sd_bus_message_append_basic(m, signature[i], args_ptr[i]);
--            }
--        }
-+    if (signature && strlen(signature)) {
-+        va_list args;
-+        va_start(args, signature);
-+        sd_bus_message_appendv(m, signature, args);
-+        va_end(args);
-     }
-     
-     /* Check if we need to wait for a response message */
--    if (expect_reply) {
-+    if (a->reply_cb != NULL) {
-         r = sd_bus_call(tmp, m, 0, &error, &reply);
-         if (check_err(&r, &error, a->caller)) {
-             goto finish;
-@@ -111,22 +107,6 @@ finish:
-     return r;
- }
- 
--/*
-- * Call a method on bus and store its result of type userptr_type in userptr.
-- */
--int call(const bus_args *a, const char *signature, ...) {
--    int r = 0;
--    if (signature) {
--        va_list args;
--        va_start(args, signature);
--        r = _call(a, signature, args, NULL, a->reply_cb != NULL);
--        va_end(args);
--    } else {
--        r = _call(a, signature, NULL, NULL, a->reply_cb != NULL); 
--    }
--    return r;
--}
--
- /*
-  * Add a match on bus on certain signal for cb callback
-  */
diff --git a/srcpkgs/Clight/template b/srcpkgs/Clight/template
index 348c6fdd46a..0eaf440911b 100644
--- a/srcpkgs/Clight/template
+++ b/srcpkgs/Clight/template
@@ -1,15 +1,22 @@
 # Template file for 'Clight'
 pkgname=Clight
-version=4.1
+version=4.2
 revision=1
 build_style=cmake
 hostmakedepends="pkg-config"
 makedepends="popt-devel gsl-devel libconfig-devel elogind-devel bash-completion
  dbus-devel libmodule-devel"
-depends="Clightd"
+depends="Clightd>=5.0"
 short_desc="Use your webcam as a light sensor to adjust screen backlight"
 maintainer="Dominic Monroe <monroef4@googlemail.com>"
 license="GPL-3.0-or-later"
 homepage="https://github.com/FedeDP/Clight"
 distfiles="https://github.com/FedeDP/Clight/archive/${version}.tar.gz"
-checksum=84156f3dfd9ab863be25d3efc8b5d6d6043ba4a0b44259c2a1cee1367b3c97aa
+checksum=fc3c4952c755bad5f4274f69f5cc17142abb51d88d7c615873e3058edc1c1137
+
+do_install() {
+	vcompletion Extra/_clight zsh
+	vcompletion Extra/clight bash
+
+	vbin build/clight
+}

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PR PATCH] [Updated] Clight[d]: Update to 4.2 and 5.1
  2021-02-08  9:38 [PR PATCH] Clight[d]: Update to 4.2 and 5.1 adriangoransson
  2021-02-08  9:41 ` [PR PATCH] [Updated] " adriangoransson
  2021-02-08 11:07 ` adriangoransson
@ 2021-02-08 11:11 ` adriangoransson
  2021-02-08 11:16 ` adriangoransson
                   ` (15 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: adriangoransson @ 2021-02-08 11:11 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1614 bytes --]

There is an updated pull request by adriangoransson against master on the void-packages repository

https://github.com/adriangoransson/void-packages master
https://github.com/void-linux/void-packages/pull/28579

Clight[d]: Update to 4.2 and 5.1
<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [X] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/28579.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-master-28579.patch --]
[-- Type: text/x-diff, Size: 6578 bytes --]

From 985fd83cd1f2b6d3e1dc6e0729ee5ff3fd7b683d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Adrian=20G=C3=B6ransson?= <adriangoransson@gmail.com>
Date: Mon, 8 Feb 2021 09:43:59 +0100
Subject: [PATCH 1/2] Clightd: Update to 5.1

---
 srcpkgs/Clightd/files/Clightd/run | 2 +-
 srcpkgs/Clightd/template          | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/Clightd/files/Clightd/run b/srcpkgs/Clightd/files/Clightd/run
index 979d7e955cc..9170543376b 100644
--- a/srcpkgs/Clightd/files/Clightd/run
+++ b/srcpkgs/Clightd/files/Clightd/run
@@ -1,4 +1,4 @@
 #!/bin/sh
 
 sv check dbus >/dev/null || exit 1
-exec /usr/lib/clightd/clightd 2>&1
+exec /usr/libexec/clightd 2>&1
diff --git a/srcpkgs/Clightd/template b/srcpkgs/Clightd/template
index 79013c87829..bff9555c043 100644
--- a/srcpkgs/Clightd/template
+++ b/srcpkgs/Clightd/template
@@ -1,19 +1,19 @@
 # Template file for 'Clightd'
 pkgname=Clightd
-version=4.2
+version=5.1
 revision=1
 build_style=cmake
 cmake_builddir=build
 configure_args="-DENABLE_DDC=1 -DENABLE_GAMMA=1 -DENABLE_DPMS=1 -DENABLE_SCREEN=1"
 hostmakedepends="pkg-config"
-makedepends="eudev-libudev-devel libmodule-devel polkit-devel elogind-devel libXrandr-devel libXext-devel libX11-devel ddcutil"
+makedepends="eudev-libudev-devel libmodule-devel polkit-devel elogind-devel libXrandr-devel libXext-devel libX11-devel ddcutil libjpeg-turbo-devel wayland-devel libdrm-devel libusb-devel"
 depends="ddcutil"
 short_desc="API to read webcam brightness & alter screen brightness/temperature"
 maintainer="Dominic Monroe <monroef4@googlemail.com>"
 license="GPL-3.0-or-later"
 homepage="https://github.com/FedeDP/Clightd"
 distfiles="https://github.com/FedeDP/Clightd/archive/${version}.tar.gz"
-checksum=39301b0cad2da9adb4b662b64563f35ad5b3724631d81c1db55c311bc10dec67
+checksum=ce5002ed7790fce64e323bd483d8e5dde70a7fa9bbebc8311f514e0d5a64ab10
 
 post_install() {
 	vinstall Scripts/i2c_clightd.conf 644 /usr/lib/modules-load.d/

From d7a0eace5bd79ae3a25784808a432ef51c58bb96 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Adrian=20G=C3=B6ransson?= <adriangoransson@gmail.com>
Date: Mon, 8 Feb 2021 10:02:07 +0100
Subject: [PATCH 2/2] Clight: Update to 4.2

This update **requires** Clightd >= 5.0.

Removed patch has been merged upstream.
---
 srcpkgs/Clight/patches/bus.c.patch | 81 ------------------------------
 srcpkgs/Clight/template            | 13 +++--
 2 files changed, 10 insertions(+), 84 deletions(-)
 delete mode 100644 srcpkgs/Clight/patches/bus.c.patch

diff --git a/srcpkgs/Clight/patches/bus.c.patch b/srcpkgs/Clight/patches/bus.c.patch
deleted file mode 100644
index a0c4d3a1d6f..00000000000
--- a/srcpkgs/Clight/patches/bus.c.patch
+++ /dev/null
@@ -1,81 +0,0 @@
-diff --git src/modules/bus.c src/modules/bus.c
-index 00f49cf..7e65fef 100644
---- src/modules/bus.c
-+++ src/modules/bus.c
-@@ -2,7 +2,6 @@
- 
- #define GET_BUS(a)  sd_bus *tmp = a->bus; if (!tmp) { tmp = a->type == USER_BUS ? userbus : sysbus; } if (!tmp) { return -1; }
- 
--static int _call(const bus_args *a, const char *signature, va_list args_va, const void **args_ptr, bool expect_reply);
- static void free_bus_structs(sd_bus_error *err, sd_bus_message *m, sd_bus_message *reply);
- static int check_err(int *r, sd_bus_error *err, const char *caller);
- 
-@@ -66,7 +65,10 @@ static void receive(const msg_t *const msg, UNUSED const void* userdata) {
-     }
- }
- 
--static int _call(const bus_args *a, const char *signature, va_list args_va, const void **args_ptr, bool expect_reply) {
-+/*
-+ * Call a method on bus and store its result of type userptr_type in userptr.
-+ */
-+int call(const bus_args *a, const char *signature, ...) {
-     sd_bus_error error = SD_BUS_ERROR_NULL;
-     sd_bus_message *m = NULL, *reply = NULL;
-     GET_BUS(a);
-@@ -76,26 +78,20 @@ static int _call(const bus_args *a, const char *signature, va_list args_va, cons
-         goto finish;
-     }
-     
--    r = sd_bus_message_set_expect_reply(m, expect_reply);
-+    r = sd_bus_message_set_expect_reply(m, a->reply_cb != NULL);
-     if (check_err(&r, &error, a->caller)) {
-         goto finish;
-     }
-     
--    if (args_va) {
--        sd_bus_message_appendv(m, signature, args_va);
--    } else if (args_ptr) {
--        int len = strlen(signature);
--        if (len == 1) {
--            sd_bus_message_append_basic(m, signature[0], args_ptr);
--        } else {
--            for (int i = 0; i < len; i++) {
--                sd_bus_message_append_basic(m, signature[i], args_ptr[i]);
--            }
--        }
-+    if (signature && strlen(signature)) {
-+        va_list args;
-+        va_start(args, signature);
-+        sd_bus_message_appendv(m, signature, args);
-+        va_end(args);
-     }
-     
-     /* Check if we need to wait for a response message */
--    if (expect_reply) {
-+    if (a->reply_cb != NULL) {
-         r = sd_bus_call(tmp, m, 0, &error, &reply);
-         if (check_err(&r, &error, a->caller)) {
-             goto finish;
-@@ -111,22 +107,6 @@ finish:
-     return r;
- }
- 
--/*
-- * Call a method on bus and store its result of type userptr_type in userptr.
-- */
--int call(const bus_args *a, const char *signature, ...) {
--    int r = 0;
--    if (signature) {
--        va_list args;
--        va_start(args, signature);
--        r = _call(a, signature, args, NULL, a->reply_cb != NULL);
--        va_end(args);
--    } else {
--        r = _call(a, signature, NULL, NULL, a->reply_cb != NULL); 
--    }
--    return r;
--}
--
- /*
-  * Add a match on bus on certain signal for cb callback
-  */
diff --git a/srcpkgs/Clight/template b/srcpkgs/Clight/template
index 348c6fdd46a..0eaf440911b 100644
--- a/srcpkgs/Clight/template
+++ b/srcpkgs/Clight/template
@@ -1,15 +1,22 @@
 # Template file for 'Clight'
 pkgname=Clight
-version=4.1
+version=4.2
 revision=1
 build_style=cmake
 hostmakedepends="pkg-config"
 makedepends="popt-devel gsl-devel libconfig-devel elogind-devel bash-completion
  dbus-devel libmodule-devel"
-depends="Clightd"
+depends="Clightd>=5.0"
 short_desc="Use your webcam as a light sensor to adjust screen backlight"
 maintainer="Dominic Monroe <monroef4@googlemail.com>"
 license="GPL-3.0-or-later"
 homepage="https://github.com/FedeDP/Clight"
 distfiles="https://github.com/FedeDP/Clight/archive/${version}.tar.gz"
-checksum=84156f3dfd9ab863be25d3efc8b5d6d6043ba4a0b44259c2a1cee1367b3c97aa
+checksum=fc3c4952c755bad5f4274f69f5cc17142abb51d88d7c615873e3058edc1c1137
+
+do_install() {
+	vcompletion Extra/_clight zsh
+	vcompletion Extra/clight bash
+
+	vbin build/clight
+}

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Clight[d]: Update to 4.2 and 5.1
  2021-02-08  9:38 [PR PATCH] Clight[d]: Update to 4.2 and 5.1 adriangoransson
                   ` (2 preceding siblings ...)
  2021-02-08 11:11 ` adriangoransson
@ 2021-02-08 11:16 ` adriangoransson
  2021-02-08 11:27 ` [PR PATCH] [Updated] " adriangoransson
                   ` (14 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: adriangoransson @ 2021-02-08 11:16 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 229 bytes --]

New comment by adriangoransson on void-packages repository

https://github.com/void-linux/void-packages/pull/28579#issuecomment-775071421

Comment:
No idea how to get this running on ARM cross builds. Any help is appreciated! :)

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PR PATCH] [Updated] Clight[d]: Update to 4.2 and 5.1
  2021-02-08  9:38 [PR PATCH] Clight[d]: Update to 4.2 and 5.1 adriangoransson
                   ` (3 preceding siblings ...)
  2021-02-08 11:16 ` adriangoransson
@ 2021-02-08 11:27 ` adriangoransson
  2021-02-08 11:33 ` adriangoransson
                   ` (13 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: adriangoransson @ 2021-02-08 11:27 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1614 bytes --]

There is an updated pull request by adriangoransson against master on the void-packages repository

https://github.com/adriangoransson/void-packages master
https://github.com/void-linux/void-packages/pull/28579

Clight[d]: Update to 4.2 and 5.1
<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [X] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/28579.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-master-28579.patch --]
[-- Type: text/x-diff, Size: 6655 bytes --]

From 8453fefa16db20152cbf99be228d1eddeb8c42e7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Adrian=20G=C3=B6ransson?= <adriangoransson@gmail.com>
Date: Mon, 8 Feb 2021 09:43:59 +0100
Subject: [PATCH 1/2] Clightd: Update to 5.1

---
 srcpkgs/Clightd/files/Clightd/run |  2 +-
 srcpkgs/Clightd/template          | 10 +++++++---
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/Clightd/files/Clightd/run b/srcpkgs/Clightd/files/Clightd/run
index 979d7e955cc..9170543376b 100644
--- a/srcpkgs/Clightd/files/Clightd/run
+++ b/srcpkgs/Clightd/files/Clightd/run
@@ -1,4 +1,4 @@
 #!/bin/sh
 
 sv check dbus >/dev/null || exit 1
-exec /usr/lib/clightd/clightd 2>&1
+exec /usr/libexec/clightd 2>&1
diff --git a/srcpkgs/Clightd/template b/srcpkgs/Clightd/template
index 79013c87829..4aef71d7e05 100644
--- a/srcpkgs/Clightd/template
+++ b/srcpkgs/Clightd/template
@@ -1,19 +1,23 @@
 # Template file for 'Clightd'
 pkgname=Clightd
-version=4.2
+version=5.1
 revision=1
 build_style=cmake
 cmake_builddir=build
 configure_args="-DENABLE_DDC=1 -DENABLE_GAMMA=1 -DENABLE_DPMS=1 -DENABLE_SCREEN=1"
 hostmakedepends="pkg-config"
-makedepends="eudev-libudev-devel libmodule-devel polkit-devel elogind-devel libXrandr-devel libXext-devel libX11-devel ddcutil"
+makedepends="eudev-libudev-devel libmodule-devel polkit-devel elogind-devel libXrandr-devel libXext-devel libX11-devel ddcutil libjpeg-turbo-devel wayland-devel libdrm-devel libusb-devel"
 depends="ddcutil"
 short_desc="API to read webcam brightness & alter screen brightness/temperature"
 maintainer="Dominic Monroe <monroef4@googlemail.com>"
 license="GPL-3.0-or-later"
 homepage="https://github.com/FedeDP/Clightd"
 distfiles="https://github.com/FedeDP/Clightd/archive/${version}.tar.gz"
-checksum=39301b0cad2da9adb4b662b64563f35ad5b3724631d81c1db55c311bc10dec67
+checksum=ce5002ed7790fce64e323bd483d8e5dde70a7fa9bbebc8311f514e0d5a64ab10
+
+if [ "$CROSS_BUILD" ]; then
+	hostmakedepends+=" wayland-devel"
+fi
 
 post_install() {
 	vinstall Scripts/i2c_clightd.conf 644 /usr/lib/modules-load.d/

From 68fd24b686a56cb90c53a0a210c07f456e0855e5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Adrian=20G=C3=B6ransson?= <adriangoransson@gmail.com>
Date: Mon, 8 Feb 2021 10:02:07 +0100
Subject: [PATCH 2/2] Clight: Update to 4.2

This update **requires** Clightd >= 5.0.

Removed patch has been merged upstream.
---
 srcpkgs/Clight/patches/bus.c.patch | 81 ------------------------------
 srcpkgs/Clight/template            | 13 +++--
 2 files changed, 10 insertions(+), 84 deletions(-)
 delete mode 100644 srcpkgs/Clight/patches/bus.c.patch

diff --git a/srcpkgs/Clight/patches/bus.c.patch b/srcpkgs/Clight/patches/bus.c.patch
deleted file mode 100644
index a0c4d3a1d6f..00000000000
--- a/srcpkgs/Clight/patches/bus.c.patch
+++ /dev/null
@@ -1,81 +0,0 @@
-diff --git src/modules/bus.c src/modules/bus.c
-index 00f49cf..7e65fef 100644
---- src/modules/bus.c
-+++ src/modules/bus.c
-@@ -2,7 +2,6 @@
- 
- #define GET_BUS(a)  sd_bus *tmp = a->bus; if (!tmp) { tmp = a->type == USER_BUS ? userbus : sysbus; } if (!tmp) { return -1; }
- 
--static int _call(const bus_args *a, const char *signature, va_list args_va, const void **args_ptr, bool expect_reply);
- static void free_bus_structs(sd_bus_error *err, sd_bus_message *m, sd_bus_message *reply);
- static int check_err(int *r, sd_bus_error *err, const char *caller);
- 
-@@ -66,7 +65,10 @@ static void receive(const msg_t *const msg, UNUSED const void* userdata) {
-     }
- }
- 
--static int _call(const bus_args *a, const char *signature, va_list args_va, const void **args_ptr, bool expect_reply) {
-+/*
-+ * Call a method on bus and store its result of type userptr_type in userptr.
-+ */
-+int call(const bus_args *a, const char *signature, ...) {
-     sd_bus_error error = SD_BUS_ERROR_NULL;
-     sd_bus_message *m = NULL, *reply = NULL;
-     GET_BUS(a);
-@@ -76,26 +78,20 @@ static int _call(const bus_args *a, const char *signature, va_list args_va, cons
-         goto finish;
-     }
-     
--    r = sd_bus_message_set_expect_reply(m, expect_reply);
-+    r = sd_bus_message_set_expect_reply(m, a->reply_cb != NULL);
-     if (check_err(&r, &error, a->caller)) {
-         goto finish;
-     }
-     
--    if (args_va) {
--        sd_bus_message_appendv(m, signature, args_va);
--    } else if (args_ptr) {
--        int len = strlen(signature);
--        if (len == 1) {
--            sd_bus_message_append_basic(m, signature[0], args_ptr);
--        } else {
--            for (int i = 0; i < len; i++) {
--                sd_bus_message_append_basic(m, signature[i], args_ptr[i]);
--            }
--        }
-+    if (signature && strlen(signature)) {
-+        va_list args;
-+        va_start(args, signature);
-+        sd_bus_message_appendv(m, signature, args);
-+        va_end(args);
-     }
-     
-     /* Check if we need to wait for a response message */
--    if (expect_reply) {
-+    if (a->reply_cb != NULL) {
-         r = sd_bus_call(tmp, m, 0, &error, &reply);
-         if (check_err(&r, &error, a->caller)) {
-             goto finish;
-@@ -111,22 +107,6 @@ finish:
-     return r;
- }
- 
--/*
-- * Call a method on bus and store its result of type userptr_type in userptr.
-- */
--int call(const bus_args *a, const char *signature, ...) {
--    int r = 0;
--    if (signature) {
--        va_list args;
--        va_start(args, signature);
--        r = _call(a, signature, args, NULL, a->reply_cb != NULL);
--        va_end(args);
--    } else {
--        r = _call(a, signature, NULL, NULL, a->reply_cb != NULL); 
--    }
--    return r;
--}
--
- /*
-  * Add a match on bus on certain signal for cb callback
-  */
diff --git a/srcpkgs/Clight/template b/srcpkgs/Clight/template
index 348c6fdd46a..0eaf440911b 100644
--- a/srcpkgs/Clight/template
+++ b/srcpkgs/Clight/template
@@ -1,15 +1,22 @@
 # Template file for 'Clight'
 pkgname=Clight
-version=4.1
+version=4.2
 revision=1
 build_style=cmake
 hostmakedepends="pkg-config"
 makedepends="popt-devel gsl-devel libconfig-devel elogind-devel bash-completion
  dbus-devel libmodule-devel"
-depends="Clightd"
+depends="Clightd>=5.0"
 short_desc="Use your webcam as a light sensor to adjust screen backlight"
 maintainer="Dominic Monroe <monroef4@googlemail.com>"
 license="GPL-3.0-or-later"
 homepage="https://github.com/FedeDP/Clight"
 distfiles="https://github.com/FedeDP/Clight/archive/${version}.tar.gz"
-checksum=84156f3dfd9ab863be25d3efc8b5d6d6043ba4a0b44259c2a1cee1367b3c97aa
+checksum=fc3c4952c755bad5f4274f69f5cc17142abb51d88d7c615873e3058edc1c1137
+
+do_install() {
+	vcompletion Extra/_clight zsh
+	vcompletion Extra/clight bash
+
+	vbin build/clight
+}

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Clight[d]: Update to 4.2 and 5.1
  2021-02-08  9:38 [PR PATCH] Clight[d]: Update to 4.2 and 5.1 adriangoransson
                   ` (4 preceding siblings ...)
  2021-02-08 11:27 ` [PR PATCH] [Updated] " adriangoransson
@ 2021-02-08 11:33 ` adriangoransson
  2021-02-08 12:50 ` [PR PATCH] [Updated] " adriangoransson
                   ` (12 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: adriangoransson @ 2021-02-08 11:33 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 361 bytes --]

New comment by adriangoransson on void-packages repository

https://github.com/void-linux/void-packages/pull/28579#issuecomment-775071421

Comment:
~No idea how to get this running on ARM cross builds. Any help is appreciated! :)~

Welp, it turned out to be not too difficult. Apparently both the host and the target need wayland-devel? I'd love to know why!

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PR PATCH] [Updated] Clight[d]: Update to 4.2 and 5.1
  2021-02-08  9:38 [PR PATCH] Clight[d]: Update to 4.2 and 5.1 adriangoransson
                   ` (5 preceding siblings ...)
  2021-02-08 11:33 ` adriangoransson
@ 2021-02-08 12:50 ` adriangoransson
  2021-02-08 12:54 ` adriangoransson
                   ` (11 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: adriangoransson @ 2021-02-08 12:50 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1614 bytes --]

There is an updated pull request by adriangoransson against master on the void-packages repository

https://github.com/adriangoransson/void-packages master
https://github.com/void-linux/void-packages/pull/28579

Clight[d]: Update to 4.2 and 5.1
<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [X] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/28579.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-master-28579.patch --]
[-- Type: text/x-diff, Size: 7656 bytes --]

From 8453fefa16db20152cbf99be228d1eddeb8c42e7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Adrian=20G=C3=B6ransson?= <adriangoransson@gmail.com>
Date: Mon, 8 Feb 2021 09:43:59 +0100
Subject: [PATCH 1/3] Clightd: Update to 5.1

---
 srcpkgs/Clightd/files/Clightd/run |  2 +-
 srcpkgs/Clightd/template          | 10 +++++++---
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/Clightd/files/Clightd/run b/srcpkgs/Clightd/files/Clightd/run
index 979d7e955cc..9170543376b 100644
--- a/srcpkgs/Clightd/files/Clightd/run
+++ b/srcpkgs/Clightd/files/Clightd/run
@@ -1,4 +1,4 @@
 #!/bin/sh
 
 sv check dbus >/dev/null || exit 1
-exec /usr/lib/clightd/clightd 2>&1
+exec /usr/libexec/clightd 2>&1
diff --git a/srcpkgs/Clightd/template b/srcpkgs/Clightd/template
index 79013c87829..4aef71d7e05 100644
--- a/srcpkgs/Clightd/template
+++ b/srcpkgs/Clightd/template
@@ -1,19 +1,23 @@
 # Template file for 'Clightd'
 pkgname=Clightd
-version=4.2
+version=5.1
 revision=1
 build_style=cmake
 cmake_builddir=build
 configure_args="-DENABLE_DDC=1 -DENABLE_GAMMA=1 -DENABLE_DPMS=1 -DENABLE_SCREEN=1"
 hostmakedepends="pkg-config"
-makedepends="eudev-libudev-devel libmodule-devel polkit-devel elogind-devel libXrandr-devel libXext-devel libX11-devel ddcutil"
+makedepends="eudev-libudev-devel libmodule-devel polkit-devel elogind-devel libXrandr-devel libXext-devel libX11-devel ddcutil libjpeg-turbo-devel wayland-devel libdrm-devel libusb-devel"
 depends="ddcutil"
 short_desc="API to read webcam brightness & alter screen brightness/temperature"
 maintainer="Dominic Monroe <monroef4@googlemail.com>"
 license="GPL-3.0-or-later"
 homepage="https://github.com/FedeDP/Clightd"
 distfiles="https://github.com/FedeDP/Clightd/archive/${version}.tar.gz"
-checksum=39301b0cad2da9adb4b662b64563f35ad5b3724631d81c1db55c311bc10dec67
+checksum=ce5002ed7790fce64e323bd483d8e5dde70a7fa9bbebc8311f514e0d5a64ab10
+
+if [ "$CROSS_BUILD" ]; then
+	hostmakedepends+=" wayland-devel"
+fi
 
 post_install() {
 	vinstall Scripts/i2c_clightd.conf 644 /usr/lib/modules-load.d/

From ff477663beeb0b988a7341c8d6750b854d04c8a9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Adrian=20G=C3=B6ransson?= <adriangoransson@gmail.com>
Date: Mon, 8 Feb 2021 10:02:07 +0100
Subject: [PATCH 2/3] Clight: Update to 4.2

This update **requires** Clightd >= 5.0.

Removed patch has been merged upstream.
---
 srcpkgs/Clight/patches/bus.c.patch | 81 ------------------------------
 srcpkgs/Clight/template            | 11 ++--
 2 files changed, 8 insertions(+), 84 deletions(-)
 delete mode 100644 srcpkgs/Clight/patches/bus.c.patch

diff --git a/srcpkgs/Clight/patches/bus.c.patch b/srcpkgs/Clight/patches/bus.c.patch
deleted file mode 100644
index a0c4d3a1d6f..00000000000
--- a/srcpkgs/Clight/patches/bus.c.patch
+++ /dev/null
@@ -1,81 +0,0 @@
-diff --git src/modules/bus.c src/modules/bus.c
-index 00f49cf..7e65fef 100644
---- src/modules/bus.c
-+++ src/modules/bus.c
-@@ -2,7 +2,6 @@
- 
- #define GET_BUS(a)  sd_bus *tmp = a->bus; if (!tmp) { tmp = a->type == USER_BUS ? userbus : sysbus; } if (!tmp) { return -1; }
- 
--static int _call(const bus_args *a, const char *signature, va_list args_va, const void **args_ptr, bool expect_reply);
- static void free_bus_structs(sd_bus_error *err, sd_bus_message *m, sd_bus_message *reply);
- static int check_err(int *r, sd_bus_error *err, const char *caller);
- 
-@@ -66,7 +65,10 @@ static void receive(const msg_t *const msg, UNUSED const void* userdata) {
-     }
- }
- 
--static int _call(const bus_args *a, const char *signature, va_list args_va, const void **args_ptr, bool expect_reply) {
-+/*
-+ * Call a method on bus and store its result of type userptr_type in userptr.
-+ */
-+int call(const bus_args *a, const char *signature, ...) {
-     sd_bus_error error = SD_BUS_ERROR_NULL;
-     sd_bus_message *m = NULL, *reply = NULL;
-     GET_BUS(a);
-@@ -76,26 +78,20 @@ static int _call(const bus_args *a, const char *signature, va_list args_va, cons
-         goto finish;
-     }
-     
--    r = sd_bus_message_set_expect_reply(m, expect_reply);
-+    r = sd_bus_message_set_expect_reply(m, a->reply_cb != NULL);
-     if (check_err(&r, &error, a->caller)) {
-         goto finish;
-     }
-     
--    if (args_va) {
--        sd_bus_message_appendv(m, signature, args_va);
--    } else if (args_ptr) {
--        int len = strlen(signature);
--        if (len == 1) {
--            sd_bus_message_append_basic(m, signature[0], args_ptr);
--        } else {
--            for (int i = 0; i < len; i++) {
--                sd_bus_message_append_basic(m, signature[i], args_ptr[i]);
--            }
--        }
-+    if (signature && strlen(signature)) {
-+        va_list args;
-+        va_start(args, signature);
-+        sd_bus_message_appendv(m, signature, args);
-+        va_end(args);
-     }
-     
-     /* Check if we need to wait for a response message */
--    if (expect_reply) {
-+    if (a->reply_cb != NULL) {
-         r = sd_bus_call(tmp, m, 0, &error, &reply);
-         if (check_err(&r, &error, a->caller)) {
-             goto finish;
-@@ -111,22 +107,6 @@ finish:
-     return r;
- }
- 
--/*
-- * Call a method on bus and store its result of type userptr_type in userptr.
-- */
--int call(const bus_args *a, const char *signature, ...) {
--    int r = 0;
--    if (signature) {
--        va_list args;
--        va_start(args, signature);
--        r = _call(a, signature, args, NULL, a->reply_cb != NULL);
--        va_end(args);
--    } else {
--        r = _call(a, signature, NULL, NULL, a->reply_cb != NULL); 
--    }
--    return r;
--}
--
- /*
-  * Add a match on bus on certain signal for cb callback
-  */
diff --git a/srcpkgs/Clight/template b/srcpkgs/Clight/template
index 348c6fdd46a..7228424312c 100644
--- a/srcpkgs/Clight/template
+++ b/srcpkgs/Clight/template
@@ -1,15 +1,20 @@
 # Template file for 'Clight'
 pkgname=Clight
-version=4.1
+version=4.2
 revision=1
 build_style=cmake
 hostmakedepends="pkg-config"
 makedepends="popt-devel gsl-devel libconfig-devel elogind-devel bash-completion
  dbus-devel libmodule-devel"
-depends="Clightd"
+depends="Clightd>=5.0"
 short_desc="Use your webcam as a light sensor to adjust screen backlight"
 maintainer="Dominic Monroe <monroef4@googlemail.com>"
 license="GPL-3.0-or-later"
 homepage="https://github.com/FedeDP/Clight"
 distfiles="https://github.com/FedeDP/Clight/archive/${version}.tar.gz"
-checksum=84156f3dfd9ab863be25d3efc8b5d6d6043ba4a0b44259c2a1cee1367b3c97aa
+checksum=fc3c4952c755bad5f4274f69f5cc17142abb51d88d7c615873e3058edc1c1137
+
+do_install() {
+	vbin build/clight
+}
+

From d33c36bfd8a6cd04affe209c5ba0eef4c076e2db Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Adrian=20G=C3=B6ransson?= <adriangoransson@gmail.com>
Date: Mon, 8 Feb 2021 13:48:31 +0100
Subject: [PATCH 3/3] Clight: add completions, desktop file and license

---
 srcpkgs/Clight/template  | 8 ++++++++
 srcpkgs/Clightd/template | 2 ++
 2 files changed, 10 insertions(+)

diff --git a/srcpkgs/Clight/template b/srcpkgs/Clight/template
index 7228424312c..a3102e1758c 100644
--- a/srcpkgs/Clight/template
+++ b/srcpkgs/Clight/template
@@ -18,3 +18,11 @@ do_install() {
 	vbin build/clight
 }
 
+post_install() {
+	vcompletion Extra/_clight zsh
+	vcompletion Extra/clight bash
+
+	vinstall Extra/desktop/clight.desktop 644 usr/share/applications
+
+	vlicense COPYING
+}
diff --git a/srcpkgs/Clightd/template b/srcpkgs/Clightd/template
index 4aef71d7e05..f8571573ff3 100644
--- a/srcpkgs/Clightd/template
+++ b/srcpkgs/Clightd/template
@@ -21,5 +21,7 @@ fi
 
 post_install() {
 	vinstall Scripts/i2c_clightd.conf 644 /usr/lib/modules-load.d/
+	vlicense COPYING
+
 	vsv Clightd
 }

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PR PATCH] [Updated] Clight[d]: Update to 4.2 and 5.1
  2021-02-08  9:38 [PR PATCH] Clight[d]: Update to 4.2 and 5.1 adriangoransson
                   ` (6 preceding siblings ...)
  2021-02-08 12:50 ` [PR PATCH] [Updated] " adriangoransson
@ 2021-02-08 12:54 ` adriangoransson
  2021-02-08 13:22 ` [PR REVIEW] " ericonr
                   ` (10 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: adriangoransson @ 2021-02-08 12:54 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1614 bytes --]

There is an updated pull request by adriangoransson against master on the void-packages repository

https://github.com/adriangoransson/void-packages master
https://github.com/void-linux/void-packages/pull/28579

Clight[d]: Update to 4.2 and 5.1
<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [X] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/28579.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-master-28579.patch --]
[-- Type: text/x-diff, Size: 7278 bytes --]

From 8453fefa16db20152cbf99be228d1eddeb8c42e7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Adrian=20G=C3=B6ransson?= <adriangoransson@gmail.com>
Date: Mon, 8 Feb 2021 09:43:59 +0100
Subject: [PATCH 1/3] Clightd: Update to 5.1

---
 srcpkgs/Clightd/files/Clightd/run |  2 +-
 srcpkgs/Clightd/template          | 10 +++++++---
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/Clightd/files/Clightd/run b/srcpkgs/Clightd/files/Clightd/run
index 979d7e955cc..9170543376b 100644
--- a/srcpkgs/Clightd/files/Clightd/run
+++ b/srcpkgs/Clightd/files/Clightd/run
@@ -1,4 +1,4 @@
 #!/bin/sh
 
 sv check dbus >/dev/null || exit 1
-exec /usr/lib/clightd/clightd 2>&1
+exec /usr/libexec/clightd 2>&1
diff --git a/srcpkgs/Clightd/template b/srcpkgs/Clightd/template
index 79013c87829..4aef71d7e05 100644
--- a/srcpkgs/Clightd/template
+++ b/srcpkgs/Clightd/template
@@ -1,19 +1,23 @@
 # Template file for 'Clightd'
 pkgname=Clightd
-version=4.2
+version=5.1
 revision=1
 build_style=cmake
 cmake_builddir=build
 configure_args="-DENABLE_DDC=1 -DENABLE_GAMMA=1 -DENABLE_DPMS=1 -DENABLE_SCREEN=1"
 hostmakedepends="pkg-config"
-makedepends="eudev-libudev-devel libmodule-devel polkit-devel elogind-devel libXrandr-devel libXext-devel libX11-devel ddcutil"
+makedepends="eudev-libudev-devel libmodule-devel polkit-devel elogind-devel libXrandr-devel libXext-devel libX11-devel ddcutil libjpeg-turbo-devel wayland-devel libdrm-devel libusb-devel"
 depends="ddcutil"
 short_desc="API to read webcam brightness & alter screen brightness/temperature"
 maintainer="Dominic Monroe <monroef4@googlemail.com>"
 license="GPL-3.0-or-later"
 homepage="https://github.com/FedeDP/Clightd"
 distfiles="https://github.com/FedeDP/Clightd/archive/${version}.tar.gz"
-checksum=39301b0cad2da9adb4b662b64563f35ad5b3724631d81c1db55c311bc10dec67
+checksum=ce5002ed7790fce64e323bd483d8e5dde70a7fa9bbebc8311f514e0d5a64ab10
+
+if [ "$CROSS_BUILD" ]; then
+	hostmakedepends+=" wayland-devel"
+fi
 
 post_install() {
 	vinstall Scripts/i2c_clightd.conf 644 /usr/lib/modules-load.d/

From ff477663beeb0b988a7341c8d6750b854d04c8a9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Adrian=20G=C3=B6ransson?= <adriangoransson@gmail.com>
Date: Mon, 8 Feb 2021 10:02:07 +0100
Subject: [PATCH 2/3] Clight: Update to 4.2

This update **requires** Clightd >= 5.0.

Removed patch has been merged upstream.
---
 srcpkgs/Clight/patches/bus.c.patch | 81 ------------------------------
 srcpkgs/Clight/template            | 11 ++--
 2 files changed, 8 insertions(+), 84 deletions(-)
 delete mode 100644 srcpkgs/Clight/patches/bus.c.patch

diff --git a/srcpkgs/Clight/patches/bus.c.patch b/srcpkgs/Clight/patches/bus.c.patch
deleted file mode 100644
index a0c4d3a1d6f..00000000000
--- a/srcpkgs/Clight/patches/bus.c.patch
+++ /dev/null
@@ -1,81 +0,0 @@
-diff --git src/modules/bus.c src/modules/bus.c
-index 00f49cf..7e65fef 100644
---- src/modules/bus.c
-+++ src/modules/bus.c
-@@ -2,7 +2,6 @@
- 
- #define GET_BUS(a)  sd_bus *tmp = a->bus; if (!tmp) { tmp = a->type == USER_BUS ? userbus : sysbus; } if (!tmp) { return -1; }
- 
--static int _call(const bus_args *a, const char *signature, va_list args_va, const void **args_ptr, bool expect_reply);
- static void free_bus_structs(sd_bus_error *err, sd_bus_message *m, sd_bus_message *reply);
- static int check_err(int *r, sd_bus_error *err, const char *caller);
- 
-@@ -66,7 +65,10 @@ static void receive(const msg_t *const msg, UNUSED const void* userdata) {
-     }
- }
- 
--static int _call(const bus_args *a, const char *signature, va_list args_va, const void **args_ptr, bool expect_reply) {
-+/*
-+ * Call a method on bus and store its result of type userptr_type in userptr.
-+ */
-+int call(const bus_args *a, const char *signature, ...) {
-     sd_bus_error error = SD_BUS_ERROR_NULL;
-     sd_bus_message *m = NULL, *reply = NULL;
-     GET_BUS(a);
-@@ -76,26 +78,20 @@ static int _call(const bus_args *a, const char *signature, va_list args_va, cons
-         goto finish;
-     }
-     
--    r = sd_bus_message_set_expect_reply(m, expect_reply);
-+    r = sd_bus_message_set_expect_reply(m, a->reply_cb != NULL);
-     if (check_err(&r, &error, a->caller)) {
-         goto finish;
-     }
-     
--    if (args_va) {
--        sd_bus_message_appendv(m, signature, args_va);
--    } else if (args_ptr) {
--        int len = strlen(signature);
--        if (len == 1) {
--            sd_bus_message_append_basic(m, signature[0], args_ptr);
--        } else {
--            for (int i = 0; i < len; i++) {
--                sd_bus_message_append_basic(m, signature[i], args_ptr[i]);
--            }
--        }
-+    if (signature && strlen(signature)) {
-+        va_list args;
-+        va_start(args, signature);
-+        sd_bus_message_appendv(m, signature, args);
-+        va_end(args);
-     }
-     
-     /* Check if we need to wait for a response message */
--    if (expect_reply) {
-+    if (a->reply_cb != NULL) {
-         r = sd_bus_call(tmp, m, 0, &error, &reply);
-         if (check_err(&r, &error, a->caller)) {
-             goto finish;
-@@ -111,22 +107,6 @@ finish:
-     return r;
- }
- 
--/*
-- * Call a method on bus and store its result of type userptr_type in userptr.
-- */
--int call(const bus_args *a, const char *signature, ...) {
--    int r = 0;
--    if (signature) {
--        va_list args;
--        va_start(args, signature);
--        r = _call(a, signature, args, NULL, a->reply_cb != NULL);
--        va_end(args);
--    } else {
--        r = _call(a, signature, NULL, NULL, a->reply_cb != NULL); 
--    }
--    return r;
--}
--
- /*
-  * Add a match on bus on certain signal for cb callback
-  */
diff --git a/srcpkgs/Clight/template b/srcpkgs/Clight/template
index 348c6fdd46a..7228424312c 100644
--- a/srcpkgs/Clight/template
+++ b/srcpkgs/Clight/template
@@ -1,15 +1,20 @@
 # Template file for 'Clight'
 pkgname=Clight
-version=4.1
+version=4.2
 revision=1
 build_style=cmake
 hostmakedepends="pkg-config"
 makedepends="popt-devel gsl-devel libconfig-devel elogind-devel bash-completion
  dbus-devel libmodule-devel"
-depends="Clightd"
+depends="Clightd>=5.0"
 short_desc="Use your webcam as a light sensor to adjust screen backlight"
 maintainer="Dominic Monroe <monroef4@googlemail.com>"
 license="GPL-3.0-or-later"
 homepage="https://github.com/FedeDP/Clight"
 distfiles="https://github.com/FedeDP/Clight/archive/${version}.tar.gz"
-checksum=84156f3dfd9ab863be25d3efc8b5d6d6043ba4a0b44259c2a1cee1367b3c97aa
+checksum=fc3c4952c755bad5f4274f69f5cc17142abb51d88d7c615873e3058edc1c1137
+
+do_install() {
+	vbin build/clight
+}
+

From e97bc5114bd57383a259405666892d5e26c87576 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Adrian=20G=C3=B6ransson?= <adriangoransson@gmail.com>
Date: Mon, 8 Feb 2021 13:48:31 +0100
Subject: [PATCH 3/3] Clight: add completions and desktop file

---
 srcpkgs/Clight/template | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/srcpkgs/Clight/template b/srcpkgs/Clight/template
index 7228424312c..0a45e8e2f4e 100644
--- a/srcpkgs/Clight/template
+++ b/srcpkgs/Clight/template
@@ -18,3 +18,9 @@ do_install() {
 	vbin build/clight
 }
 
+post_install() {
+	vcompletion Extra/_clight zsh
+	vcompletion Extra/clight bash
+
+	vinstall Extra/desktop/clight.desktop 644 usr/share/applications
+}

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PR REVIEW] Clight[d]: Update to 4.2 and 5.1
  2021-02-08  9:38 [PR PATCH] Clight[d]: Update to 4.2 and 5.1 adriangoransson
                   ` (7 preceding siblings ...)
  2021-02-08 12:54 ` adriangoransson
@ 2021-02-08 13:22 ` ericonr
  2021-02-08 13:22 ` ericonr
                   ` (9 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: ericonr @ 2021-02-08 13:22 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 191 bytes --]

New review comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/28579#discussion_r572040884

Comment:
Please break this line at around 80 columns.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PR REVIEW] Clight[d]: Update to 4.2 and 5.1
  2021-02-08  9:38 [PR PATCH] Clight[d]: Update to 4.2 and 5.1 adriangoransson
                   ` (8 preceding siblings ...)
  2021-02-08 13:22 ` [PR REVIEW] " ericonr
@ 2021-02-08 13:22 ` ericonr
  2021-02-08 13:22 ` ericonr
                   ` (8 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: ericonr @ 2021-02-08 13:22 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 255 bytes --]

New review comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/28579#discussion_r572041231

Comment:
You can add this unconditionally to hostmakedeps, if you want. It's likely necessary due to wayland-scanner.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PR REVIEW] Clight[d]: Update to 4.2 and 5.1
  2021-02-08  9:38 [PR PATCH] Clight[d]: Update to 4.2 and 5.1 adriangoransson
                   ` (9 preceding siblings ...)
  2021-02-08 13:22 ` ericonr
@ 2021-02-08 13:22 ` ericonr
  2021-02-08 13:46 ` [PR PATCH] [Closed]: " adriangoransson
                   ` (7 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: ericonr @ 2021-02-08 13:22 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 175 bytes --]

New review comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/28579#discussion_r572040571

Comment:
Why are you overriding this?

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PR PATCH] [Closed]: Clight[d]: Update to 4.2 and 5.1
  2021-02-08  9:38 [PR PATCH] Clight[d]: Update to 4.2 and 5.1 adriangoransson
                   ` (10 preceding siblings ...)
  2021-02-08 13:22 ` ericonr
@ 2021-02-08 13:46 ` adriangoransson
  2021-02-08 13:46 ` [PR PATCH] [Updated] " adriangoransson
                   ` (6 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: adriangoransson @ 2021-02-08 13:46 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1443 bytes --]

There's a closed pull request on the void-packages repository

Clight[d]: Update to 4.2 and 5.1
https://github.com/void-linux/void-packages/pull/28579

Description:
<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [X] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PR PATCH] [Updated] Clight[d]: Update to 4.2 and 5.1
  2021-02-08  9:38 [PR PATCH] Clight[d]: Update to 4.2 and 5.1 adriangoransson
                   ` (11 preceding siblings ...)
  2021-02-08 13:46 ` [PR PATCH] [Closed]: " adriangoransson
@ 2021-02-08 13:46 ` adriangoransson
  2021-02-08 13:48 ` adriangoransson
                   ` (5 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: adriangoransson @ 2021-02-08 13:46 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1614 bytes --]

There is an updated pull request by adriangoransson against master on the void-packages repository

https://github.com/adriangoransson/void-packages master
https://github.com/void-linux/void-packages/pull/28579

Clight[d]: Update to 4.2 and 5.1
<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [X] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/28579.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-master-28579.patch --]
[-- Type: text/x-diff, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Clight[d]: Update to 4.2 and 5.1
  2021-02-08  9:38 [PR PATCH] Clight[d]: Update to 4.2 and 5.1 adriangoransson
                   ` (12 preceding siblings ...)
  2021-02-08 13:46 ` [PR PATCH] [Updated] " adriangoransson
@ 2021-02-08 13:48 ` adriangoransson
  2021-02-08 13:48 ` [PR PATCH] [Updated] " adriangoransson
                   ` (4 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: adriangoransson @ 2021-02-08 13:48 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 207 bytes --]

New comment by adriangoransson on void-packages repository

https://github.com/void-linux/void-packages/pull/28579#issuecomment-775162784

Comment:
Squashed the latest commit and the PR was closed it seems.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PR PATCH] [Updated] Clight[d]: Update to 4.2 and 5.1
  2021-02-08  9:38 [PR PATCH] Clight[d]: Update to 4.2 and 5.1 adriangoransson
                   ` (13 preceding siblings ...)
  2021-02-08 13:48 ` adriangoransson
@ 2021-02-08 13:48 ` adriangoransson
  2021-02-08 13:50 ` [PR REVIEW] " adriangoransson
                   ` (3 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: adriangoransson @ 2021-02-08 13:48 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1614 bytes --]

There is an updated pull request by adriangoransson against master on the void-packages repository

https://github.com/adriangoransson/void-packages master
https://github.com/void-linux/void-packages/pull/28579

Clight[d]: Update to 4.2 and 5.1
<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [X] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/28579.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-master-28579.patch --]
[-- Type: text/x-diff, Size: 6704 bytes --]

From cd18e2327b6e488af1ad8ce338ad27d2aba74d00 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Adrian=20G=C3=B6ransson?= <adriangoransson@gmail.com>
Date: Mon, 8 Feb 2021 09:43:59 +0100
Subject: [PATCH 1/2] Clightd: Update to 5.1

---
 srcpkgs/Clightd/files/Clightd/run |  2 +-
 srcpkgs/Clightd/template          | 10 +++++++---
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/Clightd/files/Clightd/run b/srcpkgs/Clightd/files/Clightd/run
index 979d7e955cc..9170543376b 100644
--- a/srcpkgs/Clightd/files/Clightd/run
+++ b/srcpkgs/Clightd/files/Clightd/run
@@ -1,4 +1,4 @@
 #!/bin/sh
 
 sv check dbus >/dev/null || exit 1
-exec /usr/lib/clightd/clightd 2>&1
+exec /usr/libexec/clightd 2>&1
diff --git a/srcpkgs/Clightd/template b/srcpkgs/Clightd/template
index 79013c87829..4aef71d7e05 100644
--- a/srcpkgs/Clightd/template
+++ b/srcpkgs/Clightd/template
@@ -1,19 +1,23 @@
 # Template file for 'Clightd'
 pkgname=Clightd
-version=4.2
+version=5.1
 revision=1
 build_style=cmake
 cmake_builddir=build
 configure_args="-DENABLE_DDC=1 -DENABLE_GAMMA=1 -DENABLE_DPMS=1 -DENABLE_SCREEN=1"
 hostmakedepends="pkg-config"
-makedepends="eudev-libudev-devel libmodule-devel polkit-devel elogind-devel libXrandr-devel libXext-devel libX11-devel ddcutil"
+makedepends="eudev-libudev-devel libmodule-devel polkit-devel elogind-devel libXrandr-devel libXext-devel libX11-devel ddcutil libjpeg-turbo-devel wayland-devel libdrm-devel libusb-devel"
 depends="ddcutil"
 short_desc="API to read webcam brightness & alter screen brightness/temperature"
 maintainer="Dominic Monroe <monroef4@googlemail.com>"
 license="GPL-3.0-or-later"
 homepage="https://github.com/FedeDP/Clightd"
 distfiles="https://github.com/FedeDP/Clightd/archive/${version}.tar.gz"
-checksum=39301b0cad2da9adb4b662b64563f35ad5b3724631d81c1db55c311bc10dec67
+checksum=ce5002ed7790fce64e323bd483d8e5dde70a7fa9bbebc8311f514e0d5a64ab10
+
+if [ "$CROSS_BUILD" ]; then
+	hostmakedepends+=" wayland-devel"
+fi
 
 post_install() {
 	vinstall Scripts/i2c_clightd.conf 644 /usr/lib/modules-load.d/

From ae9371aea2540f376ab044f482df007869dba759 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Adrian=20G=C3=B6ransson?= <adriangoransson@gmail.com>
Date: Mon, 8 Feb 2021 10:02:07 +0100
Subject: [PATCH 2/2] Clight: Update to 4.2

This update **requires** Clightd >= 5.0.

Removed patch has been merged upstream.
---
 srcpkgs/Clight/patches/bus.c.patch | 81 ------------------------------
 srcpkgs/Clight/template            | 13 +++--
 2 files changed, 10 insertions(+), 84 deletions(-)
 delete mode 100644 srcpkgs/Clight/patches/bus.c.patch

diff --git a/srcpkgs/Clight/patches/bus.c.patch b/srcpkgs/Clight/patches/bus.c.patch
deleted file mode 100644
index a0c4d3a1d6f..00000000000
--- a/srcpkgs/Clight/patches/bus.c.patch
+++ /dev/null
@@ -1,81 +0,0 @@
-diff --git src/modules/bus.c src/modules/bus.c
-index 00f49cf..7e65fef 100644
---- src/modules/bus.c
-+++ src/modules/bus.c
-@@ -2,7 +2,6 @@
- 
- #define GET_BUS(a)  sd_bus *tmp = a->bus; if (!tmp) { tmp = a->type == USER_BUS ? userbus : sysbus; } if (!tmp) { return -1; }
- 
--static int _call(const bus_args *a, const char *signature, va_list args_va, const void **args_ptr, bool expect_reply);
- static void free_bus_structs(sd_bus_error *err, sd_bus_message *m, sd_bus_message *reply);
- static int check_err(int *r, sd_bus_error *err, const char *caller);
- 
-@@ -66,7 +65,10 @@ static void receive(const msg_t *const msg, UNUSED const void* userdata) {
-     }
- }
- 
--static int _call(const bus_args *a, const char *signature, va_list args_va, const void **args_ptr, bool expect_reply) {
-+/*
-+ * Call a method on bus and store its result of type userptr_type in userptr.
-+ */
-+int call(const bus_args *a, const char *signature, ...) {
-     sd_bus_error error = SD_BUS_ERROR_NULL;
-     sd_bus_message *m = NULL, *reply = NULL;
-     GET_BUS(a);
-@@ -76,26 +78,20 @@ static int _call(const bus_args *a, const char *signature, va_list args_va, cons
-         goto finish;
-     }
-     
--    r = sd_bus_message_set_expect_reply(m, expect_reply);
-+    r = sd_bus_message_set_expect_reply(m, a->reply_cb != NULL);
-     if (check_err(&r, &error, a->caller)) {
-         goto finish;
-     }
-     
--    if (args_va) {
--        sd_bus_message_appendv(m, signature, args_va);
--    } else if (args_ptr) {
--        int len = strlen(signature);
--        if (len == 1) {
--            sd_bus_message_append_basic(m, signature[0], args_ptr);
--        } else {
--            for (int i = 0; i < len; i++) {
--                sd_bus_message_append_basic(m, signature[i], args_ptr[i]);
--            }
--        }
-+    if (signature && strlen(signature)) {
-+        va_list args;
-+        va_start(args, signature);
-+        sd_bus_message_appendv(m, signature, args);
-+        va_end(args);
-     }
-     
-     /* Check if we need to wait for a response message */
--    if (expect_reply) {
-+    if (a->reply_cb != NULL) {
-         r = sd_bus_call(tmp, m, 0, &error, &reply);
-         if (check_err(&r, &error, a->caller)) {
-             goto finish;
-@@ -111,22 +107,6 @@ finish:
-     return r;
- }
- 
--/*
-- * Call a method on bus and store its result of type userptr_type in userptr.
-- */
--int call(const bus_args *a, const char *signature, ...) {
--    int r = 0;
--    if (signature) {
--        va_list args;
--        va_start(args, signature);
--        r = _call(a, signature, args, NULL, a->reply_cb != NULL);
--        va_end(args);
--    } else {
--        r = _call(a, signature, NULL, NULL, a->reply_cb != NULL); 
--    }
--    return r;
--}
--
- /*
-  * Add a match on bus on certain signal for cb callback
-  */
diff --git a/srcpkgs/Clight/template b/srcpkgs/Clight/template
index 348c6fdd46a..5d9c87c2cd9 100644
--- a/srcpkgs/Clight/template
+++ b/srcpkgs/Clight/template
@@ -1,15 +1,22 @@
 # Template file for 'Clight'
 pkgname=Clight
-version=4.1
+version=4.2
 revision=1
 build_style=cmake
 hostmakedepends="pkg-config"
 makedepends="popt-devel gsl-devel libconfig-devel elogind-devel bash-completion
  dbus-devel libmodule-devel"
-depends="Clightd"
+depends="Clightd>=5.0"
 short_desc="Use your webcam as a light sensor to adjust screen backlight"
 maintainer="Dominic Monroe <monroef4@googlemail.com>"
 license="GPL-3.0-or-later"
 homepage="https://github.com/FedeDP/Clight"
 distfiles="https://github.com/FedeDP/Clight/archive/${version}.tar.gz"
-checksum=84156f3dfd9ab863be25d3efc8b5d6d6043ba4a0b44259c2a1cee1367b3c97aa
+checksum=fc3c4952c755bad5f4274f69f5cc17142abb51d88d7c615873e3058edc1c1137
+
+post_install() {
+	vcompletion Extra/_clight zsh
+	vcompletion Extra/clight bash
+
+	vinstall Extra/desktop/clight.desktop 644 usr/share/applications
+}

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PR REVIEW] Clight[d]: Update to 4.2 and 5.1
  2021-02-08  9:38 [PR PATCH] Clight[d]: Update to 4.2 and 5.1 adriangoransson
                   ` (14 preceding siblings ...)
  2021-02-08 13:48 ` [PR PATCH] [Updated] " adriangoransson
@ 2021-02-08 13:50 ` adriangoransson
  2021-02-08 13:52 ` [PR PATCH] [Updated] " adriangoransson
                   ` (2 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: adriangoransson @ 2021-02-08 13:50 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 323 bytes --]

New review comment by adriangoransson on void-packages repository

https://github.com/void-linux/void-packages/pull/28579#discussion_r572060901

Comment:
Ah, mistake from the very beginning. I tried to add shell completions but suddenly the binary disappeared. It wasn't until later that I added those to post_install. :) 

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PR PATCH] [Updated] Clight[d]: Update to 4.2 and 5.1
  2021-02-08  9:38 [PR PATCH] Clight[d]: Update to 4.2 and 5.1 adriangoransson
                   ` (15 preceding siblings ...)
  2021-02-08 13:50 ` [PR REVIEW] " adriangoransson
@ 2021-02-08 13:52 ` adriangoransson
  2021-02-08 13:54 ` [PR REVIEW] " adriangoransson
  2021-02-08 15:06 ` [PR PATCH] [Merged]: " ericonr
  18 siblings, 0 replies; 20+ messages in thread
From: adriangoransson @ 2021-02-08 13:52 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1614 bytes --]

There is an updated pull request by adriangoransson against master on the void-packages repository

https://github.com/adriangoransson/void-packages master
https://github.com/void-linux/void-packages/pull/28579

Clight[d]: Update to 4.2 and 5.1
<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [X] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/28579.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-master-28579.patch --]
[-- Type: text/x-diff, Size: 6681 bytes --]

From 0149e48bb4d92504e8cdb283b17c355e78b6cfa0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Adrian=20G=C3=B6ransson?= <adriangoransson@gmail.com>
Date: Mon, 8 Feb 2021 09:43:59 +0100
Subject: [PATCH 1/2] Clightd: Update to 5.1

---
 srcpkgs/Clightd/files/Clightd/run |  2 +-
 srcpkgs/Clightd/template          | 10 ++++++----
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/srcpkgs/Clightd/files/Clightd/run b/srcpkgs/Clightd/files/Clightd/run
index 979d7e955cc..9170543376b 100644
--- a/srcpkgs/Clightd/files/Clightd/run
+++ b/srcpkgs/Clightd/files/Clightd/run
@@ -1,4 +1,4 @@
 #!/bin/sh
 
 sv check dbus >/dev/null || exit 1
-exec /usr/lib/clightd/clightd 2>&1
+exec /usr/libexec/clightd 2>&1
diff --git a/srcpkgs/Clightd/template b/srcpkgs/Clightd/template
index 79013c87829..f64c47da491 100644
--- a/srcpkgs/Clightd/template
+++ b/srcpkgs/Clightd/template
@@ -1,19 +1,21 @@
 # Template file for 'Clightd'
 pkgname=Clightd
-version=4.2
+version=5.1
 revision=1
 build_style=cmake
 cmake_builddir=build
 configure_args="-DENABLE_DDC=1 -DENABLE_GAMMA=1 -DENABLE_DPMS=1 -DENABLE_SCREEN=1"
-hostmakedepends="pkg-config"
-makedepends="eudev-libudev-devel libmodule-devel polkit-devel elogind-devel libXrandr-devel libXext-devel libX11-devel ddcutil"
+hostmakedepends="pkg-config wayland-devel"
+makedepends="eudev-libudev-devel libmodule-devel polkit-devel elogind-devel
+ libXrandr-devel libXext-devel libX11-devel ddcutil libjpeg-turbo-devel
+ wayland-devel libdrm-devel libusb-devel"
 depends="ddcutil"
 short_desc="API to read webcam brightness & alter screen brightness/temperature"
 maintainer="Dominic Monroe <monroef4@googlemail.com>"
 license="GPL-3.0-or-later"
 homepage="https://github.com/FedeDP/Clightd"
 distfiles="https://github.com/FedeDP/Clightd/archive/${version}.tar.gz"
-checksum=39301b0cad2da9adb4b662b64563f35ad5b3724631d81c1db55c311bc10dec67
+checksum=ce5002ed7790fce64e323bd483d8e5dde70a7fa9bbebc8311f514e0d5a64ab10
 
 post_install() {
 	vinstall Scripts/i2c_clightd.conf 644 /usr/lib/modules-load.d/

From 9815662f71b632bd937ab59d5699f310f3b807f6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Adrian=20G=C3=B6ransson?= <adriangoransson@gmail.com>
Date: Mon, 8 Feb 2021 10:02:07 +0100
Subject: [PATCH 2/2] Clight: Update to 4.2

This update **requires** Clightd >= 5.0.

Removed patch has been merged upstream.
---
 srcpkgs/Clight/patches/bus.c.patch | 81 ------------------------------
 srcpkgs/Clight/template            | 13 +++--
 2 files changed, 10 insertions(+), 84 deletions(-)
 delete mode 100644 srcpkgs/Clight/patches/bus.c.patch

diff --git a/srcpkgs/Clight/patches/bus.c.patch b/srcpkgs/Clight/patches/bus.c.patch
deleted file mode 100644
index a0c4d3a1d6f..00000000000
--- a/srcpkgs/Clight/patches/bus.c.patch
+++ /dev/null
@@ -1,81 +0,0 @@
-diff --git src/modules/bus.c src/modules/bus.c
-index 00f49cf..7e65fef 100644
---- src/modules/bus.c
-+++ src/modules/bus.c
-@@ -2,7 +2,6 @@
- 
- #define GET_BUS(a)  sd_bus *tmp = a->bus; if (!tmp) { tmp = a->type == USER_BUS ? userbus : sysbus; } if (!tmp) { return -1; }
- 
--static int _call(const bus_args *a, const char *signature, va_list args_va, const void **args_ptr, bool expect_reply);
- static void free_bus_structs(sd_bus_error *err, sd_bus_message *m, sd_bus_message *reply);
- static int check_err(int *r, sd_bus_error *err, const char *caller);
- 
-@@ -66,7 +65,10 @@ static void receive(const msg_t *const msg, UNUSED const void* userdata) {
-     }
- }
- 
--static int _call(const bus_args *a, const char *signature, va_list args_va, const void **args_ptr, bool expect_reply) {
-+/*
-+ * Call a method on bus and store its result of type userptr_type in userptr.
-+ */
-+int call(const bus_args *a, const char *signature, ...) {
-     sd_bus_error error = SD_BUS_ERROR_NULL;
-     sd_bus_message *m = NULL, *reply = NULL;
-     GET_BUS(a);
-@@ -76,26 +78,20 @@ static int _call(const bus_args *a, const char *signature, va_list args_va, cons
-         goto finish;
-     }
-     
--    r = sd_bus_message_set_expect_reply(m, expect_reply);
-+    r = sd_bus_message_set_expect_reply(m, a->reply_cb != NULL);
-     if (check_err(&r, &error, a->caller)) {
-         goto finish;
-     }
-     
--    if (args_va) {
--        sd_bus_message_appendv(m, signature, args_va);
--    } else if (args_ptr) {
--        int len = strlen(signature);
--        if (len == 1) {
--            sd_bus_message_append_basic(m, signature[0], args_ptr);
--        } else {
--            for (int i = 0; i < len; i++) {
--                sd_bus_message_append_basic(m, signature[i], args_ptr[i]);
--            }
--        }
-+    if (signature && strlen(signature)) {
-+        va_list args;
-+        va_start(args, signature);
-+        sd_bus_message_appendv(m, signature, args);
-+        va_end(args);
-     }
-     
-     /* Check if we need to wait for a response message */
--    if (expect_reply) {
-+    if (a->reply_cb != NULL) {
-         r = sd_bus_call(tmp, m, 0, &error, &reply);
-         if (check_err(&r, &error, a->caller)) {
-             goto finish;
-@@ -111,22 +107,6 @@ finish:
-     return r;
- }
- 
--/*
-- * Call a method on bus and store its result of type userptr_type in userptr.
-- */
--int call(const bus_args *a, const char *signature, ...) {
--    int r = 0;
--    if (signature) {
--        va_list args;
--        va_start(args, signature);
--        r = _call(a, signature, args, NULL, a->reply_cb != NULL);
--        va_end(args);
--    } else {
--        r = _call(a, signature, NULL, NULL, a->reply_cb != NULL); 
--    }
--    return r;
--}
--
- /*
-  * Add a match on bus on certain signal for cb callback
-  */
diff --git a/srcpkgs/Clight/template b/srcpkgs/Clight/template
index 348c6fdd46a..5d9c87c2cd9 100644
--- a/srcpkgs/Clight/template
+++ b/srcpkgs/Clight/template
@@ -1,15 +1,22 @@
 # Template file for 'Clight'
 pkgname=Clight
-version=4.1
+version=4.2
 revision=1
 build_style=cmake
 hostmakedepends="pkg-config"
 makedepends="popt-devel gsl-devel libconfig-devel elogind-devel bash-completion
  dbus-devel libmodule-devel"
-depends="Clightd"
+depends="Clightd>=5.0"
 short_desc="Use your webcam as a light sensor to adjust screen backlight"
 maintainer="Dominic Monroe <monroef4@googlemail.com>"
 license="GPL-3.0-or-later"
 homepage="https://github.com/FedeDP/Clight"
 distfiles="https://github.com/FedeDP/Clight/archive/${version}.tar.gz"
-checksum=84156f3dfd9ab863be25d3efc8b5d6d6043ba4a0b44259c2a1cee1367b3c97aa
+checksum=fc3c4952c755bad5f4274f69f5cc17142abb51d88d7c615873e3058edc1c1137
+
+post_install() {
+	vcompletion Extra/_clight zsh
+	vcompletion Extra/clight bash
+
+	vinstall Extra/desktop/clight.desktop 644 usr/share/applications
+}

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PR REVIEW] Clight[d]: Update to 4.2 and 5.1
  2021-02-08  9:38 [PR PATCH] Clight[d]: Update to 4.2 and 5.1 adriangoransson
                   ` (16 preceding siblings ...)
  2021-02-08 13:52 ` [PR PATCH] [Updated] " adriangoransson
@ 2021-02-08 13:54 ` adriangoransson
  2021-02-08 15:06 ` [PR PATCH] [Merged]: " ericonr
  18 siblings, 0 replies; 20+ messages in thread
From: adriangoransson @ 2021-02-08 13:54 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 339 bytes --]

New review comment by adriangoransson on void-packages repository

https://github.com/void-linux/void-packages/pull/28579#discussion_r572060901

Comment:
Ah, mistake from the very beginning. I tried to add shell completions (in do_install) but suddenly the binary disappeared. It wasn't until later that I added those to post_install. :) 

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PR PATCH] [Merged]: Clight[d]: Update to 4.2 and 5.1
  2021-02-08  9:38 [PR PATCH] Clight[d]: Update to 4.2 and 5.1 adriangoransson
                   ` (17 preceding siblings ...)
  2021-02-08 13:54 ` [PR REVIEW] " adriangoransson
@ 2021-02-08 15:06 ` ericonr
  18 siblings, 0 replies; 20+ messages in thread
From: ericonr @ 2021-02-08 15:06 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1443 bytes --]

There's a merged pull request on the void-packages repository

Clight[d]: Update to 4.2 and 5.1
https://github.com/void-linux/void-packages/pull/28579

Description:
<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [X] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2021-02-08 15:06 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-08  9:38 [PR PATCH] Clight[d]: Update to 4.2 and 5.1 adriangoransson
2021-02-08  9:41 ` [PR PATCH] [Updated] " adriangoransson
2021-02-08 11:07 ` adriangoransson
2021-02-08 11:11 ` adriangoransson
2021-02-08 11:16 ` adriangoransson
2021-02-08 11:27 ` [PR PATCH] [Updated] " adriangoransson
2021-02-08 11:33 ` adriangoransson
2021-02-08 12:50 ` [PR PATCH] [Updated] " adriangoransson
2021-02-08 12:54 ` adriangoransson
2021-02-08 13:22 ` [PR REVIEW] " ericonr
2021-02-08 13:22 ` ericonr
2021-02-08 13:22 ` ericonr
2021-02-08 13:46 ` [PR PATCH] [Closed]: " adriangoransson
2021-02-08 13:46 ` [PR PATCH] [Updated] " adriangoransson
2021-02-08 13:48 ` adriangoransson
2021-02-08 13:48 ` [PR PATCH] [Updated] " adriangoransson
2021-02-08 13:50 ` [PR REVIEW] " adriangoransson
2021-02-08 13:52 ` [PR PATCH] [Updated] " adriangoransson
2021-02-08 13:54 ` [PR REVIEW] " adriangoransson
2021-02-08 15:06 ` [PR PATCH] [Merged]: " ericonr

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).