public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: net-irc/emech/files/, net-irc/emech/
@ 2022-12-11  8:40 Joonas Niilola
  0 siblings, 0 replies; only message in thread
From: Joonas Niilola @ 2022-12-11  8:40 UTC (permalink / raw
  To: gentoo-commits

commit:     0c432c6e270bf46229bb9b8b965b1f1b3b8cd548
Author:     Pascal Jäger <pascal.jaeger <AT> leimstift <DOT> de>
AuthorDate: Wed Nov 23 07:10:52 2022 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Sun Dec 11 08:39:32 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0c432c6e

net-irc/emech: fix build for clang16

Closes: https://bugs.gentoo.org/876358
Closes: https://bugs.gentoo.org/731210

Signed-off-by: Pascal Jäger <pascal.jaeger <AT> leimstift.de>
Closes: https://github.com/gentoo/gentoo/pull/28393
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 net-irc/emech/Manifest                             |  1 +
 net-irc/emech/emech-3.0.99_p20221123.ebuild        | 90 ++++++++++++++++++++++
 .../emech-3.0.99_p20221123-fix-Wreturn-type.patch  | 34 ++++++++
 3 files changed, 125 insertions(+)

diff --git a/net-irc/emech/Manifest b/net-irc/emech/Manifest
index d90afca08168..e553ba254bad 100644
--- a/net-irc/emech/Manifest
+++ b/net-irc/emech/Manifest
@@ -1 +1,2 @@
+DIST emech-3.0.99_p20221123.tar.gz 290464 BLAKE2B a5b5bb057478e720d7e9039b4f1039b88d31dcb6f07b5fcbe1dfe5d29760336313183763ff35b8b66aba6402316d800a48b5509318a98cf9ab2729da7862a787 SHA512 e69455de286f3666ea8c53b9035ee927d5aff240ecf424c10d9eda6e1e957d97cba476c1b65cc6581e118938785366d313a687a00004e3d5f589a671194db41e
 DIST emech-3.0.99p3.tar.gz 249209 BLAKE2B 8ff0806275f7b1c9e49bb2eeda2afa0ac94b894426a2f56508492f970070e4141f14f88ffb3c1c46855817c405d29454cf85ebba53c85b4038d7d9d079f4dff6 SHA512 8ce6f8889e060791ab3af6fa63623469a457c436b4e23c51dcd1833fd09e7692270a324ad1d15beb4ad390e9d481267a8ea60eb17c9fd3195b5ad0daf7341165

diff --git a/net-irc/emech/emech-3.0.99_p20221123.ebuild b/net-irc/emech/emech-3.0.99_p20221123.ebuild
new file mode 100644
index 000000000000..f7107601febc
--- /dev/null
+++ b/net-irc/emech/emech-3.0.99_p20221123.ebuild
@@ -0,0 +1,90 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit readme.gentoo-r1 toolchain-funcs
+
+GIT_COMMIT="62b62c8388fac3b3715c5d6539e1d704b16fa2d6"
+
+DESCRIPTION="UNIX compatible IRC bot programmed in C"
+HOMEPAGE="https://github.com/EnergyMech/energymech"
+SRC_URI="https://github.com/EnergyMech/energymech/archive/${GIT_COMMIT}.tar.gz -> ${P}.tar.gz"
+S="${WORKDIR}/energymech-${GIT_COMMIT}"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="debug session tcl"
+KEYWORDS="~amd64 ~ppc ~x86"
+
+RDEPEND="virtual/libcrypt:="
+DEPEND="${RDEPEND}"
+
+DOC_CONTENTS="You can find a compressed sample config file at /usr/share/doc/${PF}"
+
+PATCHES=( "${FILESDIR}/${P}-fix-Wreturn-type.patch" )
+src_prepare() {
+	default
+
+	sed -i \
+		-e 's:"help/":"/usr/share/energymech/help/":' \
+		src/config.h.in || die
+	# Respect CFLAGS and LDFLAGS
+	sed -i \
+		-e '/^LFLAGS/s/\$(PIPEFLAG)/\0 \$(OPTIMIZE) \$(LDFLAGS)/' \
+		-e '/^GDBFLAG/d' \
+		-e '/^PIPEFLAG/d' \
+		src/Makefile.in || die
+}
+
+src_configure() {
+	tc-export CC
+	myconf=(
+		--with-alias
+		--with-botnet
+		--with-bounce
+		--with-ctcp
+		--with-dccfile
+		--with-dynamode
+		--with-dyncmd
+		--with-greet
+		--with-ircd_ext
+		--with-md5
+		--with-newbie
+		--with-note
+		--with-notify
+		--with-rawdns
+		--with-seen
+		--with-stats
+		--with-telnet
+		--with-toybox
+		--with-trivia
+		--without-uptime
+		--with-web
+		--with-wingate
+		--without-profiling
+		--without-redirect
+		$(use_with tcl)
+		$(use_with session)
+		$(use_with debug)
+	)
+	# not econf because we don't use autotools
+	./configure "${myconf[@]}" || die "Configure failed"
+}
+
+src_compile() {
+	emake -C src CC="$(tc-getCC)" OPTIMIZE="${CFLAGS}"
+}
+
+src_install() {
+	dobin src/energymech
+
+	insinto /usr/share/energymech
+	doins -r help
+
+	insinto /usr/share/energymech/messages
+	doins common/*.txt
+
+	dodoc sample.* README* TODO VERSIONS CREDITS checkmech
+	readme.gentoo_create_doc
+}

diff --git a/net-irc/emech/files/emech-3.0.99_p20221123-fix-Wreturn-type.patch b/net-irc/emech/files/emech-3.0.99_p20221123-fix-Wreturn-type.patch
new file mode 100644
index 000000000000..0413a61dcad8
--- /dev/null
+++ b/net-irc/emech/files/emech-3.0.99_p20221123-fix-Wreturn-type.patch
@@ -0,0 +1,34 @@
+QA warns about non-void functions returning no value. Both function are not used
+anywhere in the code anyway.
+
+Pascal Jäger <pascal.jaeger@leimstift.de> (2022-11-23)
+
+--- a/src/spy.c
++++ b/src/spy.c
+@@ -460,7 +460,7 @@ void end_redirect(void)
+ char *urlhost(const char *url)
+ {
+ 	char	copy[strlen(url)];
+-	const char *end,*beg,*dst;
++	char *end,*beg,*dst;
+ 	int	n = 0;
+ 
+ 	beg = end = url;
+@@ -481,6 +481,7 @@ char *urlhost(const char *url)
+ 		end++;
+ 	}
+ 	stringcpy_n(copy,beg,(end-beg));
++	return beg;
+ #ifdef DEBUG
+ 	debug("(urlhost) host = %s\n",copy);
+ #endif
+--- a/src/toybox.c
++++ b/src/toybox.c
+@@ -196,6 +196,7 @@ int read_bigcharset(char *fname)
+ int read_ascii(char *rest)
+ {
+ 	to_user_q(global_from,FMT_PLAIN,rest);
++	return (0);
+ }
+ 
+ #ifdef TRIVIA


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2022-12-11  8:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-11  8:40 [gentoo-commits] repo/gentoo:master commit in: net-irc/emech/files/, net-irc/emech/ Joonas Niilola

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox