Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 4 Oct 2012 19:51:34 +0000 (UTC)
From:      Greg Larkin <glarkin@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r305277 - in head: . devel/gearmand devel/gearmand/files devel/p5-Gearman-Server devel/p5-Gearman-XS
Message-ID:  <201210041951.q94JpYrD014499@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: glarkin
Date: Thu Oct  4 19:51:33 2012
New Revision: 305277
URL: http://svn.freebsd.org/changeset/ports/305277

Log:
  [devel/gearmand]:
    - Updated to 0.39
    - Added gearmand entries to UIDs and GIDs
    - Registered conflict with devel/p5-Gearman-Server (conflicting rc.d scripts)
    - Add patch to fix build with GCC < 4.4
    - Cleaned up rc.d script
    - Converted to OptionsNG
  
  [devel/p5-Gearman-Server]:
    - Registered conflict with devel/gearmand (conflicting rc.d scripts)
  
  [devel/p5-Gearman-XS]:
    - Removed explicit LIB_DEPENDS library version number
    - Bumped PORTREVISION
  
  PR:		ports/171593 (based on)
  Submitted by:	Gasol Wu <gasol.wu@gmail.com>

Added:
  head/devel/gearmand/files/patch-libgearman-server__plugins__queue__redis__queue.cc   (contents, props changed)
  head/devel/gearmand/files/patch-libgearman-server__server.cc   (contents, props changed)
Modified:
  head/GIDs
  head/UIDs
  head/devel/gearmand/Makefile
  head/devel/gearmand/distinfo
  head/devel/gearmand/files/gearmand.in
  head/devel/gearmand/files/patch-configure
  head/devel/gearmand/pkg-plist   (contents, props changed)
  head/devel/p5-Gearman-Server/Makefile
  head/devel/p5-Gearman-XS/Makefile

Modified: head/GIDs
==============================================================================
--- head/GIDs	Thu Oct  4 19:40:39 2012	(r305276)
+++ head/GIDs	Thu Oct  4 19:51:33 2012	(r305277)
@@ -240,5 +240,6 @@ razorback:*:957:
 gnunet:*:958:
 c_icap:*:959:
 trytond:*:960:
+gearmand:*:961:
 nogroup:*:65533:
 nobody:*:65534:

Modified: head/UIDs
==============================================================================
--- head/UIDs	Thu Oct  4 19:40:39 2012	(r305276)
+++ head/UIDs	Thu Oct  4 19:51:33 2012	(r305277)
@@ -244,4 +244,5 @@ razorback:*:957:957::0:0:Razorback user:
 gnunet:*:958:958::0:0:GNUnet daemon:/var/lib/gnunet:/usr/sbin/nologin
 c_icap:*:959:959::0:0:c-icap daemon:/var/empty:/usr/sbin/nologin
 trytond:*:960:960::0:0:trytond daemon:/var/empty:/usr/sbin/nologin
+gearmand:*:961:961::0:0:gearmand daemon:/var/empty:/usr/sbin/nologin
 nobody:*:65534:65534::0:0:Unprivileged user:/nonexistent:/usr/sbin/nologin

Modified: head/devel/gearmand/Makefile
==============================================================================
--- head/devel/gearmand/Makefile	Thu Oct  4 19:40:39 2012	(r305276)
+++ head/devel/gearmand/Makefile	Thu Oct  4 19:51:33 2012	(r305277)
@@ -6,17 +6,30 @@
 #
 
 PORTNAME=	gearmand
-PORTVERSION=	0.26
+PORTVERSION=	0.39
 CATEGORIES=	devel
-MASTER_SITES=	http://launchpad.net/gearmand/trunk/${PORTVERSION}/+download/ \
-		LOCAL/glarkin
+MASTER_SITES=	http://launchpad.net/gearmand/1.0/${PORTVERSION}/+download/
 
 MAINTAINER=	glarkin@FreeBSD.org
 COMMENT=	Gearman C Server and Library
 
 BUILD_DEPENDS=	boost-libs>=0:${PORTSDIR}/devel/boost-libs
 LIB_DEPENDS=	event:${PORTSDIR}/devel/libevent \
