Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 1 Dec 2011 21:55:02 GMT
From:      Grzegorz Blach <magik@roorback.net>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/163004: databases/redis: Fixed build on i386
Message-ID:  <201112012155.pB1Lt2VI037330@red.freebsd.org>
Resent-Message-ID: <201112012200.pB1M0Wpa017436@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         163004
>Category:       ports
>Synopsis:       databases/redis: Fixed build on i386
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Thu Dec 01 22:00:31 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator:     Grzegorz Blach
>Release:        9.0-RC2 amd64
>Organization:
>Environment:
FreeBSD silver.nine 9.0-RC2 FreeBSD 9.0-RC2 #2: Wed Nov  9 21:17:39 CET 2011     root@silver.nine:/usr/obj/usr/src/sys/SILVER  amd64

>Description:
Patch extra-patch-src::redis.c fixes building on amd64 platform, but unfortunately broke building on i386, so this patch should be applied conditionally, only on amd64.

>How-To-Repeat:
Try build databases/redis-2.4.4_1 on i386 platform

>Fix:


Patch attached with submission follows:

diff -ruN databases/redis/Makefile databases/redis/Makefile
--- databases/redis/Makefile	2011-11-30 13:46:19.000000000 +0100
+++ databases/redis/Makefile	2011-12-01 20:56:38.166112312 +0100
@@ -7,7 +7,7 @@
 
 PORTNAME=	redis
 PORTVERSION=	2.4.4
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	databases
 MASTER_SITES=	GOOGLE_CODE
 
@@ -48,6 +48,13 @@
 	REDIS_DBDIR=${REDIS_DBDIR} \
 	REDIS_RUNDIR=${REDIS_RUNDIR}
 
+.include <bsd.port.pre.mk>
+
+post-patch:
+.if ${ARCH} == amd64
+	@${PATCH} -d ${WRKSRC} < files/extra-patch-src::redis.c
+.endif
+
 post-build:
 	${SED} ${SUB_LIST:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \
 		${WRKSRC}/redis.conf > ${WRKDIR}/redis.conf
@@ -61,4 +68,4 @@
 	[ -d ${d} ] || ${MKDIR} ${d} && ${CHOWN} ${USERS}:${GROUPS} ${d}
 .endfor
 
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff -ruN databases/redis/files/extra-patch-src::redis.c databases/redis/files/extra-patch-src::redis.c
--- databases/redis/files/extra-patch-src::redis.c	1970-01-01 01:00:00.000000000 +0100
+++ databases/redis/files/extra-patch-src::redis.c	2011-12-01 20:43:08.132116792 +0100
@@ -0,0 +1,11 @@
+--- src/redis.c.orig	2011-11-30 16:29:38.000000000 +0400
++++ src/redis.c	2011-11-30 16:29:59.000000000 +0400
+@@ -1685,7 +1685,7 @@
+ #ifdef HAVE_BACKTRACE
+ static void *getMcontextEip(ucontext_t *uc) {
+ #if defined(__FreeBSD__)
+-    return (void*) uc->uc_mcontext.mc_eip;
++    return (void*) uc->uc_mcontext.mc_rip;
+ #elif defined(__dietlibc__)
+     return (void*) uc->uc_mcontext.eip;
+ #elif defined(__APPLE__) && !defined(MAC_OS_X_VERSION_10_6)
diff -ruN databases/redis/files/patch-src::redis.c databases/redis/files/patch-src::redis.c
--- databases/redis/files/patch-src::redis.c	2011-11-30 13:46:19.000000000 +0100
+++ databases/redis/files/patch-src::redis.c	1970-01-01 01:00:00.000000000 +0100
@@ -1,11 +0,0 @@
---- src/redis.c.orig	2011-11-30 16:29:38.000000000 +0400
-+++ src/redis.c	2011-11-30 16:29:59.000000000 +0400
-@@ -1685,7 +1685,7 @@
- #ifdef HAVE_BACKTRACE
- static void *getMcontextEip(ucontext_t *uc) {
- #if defined(__FreeBSD__)
--    return (void*) uc->uc_mcontext.mc_eip;
-+    return (void*) uc->uc_mcontext.mc_rip;
- #elif defined(__dietlibc__)
-     return (void*) uc->uc_mcontext.eip;
- #elif defined(__APPLE__) && !defined(MAC_OS_X_VERSION_10_6)


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201112012155.pB1Lt2VI037330>