View | Details | Raw Unified | Return to bug 160824 | Differences between
and this patch

Collapse All | Expand All

(-)./Makefile (-5 / +5 lines)
Lines 7-20 Link Here
7
7
8
PORTNAME=	rabbitmq-c
8
PORTNAME=	rabbitmq-c
9
PORTVERSION=	0.0.1
9
PORTVERSION=	0.0.1
10
PORTREVISION=	1
10
PORTREVISION=	2
11
CATEGORIES=	net
11
CATEGORIES=	net
12
MASTER_SITES=	http://hg.rabbitmq.com/rabbitmq-c/archive/:c \
12
MASTER_SITES=	http://hg.rabbitmq.com/rabbitmq-c/archive/:c \
13
		http://hg.rabbitmq.com/rabbitmq-codegen/archive/:codegen
13
		http://hg.rabbitmq.com/rabbitmq-codegen/archive/:codegen
14
PKGNAMESUFFIX=	-devel
14
PKGNAMESUFFIX=	-devel
15
DISTNAME=	${PORTNAME}-17b9fb0d63d3
15
DISTNAME=	${PORTNAME}-cbeb2f3c3e6d
16
DISTFILES=	17b9fb0d63d3.tar.bz2:c \
16
DISTFILES=	cbeb2f3c3e6d.tar.bz2:c \
17
		fc46914f99b7.tar.bz2:codegen
17
		df43f2bfcf0e.tar.bz2:codegen
18
DIST_SUBDIR=	rabbitmq
18
DIST_SUBDIR=	rabbitmq
19
19
20
MAINTAINER=	rabbitmq@geoffgarside.co.uk
20
MAINTAINER=	rabbitmq@geoffgarside.co.uk
Lines 62-68 Link Here
62
.endif
62
.endif
63
63
64
post-patch:
64
post-patch:
65
	@${REINPLACE_CMD} -e 's|rabbitmq-codegen|rabbitmq-codegen-fc46914f99b7|g' ${WRKSRC}/configure.ac
65
	@${REINPLACE_CMD} -e 's|rabbitmq-codegen|rabbitmq-codegen-df43f2bfcf0e|g' ${WRKSRC}/configure.ac
66
66
67
pre-configure:
67
pre-configure:
68
	@(cd ${CONFIGURE_WRKSRC} && ${SETENV} ${AUTOTOOLS_ENV} ${LIBTOOLIZE})
68
	@(cd ${CONFIGURE_WRKSRC} && ${SETENV} ${AUTOTOOLS_ENV} ${LIBTOOLIZE})
(-)./distinfo (-4 / +4 lines)
Lines 1-4 Link Here
1
SHA256 (rabbitmq/17b9fb0d63d3.tar.bz2) = 833147be1a7b92d493debad970620e640a6d3bc65351b2cb829f9ccf2fc047dd
1
SHA256 (rabbitmq/cbeb2f3c3e6d.tar.bz2) = de42ec3dfb9a68c8817e2b1065a87b7d03f22f5b8e20baf8324408a3224cb528
2
SIZE (rabbitmq/17b9fb0d63d3.tar.bz2) = 47586
2
SIZE (rabbitmq/cbeb2f3c3e6d.tar.bz2) = 62299
3
SHA256 (rabbitmq/fc46914f99b7.tar.bz2) = 8182a38d4cee90b6985a051c053a4cb6ae0124323b45850f5c8ba888e63b25e7
3
SHA256 (rabbitmq/df43f2bfcf0e.tar.bz2) = 96f85c564ddf69c564e62392c61d6f193fca0956fea6baf34ed6e6ef4257e229
4
SIZE (rabbitmq/fc46914f99b7.tar.bz2) = 14068
4
SIZE (rabbitmq/df43f2bfcf0e.tar.bz2) = 17368
(-)./files/patch-configure.ac (-7 / +6 lines)
Lines 1-11 Link Here
1
--- ./configure.ac.orig	2010-06-01 13:14:11.154116974 +0200
1
--- configure.ac.orig	2011-09-06 09:43:42.000000000 +0100
2
+++ ./configure.ac	2010-06-01 13:14:11.263184468 +0200
2
+++ configure.ac	2011-11-17 15:12:38.567082237 +0000
3
@@ -14,6 +14,8 @@
3
@@ -14,6 +14,7 @@
4
 
4
 dnl Header-file checks
5
 dnl Header-file checks
5
 AC_HEADER_STDC
6
 AC_HEADER_STDC
6
 
7
+AC_CHECK_HEADERS([spawn.h])
7
+AC_CHECK_HEADERS([spawn.h])
8
+
8
 
9
 dnl Only use -Wall if we have gcc
10
 if test "x$GCC" = "xyes"; then
9
 if test "x$GCC" = "xyes"; then
11
   if test -z "`echo "$CFLAGS" | grep "\-Wall" 2> /dev/null`" ; then
10
   dnl Only use -Wall if we have gcc