-		uuid:${PORTSDIR}/misc/e2fsprogs-libuuid
+		uuid:${PORTSDIR}/misc/e2fsprogs-libuuid \
+		execinfo:${PORTSDIR}/devel/libexecinfo
+
+CONFLICTS=	p5-Gearman-Server-1.*
+
+.if defined(MAINTAINER_MODE) && ${MAINTAINER_MODE:Myes}
+UID_FILES=	../../UIDs
+GID_FILES=	../../GIDs
+.if !exists(${UID_FILES}) || !exists(${GID_FILES})
+.error ${UID_FILES} or ${GID_FILES} does not exist - please check
+.endif
+.endif
+
+USERS=		gearmand
+GROUPS=		gearmand
 
 FETCH_ARGS=	-pRr
 USE_PERL5_BUILD=yes
@@ -25,14 +38,22 @@ USE_GMAKE=	yes
 USE_GNOME=	gnomehack
 USE_LDCONFIG=	yes
 USE_RC_SUBR=	gearmand
-CONFIGURE_ARGS+=--with-lib-prefix=${LOCALBASE} --with-boost=${LOCALBASE}
+SUB_LIST+=	USERS=${USERS} GROUPS=${GROUPS}
 
-OPTIONS=	DRIZZLE "Enable Drizzle support for persistent queue" off \
-		MEMCACHED "Enable memcached support for persistent queue" off \
-		PGSQL "Enable PostgreSQL support for persistent queue" off \
-		SQLITE "Enable SQLite support for persistent queue" on \
-		REDIS "Enable Redis support for persistent queue" off \
-		TOKYOCAB "Enable Tokyo Cabinet support for persistent queue" off
+CONFIGURE_ARGS+=--with-lib-prefix=${LOCALBASE} --with-boost=${LOCALBASE} \
+		--localstatedir=/var/db/${PORTNAME} --enable-static
+LDFLAGS+=	-lexecinfo
+
+OPTIONS_DEFINE=	DRIZZLE MEMCACHED PGSQL SQLITE MYSQL HIREDIS TOKYOCAB
+OPTIONS_DEFAULT=SQLITE
+
+DRIZZLE_DESC=	Enable Drizzle support for persistent queue
+MEMCACHED_DESC=	Enable memcached support for persistent queue
+MYSQL_DESC=	Enable MySQL support for persistent queue
+PGSQL_DESC=	Enable PostgreSQL support for persistent queue
+SQLITE_DESC=	Enable SQLite support for persistent queue
+HIREDIS_DESC=	Enable Hiredis support for persistent queue
+TOKYOCAB_DESC=	Enable Tokyo Cabinet support for persistent queue
 
 MAN1=	gearadmin.1 \
 	gearman.1
@@ -189,7 +210,7 @@ MAN3=	gearman_actions_t.3 \
 	libgearman.3
 MAN8=	gearmand.8
 
-.include <bsd.port.pre.mk>
+.include <bsd.port.options.mk>
 
 # Workaround for missing sigignore that wasn't introduced until
 # FreeBSD 8.0
@@ -197,37 +218,48 @@ MAN8=	gearmand.8
 EXTRA_PATCHES+=	${FILESDIR}/extra-patch-libtest__test.cc
 .endif
 
+.if ${PORT_OPTIONS:MDRIZZLE}
+LIB_DEPENDS+=		drizzle:${PORTSDIR}/databases/libdrizzle
+CONFIGURE_ARGS+=	--enable-libdrizzle
+.else
+CONFIGURE_ARGS+=	--disable-libdrizzle
+.endif
+
+.if ${PORT_OPTIONS:MMEMCACHED}
+LIB_DEPENDS+=		memcached:${PORTSDIR}/databases/libmemcached
+BUILD_DEPENDS+=		memcached>=0:${PORTSDIR}/databases/memcached
+CONFIGURE_ARGS+=	--enable-libmemcached
 # This hack is required for the test programs invoked by configure,
 # in the event that libmemcached was compiled with SASL support.
 .if exists(${LOCALBASE}/lib/libsasl.so)
-LDFLAGS+=	-L${LOCALBASE}/lib -lsasl
+LDFLAGS+=		-L${LOCALBASE}/lib -lsasl
+CONFIGURE_ARGS+=	--with-memcached-sasl=${LOCALBASE}/bin/memcached
 .elif exists(${LOCALBASE}/lib/libsasl2.a)
-LDFLAGS+=	-L${LOCALBASE}/lib -lsasl2
+LDFLAGS+=		-L${LOCALBASE}/lib -lsasl2
+CONFIGURE_ARGS+=	--with-memcached-sasl=${LOCALBASE}/bin/memcached
 .else
-LDFLAGS+=	-L${LOCALBASE}/lib
+LDFLAGS+=		-L${LOCALBASE}/lib
+CONFIGURE_ARGS+=	--with-memcached=${LOCALBASE}/bin/memcached
 .endif
