Update to changeset cbeb2f3c3e6d

PR:		ports/160824
Submitted by:	Jui-Nan Lin <jnlin@csie.nctu.edu.tw>
Approved by:	maintainer (with his improvements)
Feature safe:	yes
This commit is contained in:
Pawel Pekala 2011-11-17 20:12:28 +00:00
parent ac8373f8ea
commit 779d878432
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=285979
6 changed files with 74 additions and 81 deletions

View File

@ -7,14 +7,14 @@
PORTNAME= rabbitmq-c
PORTVERSION= 0.0.1
PORTREVISION= 1
PORTREVISION= 2
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
DISTNAME= ${PORTNAME}-cbeb2f3c3e6d
DISTFILES= cbeb2f3c3e6d.tar.bz2:c \
df43f2bfcf0e.tar.bz2:codegen
DIST_SUBDIR= rabbitmq
MAINTAINER= rabbitmq@geoffgarside.co.uk
@ -62,7 +62,7 @@ CONFIGURE_ARGS+= --without-popt
.endif
post-patch:
@${REINPLACE_CMD} -e 's|rabbitmq-codegen|rabbitmq-codegen-fc46914f99b7|g' ${WRKSRC}/configure.ac
@${REINPLACE_CMD} -e 's|rabbitmq-codegen|rabbitmq-codegen-df43f2bfcf0e|g' ${WRKSRC}/configure.ac
pre-configure:
@(cd ${CONFIGURE_WRKSRC} && ${SETENV} ${AUTOTOOLS_ENV} ${LIBTOOLIZE})

View File

@ -1,4 +1,4 @@
SHA256 (rabbitmq/17b9fb0d63d3.tar.bz2) = 833147be1a7b92d493debad970620e640a6d3bc65351b2cb829f9ccf2fc047dd
SIZE (rabbitmq/17b9fb0d63d3.tar.bz2) = 47586
SHA256 (rabbitmq/fc46914f99b7.tar.bz2) = 8182a38d4cee90b6985a051c053a4cb6ae0124323b45850f5c8ba888e63b25e7
SIZE (rabbitmq/fc46914f99b7.tar.bz2) = 14068
SHA256 (rabbitmq/cbeb2f3c3e6d.tar.bz2) = de42ec3dfb9a68c8817e2b1065a87b7d03f22f5b8e20baf8324408a3224cb528
SIZE (rabbitmq/cbeb2f3c3e6d.tar.bz2) = 62299
SHA256 (rabbitmq/df43f2bfcf0e.tar.bz2) = 96f85c564ddf69c564e62392c61d6f193fca0956fea6baf34ed6e6ef4257e229
SIZE (rabbitmq/df43f2bfcf0e.tar.bz2) = 17368

View File

@ -1,11 +1,10 @@
--- ./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 @@
--- configure.ac.orig 2011-09-06 09:43:42.000000000 +0100
+++ configure.ac 2011-11-17 15:12:38.567082237 +0000
@@ -14,6 +14,7 @@
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
dnl Only use -Wall if we have gcc

View File

@ -1,57 +0,0 @@
--- ./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)
{

View File

@ -0,0 +1,57 @@
--- ./tools/unix/process.c.orig 2011-09-06 09:43:42.000000000 +0100
+++ ./tools/unix/process.c 2011-11-17 15:30:00.000000000 +0000
@@ -38,7 +38,9 @@
#include <unistd.h>
#include <errno.h>
+#ifdef HAVE_SPAWN_H
#include <spawn.h>
+#endif
#include <sys/wait.h>
#include "common.h"
@@ -46,6 +48,7 @@
extern char **environ;
+#ifdef HAVE_SPAWN_H
void pipeline(const char *const *argv, struct pipeline *pl)
{
posix_spawn_file_actions_t file_acts;
@@ -75,6 +78,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)
{

View File

@ -1,14 +1,8 @@
%%POPT%%bin/amqp-consume
%%POPT%%bin/amqp-declare-queue
%%POPT%%bin/amqp-delete-queue
%%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