commit:     3cad08617b6f983c8969713a3a0929d28aada094
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Dec  3 05:03:44 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Dec  3 06:06:07 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3cad0861

net-print/cups-bjnp: fix configure w/ clang 16

Signed-off-by: Sam James <sam <AT> gentoo.org>

 net-print/cups-bjnp/cups-bjnp-2.0.3-r1.ebuild      | 32 ++++++++++++++++++++
 .../files/cups-bjnp-2.0.3-configure-clang16.patch  | 34 ++++++++++++++++++++++
 2 files changed, 66 insertions(+)

diff --git a/net-print/cups-bjnp/cups-bjnp-2.0.3-r1.ebuild 
b/net-print/cups-bjnp/cups-bjnp-2.0.3-r1.ebuild
new file mode 100644
index 000000000000..55fb1e8a2677
--- /dev/null
+++ b/net-print/cups-bjnp/cups-bjnp-2.0.3-r1.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools
+
+DESCRIPTION="CUPS backend for canon printers using proprietary USB over IP 
BJNP protocol"
+HOMEPAGE="https://sourceforge.net/projects/cups-bjnp/";
+SRC_URI="mirror://sourceforge/${PN}/${PV}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
+
+DEPEND="net-print/cups"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+       "${FILESDIR}"/${PN}-2.0.3-configure-clang16.patch
+)
+
+src_prepare() {
+       default
+
+       # Clang 16
+       eautoreconf
+}
+
+src_configure() {
+       econf --disable-Werror
+}

diff --git a/net-print/cups-bjnp/files/cups-bjnp-2.0.3-configure-clang16.patch 
b/net-print/cups-bjnp/files/cups-bjnp-2.0.3-configure-clang16.patch
new file mode 100644
index 000000000000..e1d37445f89d
--- /dev/null
+++ b/net-print/cups-bjnp/files/cups-bjnp-2.0.3-configure-clang16.patch
@@ -0,0 +1,34 @@
+https://sourceforge.net/p/cups-bjnp/patches/5/
+--- a/acinclude.m4
++++ b/acinclude.m4
+@@ -25,9 +25,9 @@
+       #include <sys/socket.h> ], [
+        /* AF_INET6 available check */  
+       if (socket(AF_INET6, SOCK_STREAM, 0) < 0) 
+-        exit(1); 
++        return 1; 
+       else 
+-        exit(0); 
++        return 0; 
+       ],[
+         AC_MSG_RESULT(yes) 
+         AC_DEFINE([ENABLE_IPV6], 1, [Define to 1 if the system supports 
IPv6]) 
+@@ -47,7 +47,7 @@
+       /* test if the ss_family member exists in struct sockaddr_storage */
+       struct sockaddr_storage ss;
+       ss.ss_family = AF_INET;
+-      exit (0);
++      return 0;
+     ], [
+       AC_MSG_RESULT(yes)
+       AC_DEFINE([HAS_SS_FAMILY], 1, [Define to 1 if struct sockaddr_storage 
has an ss_family member])
+@@ -59,7 +59,7 @@
+               /* test if the __ss_family member exists in struct 
sockaddr_storage */
+               struct sockaddr_storage ss;
+               ss.__ss_family = AF_INET;
+-              exit (0);
++              return 0;
+         ], [
+               AC_MSG_RESULT([no, but __ss_family exists])
+               AC_DEFINE([HAS___SS_FAMILY], 1, [Define to 1 if struct 
sockaddr_storage has __ss_family instead of ss_family])
+

Reply via email to