aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorjacula <jacula@FreeBSD.org>2010-06-10 02:21:20 +0800
committerjacula <jacula@FreeBSD.org>2010-06-10 02:21:20 +0800
commit3426224c575fc93729e28a7c62dc69285a0cd433 (patch)
treeafe2f20ae9b0f963c360b410f2ed71bb41640c9e /net
parent5f6885346de43bfdaa4803b6015f16bcb4268529 (diff)
downloadfreebsd-ports-gnome-3426224c575fc93729e28a7c62dc69285a0cd433.tar.gz
freebsd-ports-gnome-3426224c575fc93729e28a7c62dc69285a0cd433.tar.zst
freebsd-ports-gnome-3426224c575fc93729e28a7c62dc69285a0cd433.zip
This is a C-language AMQP client library for use with AMQP servers
speaking protocol versions 0-8 and 0-9-1. This port only speaks the 0-9-1 protocol version, for 0-8 use net/rabbitmq-c. - <http://www.rabbitmq.com/> - <http://www.amqp.org/> - <http://hg.rabbitmq.com/rabbitmq-c> WWW: http://hg.rabbitmq.com/rabbitmq-c PR: ports/145260 Submitted by: Geoff Garside <rabbitmq@geoffgarside.co.uk> Approved by: pgj (mentor)
Diffstat (limited to 'net')
-rw-r--r--net/Makefile1
-rw-r--r--net/rabbitmq-c-devel/Makefile74
-rw-r--r--net/rabbitmq-c-devel/distinfo6
-rw-r--r--net/rabbitmq-c-devel/files/patch-configure.ac11
-rw-r--r--net/rabbitmq-c-devel/files/patch-tools_common.c57
-rw-r--r--net/rabbitmq-c-devel/pkg-descr9
-rw-r--r--net/rabbitmq-c-devel/pkg-plist17
7 files changed, 175 insertions, 0 deletions
diff --git a/net/Makefile b/net/Makefile
index f67baffd3e55..d48beb7eda2a 100644
--- a/net/Makefile
+++ b/net/Makefile
@@ -862,6 +862,7 @@
SUBDIR += quoted
SUBDIR += rabbitmq
SUBDIR += rabbitmq-c
+ SUBDIR += rabbitmq-c-devel
SUBDIR += raddump
SUBDIR += radiator
SUBDIR += radiusclient
diff --git a/net/rabbitmq-c-devel/Makefile b/net/rabbitmq-c-devel/Makefile
new file mode 100644
index 000000000000..a0b2f749dd4a
--- /dev/null
+++ b/net/rabbitmq-c-devel/Makefile
@@ -0,0 +1,74 @@
+# New ports collection makefile for: rabbitmq-c-devel
+# Date created: 31 March 2010
+# Whom: Geoff Garside
+#
+# $FreeBSD$
+#
+
+PORTNAME= rabbitmq-c
+PORTVERSION= 0.0.1
+CATEGORIES= net
+MASTER_SITES= http://hg.rabbitmq.com/rabbitmq-c/archive/:c \
+ http://hg.rabbitmq.com/rabbitmq-codegen/archive/:codegen
+PKGNAMESUFFIX= -devel
+DISTNAME= ${PORTNAME}-17b9fb0d63d3
+DISTFILES= 17b9fb0d63d3.tar.bz2:c \
+ fc46914f99b7.tar.bz2:codegen
+DIST_SUBDIR= rabbitmq
+
+MAINTAINER= rabbitmq@geoffgarside.co.uk
+COMMENT= RabbitMQ C AMQP client library
+
+BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}simplejson>=2.0:${PORTSDIR}/devel/py-simplejson
+
+CONFLICTS= rabbitmq-c-[0-9]*
+
+USE_BZIP2= YES
+USE_GMAKE= YES
+USE_PYTHON= YES
+USE_LDCONFIG= YES
+GNU_CONFIGURE= YES
+USE_AUTOTOOLS= aclocal:110 autoconf:262 automake:110 autoheader:262 libtool:22
+AUTOMAKE_ARGS= -i --add-missing
+ACLOCAL_ARGS= -I . -I ${LOCALBASE}/share/aclocal
+
+LICENSE= GPLv2 MPL
+LICENSE_COMB= dual
+LICENSE_FILE_MPL= ${WRKSRC}/LICENSE-GPL-2.0
+LICENSE_FILE_GPLv2= ${WRKSRC}/LICENSE-MPL-RabbitMQ
+
+OPTIONS= 64BIT "Produce 64-bit library" Off \
+ POPT "Popt support in tools" Off
+
+.include <bsd.port.options.mk>
+
+.if defined(WITH_64BIT)
+ONLY_FOR_ARCHS= amd64 sparc64 powerpc
+ONLY_FOR_ARCHS_REASON= WITH_64BIT is set
+CONFIGURE_ARGS+= --enable-64-bit
+.endif
+
+.if defined(WITH_POPT)
+LIB_DEPENDS+= popt.0:${PORTSDIR}/devel/popt
+CFLAGS+= -I${LOCALBASE}/include
+LDFLAGS+= -L${LOCALBASE}/lib
+CONFIGURE_ENV+= CFLAGS="${CFLAGS}" \
+ LDFLAGS="${LDFLAGS}"
+
+PLIST_SUB+= POPT=''
+CONFIGURE_ARGS+= --with-popt
+.else
+PLIST_SUB+= POPT='@comment '
+CONFIGURE_ARGS+= --without-popt
+.endif
+
+post-patch:
+ @${REINPLACE_CMD} -e 's|rabbitmq-codegen|rabbitmq-codegen-fc46914f99b7|g' ${WRKSRC}/configure.ac
+
+pre-configure:
+ @(cd ${CONFIGURE_WRKSRC} && ${SETENV} ${AUTOTOOLS_ENV} ${LIBTOOLIZE})
+
+post-install:
+ ${STRIP_CMD} ${PREFIX}/lib/librabbitmq.so.0
+
+.include <bsd.port.mk>
diff --git a/net/rabbitmq-c-devel/distinfo b/net/rabbitmq-c-devel/distinfo
new file mode 100644
index 000000000000..7c7c445da40f
--- /dev/null
+++ b/net/rabbitmq-c-devel/distinfo
@@ -0,0 +1,6 @@
+MD5 (rabbitmq/17b9fb0d63d3.tar.bz2) = 0d945fef34d4060f19d12de4b2f2f8a8
+SHA256 (rabbitmq/17b9fb0d63d3.tar.bz2) = 833147be1a7b92d493debad970620e640a6d3bc65351b2cb829f9ccf2fc047dd
+SIZE (rabbitmq/17b9fb0d63d3.tar.bz2) = 47586
+MD5 (rabbitmq/fc46914f99b7.tar.bz2) = 09e6b9df787c6faa97016bca3a27bbb6
+SHA256 (rabbitmq/fc46914f99b7.tar.bz2) = 8182a38d4cee90b6985a051c053a4cb6ae0124323b45850f5c8ba888e63b25e7
+SIZE (rabbitmq/fc46914f99b7.tar.bz2) = 14068
diff --git a/net/rabbitmq-c-devel/files/patch-configure.ac b/net/rabbitmq-c-devel/files/patch-configure.ac
new file mode 100644
index 000000000000..1a70179606d9
--- /dev/null
+++ b/net/rabbitmq-c-devel/files/patch-configure.ac
@@ -0,0 +1,11 @@
+--- ./configure.ac.orig 2010-06-01 13:14:11.154116974 +0200
++++ ./configure.ac 2010-06-01 13:14:11.263184468 +0200
+@@ -14,6 +14,8 @@
+ dnl Header-file checks
+ AC_HEADER_STDC
+
++AC_CHECK_HEADERS([spawn.h])
++
+ dnl Only use -Wall if we have gcc
+ if test "x$GCC" = "xyes"; then
+ if test -z "`echo "$CFLAGS" | grep "\-Wall" 2> /dev/null`" ; then
diff --git a/net/rabbitmq-c-devel/files/patch-tools_common.c b/net/rabbitmq-c-devel/files/patch-tools_common.c
new file mode 100644
index 000000000000..99406bae52a4
--- /dev/null
+++ b/net/rabbitmq-c-devel/files/patch-tools_common.c
@@ -0,0 +1,57 @@
+--- ./tools/common.c.orig 2010-03-31 03:28:20.000000000 +0200
++++ ./tools/common.c 2010-06-01 13:26:57.576932723 +0200
+@@ -58,7 +58,9 @@
+ #include <unistd.h>
+ #include <fcntl.h>
+ #include <errno.h>
++#ifdef HAVE_SPAWN_H
+ #include <spawn.h>
++#endif
+ #include <sys/wait.h>
+
+ #include <popt.h>
+@@ -327,6 +329,7 @@
+ }
+ }
+
++#ifdef HAVE_SPAWN_H
+ void pipeline(const char * const *argv, struct pipeline *pl)
+ {
+ posix_spawn_file_actions_t file_acts;
+@@ -356,6 +359,36 @@
+
+ pl->infd = pipefds[1];
+ }
++#else
++void pipeline(const char * const *argv, struct pipeline *pl)
++{
++ int pipefds[2];
++ if (pipe(pipefds))
++ die_errno(errno, "pipe");
++
++ pl->pid = fork();
++
++ if (pl->pid == -1)
++ die_errno(errno, "fork: %s", argv[0]);
++ else
++ if (pl->pid == 0) {
++ if (dup2(pipefds[0], 0))
++ die_errno(errno, "dup2()");
++ if (close(pipefds[0]))
++ die_errno(errno, "close()");
++ if (close(pipefds[1]))
++ die_errno(errno, "close()");
++ execvp(argv[0], argv);
++ die_errno(errno, "execvp()");
++ }
++ else {
++ if (close(pipefds[0]))
++ die_errno(errno, "close");
++ }
++
++ pl->infd = pipefds[1];
++}
++#endif
+
+ int finish_pipeline(struct pipeline *pl)
+ {
diff --git a/net/rabbitmq-c-devel/pkg-descr b/net/rabbitmq-c-devel/pkg-descr
new file mode 100644
index 000000000000..f16c7751ac7b
--- /dev/null
+++ b/net/rabbitmq-c-devel/pkg-descr
@@ -0,0 +1,9 @@
+This is a C-language AMQP client library for use with AMQP servers
+speaking protocol versions 0-8 and 0-9-1. This port only speaks the
+0-9-1 protocol version, for 0-8 use net/rabbitmq-c.
+
+ - <http://www.rabbitmq.com/>
+ - <http://www.amqp.org/>
+ - <http://hg.rabbitmq.com/rabbitmq-c>
+
+WWW: http://hg.rabbitmq.com/rabbitmq-c
diff --git a/net/rabbitmq-c-devel/pkg-plist b/net/rabbitmq-c-devel/pkg-plist
new file mode 100644
index 000000000000..01c463d93e5a
--- /dev/null
+++ b/net/rabbitmq-c-devel/pkg-plist
@@ -0,0 +1,17 @@
+%%POPT%%bin/amqp-consume
+%%POPT%%bin/amqp-get
+%%POPT%%bin/amqp-publish
+bin/amqp_bind
+bin/amqp_consumer
+bin/amqp_exchange_declare
+bin/amqp_listen
+bin/amqp_listenq
+bin/amqp_producer
+bin/amqp_sendstring
+bin/amqp_unbind
+include/amqp.h
+include/amqp_framing.h
+lib/librabbitmq.a
+lib/librabbitmq.la
+lib/librabbitmq.so
+lib/librabbitmq.so.0