Hi ports@,

a few people have asked me off list to enable IDENT support for ngircd. 
As this is not something everybody will need I added a FLAVOR "ident" 
for this.

Changes:
- add ident FLAVOR
- fix mirror domain
- fix warnings due to missing #include's

Tested on amd64.


Index: Makefile
===================================================================
RCS file: /cvs/ports/net/ngircd/Makefile,v
retrieving revision 1.23
diff -u -p -r1.23 Makefile
--- Makefile    8 Nov 2022 11:16:58 -0000       1.23
+++ Makefile    6 Jan 2023 12:55:16 -0000
@@ -1,7 +1,7 @@
 COMMENT =      lightweight irc server
 
 DISTNAME =     ngircd-26.1
-REVISION =     0
+REVISION =     1
 
 CATEGORIES =   net
 
@@ -15,8 +15,11 @@ PERMIT_PACKAGE =     Yes
 # use pledge()
 WANTLIB =      c crypto iconv ssl z
 
+FLAVORS =      ident
+FLAVOR ?=
+
 MASTER_SITES = https://ngircd.barton.de/pub/ngircd/ \
-               https://ngircd.mirror.3rz.org/pub/ngircd/ \
+               https://ngircd.mirror.3rz.de/pub/ngircd/ \
                https://ngircd.sourceforge.io/pub/ngircd/
 
 LIB_DEPENDS =  converters/libiconv
@@ -29,5 +32,11 @@ CONFIGURE_STYLE = gnu
 CONFIGURE_ARGS += --with-iconv=${LOCALBASE} \
                  --with-openssl \
                  --enable-ipv6
+
+.if ${FLAVOR:Mident}
+LIB_DEPENDS += security/libident
+WANTLIB +=     ident
+CONFIGURE_ARGS += --with-ident=${LOCALBASE}
+.endif
 
 .include <bsd.port.mk>
Index: patches/patch-doc_Makefile_in
===================================================================
RCS file: /cvs/ports/net/ngircd/patches/patch-doc_Makefile_in,v
retrieving revision 1.7
diff -u -p -r1.7 patch-doc_Makefile_in
--- patches/patch-doc_Makefile_in       11 Mar 2022 19:46:30 -0000      1.7
+++ patches/patch-doc_Makefile_in       6 Jan 2023 12:55:16 -0000
@@ -1,7 +1,7 @@
 Index: doc/Makefile.in
 --- doc/Makefile.in.orig
 +++ doc/Makefile.in
-@@ -648,16 +648,13 @@ maintainer-clean-local:
+@@ -617,16 +617,13 @@ maintainer-clean-local:
  all: $(generated_docs)
  
  install-data-hook: $(static_docs) $(toplevel_docs) $(generated_docs)
Index: patches/patch-src_ngircd_ngircd_c
===================================================================
RCS file: /cvs/ports/net/ngircd/patches/patch-src_ngircd_ngircd_c,v
retrieving revision 1.7
diff -u -p -r1.7 patch-src_ngircd_ngircd_c
--- patches/patch-src_ngircd_ngircd_c   11 Mar 2022 19:46:30 -0000      1.7
+++ patches/patch-src_ngircd_ngircd_c   6 Jan 2023 12:55:16 -0000
@@ -1,7 +1,15 @@
 Index: src/ngircd/ngircd.c
 --- src/ngircd/ngircd.c.orig
 +++ src/ngircd/ngircd.c
-@@ -261,6 +261,16 @@ main(int argc, const char *argv[])
+@@ -30,6 +30,7 @@
+ #include <fcntl.h>
+ #include <pwd.h>
+ #include <grp.h>
++#include <err.h>
+ 
+ #if defined(DEBUG) && defined(HAVE_MTRACE)
+ #include <mcheck.h>
+@@ -261,6 +262,16 @@ main(int argc, const char *argv[])
                        exit(1);
                }
  
@@ -18,7 +26,7 @@ Index: src/ngircd/ngircd.c
                if (!io_library_init(CONNECTION_POOL)) {
                        Log(LOG_ALERT,
                            "Fatal: Could not initialize IO routines: %s",
-@@ -563,7 +573,7 @@ Setup_FDStreams(int fd)
+@@ -563,7 +574,7 @@ Setup_FDStreams(int fd)
  #if !defined(SINGLE_USER_OS)
  
  /**
@@ -27,7 +35,7 @@ Index: src/ngircd/ngircd.c
   *
   * @param uid User ID
   * @param gid Group ID
-@@ -587,7 +597,7 @@ NGIRCd_getNobodyID(uid_t *uid, gid_t *gid )
+@@ -587,7 +598,7 @@ NGIRCd_getNobodyID(uid_t *uid, gid_t *gid )
        }
  #endif
  
@@ -36,7 +44,7 @@ Index: src/ngircd/ngircd.c
        if (!pwd)
                return false;
  
-@@ -703,11 +713,11 @@ NGIRCd_Init(bool NGIRCd_NoDaemon)
+@@ -703,11 +714,11 @@ NGIRCd_Init(bool NGIRCd_NoDaemon)
        if (Conf_UID == 0) {
                pwd = getpwuid(0);
                Log(LOG_INFO,
Index: patches/patch-src_ngircd_proc_c
===================================================================
RCS file: /cvs/ports/net/ngircd/patches/patch-src_ngircd_proc_c,v
retrieving revision 1.2
diff -u -p -r1.2 patch-src_ngircd_proc_c
--- patches/patch-src_ngircd_proc_c     11 Mar 2022 19:46:30 -0000      1.2
+++ patches/patch-src_ngircd_proc_c     6 Jan 2023 12:55:16 -0000
@@ -1,7 +1,15 @@
 Index: src/ngircd/proc.c
 --- src/ngircd/proc.c.orig
 +++ src/ngircd/proc.c
-@@ -76,6 +76,9 @@ Proc_Fork(PROC_STAT *proc, int *pipefds, void (*cbfunc
+@@ -24,6 +24,7 @@
+ #include <sys/types.h>
+ #include <unistd.h>
+ #include <time.h>
++#include <err.h>
+ 
+ #include "log.h"
+ #include "io.h"
+@@ -76,6 +77,9 @@ Proc_Fork(PROC_STAT *proc, int *pipefds, void (*cbfunc
                return -1;
        case 0:
                /* New child process: */

Reply via email to