svn commit: r359786 - in head/databases/pgpool-II-33: . files

Matthew Seaman matthew at FreeBSD.org
Sun Jun 29 16:40:56 UTC 2014


Author: matthew
Date: Sun Jun 29 16:40:54 2014
New Revision: 359786
URL: http://svnweb.freebsd.org/changeset/ports/359786
QAT: https://qat.redports.org/buildarchive/r359786/

Log:
  New port databases/pgpool-II-33
  
  Repo copy from databases/pgpool-II. Changes from that port:
  
   - New port for pgpool-II33-3.3.3
  
   - Stagify
  
   - Add libtool, gmake, pgsql, perl5 to USES.  Drop .la files -- this is a
     new port, so there can't be any pre-existing consumers of the .la files
     to worry about.
  
   - Use options helpers
  
   - The configure used with this software is buggy and doesn't understand
     --without-foo.  Just omit any --with-foo or --without-foo to turn off
     'foo' support.
  
   - New options PAM MEMCACHED.  Enable PAM by default since it
     only depends on the base system.
  
   - Add RUN_DEPENDS on rsync and perl5 -- needed for the scripts
     pgpool_copy_backup and pgpool_remote_start respectively.
  
   - regenerate pkg-plist using 'make makeplist.'  Just use the auto-generated
     plist entries for %%PORTDOCS%% rather than the $PORTDOCS variable.
  
   - Simplify how docs and sql/contrib functions are installed
  
  Redports:   	https://redports.org/buildarchive/20140629142900-20287/
  PR:		189880
  Submitted by:	michelle at sorbs.net
  Reviewed by:	pi, matthew

Added:
  head/databases/pgpool-II-33/
     - copied from r359419, head/databases/pgpool-II/
  head/databases/pgpool-II-33/files/patch-pool_hba.c   (contents, props changed)
  head/databases/pgpool-II-33/files/patch-watchdog__watchdog.h   (contents, props changed)
Modified:
  head/databases/pgpool-II-33/Makefile
  head/databases/pgpool-II-33/distinfo
  head/databases/pgpool-II-33/files/patch-recovery.c
  head/databases/pgpool-II-33/pkg-descr
  head/databases/pgpool-II-33/pkg-plist

Modified: head/databases/pgpool-II-33/Makefile
==============================================================================
--- head/databases/pgpool-II/Makefile	Thu Jun 26 21:02:37 2014	(r359419)
+++ head/databases/pgpool-II-33/Makefile	Sun Jun 29 16:40:54 2014	(r359786)
@@ -1,80 +1,92 @@
-# Created by: Choe, Cheng-Dae <whitekid at gmail.com>
 # $FreeBSD$
 
 PORTNAME=	pgpool-II
-PORTVERSION=	3.1.6
+PORTVERSION=	3.3.3
 CATEGORIES=	databases
-MASTER_SITES=	LOCAL/kuriyama \
-		http://www.pgpool.net/mediawiki/images/
+MASTER_SITES=	http://www.pgpool.net/mediawiki/images/ \
+		LOCAL/matthew/${PORTNAME}
+PKGNAMESUFFIX=	33
 
-MAINTAINER=	kuriyama at FreeBSD.org
+MAINTAINER=	michelle at sorbs.net
 COMMENT=	Connection pool server for PostgreSQL
 
-LICENSE=	BSD
-
-USES=		gmake
+LICENSE=	PGPOOL
+LICENSE_NAME=	PGPOOL
+LICENSE_FILE=	${WRKSRC}/COPYING
+LICENSE_PERMS=	dist-mirror pkg-mirror auto-accept
+
+RUN_DEPENDS=	rsync:${PORTSDIR}/net/rsync
+
+USES=		gmake libtool pgsql perl5
+WANT_PGSQL=	client
+USE_PERL5=	run
 GNU_CONFIGURE=	yes
-USE_PGSQL=	yes
 USE_LDCONFIG=	yes
