<pre style='margin:0'>
Ryan Schmidt (ryandesign) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/f0b061bf41f1182b12bc0afa69b18c7f6aea80a7">https://github.com/macports/macports-ports/commit/f0b061bf41f1182b12bc0afa69b18c7f6aea80a7</a></p>
<pre style="white-space: pre; background: #F8F8F8">The following commit(s) were added to refs/heads/master by this push:
<span style='display:block; white-space:pre;color:#404040;'> new f0b061bf41f libnids: Also build and install dynamic library
</span>f0b061bf41f is described below
<span style='display:block; white-space:pre;color:#808000;'>commit f0b061bf41f1182b12bc0afa69b18c7f6aea80a7
</span>Author: Ryan Schmidt <ryandesign@macports.org>
AuthorDate: Thu Jul 29 12:38:35 2021 -0500
<span style='display:block; white-space:pre;color:#404040;'> libnids: Also build and install dynamic library
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> Build and install dynamic library in addition to static library. Fix
</span><span style='display:block; white-space:pre;color:#404040;'> permissions in extracted directory for easier development. Fix implicit
</span><span style='display:block; white-space:pre;color:#404040;'> declaration of functions. Fix undefined symbols in i386 build by not
</span><span style='display:block; white-space:pre;color:#404040;'> declaring functions inline. Modernize checksums.
</span>---
net/libnids/Portfile | 30 +++++++++++++++++++++----
net/libnids/files/LDFLAGS.patch | 12 ++++++++++
net/libnids/files/dylib.patch | 30 +++++++++++++++++++++++++
net/libnids/files/implicit.patch | 12 ++++++++++
net/libnids/files/inline.patch | 47 ++++++++++++++++++++++++++++++++++++++++
5 files changed, 127 insertions(+), 4 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/net/libnids/Portfile b/net/libnids/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index 7c363c03b78..8fd00997718 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/net/libnids/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/net/libnids/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -2,6 +2,11 @@ PortSystem 1.0
</span>
name libnids
version 1.24
<span style='display:block; white-space:pre;background:#e0ffe0;'>+revision 1
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+checksums rmd160 66a1a332a70b316fd83905887dc731b5bf28d715 \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ sha256 314b4793e0902fbf1fdb7fb659af37a3c1306ed1aad5d1c84de6c931b351d359 \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ size 151021
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> categories net
license GPL-2
maintainers nomaintainer
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -15,13 +20,30 @@ homepage http://libnids.sourceforge.net/
</span> platforms darwin
master_sites sourceforge:project/${name}/${name}/${version}
<span style='display:block; white-space:pre;background:#ffe0e0;'>-checksums md5 72d37c79c85615ffe158aa524d649610 \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- sha1 9a421df05cefdc4f5f7db95efc001b3c2b5249ce \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- rmd160 66a1a332a70b316fd83905887dc731b5bf28d715
</span>
depends_lib port:libpcap
<span style='display:block; white-space:pre;background:#ffe0e0;'>-configure.args --mandir=${prefix}/share/man --disable-libglib
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+post-extract {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Copy "owner" permission to "group" and "others" but removing write.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ fs-traverse item ${worksrcpath} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set p [file attributes ${item} -permissions]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set x [expr {${p} >> 6 & 5}]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ file attributes ${item} -permissions [format {0%o} [expr {${x} | (${x} << 3) | ${p}}]]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+patchfiles implicit.patch \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ inline.patch \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ LDFLAGS.patch
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+platform darwin {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ patchfiles-append \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ dylib.patch
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+configure.args --disable-libglib \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --enable-shared \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --mandir=${prefix}/share/man
</span>
destroot.destdir install_prefix=${destroot}
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/net/libnids/files/LDFLAGS.patch b/net/libnids/files/LDFLAGS.patch
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..5d2fac19cae
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/net/libnids/files/LDFLAGS.patch
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,12 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Use LDFLAGS.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- src/Makefile.in.orig 2010-03-01 15:13:17.000000000 -0600
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ src/Makefile.in 2021-07-29 11:44:40.000000000 -0500
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -65,7 +65,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ar -cr $@ $(OBJS)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ $(RANLIB) $@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ $(LIBSHARED): $(OBJS_SHARED)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- $(CC) -shared -Wl,-soname,$(LIBSHARED) -o $(LIBSHARED) $(OBJS_SHARED) $(LIBS) $(LNETLIB) $(PCAPLIB)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ $(CC) -shared -Wl,-soname,$(LIBSHARED) -o $(LIBSHARED) $(OBJS_SHARED) $(LDFLAGS) $(LIBS) $(LNETLIB) $(PCAPLIB)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ _install install: $(LIBSTATIC)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ../mkinstalldirs $(install_prefix)$(libdir)
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/net/libnids/files/dylib.patch b/net/libnids/files/dylib.patch
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..e9b35835399
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/net/libnids/files/dylib.patch
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,30 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Build a macOS dylib rather than a shared library.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- src/Makefile.in.orig 2021-07-29 11:44:40.000000000 -0500
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ src/Makefile.in 2021-07-29 11:44:40.000000000 -0500
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -13,7 +13,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ libdir = @libdir@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ mandir = @mandir@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ LIBSTATIC = libnids.a
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-LIBSHARED = libnids.so.1.24
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++LIBSHARED = libnids.1.24.dylib
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ CC = @CC@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ CFLAGS = @CFLAGS@ -DLIBNET_VER=@LIBNET_VER@ -DHAVE_ICMPHDR=@ICMPHEADER@ -DHAVE_TCP_STATES=@TCPSTATES@ -DHAVE_BSD_UDPHDR=@HAVE_BSD_UDPHDR@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -65,7 +65,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ar -cr $@ $(OBJS)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ $(RANLIB) $@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ $(LIBSHARED): $(OBJS_SHARED)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- $(CC) -shared -Wl,-soname,$(LIBSHARED) -o $(LIBSHARED) $(OBJS_SHARED) $(LDFLAGS) $(LIBS) $(LNETLIB) $(PCAPLIB)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ $(CC) -dynamiclib -Wl,-install_name,$(libdir)/$(LIBSHARED) -current_version 1.0.0 -compatibility_version 1.0.0 -o $(LIBSHARED) $(OBJS_SHARED) $(LDFLAGS) $(LIBS) $(LNETLIB) $(PCAPLIB)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ _install install: $(LIBSTATIC)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ../mkinstalldirs $(install_prefix)$(libdir)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -76,7 +76,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ $(INSTALL) -c -m 644 libnids.3 $(install_prefix)$(mandir)/man3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ _installshared installshared: install $(LIBSHARED)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ $(INSTALL) -c -m 755 $(LIBSHARED) $(install_prefix)$(libdir)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- ln -s -f $(LIBSHARED) $(install_prefix)$(libdir)/libnids.so
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ln -s -f $(LIBSHARED) $(install_prefix)$(libdir)/libnids.dylib
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ clean:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ rm -f *.o *~ $(LIBSTATIC) $(LIBSHARED)
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/net/libnids/files/implicit.patch b/net/libnids/files/implicit.patch
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..cd477b25744
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/net/libnids/files/implicit.patch
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,12 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Fix:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+conftest.c:26:7: error: implicitly declaring library function 'exit' with type 'void (int) __attribute__((noreturn))' [-Werror,-Wimplicit-function-declaration]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- configure.orig 2006-05-01 12:14:51.000000000 -0500
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ configure 2021-07-29 11:48:19.000000000 -0500
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -2892,6 +2892,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ cat >>conftest.$ac_ext <<_ACEOF
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /* end confdefs.h. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <ctype.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include <stdlib.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #if ((' ' & 0x0FF) == 0x020)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/net/libnids/files/inline.patch b/net/libnids/files/inline.patch
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..a5f0fa15f77
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/net/libnids/files/inline.patch
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,47 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Fix:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Undefined symbols for architecture i386:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "_ip_compute_csum", referenced from:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ _process_icmp in tcp_pic.o
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "_ip_fast_csum", referenced from:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ _gen_ip_frag_proc in libnids_pic.o
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "_my_tcp_check", referenced from:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ _process_tcp in tcp_pic.o
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "_my_udp_check", referenced from:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ _gen_ip_proc in libnids_pic.o
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ld: symbol(s) not found for architecture i386
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- src/checksum.c.orig 2010-02-26 04:58:41.000000000 -0600
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ src/checksum.c 2021-07-29 12:02:18.000000000 -0500
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -120,7 +120,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ By Jorge Cwik <jorge@laser.satlink.net>, adapted for linux by Arnt
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Gulbrandsen.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-inline u_short ip_fast_csum(u_char * iph, u_int ihl)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++u_short ip_fast_csum(u_char * iph, u_int ihl)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ u_int sum;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (dontchksum(((struct ip*)iph)->ip_src.s_addr))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -191,13 +191,13 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ this routine is used for miscellaneous IP-like checksums, mainly in
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ icmp.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-inline u_short
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++u_short
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ip_compute_csum(u_char * buff, int len)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return (csum_fold(csum_partial(buff, len, 0)));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-inline u_short
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++u_short
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ my_tcp_check(struct tcphdr *th, int len, u_int saddr, u_int daddr)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (dontchksum(saddr))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -205,7 +205,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return csum_tcpudp_magic(saddr, daddr, len, IPPROTO_TCP,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ csum_partial((u_char *)th, len, 0));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-inline u_short
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++u_short
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ my_udp_check(void *u, int len, u_int saddr, u_int daddr)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (dontchksum(saddr))
</span></pre><pre style='margin:0'>
</pre>