-
-.ifdef(WITH_DRIZZLE)
-LIB_DEPENDS+=		drizzle:${PORTSDIR}/databases/libdrizzle
 .else
-CONFIGURE_ARGS+=	--disable-libdrizzle
+CONFIGURE_ARGS+=	--disable-libmemcached
 .endif
 
-.ifdef(WITH_MEMCACHED)
-LIB_DEPENDS+=		memcached:${PORTSDIR}/databases/libmemcached
-BUILD_DEPENDS+=		memcached>=0:${PORTSDIR}/databases/memcached
-CONFIGURE_ARGS+=	--enable-libmemcached --with-memcached=${LOCALBASE}/bin
+.if ${PORT_OPTIONS:MMYSQL}
+USE_MYSQL=		yes
+CONFIGURE_ARGS+=	--with-mysql=yes
 .else
-CONFIGURE_ARGS+=	--disable-libmemcached
+CONFIGURE_ARGS+=	--with-mysql=no
 .endif
 
-.ifdef(WITH_PGSQL)
+.if ${PORT_OPTIONS:MPGSQL}
 USE_PGSQL=		yes
+CONFIGURE_ARGS+=	--enable-libpq
 .else
 CONFIGURE_ARGS+=	--disable-libpq
 .endif
 
-.ifdef(WITH_SQLITE)
+.if ${PORT_OPTIONS:MSQLITE}
 BUILD_DEPENDS+=		sqlite3>=3.0.0:${PORTSDIR}/databases/sqlite3
 LIB_DEPENDS+=		sqlite3:${PORTSDIR}/databases/sqlite3
 CONFIGURE_ARGS+=	--with-sqlite3=${LOCALBASE}