-USE_OPENSSL=	yes
-CONFIGURE_ARGS=	--with-openssl
+MAKE_ENV=	INSTALL_STRIP_FLAG=${STRIP}
 
-CONFLICTS=	pgpool-3.* pgpool-II-22-* pgpool-II-23-* pgpool-II-23-* 
+CONFLICTS=	pgpool-3.* pgpool-II-22-2.* pgpool-II-23-2.* pgpool-II-30-3.* pgpool-II-3.*
 USE_RC_SUBR=	pgpool
 
-PORTDOCS=	AUTHORS COPYING ChangeLog INSTALL NEWS README README.euc_jp
-PORTDOCS+=	TODO
-PORTDOCShtml=	pgpool-en.html pgpool-ja.html pgpool.css
-PORTDOCShtml+=	tutorial-en.html tutorial-ja.html
-
-OPTIONS_DEFINE+=	DOCS SSL
-SSL_DESC=	Build with OpenSSL support
-
-.include <bsd.port.options.mk>
-
-.if ${PORT_OPTIONS:MSSL}
-USE_OPENSSL=	yes
-CONFIGURE_ARGS+=--with-openssl
-.endif
-
-.if exists(${LOCALBASE}/include/postgresql/server/replication/walreceiver.h)
-FUNCTIONS=	pgpool-recovery pgpool-regclass pgpool-walrecrunning
-PLIST_SUB=	PGSQL9=""
-.else
-FUNCTIONS=	pgpool-recovery pgpool-regclass
-PLIST_SUB=	PGSQL9="@comment "
-.endif
-
-post-patch:
-	@${REINPLACE_CMD} -e 's|echo aout|echo elf|g' \
-	${WRKSRC}/configure
-	@${REINPLACE_CMD} -e 's| pg_config| ${LOCALBASE}/bin/pg_config|g' \
-	${WRKSRC}/sql/pgpool-recovery/Makefile
+DOCS=		AUTHORS COPYING ChangeLog INSTALL NEWS README README.euc_jp \
+		TODO doc/pgpool-en.html doc/pgpool-ja.html doc/pgpool.css \
+		doc/tutorial-en.html doc/tutorial-ja.html
+
+OPTIONS_DEFINE+=	DOCS SSL LIBMEMCACHED PAM
+OPTIONS_DEFAULT=	DOCS SSL PAM
+
+# Buggy configure: adding eg. --without-pam to CONFIGURE_ARGS causes
+# USE_PAM to be *defined* in config.h Omit the --with-pam or
+# --without-pam flags entirely to leave PAM turned off.  Similarly for
+# --with-memcached.
+
+LIBMEMCACHED_DESC=		Build with MemCached support
+LIBMEMCACHED_BUILD_DEPENDS=	libmemcached>=1.0:${PORTSDIR}/databases/libmemcached
+LIBMEMCACHED_CONFIGURE_ON=	--with-memcached=${LOCALBASE}/lib/libmemcached
+
+SSL_DESC=		Build with OpenSSL support
+SSL_CONFIGURE_WITH=	openssl
+SSL_USE=		OPENSSL=yes
+
+PAM_DESC=		Build with PAM support
+PAM_CONFIGURE_ON=	--with-pam
+PAM_USE=		PAM=yes
+
+FUNC_CONTRIB_DIR=	${PREFIX}/share/postgresql/contrib
+FUNC_LIB_DIR=		${PREFIX}/lib/postgresql
+
+FUNCTIONS=		pgpool-recovery pgpool-regclass
+FUNC_CONTRIB=		pgpool-recovery/uninstall_pgpool-recovery.sql \
+			pgpool-recovery/pgpool-recovery.sql \
+			pgpool-regclass/uninstall_pgpool-regclass.sql \
+			pgpool-regclass/pgpool-regclass.sql
+FUNC_LIB=		pgpool-recovery/pgpool-recovery.so \
+			pgpool-regclass/pgpool-regclass.so
 
 post-build:
 .for f in ${FUNCTIONS}
