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-8 protocol version, for 0-9-1 use net/rabbitmq-c-devel.

 - <http://www.rabbitmq.com/>
 - <http://www.amqp.org/>
 - <http://hg.rabbitmq.com/rabbitmq-c>

WWW: http://hg.rabbitmq.com/rabbitmq-c

PR:		ports/145242
Submitted by:	Geoff Garside <rabbitmq@geoffgarside.co.uk>
Approved by:	pgj (mentor)
This commit is contained in:
Giuseppe Pilichi 2010-06-09 18:03:54 +00:00
parent 0c5958468d
commit d99d82e7ed
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=256218
7 changed files with 174 additions and 0 deletions

View file

@ -861,6 +861,7 @@
SUBDIR += queso
SUBDIR += quoted
SUBDIR += rabbitmq
SUBDIR += rabbitmq-c
SUBDIR += raddump
SUBDIR += radiator
SUBDIR += radiusclient

73
net/rabbitmq-c/Makefile Normal file
View file

@ -0,0 +1,73 @@
# New ports collection makefile for: rabbitmq-c
# 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
DISTNAME= ${PORTNAME}-4e789c776a45
DISTFILES= 4e789c776a45.tar.bz2:c \
821f5ee7b040.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-devel-[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-821f5ee7b040|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>

6
net/rabbitmq-c/distinfo Normal file
View file

@ -0,0 +1,6 @@
MD5 (rabbitmq/4e789c776a45.tar.bz2) = fb4d3a6b1e23c2c1a3cbcf066f57273e
SHA256 (rabbitmq/4e789c776a45.tar.bz2) = 17da5bc8597b9be66e1208c47f068c4aea4dbdef55c0f774586224cc7e755a4f
SIZE (rabbitmq/4e789c776a45.tar.bz2) = 47470
MD5 (rabbitmq/821f5ee7b040.tar.bz2) = c1b36ea13f83943d4d661b6ad71972b0
SHA256 (rabbitmq/821f5ee7b040.tar.bz2) = f7eb8f69f3b3e3a176d77d1fc6d228a10ce58be6d7ed420ba9946720b4155344
SIZE (rabbitmq/821f5ee7b040.tar.bz2) = 13229

View file

@ -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

View file

@ -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)
{

9
net/rabbitmq-c/pkg-descr Normal file
View file

@ -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-8 protocol version, for 0-9-1 use net/rabbitmq-c-devel.
- <http://www.rabbitmq.com/>
- <http://www.amqp.org/>
- <http://hg.rabbitmq.com/rabbitmq-c>
WWW: http://hg.rabbitmq.com/rabbitmq-c

17
net/rabbitmq-c/pkg-plist Normal file
View file

@ -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