@@ -235,18 +267,22 @@ CONFIGURE_ARGS+=	--with-sqlite3=${LOCALB
 CONFIGURE_ARGS+=	--without-sqlite3
 .endif
 
-.ifdef(WITH_TOKYOCAB)
+.if ${PORT_OPTIONS:MTOKYOCAB}
 LIB_DEPENDS+=		tokyocabinet:${PORTSDIR}/databases/tokyocabinet
-CONFIGURE_ARGS+=	--with-libtokyocabinet-prefix=${LOCALBASE}
+CONFIGURE_ARGS+=	--enable-libtokyocabinet
+CONFIGURE_ENV+=		LIBTOKYOCABINET_CPPFLAGS=-I${LOCALBASE}/include \
+			LIBTOKYOCABINET_LDFLAGS=-L${LOCALBASE}/lib
 .else
 CONFIGURE_ARGS+=	--disable-libtokyocabinet
 .endif
 
-.ifdef(WITH_REDIS)
+.if ${PORT_OPTIONS:MHIREDIS}
 LIB_DEPENDS+=		hiredis:${PORTSDIR}/databases/hiredis
-CONFIGURE_ARGS+=	--with-libhiredis-prefix=${LOCALBASE}
+CONFIGURE_ARGS+=	--enable-hires
+CONFIGURE_ENV+=		LIBHIREDIS_CPPFLAGS=-I${LOCALBASE}/include/hiredis \
+			LIBHIREDIS_LDFLAGS=-L${LOCALBASE}/lib
 .else
-CONFIGURE_ARGS+=	--without-libhiredis-prefix
+CONFIGURE_ARGS+=	--disable-hires
 .endif
 
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>

Modified: head/devel/gearmand/distinfo
==============================================================================
--- head/devel/gearmand/distinfo	Thu Oct  4 19:40:39 2012	(r305276)
+++ head/devel/gearmand/distinfo	Thu Oct  4 19:51:33 2012	(r305277)
@@ -1,2 +1,2 @@
-SHA256 (gearmand-0.26.tar.gz) = 79ae2233bafe8f092ebf4157f83c2e0535a1fe1765da04cb01f34bcdf520dd33
-SIZE (gearmand-0.26.tar.gz) = 773491
+SHA256 (gearmand-0.39.tar.gz) = 7eaa4050bdd3e7801d0af047926314dbc6270f8fa6723aca72a7226f341507ec
+SIZE (gearmand-0.39.tar.gz) = 841815

Modified: head/devel/gearmand/files/gearmand.in
==============================================================================
--- head/devel/gearmand/files/gearmand.in	Thu Oct  4 19:40:39 2012	(r305276)
+++ head/devel/gearmand/files/gearmand.in	Thu Oct  4 19:51:33 2012	(r305277)
@@ -4,19 +4,50 @@
 #
 
 # PROVIDE: gearmand
-# REQUIRE: DAEMON
+# REQUIRE: LOGIN
+# KEYWORD: shutdown
+#
+# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
+# to enable this service:
+#
+# gearmand_enable (bool):	Set to NO by default.
+#				Set it to YES to enable gearmand.
+# gearmand_log_level (value):	Set to WARNING by default. Other options are:
+#				FATAL, ALERT, CRITICAL, ERROR, WARNING,
+#				NOTICE, INFO, and DEBUG
+# gearmand_flags (value):	Include other command-line arguments with
+#				this variable.
+# gearmand_user (value):	Set to %%USERS%% by default.
+# gearmand_group (value):	Set to %%GROUPS%% by default.
 
 . /etc/rc.subr
 
-name="gearmand"
+name=gearmand
 rcvar=gearmand_enable
-command="%%PREFIX%%/sbin/gearmand"
 
-load_rc_config "$name"
-: ${gearmand_enable="NO"}
-: ${gearmand_flags="-d -v"}
-: ${gearmand_group="daemon"}
-: ${gearmand_user="daemon"}
+load_rc_config $name
 
-run_rc_command "$1"
+gearmand_prestart()
+{
+	install -d -o ${gearmand_user} -g ${gearmand_group} -m 755 ${_piddir}
+	install -d -o ${gearmand_user} -g ${gearmand_group} -m 755 ${_logdir}
+	install -d -o ${gearmand_user} -g ${gearmand_group} -m 755 ${_statedir}
+}
+
+: ${gearmand_enable:="NO"}
+: ${gearmand_log_level="WARNING"}
+: ${gearmand_user="%%USERS%%"}
+: ${gearmand_group="%%GROUPS%%"}
+
+command=%%PREFIX%%/sbin/${name}
+_piddir=/var/run/${name}
+pidfile=${_piddir}/${name}.pid
+_logdir=/var/log/${name}
+logfile=${_logdir}/${name}.log
+_statedir=/var/db/${name}
 
+command_args="-d --verbose ${gearmand_log_level} -l ${logfile} -P ${pidfile}"
+
+start_precmd="${name}_prestart"
+
+run_rc_command "$1"

Modified: head/devel/gearmand/files/patch-configure
==============================================================================
--- head/devel/gearmand/files/patch-configure	Thu Oct  4 19:40:39 2012	(r305276)
+++ head/devel/gearmand/files/patch-configure	Thu Oct  4 19:51:33 2012	(r305277)
@@ -1,6 +1,24 @@
---- ./configure.orig	2012-01-16 15:07:46.000000000 -0500
-+++ ./configure	2012-01-16 15:08:21.000000000 -0500
-@@ -23441,6 +23441,7 @@
+--- ./configure.orig	2012-10-03 15:37:17.000000000 -0400
++++ ./configure	2012-10-03 15:37:17.000000000 -0400
+@@ -19021,7 +19021,7 @@
+ 
+ else
+ 
+-            if test x"" == x; then :
++            if test x"" = x; then :
+ 
+ 	CURL_CFLAGS="`$CURL_CONFIG $curl_config_args --cflags`"
+ 
+@@ -19031,7 +19031,7 @@
+ 
+ fi
+ 
+-            if test x"" == x; then :
++            if test x"" = x; then :
+ 
+ 	CURL_LIBS="`$CURL_CONFIG $curl_config_args --libs`"
+ 
+@@ -19842,6 +19842,7 @@
                          | sed -e 's/"//'`
                  if test $ac_sqlite3_version != ""; then
                      SQLITE3_VERSION=$ac_sqlite3_version

Added: head/devel/gearmand/files/patch-libgearman-server__plugins__queue__redis__queue.cc
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/gearmand/files/patch-libgearman-server__plugins__queue__redis__queue.cc	Thu Oct  4 19:51:33 2012	(r305277)
@@ -0,0 +1,17 @@
+--- ./libgearman-server/plugins/queue/redis/queue.cc.orig	2012-10-03 15:55:58.000000000 -0400
++++ ./libgearman-server/plugins/queue/redis/queue.cc	2012-10-03 15:56:31.000000000 -0400
+@@ -269,14 +269,11 @@
+       assert(fmt_str_length != 1);
+       return gearmand_gerror("snprintf() failed to produce a valud fmt_str for redis key", GEARMAN_QUEUE_ERROR);
+     }
+-#pragma GCC diagnostic push
+-#pragma GCC diagnostic ignored "-Wformat-nonliteral"
+     int ret= sscanf(reply->element[x]->str,
+                     fmt_str,
+                     prefix,
+                     function_name,
+                     unique);
+-#pragma GCC diagnostic pop
+     if (ret == 0)
+     {
+       continue;

Added: head/devel/gearmand/files/patch-libgearman-server__server.cc
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/gearmand/files/patch-libgearman-server__server.cc	Thu Oct  4 19:51:33 2012	(r305277)
@@ -0,0 +1,10 @@
+--- ./libgearman-server/server.cc.orig	2012-09-19 22:42:05.000000000 -0400
++++ ./libgearman-server/server.cc	2012-10-03 15:37:17.000000000 -0400
+@@ -46,7 +46,6 @@
+ #include <libgearman-server/queue.h>
+ 
+ #include <errno.h>
+-#include <iso646.h>
+ #include <limits.h>
+ #include <stdlib.h>
+ #include <string.h>

Modified: head/devel/gearmand/pkg-plist
==============================================================================
--- head/devel/gearmand/pkg-plist	Thu Oct  4 19:40:39 2012	(r305276)
+++ head/devel/gearmand/pkg-plist	Thu Oct  4 19:51:33 2012	(r305277)
@@ -13,6 +13,8 @@ include/libgearman-1.0/core.h
 include/libgearman-1.0/execute.h
 include/libgearman-1.0/function.h
 include/libgearman-1.0/gearman.h
+include/libgearman-1.0/interface/status.h
+include/libgearman-1.0/interface/task.h
 include/libgearman-1.0/job.h
 include/libgearman-1.0/job_handle.h
 include/libgearman-1.0/kill.h
@@ -25,6 +27,7 @@ include/libgearman-1.0/protocol.h
 include/libgearman-1.0/result.h
 include/libgearman-1.0/return.h
 include/libgearman-1.0/signal.h
+include/libgearman-1.0/status.h
 include/libgearman-1.0/strerror.h
 include/libgearman-1.0/string.h
 include/libgearman-1.0/task.h
@@ -38,8 +41,9 @@ include/libgearman/gearman.h
 lib/libgearman.a
 lib/libgearman.la
 lib/libgearman.so
-lib/libgearman.so.6
+lib/libgearman.so.7
 libdata/pkgconfig/gearmand.pc
 sbin/gearmand
+@dirrm include/libgearman-1.0/interface
 @dirrm include/libgearman-1.0
 @dirrm include/libgearman

Modified: head/devel/p5-Gearman-Server/Makefile
==============================================================================
--- head/devel/p5-Gearman-Server/Makefile	Thu Oct  4 19:40:39 2012	(r305276)
+++ head/devel/p5-Gearman-Server/Makefile	Thu Oct  4 19:51:33 2012	(r305277)
@@ -19,6 +19,8 @@ COMMENT=	Gearman server daemon
 RUN_DEPENDS=	p5-Gearman>=1.10:${PORTSDIR}/devel/p5-Gearman \
 		p5-Danga-Socket>=1.52:${PORTSDIR}/devel/p5-Danga-Socket
 
+CONFLICTS=	gearmand-0.*
+
 PERL_CONFIGURE=	yes
 
 MAN1=	gearmand.1

Modified: head/devel/p5-Gearman-XS/Makefile
==============================================================================
--- head/devel/p5-Gearman-XS/Makefile	Thu Oct  4 19:40:39 2012	(r305276)
+++ head/devel/p5-Gearman-XS/Makefile	Thu Oct  4 19:51:33 2012	(r305277)
@@ -7,6 +7,7 @@
 
 PORTNAME=	Gearman-XS
 PORTVERSION=	0.12
+PORTREVISION=	1
 CATEGORIES=	devel perl5
 MASTER_SITES=	CPAN
 MASTER_SITE_SUBDIR=	CPAN:DSCHOEN
@@ -15,7 +16,7 @@ PKGNAMEPREFIX=	p5-
 MAINTAINER=	otaviof@gmail.com
 COMMENT=	Perl front end for the Gearman C library
 
-LIB_DEPENDS=	gearman.6:${PORTSDIR}/devel/gearmand
+LIB_DEPENDS=	gearman:${PORTSDIR}/devel/gearmand
 
 CFLAGS+=	-I${LOCALBASE}/include
 



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