-	@cd ${WRKSRC}/sql/${f} && ${SETENV} ${MAKE_ENV} ${MAKE_CMD}
+	cd ${WRKSRC}/sql/${f} && ${SETENV} ${MAKE_ENV} ${MAKE_CMD}
 .endfor
 
 post-install:
-.for f in ${FUNCTIONS}
-	@cd ${WRKSRC}/sql/${f} && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} DESTDIR=${STAGEDIR}  ${INSTALL_TARGET}
+	${MKDIR} ${STAGEDIR}${FUNC_CONTRIB_DIR}
+.for f in ${FUNC_CONTRIB}
+	${INSTALL_DATA} ${WRKSRC}/sql/${f} ${STAGEDIR}${FUNC_CONTRIB_DIR}
 .endfor
-	${INSTALL_DATA} ${WRKSRC}/sample/dist_def_pgbench.sql ${STAGEDIR}${DATADIR}
-	${INSTALL_DATA} ${WRKSRC}/sample/replicate_def_pgbench.sql ${STAGEDIR}${DATADIR}
+	${MKDIR} ${STAGEDIR}${FUNC_LIB_DIR}
+.for f in ${FUNC_LIB}
+	${INSTALL_LIB} ${WRKSRC}/sql/${f} ${STAGEDIR}${FUNC_LIB_DIR}
+.endfor
+	${INSTALL_DATA} ${WRKSRC}/sample/dist_def_pgbench.sql \
+	    ${STAGEDIR}${DATADIR}
+	${INSTALL_DATA} ${WRKSRC}/sample/replicate_def_pgbench.sql \
+	    ${STAGEDIR}${DATADIR}
 	${MKDIR} ${STAGEDIR}${DATADIR} ${STAGEDIR}${EXAMPLESDIR}
 .for f in pgpool_recovery pgpool_recovery_pitr pgpool_remote_start
 	${INSTALL_SCRIPT} ${WRKSRC}/sample/${f} ${STAGEDIR}${EXAMPLESDIR}
 .endfor
-.if ${PORT_OPTIONS:MDOCS}
-	@${MKDIR} ${STAGEDIR}${DOCSDIR}
-.for f in ${PORTDOCS}
+	${MKDIR} ${STAGEDIR}${DOCSDIR}
+.for f in ${DOCS}
 	${INSTALL_MAN} ${WRKSRC}/$f ${STAGEDIR}${DOCSDIR}
 .endfor
-.for f in ${PORTDOCShtml}
-	${INSTALL_MAN} ${WRKSRC}/doc/$f ${STAGEDIR}${DOCSDIR}
-.endfor
-PORTDOCS+=	${PORTDOCShtml}
-.endif
 
 .include <bsd.port.mk>

Modified: head/databases/pgpool-II-33/distinfo
==============================================================================
--- head/databases/pgpool-II/distinfo	Thu Jun 26 21:02:37 2014	(r359419)
+++ head/databases/pgpool-II-33/distinfo	Sun Jun 29 16:40:54 2014	(r359786)
@@ -1,2 +1,2 @@
-SHA256 (pgpool-II-3.1.6.tar.gz) = c15783105eecc85eb3cadebc22e0d6c9efa916da4bcc4c96c12b0463b34945cc
-SIZE (pgpool-II-3.1.6.tar.gz) = 1353846
+SHA256 (pgpool-II-3.3.3.tar.gz) = b8da35bb50b24f011da9fffef2875035f07cd6da8e3c60f8c0c33323b16214c4
+SIZE (pgpool-II-3.3.3.tar.gz) = 1725512

Added: head/databases/pgpool-II-33/files/patch-pool_hba.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/pgpool-II-33/files/patch-pool_hba.c	Sun Jun 29 16:40:54 2014	(r359786)
@@ -0,0 +1,10 @@
+--- ./pool_hba.c.orig	2014-03-24 14:30:01.000000000 +0000
++++ ./pool_hba.c	2014-06-29 14:58:09.893352941 +0100
+@@ -29,6 +29,7 @@
+ #include <string.h>
+ #include <errno.h>
+ #include <netdb.h>
++#include <netinet/in.h>
+ 
+ #include "pool.h"
+ #include "pool_path.h"

