commit:     fab5eef76374e27acdf1aca851f5b7f336000159
Author:     David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Sun Jul 31 12:20:08 2022 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Sun Jul 31 12:20:08 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fab5eef7

app-misc/acdctl: update EAPI 6 -> 8

Closes: https://bugs.gentoo.org/722400
Signed-off-by: David Seifert <soap <AT> gentoo.org>

 .../{acdctl-1.1-r1.ebuild => acdctl-1.1-r2.ebuild}   | 17 ++++++++++++++---
 app-misc/acdctl/files/acdctl-1.1-makefile.patch      | 13 +++++++++++++
 app-misc/acdctl/files/acdctl-1.1-warnings.patch      | 20 ++++++++++++++++++++
 3 files changed, 47 insertions(+), 3 deletions(-)

diff --git a/app-misc/acdctl/acdctl-1.1-r1.ebuild 
b/app-misc/acdctl/acdctl-1.1-r2.ebuild
similarity index 66%
rename from app-misc/acdctl/acdctl-1.1-r1.ebuild
rename to app-misc/acdctl/acdctl-1.1-r2.ebuild
index bde44c11ce75..df2784238b54 100644
--- a/app-misc/acdctl/acdctl-1.1-r1.ebuild
+++ b/app-misc/acdctl/acdctl-1.1-r2.ebuild
@@ -1,7 +1,9 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=6
+EAPI=8
+
+inherit toolchain-funcs
 
 DESCRIPTION="Apple Cinema Display Control"
 
HOMEPAGE="https://web.archive.org/web/20090725222711/http://technocage.com:80/~caskey/acdctl/";
@@ -14,7 +16,16 @@ KEYWORDS="ppc"
 RDEPEND="virtual/libusb:0"
 DEPEND="${RDEPEND}"
 
+PATCHES=(
+       "${FILESDIR}"/${P}-makefile.patch
+       "${FILESDIR}"/${P}-warnings.patch
+)
+
+src_configure() {
+       tc-export CC
+}
+
 src_install() {
+       dobin acdctl
        einstalldocs
-       dobin "${PN}"
 }

diff --git a/app-misc/acdctl/files/acdctl-1.1-makefile.patch 
b/app-misc/acdctl/files/acdctl-1.1-makefile.patch
new file mode 100644
index 000000000000..ac63da0c5e1d
--- /dev/null
+++ b/app-misc/acdctl/files/acdctl-1.1-makefile.patch
@@ -0,0 +1,13 @@
+--- a/Makefile
++++ b/Makefile
+@@ -25,8 +25,8 @@
+ #****************************************************************************
+ 
+ 
+-CFLAGS=-Wall
+-LDFLAGS=-lusb
++CFLAGS += -Wall
++LDLIBS = -lusb
+ 
+ all:acdctl
+ 

diff --git a/app-misc/acdctl/files/acdctl-1.1-warnings.patch 
b/app-misc/acdctl/files/acdctl-1.1-warnings.patch
new file mode 100644
index 000000000000..e86d80918b4a
--- /dev/null
+++ b/app-misc/acdctl/files/acdctl-1.1-warnings.patch
@@ -0,0 +1,20 @@
+--- a/acdctl.c
++++ b/acdctl.c
+@@ -130,7 +130,7 @@
+       next->vendor, next->product, next->description, next->year);
+     next++;
+   }
+-  printf("\n%d displays supported\n", displayCount);
++  printf("\n%ld displays supported\n", displayCount);
+ }
+ 
+ void help(const char* program_name) {
+@@ -277,7 +277,7 @@
+ }
+ 
+ void found_display(int index, struct usb_device *dev) {
+-  int ret;
++  int ret = 0;
+   usb_dev_handle* display_device = usb_open(dev);
+ 
+   if(display_device) {

Reply via email to