aboutsummaryrefslogtreecommitdiffstats
path: root/devel/libcidr
diff options
context:
space:
mode:
authorzi <zi@FreeBSD.org>2012-04-01 12:40:26 +0800
committerzi <zi@FreeBSD.org>2012-04-01 12:40:26 +0800
commite0e3ec5bb655722f0b37f475303f5d749aafe3c5 (patch)
treea95fc9aa3581779ddeaaf66d238900863559708b /devel/libcidr
parent7af80d1c346b74bb8c1e5785a4b71bad4b5262d5 (diff)
downloadfreebsd-ports-gnome-e0e3ec5bb655722f0b37f475303f5d749aafe3c5.tar.gz
freebsd-ports-gnome-e0e3ec5bb655722f0b37f475303f5d749aafe3c5.tar.zst
freebsd-ports-gnome-e0e3ec5bb655722f0b37f475303f5d749aafe3c5.zip
New port: devel/libcidr
libcidr is a library that provides a number of functions to input, output, manipulate, compare, multilate, and otherwise play with, IP addresses and netblocks. It supports both IPv4 and IPv6, and provides sufficiently diverse functions to be useful for everything from log processes to network client and server programs. It parses addresses in a wide variety of common formats. It also provides a plethora of options for formatting them on the output as well. It can compare them in various ways and give you some useful statistics about the netblocks in which tey reside. WWW: http://www.over-yonder.net/~fullermd/projects/libcidr Feature safe: yes
Diffstat (limited to 'devel/libcidr')
-rw-r--r--devel/libcidr/Makefile37
-rw-r--r--devel/libcidr/distinfo2
-rw-r--r--devel/libcidr/files/patch-src__cidr_inaddr.c10
-rw-r--r--devel/libcidr/pkg-descr13
-rw-r--r--devel/libcidr/pkg-plist22
5 files changed, 84 insertions, 0 deletions
diff --git a/devel/libcidr/Makefile b/devel/libcidr/Makefile
new file mode 100644
index 000000000000..348837ca612e
--- /dev/null
+++ b/devel/libcidr/Makefile
@@ -0,0 +1,37 @@
+# New ports collection makefile for: libcidr
+# Date created: Mar 31 2012
+# Whom: Ryan Steinmetz <zi@FreeBSD.org>
+#
+# $FreeBSD$
+#
+
+PORTNAME= libcidr
+DISTVERSION= 1.1
+CATEGORIES= devel dns
+MASTER_SITES= http://www.over-yonder.net/~fullermd/projects/${PORTNAME}/ \
+ http://mirrors.rit.edu/zi/
+
+MAINTAINER= zi@FreeBSD.org
+COMMENT= A library to handle manipulating CIDR netblocks
+
+USE_BZIP2= yes
+USE_LDCONFIG= yes
+MAKE_ENV+= DOCDIR=${DOCSDIR} EXDIR=${EXAMPLESDIR}
+
+MAN3= libcidr.3.gz
+
+post-patch:
+ @${REINPLACE_CMD} -e 's|CC = cc|CC = ${CC}|g' \
+ ${WRKSRC}/src/Makefile.inc
+ @${REINPLACE_CMD} -e 's|/usr/local|${PREFIX}|g' \
+ -e 's|LIBDIR|CIDRLIBDIR|g' ${WRKSRC}/Makefile
+
+.if defined(NOPORTDOCS)
+MAKE_ENV+= NO_DOCS=yes
+.endif
+
+.if defined(NOPORTEXAMPLES)
+MAKE_ENV+= NO_EXAMPLES=yes
+.endif
+
+.include <bsd.port.mk>
diff --git a/devel/libcidr/distinfo b/devel/libcidr/distinfo
new file mode 100644
index 000000000000..1cd2732ab1cc
--- /dev/null
+++ b/devel/libcidr/distinfo
@@ -0,0 +1,2 @@
+SHA256 (libcidr-1.1.tar.bz2) = 773c33c9f3182a47a5dc2eb54afdf6b57493d8cb8b5c72a5f38daa62e181a03f
+SIZE (libcidr-1.1.tar.bz2) = 164461
diff --git a/devel/libcidr/files/patch-src__cidr_inaddr.c b/devel/libcidr/files/patch-src__cidr_inaddr.c
new file mode 100644
index 000000000000..84cd773cb45b
--- /dev/null
+++ b/devel/libcidr/files/patch-src__cidr_inaddr.c
@@ -0,0 +1,10 @@
+--- ./src/cidr_inaddr.c.orig 2012-04-01 00:29:13.000000000 -0400
++++ ./src/cidr_inaddr.c 2012-04-01 00:29:27.000000000 -0400
+@@ -5,6 +5,7 @@
+ #include <errno.h>
+ #include <stdlib.h>
+ #include <string.h>
++#include <arpa/inet.h>
+ /* netinet/in.h is pulled in by libcidr.h */
+
+ #include <libcidr.h>
diff --git a/devel/libcidr/pkg-descr b/devel/libcidr/pkg-descr
new file mode 100644
index 000000000000..1cc3d029524e
--- /dev/null
+++ b/devel/libcidr/pkg-descr
@@ -0,0 +1,13 @@
+libcidr is a library that provides a number of functions to input, output,
+manipulate, compare, multilate, and otherwise play with, IP addresses and
+netblocks.
+
+It supports both IPv4 and IPv6, and provides sufficiently diverse functions
+to be useful for everything from log processes to network client and server
+programs. It parses addresses in a wide variety of common formats. It also
+provides a plethora of options for formatting them on the output as well.
+
+It can compare them in various ways and give you some useful statistics
+about the netblocks in which tey reside.
+
+WWW: http://www.over-yonder.net/~fullermd/projects/libcidr
diff --git a/devel/libcidr/pkg-plist b/devel/libcidr/pkg-plist
new file mode 100644
index 000000000000..97ee7867e573
--- /dev/null
+++ b/devel/libcidr/pkg-plist
@@ -0,0 +1,22 @@
+lib/libcidr.so
+lib/libcidr.so.0
+bin/cidrcalc
+include/libcidr.h
+%%PORTDOCS%%%%DOCSDIR%%/libcidr-big.html
+%%PORTDOCS%%%%DOCSDIR%%/libcidr.dvi
+%%PORTDOCS%%%%DOCSDIR%%/libcidr.pdf
+%%PORTDOCS%%%%DOCSDIR%%/libcidr.ps
+%%PORTDOCS%%%%DOCSDIR%%/libcidr.rtf
+%%PORTDOCS%%%%DOCSDIR%%/libcidr.txt
+%%PORTDOCS%%%%DOCSDIR%%/codelibrary-html.css
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/Makefile.inc
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/README
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/cidrcalc/cidrcalc.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/cidrcalc/Makefile
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/acl/acl.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/acl/acl.example
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/acl/Makefile
+%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%%/cidrcalc
+%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%%/acl
+%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%%
+%%PORTDOCS%%@dirrm %%DOCSDIR%%