Modified: head/databases/pgpool-II-33/files/patch-recovery.c
==============================================================================
--- head/databases/pgpool-II/files/patch-recovery.c	Thu Jun 26 21:02:37 2014	(r359419)
+++ head/databases/pgpool-II-33/files/patch-recovery.c	Sun Jun 29 16:40:54 2014	(r359786)
@@ -1,6 +1,6 @@
---- recovery.c.orig	2010-10-12 08:12:18.155163331 +0900
-+++ recovery.c	2010-10-12 08:13:21.347257609 +0900
-@@ -96,7 +96,7 @@
+--- ./recovery.c.orig	2014-03-24 14:30:01.000000000 +0000
++++ ./recovery.c	2014-06-29 14:55:21.756363519 +0100
+@@ -117,7 +117,7 @@
  
  	if (REPLICATION)
  	{
@@ -8,8 +8,8 @@
 +		pool_log("starting 2nd stage.  waiting connections from clients to be closed");
  
  		/* 2nd stage */
- 		*InRecovery = 1;
-@@ -384,6 +384,6 @@
+ 		*InRecovery = RECOVERY_ONLINE;
+@@ -430,6 +430,6 @@
  			sleep(3);
  	} while (i++ < WAIT_RETRY_COUNT);
  

Added: head/databases/pgpool-II-33/files/patch-watchdog__watchdog.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/pgpool-II-33/files/patch-watchdog__watchdog.h	Sun Jun 29 16:40:54 2014	(r359786)
@@ -0,0 +1,31 @@
+--- ./watchdog/watchdog.h.orig	2014-03-24 14:30:01.000000000 +0000
++++ ./watchdog/watchdog.h	2014-06-29 14:55:21.760361453 +0100
+@@ -56,6 +56,28 @@
+ #define WD_TIME_DIFF_SEC(a,b) (int)(((a).tv_sec - (b).tv_sec) + \
+                                     ((a).tv_usec - (b).tv_usec) / 1000000.0)
+ 
++/* For valid x, exactly one of WIFSIGNALED(x), WIFEXITED(x), WIFSTOPPED(x) is true.  */
++#ifndef WIFSIGNALED
++# define WIFSIGNALED(x) (WTERMSIG (x) != 0 && WTERMSIG(x) != 0x7f)
++#endif
++#ifndef WIFEXITED
++# define WIFEXITED(x) (WTERMSIG (x) == 0)
++#endif
++#ifndef WIFSTOPPED
++# define WIFSTOPPED(x) (WTERMSIG (x) == 0x7f)
++#endif
++
++/* The termination signal. Only to be accessed if WIFSIGNALED(x) is true.  */
++#ifndef WTERMSIG
++# define WTERMSIG(x) ((x) & 0x7f)
++#endif
++
++
++/* The exit status. Only to be accessed if WIFEXITED(x) is true.  */
++#ifndef WEXITSTATUS
++# define WEXITSTATUS(x) (((x) >> 8) & 0xff)
++#endif
++
+ /*
+  * packet number of watchdog negotiation
+  */

Modified: head/databases/pgpool-II-33/pkg-descr
==============================================================================
--- head/databases/pgpool-II/pkg-descr	Thu Jun 26 21:02:37 2014	(r359419)
+++ head/databases/pgpool-II-33/pkg-descr	Sun Jun 29 16:40:54 2014	(r359786)
@@ -7,4 +7,4 @@ as pgpool-I by changing configuration pa
 executed in pgpool-I mode enables multiple DB nodes to be connected,
 which was not possible in pgpool-I.
 
-WWW:	http://www.pgpool.net/
+WWW: http://www.pgpool.net/