(-)./files/patch-tools_common.c (-57 lines)
Lines 1-57 Link Here
1
--- ./tools/common.c.orig	2010-03-31 03:28:20.000000000 +0200
2
+++ ./tools/common.c	2010-06-01 13:26:57.576932723 +0200
3
@@ -58,7 +58,9 @@
4
 #include <unistd.h>
5
 #include <fcntl.h>
6
 #include <errno.h>
7
+#ifdef HAVE_SPAWN_H
8
 #include <spawn.h>
9
+#endif
10
 #include <sys/wait.h>
11
 
12
 #include <popt.h>
13
@@ -327,6 +329,7 @@
14
 	}
15
 }
16
 
17
+#ifdef HAVE_SPAWN_H
18
 void pipeline(const char * const *argv, struct pipeline *pl)
19
 {
20
 	posix_spawn_file_actions_t file_acts;
21
@@ -356,6 +359,36 @@
22
 
23
 	pl->infd = pipefds[1];
24
 }
25
+#else
26
+void pipeline(const char * const *argv, struct pipeline *pl)
27
+{
28
+	int pipefds[2];
29
+	if (pipe(pipefds))
30
+		die_errno(errno, "pipe");
31
+
32
+	pl->pid = fork();
33
+
34
+	if (pl->pid == -1)
35
+		die_errno(errno, "fork: %s", argv[0]);
36
+	else
37
+	if (pl->pid == 0) {
38
+		if (dup2(pipefds[0], 0))
39
+			die_errno(errno, "dup2()");
40
+		if (close(pipefds[0]))
41
+			die_errno(errno, "close()");
42
+		if (close(pipefds[1]))
43
+			die_errno(errno, "close()");
44
+		execvp(argv[0], argv);
45
+		die_errno(errno, "execvp()");
46
+	}
47
+	else {
48
+		if (close(pipefds[0]))
49
+			die_errno(errno, "close");
50
+	}
51
+
52
+	pl->infd = pipefds[1];
53
+}
54
+#endif
55
 
56
 int finish_pipeline(struct pipeline *pl)
57
 {
(-)./files/patch-tools_unix_process.c (+57 lines)
Line 0 Link Here
1
--- ./tools/unix/process.c.orig	2011-09-06 09:43:42.000000000 +0100
2
+++ ./tools/unix/process.c	2011-11-17 15:30:00.000000000 +0000
3
@@ -38,7 +38,9 @@
4
 
5
 #include <unistd.h>
6
 #include <errno.h>
7
+#ifdef HAVE_SPAWN_H
8
 #include <spawn.h>
9
+#endif
10
 #include <sys/wait.h>
11
 
12
 #include "common.h"
13
@@ -46,6 +48,7 @@
14
 
15
 extern char **environ;
16
 
17
+#ifdef HAVE_SPAWN_H
18
 void pipeline(const char *const *argv, struct pipeline *pl)
19
 {
20
 	posix_spawn_file_actions_t file_acts;
21
@@ -75,6 +78,36 @@
22
 
23
 	pl->infd = pipefds[1];
24
 }
25
+#else
26
+void pipeline(const char * const *argv, struct pipeline *pl)
27
+{
28
+       int pipefds[2];
29
+       if (pipe(pipefds))
30
+               die_errno(errno, "pipe");
31
+
32
+       pl->pid = fork();
33
+
34
+       if (pl->pid == -1)
35
+               die_errno(errno, "fork: %s", argv[0]);
36
+       else
37
+       if (pl->pid == 0) {
38
+               if (dup2(pipefds[0], 0))
39
+                       die_errno(errno, "dup2()");
40
+               if (close(pipefds[0]))
41
+                       die_errno(errno, "close()");
42
+               if (close(pipefds[1]))
43
+                       die_errno(errno, "close()");
44
+               execvp(argv[0], argv);
45
+               die_errno(errno, "execvp()");
46
+       }
47
+       else {
48
+               if (close(pipefds[0]))
49
+                       die_errno(errno, "close");
50
+       }
51
+
52
+       pl->infd = pipefds[1];
53
+}
54
+#endif
55
 
56
 int finish_pipeline(struct pipeline *pl)
57
 {
(-)./pkg-plist (-8 / +2 lines)
Lines 1-14 Link Here
1
%%POPT%%bin/amqp-consume
1
%%POPT%%bin/amqp-consume
2
%%POPT%%bin/amqp-declare-queue
3
%%POPT%%bin/amqp-delete-queue
2
%%POPT%%bin/amqp-get
4
%%POPT%%bin/amqp-get
3
%%POPT%%bin/amqp-publish
5
%%POPT%%bin/amqp-publish
4
bin/amqp_bind
5
bin/amqp_consumer
6
bin/amqp_exchange_declare
7
bin/amqp_listen
8
bin/amqp_listenq
9
bin/amqp_producer
10
bin/amqp_sendstring
11
bin/amqp_unbind
12
include/amqp.h
6
include/amqp.h
13
include/amqp_framing.h
7
include/amqp_framing.h
14
lib/librabbitmq.a
8
lib/librabbitmq.a

Return to bug 160824