diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/Makefile | 1 | ||||
-rw-r--r-- | net/rabbitmq-c/Makefile | 73 | ||||
-rw-r--r-- | net/rabbitmq-c/distinfo | 6 | ||||
-rw-r--r-- | net/rabbitmq-c/files/patch-configure.ac | 11 | ||||
-rw-r--r-- | net/rabbitmq-c/files/patch-tools_common.c | 57 | ||||
-rw-r--r-- | net/rabbitmq-c/pkg-descr | 9 | ||||
-rw-r--r-- | net/rabbitmq-c/pkg-plist | 17 |
7 files changed, 174 insertions, 0 deletions
diff --git a/net/Makefile b/net/Makefile index 4a87f7081857..f67baffd3e55 100644 --- a/net/Makefile +++ b/net/Makefile @@ -861,6 +861,7 @@ SUBDIR += queso SUBDIR += quoted SUBDIR += rabbitmq + SUBDIR += rabbitmq-c SUBDIR += raddump SUBDIR += radiator SUBDIR += radiusclient diff --git a/net/rabbitmq-c/Makefile b/net/rabbitmq-c/Makefile new file mode 100644 index 000000000000..6d4a8b5a4ada --- /dev/null +++ b/net/rabbitmq-c/Makefile @@ -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> diff --git a/net/rabbitmq-c/distinfo b/net/rabbitmq-c/distinfo new file mode 100644 index 000000000000..84d0f103e822 --- /dev/null +++ b/net/rabbitmq-c/distinfo @@ -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 diff --git a/net/rabbitmq-c/files/patch-configure.ac b/net/rabbitmq-c/files/patch-configure.ac new file mode 100644 index 000000000000..1a70179606d9 --- /dev/null +++ b/net/rabbitmq-c/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/files/patch-tools_common.c b/net/rabbitmq-c/files/patch-tools_common.c new file mode 100644 index 000000000000..99406bae52a4 --- /dev/null +++ b/net/rabbitmq-c/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/pkg-descr b/net/rabbitmq-c/pkg-descr new file mode 100644 index 000000000000..26956d157f16 --- /dev/null +++ b/net/rabbitmq-c/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-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 diff --git a/net/rabbitmq-c/pkg-plist b/net/rabbitmq-c/pkg-plist new file mode 100644 index 000000000000..01c463d93e5a --- /dev/null +++ b/net/rabbitmq-c/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 |