Modified: head/databases/pgpool-II-33/pkg-plist
==============================================================================
--- head/databases/pgpool-II/pkg-plist	Thu Jun 26 21:02:37 2014	(r359419)
+++ head/databases/pgpool-II-33/pkg-plist	Sun Jun 29 16:40:54 2014	(r359786)
@@ -9,40 +9,52 @@ bin/pcp_promote_node
 bin/pcp_recovery_node
 bin/pcp_stop_pgpool
 bin/pcp_systemdb_info
+bin/pcp_watchdog_info
 bin/pg_md5
 bin/pgpool
-etc/pcp.conf.sample
-etc/pgpool.conf.sample
+ at sample etc/pcp.conf.sample
+ at sample etc/pgpool.conf.sample
 etc/pgpool.conf.sample-master-slave
 etc/pgpool.conf.sample-replication
 etc/pgpool.conf.sample-stream
-etc/pool_hba.conf.sample
+ at sample etc/pool_hba.conf.sample
 include/libpcp_ext.h
 include/pcp.h
 include/pool_process_reporting.h
 include/pool_type.h
 lib/libpcp.a
-lib/libpcp.la
 lib/libpcp.so
 lib/libpcp.so.0
+lib/libpcp.so.0.0.0
+lib/postgresql/pgpool-recovery.so
+lib/postgresql/pgpool-regclass.so
 man/man8/pgpool.8.gz
+%%PORTDOCS%%%%DOCSDIR%%/AUTHORS
+%%PORTDOCS%%%%DOCSDIR%%/COPYING
+%%PORTDOCS%%%%DOCSDIR%%/ChangeLog
+%%PORTDOCS%%%%DOCSDIR%%/INSTALL
+%%PORTDOCS%%%%DOCSDIR%%/NEWS
+%%PORTDOCS%%%%DOCSDIR%%/README
+%%PORTDOCS%%%%DOCSDIR%%/README.euc_jp
+%%PORTDOCS%%%%DOCSDIR%%/TODO
+%%PORTDOCS%%%%DOCSDIR%%/pgpool-en.html
+%%PORTDOCS%%%%DOCSDIR%%/pgpool-ja.html
+%%PORTDOCS%%%%DOCSDIR%%/pgpool.css
+%%PORTDOCS%%%%DOCSDIR%%/tutorial-en.html
+%%PORTDOCS%%%%DOCSDIR%%/tutorial-ja.html
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/pgpool_recovery
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/pgpool_recovery_pitr
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/pgpool_remote_start
 %%DATADIR%%/dist_def_pgbench.sql
 %%DATADIR%%/insert_lock.sql
 %%DATADIR%%/pgpool.pam
 %%DATADIR%%/replicate_def_pgbench.sql
 %%DATADIR%%/system_db.sql
-%%EXAMPLESDIR%%/pgpool_recovery
-%%EXAMPLESDIR%%/pgpool_recovery_pitr
-%%EXAMPLESDIR%%/pgpool_remote_start
 share/postgresql/contrib/pgpool-recovery.sql
 share/postgresql/contrib/pgpool-regclass.sql
-%%PGSQL9%%share/postgresql/contrib/pgpool-walrecrunning.sql
 share/postgresql/contrib/uninstall_pgpool-recovery.sql
 share/postgresql/contrib/uninstall_pgpool-regclass.sql
-%%PGSQL9%%share/postgresql/contrib/uninstall_pgpool-walrecrunning.sql
-lib/postgresql/pgpool-recovery.so
-lib/postgresql/pgpool-regclass.so
-%%PGSQL9%%lib/postgresql/pgpool-walrecrunning.so
+%%PORTDOCS%%@dirrmtry %%DOCSDIR%%
+%%PORTEXAMPLES%%@dirrmtry %%EXAMPLESDIR%%
+ at dirrmtry %%DATADIR%%
 @dirrmtry share/postgresql/contrib
- at dirrm %%EXAMPLESDIR%%
- at dirrm %%DATADIR%%


More information about the svn-ports-head mailing list