summaryrefslogtreecommitdiffstats
path: root/net/libgnetwork
diff options
context:
space:
mode:
authormarcus <marcus@df743ca5-7f9a-e211-a948-0013205c9059>2003-12-12 15:18:37 +0800
committermarcus <marcus@df743ca5-7f9a-e211-a948-0013205c9059>2003-12-12 15:18:37 +0800
commit4d41f04b6e6bd7cc54bc440579dc7b7c6a3f31f1 (patch)
treecd2a33542768c416f2c1bfd4e73fb334a831dc65 /net/libgnetwork
parent917e8152be562af6b2ba68d30733c029c9b0f7ad (diff)
downloadmarcuscom-ports-4d41f04b6e6bd7cc54bc440579dc7b7c6a3f31f1.tar
marcuscom-ports-4d41f04b6e6bd7cc54bc440579dc7b7c6a3f31f1.tar.gz
marcuscom-ports-4d41f04b6e6bd7cc54bc440579dc7b7c6a3f31f1.tar.bz2
marcuscom-ports-4d41f04b6e6bd7cc54bc440579dc7b7c6a3f31f1.tar.lz
marcuscom-ports-4d41f04b6e6bd7cc54bc440579dc7b7c6a3f31f1.tar.xz
marcuscom-ports-4d41f04b6e6bd7cc54bc440579dc7b7c6a3f31f1.tar.zst
marcuscom-ports-4d41f04b6e6bd7cc54bc440579dc7b7c6a3f31f1.zip
Add libgnetwork, a GLib-based networking wrapper library.
git-svn-id: svn://creme-brulee.marcuscom.com/ports/trunk@1472 df743ca5-7f9a-e211-a948-0013205c9059
Diffstat (limited to 'net/libgnetwork')
-rw-r--r--net/libgnetwork/Makefile40
-rw-r--r--net/libgnetwork/distinfo1
-rw-r--r--net/libgnetwork/files/patch-Makefile.in11
-rw-r--r--net/libgnetwork/files/patch-data_Makefile.in10
-rw-r--r--net/libgnetwork/files/patch-libgnetwork_gnetwork-dns.c11
-rw-r--r--net/libgnetwork/files/patch-libgnetwork_gnetwork-interfaces.c44
-rw-r--r--net/libgnetwork/files/patch-libgnetwork_gnetwork-interfaces.h44
-rw-r--r--net/libgnetwork/files/patch-libgnetwork_gnetwork-ip-address.c11
-rw-r--r--net/libgnetwork/files/patch-libgnetwork_gnetwork-ip-multicast.c13
-rw-r--r--net/libgnetwork/files/patch-libgnetwork_gnetwork-tcp-connection.c10
-rw-r--r--net/libgnetwork/files/patch-libgnetwork_gnetwork-type-builtins.c.template12
-rw-r--r--net/libgnetwork/files/patch-libgnetwork_gnetwork-udp-datagram.c38
-rw-r--r--net/libgnetwork/files/patch-libgnetwork_gnetwork-utils.c44
-rw-r--r--net/libgnetwork/pkg-descr11
-rw-r--r--net/libgnetwork/pkg-plist55
15 files changed, 355 insertions, 0 deletions
diff --git a/net/libgnetwork/Makefile b/net/libgnetwork/Makefile
new file mode 100644
index 000000000..a8f9773a4
--- /dev/null
+++ b/net/libgnetwork/Makefile
@@ -0,0 +1,40 @@
+# New ports collection makefile for: libgnetwork
+# Date created: 11 December 2003
+# Whom: Joe Marcus Clarke <marcus@FreeBSD.org>
+#
+# $FreeBSD$
+#
+
+PORTNAME= libgnetwork
+PORTVERSION= 0.0.3
+CATEGORIES= net gnome
+MASTER_SITES= ${MASTER_SITE_GNOME}
+MASTER_SITE_SUBDIR= sources/${PORTNAME}/0.0
+DIST_SUBDIR= gnome2
+
+MAINTAINER= gnome@FreeBSD.org
+COMMENT= A GLib-based networking wrapper
+
+USE_BZIP2= yes
+USE_X_PREFIX= yes
+USE_GNOME= gnomeprefix gnomehack intlhack lthack gconf2
+INSTALLS_SHLIB= yes
+USE_LIBTOOL= yes
+USE_GMAKE= yes
+CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include"
+LDFLAGS+= -L${LOCALBASE}/lib
+
+.if !defined(WITHOUT_SSL)
+LIB_DEPENDS+= gnutls.7:${PORTSDIR}/security/gnutls
+CONFIGURE_ARGS+=--enable-ssl=gnutls
+.else
+CONFIGURE_ARGS+=--enable-ssl=no
+.endif
+
+pre-everything::
+ @${ECHO_MSG} ""
+ @${ECHO_MSG} "libgnetwork has the following configurable option(s):"
+ @${ECHO_MSG} " WITHOUT_SSL Disable GnuTLS SSL support"
+ @${ECHO_MSG} ""
+
+.include <bsd.port.mk>
diff --git a/net/libgnetwork/distinfo b/net/libgnetwork/distinfo
new file mode 100644
index 000000000..f6dd551fc
--- /dev/null
+++ b/net/libgnetwork/distinfo
@@ -0,0 +1 @@
+MD5 (gnome2/libgnetwork-0.0.3.tar.bz2) = 7debe5a991e4e49c1b484c0e2e6e590f
diff --git a/net/libgnetwork/files/patch-Makefile.in b/net/libgnetwork/files/patch-Makefile.in
new file mode 100644
index 000000000..bfedc0255
--- /dev/null
+++ b/net/libgnetwork/files/patch-Makefile.in
@@ -0,0 +1,11 @@
+--- Makefile.in.orig Fri Dec 12 01:51:23 2003
++++ Makefile.in Fri Dec 12 01:51:29 2003
+@@ -197,7 +197,7 @@
+
+ AUTOMAKE_OPTIONS = 1.7
+
+-SUBDIRS = libgnetwork tests data doc po
++SUBDIRS = libgnetwork data doc po
+
+ EXTRA_DIST = \
+ intltool-merge.in \
diff --git a/net/libgnetwork/files/patch-data_Makefile.in b/net/libgnetwork/files/patch-data_Makefile.in
new file mode 100644
index 000000000..741e38dc9
--- /dev/null
+++ b/net/libgnetwork/files/patch-data_Makefile.in
@@ -0,0 +1,10 @@
+--- data/Makefile.in.orig Fri Dec 12 02:11:14 2003
++++ data/Makefile.in Fri Dec 12 02:11:34 2003
+@@ -419,7 +419,6 @@
+ if test -z "$(DESTDIR)" ; then \
+ for p in $(schema_DATA) ; do \
+ if test -f $(srcdir)/$$p ; then \
+- GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) $(GCONFTOOL) --makefile-install-rule $(srcdir)/$$p ; \
+ fi \
+ done \
+ fi
diff --git a/net/libgnetwork/files/patch-libgnetwork_gnetwork-dns.c b/net/libgnetwork/files/patch-libgnetwork_gnetwork-dns.c
new file mode 100644
index 000000000..e34478b4f
--- /dev/null
+++ b/net/libgnetwork/files/patch-libgnetwork_gnetwork-dns.c
@@ -0,0 +1,11 @@
+--- libgnetwork/gnetwork-dns.c.orig Thu Dec 11 21:25:54 2003
++++ libgnetwork/gnetwork-dns.c Thu Dec 11 21:27:13 2003
+@@ -33,6 +33,8 @@
+ #include <time.h>
+ #include <netdb.h>
+ #include <string.h>
++#include <sys/types.h>
++#include <netinet/in.h>
+ #include <arpa/inet.h>
+ #include <sys/socket.h>
+ #include <netinet/in.h>
diff --git a/net/libgnetwork/files/patch-libgnetwork_gnetwork-interfaces.c b/net/libgnetwork/files/patch-libgnetwork_gnetwork-interfaces.c
new file mode 100644
index 000000000..68dfe19bc
--- /dev/null
+++ b/net/libgnetwork/files/patch-libgnetwork_gnetwork-interfaces.c
@@ -0,0 +1,44 @@
+--- libgnetwork/gnetwork-interfaces.c.orig Thu Dec 11 21:27:32 2003
++++ libgnetwork/gnetwork-interfaces.c Thu Dec 11 23:33:27 2003
+@@ -34,11 +34,16 @@
+ #include <unistd.h>
+
+ /* Interfaces & Addresses */
++#include <sys/types.h>
+ #include <sys/socket.h>
+ #include <netinet/in.h>
+ #include <net/if.h>
++#ifdef __linux__
+ #include <netpacket/packet.h>
+ #include <netinet/ether.h>
++#else
++#include <net/ethernet.h>
++#endif
+ #include <ifaddrs.h>
+ #include <arpa/inet.h>
+
+@@ -72,7 +77,7 @@
+ gchar *hw_address;
+ gchar *hw_broadcast_or_destination;
+
+- GNetworkInterfaceFlags flags:15;
++ GNetworkInterfaceFlags flags:16;
+ GNetworkProtocols protocols:3;
+ };
+
+@@ -126,6 +131,7 @@
+ _gnetwork_ip_address_set_from_sockaddr (&(info->ip6_netmask), data->ifa_netmask);
+ _gnetwork_ip_address_set_from_sockaddr (&(info->ip6_destination), data->ifa_dstaddr);
+ break;
++#ifdef AF_PACKET
+ case AF_PACKET:
+ info->protocols |= GNETWORK_PROTOCOL_PACKET;
+
+@@ -134,6 +140,7 @@
+ info->hw_address = _gnetwork_sockaddr_get_address (data->ifa_addr);
+ info->hw_broadcast_or_destination = _gnetwork_sockaddr_get_address (data->ifa_dstaddr);
+ break;
++#endif
+ }
+ }
+
diff --git a/net/libgnetwork/files/patch-libgnetwork_gnetwork-interfaces.h b/net/libgnetwork/files/patch-libgnetwork_gnetwork-interfaces.h
new file mode 100644
index 000000000..77fc35ef6
--- /dev/null
+++ b/net/libgnetwork/files/patch-libgnetwork_gnetwork-interfaces.h
@@ -0,0 +1,44 @@
+--- libgnetwork/gnetwork-interfaces.h.orig Thu Dec 11 21:17:13 2003
++++ libgnetwork/gnetwork-interfaces.h Fri Dec 12 01:42:17 2003
+@@ -23,6 +23,8 @@
+ #define __GNETWORK_INTERFACES_H__
+
+ #include <glib-object.h>
++#include <sys/types.h>
++#include <sys/socket.h>
+ #include <net/if.h>
+
+ G_BEGIN_DECLS
+@@ -45,16 +47,32 @@
+ /* Special Types */
+ GNETWORK_INTERFACE_IS_LOOPBACK = IFF_LOOPBACK,
+ GNETWORK_INTERFACE_IS_POINT_TO_POINT = IFF_POINTOPOINT,
++#ifdef IFF_MASTER
+ GNETWORK_INTERFACE_IS_LOAD_MASTER = IFF_MASTER,
++#endif
++#ifdef IFF_SLAVE
+ GNETWORK_INTERFACE_IS_LOAD_SLAVE = IFF_SLAVE,
++#endif
+
+ /* Capabilities */
+ GNETWORK_INTERFACE_CAN_BROADCAST = IFF_BROADCAST,
+ GNETWORK_INTERFACE_CAN_MULTICAST = IFF_MULTICAST,
++#ifdef IFF_NOTRAILERS
+ GNETWORK_INTERFACE_NO_TRAILERS = IFF_NOTRAILERS,
++#endif
+ GNETWORK_INTERFACE_NO_ARP = IFF_NOARP,
++#ifdef IFF_PORTSEL
+ GNETWORK_INTERFACE_CAN_SET_MEDIA = IFF_PORTSEL,
++#endif
++#ifdef IFF_ALTPHYS
++ GNETWORK_INTERFACE_CAN_MANAGE_ROUTES = IFF_ALTPHYS,
++#endif
++#ifdef IFF_ALTPHYS
++ GNETWORK_INTERFACE_ALT_CONN = IFF_ALTPHYS,
++#endif
++#ifdef IFF_AUTOMEDIA
+ GNETWORK_INTERFACE_AUTOSELECTED_MEDIA = IFF_AUTOMEDIA,
++#endif
+
+ /* Modes */
+ GNETWORK_INTERFACE_RECV_ALL_PACKETS = IFF_PROMISC,
diff --git a/net/libgnetwork/files/patch-libgnetwork_gnetwork-ip-address.c b/net/libgnetwork/files/patch-libgnetwork_gnetwork-ip-address.c
new file mode 100644
index 000000000..2e56b39da
--- /dev/null
+++ b/net/libgnetwork/files/patch-libgnetwork_gnetwork-ip-address.c
@@ -0,0 +1,11 @@
+--- libgnetwork/gnetwork-ip-address.c.orig Thu Dec 11 23:26:37 2003
++++ libgnetwork/gnetwork-ip-address.c Thu Dec 11 23:27:00 2003
+@@ -26,6 +26,8 @@
+ #include "gnetwork-ip-address.h"
+ #include "gnetwork-utils.h"
+
++#include <sys/types.h>
++#include <netinet/in.h>
+ #include <arpa/inet.h>
+ #include <unistd.h>
+ #include <string.h>
diff --git a/net/libgnetwork/files/patch-libgnetwork_gnetwork-ip-multicast.c b/net/libgnetwork/files/patch-libgnetwork_gnetwork-ip-multicast.c
new file mode 100644
index 000000000..8bbaedd8c
--- /dev/null
+++ b/net/libgnetwork/files/patch-libgnetwork_gnetwork-ip-multicast.c
@@ -0,0 +1,13 @@
+--- libgnetwork/gnetwork-ip-multicast.c.orig Thu Dec 11 23:27:11 2003
++++ libgnetwork/gnetwork-ip-multicast.c Thu Dec 11 23:27:32 2003
+@@ -34,8 +34,9 @@
+
+ #include <glib/gi18n.h>
+
+-#include <arpa/inet.h>
+ #include <sys/types.h>
++#include <netinet/in.h>
++#include <arpa/inet.h>
+ #include <sys/socket.h>
+ #include <netinet/in.h>
+ #include <string.h>
diff --git a/net/libgnetwork/files/patch-libgnetwork_gnetwork-tcp-connection.c b/net/libgnetwork/files/patch-libgnetwork_gnetwork-tcp-connection.c
new file mode 100644
index 000000000..6a5cfb5c2
--- /dev/null
+++ b/net/libgnetwork/files/patch-libgnetwork_gnetwork-tcp-connection.c
@@ -0,0 +1,10 @@
+--- libgnetwork/gnetwork-tcp-connection.c.orig Thu Dec 11 23:27:47 2003
++++ libgnetwork/gnetwork-tcp-connection.c Thu Dec 11 23:28:04 2003
+@@ -42,6 +42,7 @@
+ #include <fcntl.h>
+ #include <unistd.h>
+ #include <string.h>
++#include <netinet/in.h>
+ #include <arpa/inet.h>
+ #include <sys/time.h>
+ #include <sys/types.h>
diff --git a/net/libgnetwork/files/patch-libgnetwork_gnetwork-type-builtins.c.template b/net/libgnetwork/files/patch-libgnetwork_gnetwork-type-builtins.c.template
new file mode 100644
index 000000000..6dc201a78
--- /dev/null
+++ b/net/libgnetwork/files/patch-libgnetwork_gnetwork-type-builtins.c.template
@@ -0,0 +1,12 @@
+--- libgnetwork/gnetwork-type-builtins.c.template.orig Fri Dec 12 01:47:18 2003
++++ libgnetwork/gnetwork-type-builtins.c.template Fri Dec 12 01:48:31 2003
+@@ -26,7 +26,9 @@
+
+
+ /*** BEGIN value-production ***/
++#ifdef @VALUENAME@
+ { @VALUENAME@, "@VALUENAME@", "@valuenick@" },
++#endif
+ /*** END value-production ***/
+
+
diff --git a/net/libgnetwork/files/patch-libgnetwork_gnetwork-udp-datagram.c b/net/libgnetwork/files/patch-libgnetwork_gnetwork-udp-datagram.c
new file mode 100644
index 000000000..1a69ce454
--- /dev/null
+++ b/net/libgnetwork/files/patch-libgnetwork_gnetwork-udp-datagram.c
@@ -0,0 +1,38 @@
+--- libgnetwork/gnetwork-udp-datagram.c.orig Thu Dec 11 23:28:22 2003
++++ libgnetwork/gnetwork-udp-datagram.c Thu Dec 11 23:31:01 2003
+@@ -40,6 +40,7 @@
+ #include <errno.h>
+ #include <fcntl.h>
+ #include <unistd.h>
++#include <netinet/in.h>
+ #include <arpa/inet.h>
+ #include <sys/types.h>
+ #include <sys/socket.h>
+@@ -208,8 +209,13 @@
+ sa = g_malloc0 (sa_size);
+
+ errno = 0;
++#ifdef MSG_NOSIGNAL
+ bytes_done = recvfrom (udp->_priv->sockfd, buffer, udp->_priv->buffer_size, MSG_NOSIGNAL,
+ sa, &sa_size);
++#else
++ bytes_done = recvfrom (udp->_priv->sockfd, buffer, udp->_priv->buffer_size, 0,
++ sa, &sa_size);
++#endif
+ en = errno;
+
+ target->hostname = NULL;
+@@ -281,8 +287,13 @@
+ &sa_size);
+
+ errno = 0;
++#ifdef MSG_NOSIGNAL
+ bytes_done = sendto (udp->_priv->sockfd, item->data, item->length, MSG_NOSIGNAL, sa,
+ sa_size);
++#else
++ bytes_done = sendto (udp->_priv->sockfd, item->data, item->length, 0, sa,
++ sa_size);
++#endif
+ en = errno;
+ g_free (sa);
+
diff --git a/net/libgnetwork/files/patch-libgnetwork_gnetwork-utils.c b/net/libgnetwork/files/patch-libgnetwork_gnetwork-utils.c
new file mode 100644
index 000000000..cc91dde25
--- /dev/null
+++ b/net/libgnetwork/files/patch-libgnetwork_gnetwork-utils.c
@@ -0,0 +1,44 @@
+--- libgnetwork/gnetwork-utils.c.orig Thu Dec 11 23:31:20 2003
++++ libgnetwork/gnetwork-utils.c Thu Dec 11 23:32:55 2003
+@@ -30,8 +30,13 @@
+ #include <errno.h>
+
+ #include <net/if.h>
++#ifdef __linux__
+ #include <netpacket/packet.h>
+ #include <netinet/ether.h>
++#else
++#include <net/ethernet.h>
++#endif
++#include <netinet/in.h>
+ #include <arpa/inet.h>
+
+ #include <unistd.h>
+@@ -269,6 +274,7 @@
+ inet_ntop (sock->sa_family, &(((struct sockaddr_in6 *) sock)->sin6_addr), address,
+ INET_ADDRESS_SIZE);
+ break;
++#ifdef AF_PACKET
+ case AF_PACKET:
+ switch (((struct sockaddr_ll *) sock)->sll_halen)
+ {
+@@ -285,6 +291,7 @@
+ break;
+ }
+ break;
++#endif
+ }
+
+ return (address[0] != '\0' ? g_strdup (address) : NULL);
+@@ -335,9 +342,11 @@
+ case AF_INET6:
+ retval = GNETWORK_PROTOCOL_IPv6;
+ break;
++#ifdef AF_PACKET
+ case AF_PACKET:
+ retval = GNETWORK_PROTOCOL_PACKET;
+ break;
++#endif
+ default:
+ break;
+ }
diff --git a/net/libgnetwork/pkg-descr b/net/libgnetwork/pkg-descr
new file mode 100644
index 000000000..2a8487b69
--- /dev/null
+++ b/net/libgnetwork/pkg-descr
@@ -0,0 +1,11 @@
+GNetwork is a networking wrapper written in pure C against the Glib/GObject
+object framework.
+
+The intention here is to provide a useful and easy-to-develop-against sockets
+wrapper for GNOME2 & GTK+ 2.0 programs which require TCP/IP connection
+capabilities. It can be used by programs which do not use GNOME or GTK+
+anyways,however. It is NOT recommended or intended for high-load server
+situations, just user applications which need TCP/IP networking. Proxies are
+supported completely transparently, using the same settings as gnome-vfs.
+
+-- The libgnetwork README
diff --git a/net/libgnetwork/pkg-plist b/net/libgnetwork/pkg-plist
new file mode 100644
index 000000000..d8419bcaa
--- /dev/null
+++ b/net/libgnetwork/pkg-plist
@@ -0,0 +1,55 @@
+etc/gconf/schemas/libgnetwork.schemas
+include/libgnetwork-1.0/libgnetwork/gnetwork-connection.h
+include/libgnetwork-1.0/libgnetwork/gnetwork-datagram.h
+include/libgnetwork-1.0/libgnetwork/gnetwork-dns.h
+include/libgnetwork-1.0/libgnetwork/gnetwork-errors.h
+include/libgnetwork-1.0/libgnetwork/gnetwork-interfaces.h
+include/libgnetwork-1.0/libgnetwork/gnetwork-ip-address.h
+include/libgnetwork-1.0/libgnetwork/gnetwork-ip-multicast.h
+include/libgnetwork-1.0/libgnetwork/gnetwork-macros.h
+include/libgnetwork-1.0/libgnetwork/gnetwork-server.h
+include/libgnetwork-1.0/libgnetwork/gnetwork-ssl.h
+include/libgnetwork-1.0/libgnetwork/gnetwork-tcp-connection.h
+include/libgnetwork-1.0/libgnetwork/gnetwork-tcp-proxy.h
+include/libgnetwork-1.0/libgnetwork/gnetwork-tcp-server.h
+include/libgnetwork-1.0/libgnetwork/gnetwork-threads.h
+include/libgnetwork-1.0/libgnetwork/gnetwork-type-builtins.h
+include/libgnetwork-1.0/libgnetwork/gnetwork-udp-datagram.h
+include/libgnetwork-1.0/libgnetwork/gnetwork-unix-connection.h
+include/libgnetwork-1.0/libgnetwork/gnetwork-unix-server.h
+include/libgnetwork-1.0/libgnetwork/gnetwork.h
+lib/libgnetwork-1.0.a
+lib/libgnetwork-1.0.so
+lib/libgnetwork-1.0.so.0
+libdata/pkgconfig/libgnetwork-1.0.pc
+%%DOCSDIR%%/GNetworkConnection.html
+%%DOCSDIR%%/GNetworkDatagram.html
+%%DOCSDIR%%/GNetworkIpMulticast.html
+%%DOCSDIR%%/GNetworkServer.html
+%%DOCSDIR%%/GNetworkTcpConnection.html
+%%DOCSDIR%%/GNetworkTcpServer.html
+%%DOCSDIR%%/GNetworkUdpDatagram.html
+%%DOCSDIR%%/GNetworkUnixConnection.html
+%%DOCSDIR%%/GNetworkUnixServer.html
+%%DOCSDIR%%/api-reference.html
+%%DOCSDIR%%/compiling.html
+%%DOCSDIR%%/home.png
+%%DOCSDIR%%/index.html
+%%DOCSDIR%%/index.sgml
+%%DOCSDIR%%/introduction.html
+%%DOCSDIR%%/left.png
+%%DOCSDIR%%/libgnetwork-DNS-Lookups.html
+%%DOCSDIR%%/libgnetwork-Error-Reporting.html
+%%DOCSDIR%%/libgnetwork-IP-Addresses.html
+%%DOCSDIR%%/libgnetwork-Local-Interfaces.html
+%%DOCSDIR%%/libgnetwork-Proxy-Support.html
+%%DOCSDIR%%/libgnetwork-SSL-Certificates.html
+%%DOCSDIR%%/libgnetwork-Thread-Support.html
+%%DOCSDIR%%/libgnetwork.devhelp
+%%DOCSDIR%%/low-level-api.html
+%%DOCSDIR%%/right.png
+%%DOCSDIR%%/tutorials.html
+%%DOCSDIR%%/up.png
+@dirrm %%DOCSDIR%%
+@dirrm include/libgnetwork-1.0/libgnetwork
+@dirrm include/libgnetwork-1.0