From 85a1bf546971bfd029b98758b62f8745846e257f Mon Sep 17 00:00:00 2001 From: xtkoba <69125751+xtkoba@users.noreply.github.com> Date: Mon, 20 Dec 2021 18:36:17 +0900 Subject: [PATCH] new package: ircd-irc2 (#8176) --- packages/ircd-irc2/build.sh | 21 +++++++++++++++++++ packages/ircd-irc2/configure.patch | 11 ++++++++++ .../contrib-ircdwatch-ircdwatch.c.patch | 11 ++++++++++ .../contrib-mkpasswd-mkpasswd.c.patch | 12 +++++++++++ packages/ircd-irc2/ircd-s_bsd.c.patch | 20 ++++++++++++++++++ packages/ircd-irc2/support-Makefile.in.patch | 20 ++++++++++++++++++ 6 files changed, 95 insertions(+) create mode 100644 packages/ircd-irc2/build.sh create mode 100644 packages/ircd-irc2/configure.patch create mode 100644 packages/ircd-irc2/contrib-ircdwatch-ircdwatch.c.patch create mode 100644 packages/ircd-irc2/contrib-mkpasswd-mkpasswd.c.patch create mode 100644 packages/ircd-irc2/ircd-s_bsd.c.patch create mode 100644 packages/ircd-irc2/support-Makefile.in.patch diff --git a/packages/ircd-irc2/build.sh b/packages/ircd-irc2/build.sh new file mode 100644 index 000000000..e3d7c034a --- /dev/null +++ b/packages/ircd-irc2/build.sh @@ -0,0 +1,21 @@ +TERMUX_PKG_HOMEPAGE=http://www.irc.org/ +TERMUX_PKG_DESCRIPTION="An Internet Relay Chat (IRC) daemon" +TERMUX_PKG_LICENSE="GPL-2.0" # GPL-1.0-or-later +TERMUX_PKG_MAINTAINER="@termux" +TERMUX_PKG_VERSION=2.11.2p3 +TERMUX_PKG_SRCURL=http://www.irc.org/ftp/irc/server/irc${TERMUX_PKG_VERSION}.tgz +TERMUX_PKG_SHA256=be94051845f9be7da0e558699c4af7963af7e647745d339351985a697eca2c81 +TERMUX_PKG_DEPENDS="libcrypt, resolv-conf, zlib" +TERMUX_PKG_BUILD_IN_SRC=true + +TERMUX_PKG_EXTRA_CONFIGURE_ARGS=" +--with-resconf=$TERMUX_PREFIX/etc/resolv.conf +ac_cv_func_setpgrp_void=yes +irc_cv_non_blocking_system=posix +" +TERMUX_PKG_EXTRA_MAKE_ARGS="-C build" + +termux_step_pre_configure() { + CFLAGS+=" $CPPFLAGS" + LDFLAGS+=" -lcrypt" +} diff --git a/packages/ircd-irc2/configure.patch b/packages/ircd-irc2/configure.patch new file mode 100644 index 000000000..2e2896614 --- /dev/null +++ b/packages/ircd-irc2/configure.patch @@ -0,0 +1,11 @@ +--- a/configure ++++ b/configure +@@ -19,7 +19,7 @@ + support/configure $* + else + echo "retrieving the system name, type and OS release..." +- rev=`support/config.guess` ++ rev=build + if test "${rev}" # test for no output + then + echo " your system seems to be ${rev}." diff --git a/packages/ircd-irc2/contrib-ircdwatch-ircdwatch.c.patch b/packages/ircd-irc2/contrib-ircdwatch-ircdwatch.c.patch new file mode 100644 index 000000000..09d1541b9 --- /dev/null +++ b/packages/ircd-irc2/contrib-ircdwatch-ircdwatch.c.patch @@ -0,0 +1,11 @@ +--- a/contrib/ircdwatch/ircdwatch.c ++++ b/contrib/ircdwatch/ircdwatch.c +@@ -205,7 +205,7 @@ + } + + if (pid == 0) { +- execl("/bin/sh", "sh", "-c", cmd, (char *) NULL); ++ execl("@TERMUX_PREFIX@/bin/sh", "sh", "-c", cmd, (char *) NULL); + _exit(127); + } + return(0); diff --git a/packages/ircd-irc2/contrib-mkpasswd-mkpasswd.c.patch b/packages/ircd-irc2/contrib-mkpasswd-mkpasswd.c.patch new file mode 100644 index 000000000..f2103f1d4 --- /dev/null +++ b/packages/ircd-irc2/contrib-mkpasswd-mkpasswd.c.patch @@ -0,0 +1,12 @@ +--- a/contrib/mkpasswd/mkpasswd.c ++++ b/contrib/mkpasswd/mkpasswd.c +@@ -27,8 +27,7 @@ + #define FLAG_ROUNDS 0x00000040 + #define FLAG_EXT 0x00000080 + +-extern char *getpass(const char * prompt); +-extern char *crypt(const char *key, const char *salt); ++#include + + char *make_des_salt(void); + char *make_ext_salt(int); diff --git a/packages/ircd-irc2/ircd-s_bsd.c.patch b/packages/ircd-irc2/ircd-s_bsd.c.patch new file mode 100644 index 000000000..a93d5fd22 --- /dev/null +++ b/packages/ircd-irc2/ircd-s_bsd.c.patch @@ -0,0 +1,20 @@ +--- a/ircd/s_bsd.c ++++ b/ircd/s_bsd.c +@@ -809,7 +809,7 @@ void daemonize(void) + #if defined(HPUX) || defined(SVR4) || defined(DYNIXPTX) || \ + defined(_POSIX_SOURCE) || defined(SGI) + (void)setsid(); +-#elif defined (__CYGWIN32__) || defined(__APPLE__) ++#elif defined (__CYGWIN32__) || defined(__APPLE__) || defined(__ANDROID__) + (void)setpgrp(); + #else + (void)setpgrp(0, (int)getpid()); +@@ -3159,7 +3159,7 @@ int setup_ping(aConfItem *aconf) + (void)close(udpfd); + return udpfd = -1; + } +- if (fcntl(udpfd, F_SETFL, FNDELAY)==-1) ++ if (fcntl(udpfd, F_SETFL, O_NONBLOCK)==-1) + { + Debug((DEBUG_ERROR, "fcntl fndelay : %s", strerror(errno))); + (void)close(udpfd); diff --git a/packages/ircd-irc2/support-Makefile.in.patch b/packages/ircd-irc2/support-Makefile.in.patch new file mode 100644 index 000000000..ba777aff8 --- /dev/null +++ b/packages/ircd-irc2/support-Makefile.in.patch @@ -0,0 +1,20 @@ +--- a/support/Makefile.in ++++ b/support/Makefile.in +@@ -169,6 +169,8 @@ + CHKCONF_OBJS = chkconf.o + CHKCONF = chkconf + ++all: server ++ + help: + @echo "Choose one of the following:" + @echo " all : build everything" +@@ -184,8 +186,6 @@ + @echo " install-server : build and install server programs" + @echo " install-tkserv : build and install tkserv" + +-all: server +- + server: $(IRCD_BIN) $(IAUTH) $(CHKCONF) ircd-mkpasswd $(IRCDWATCH) + + $(IRCD_BIN): $(IRCD_COMMON_OBJS) $(IRCD_OBJS)