Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 Jan 2014 12:39:03 GMT
From:      Matthew Seaman <matthew@freebsd.org>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   ports/185906: databases/slony1v2 -- fix build with poudriere and non-default postgresql version, etc
Message-ID:  <201401201239.s0KCd3HP017612@lucid-nonsense.infracaninophile.co.uk>
Resent-Message-ID: <201401201240.s0KCe093014933@freefall.freebsd.org>

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

>Number:         185906
>Category:       ports
>Synopsis:       databases/slony1v2 -- fix build with poudriere and non-default postgresql version, etc
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jan 20 12:40:00 UTC 2014
>Closed-Date:
>Last-Modified:
>Originator:     Matthew Seaman
>Release:        FreeBSD 9.2-STABLE amd64
>Organization:
>Environment:
System: FreeBSD lucid-nonsense.infracaninophile.co.uk 9.2-STABLE FreeBSD 9.2-STABLE #30 r259416: Sun Dec 15 18:37:44 GMT 2013 root@lucid-nonsense.infracaninophile.co.uk:/usr/obj/usr/src/sys/LUCID-NONSENSE amd64


	
>Description:
	
>How-To-Repeat:

Update the port to use various more recent constructs, with the
benefit that it makes it possible to build a pkg against a non-default
postgresql version using poudriere

     * USES=pgsql -- use the standard ports methods for deciding what
       postgresql version to compile against, instead of DiY code
     * while here, OPTIONS helpers
     * Pass ${PERL} through to configure to prevent 'make stage-qa'
       complaining about files that need to be shebangfixed.
     * USES=shebangfix for the one perl script that doesn't get its
       #! line set correctly by the above during the build process

There are still a number of warnings about unstripped binaries
generated with DEVELOPER=yes in /etc/make.conf which I haven't fixed
here.

>Fix:

	

--- slony1v2.diff begins here ---
Index: Makefile
===================================================================
--- Makefile	(revision 340258)
+++ Makefile	(working copy)
@@ -12,36 +12,38 @@
 MAINTAINER=	olgeni@FreeBSD.org
 COMMENT=	PostgreSQL master to multiple replicas replication system
 
-BUILD_DEPENDS=	${LOCALBASE}/bin/flex:${PORTSDIR}/textproc/flex \
-		${LOCALBASE}/bin/postmaster:${PORTSDIR}/databases/postgresql${PGSQL_VER}-server
+BUILD_DEPENDS=	${LOCALBASE}/bin/flex:${PORTSDIR}/textproc/flex
 
 GNU_CONFIGURE=	yes
-USES=		bison gmake
-USE_PGSQL=	yes
+USES=		bison gmake pgsql shebangfix
+WANT_PGSQL=	server
 USE_BZIP2=	yes
 USE_RC_SUBR=	slon
 
+SHEBANG_FILES=	tools/altperl/slonik_restart_node.pl
+
 SUB_FILES=	pkg-message slon-mkservice.sh
 SUB_LIST+=	NAME=slon
 
 OPTIONS_DEFINE=	DOCS PERLTOOLS
-PERLTOOLS_DESC=	Install perl configuration tools
+OPTIONS_SUB=	yes
 
 CONFLICTS?=	slony1-1*
 
 CONFIGURE_ENV+=	FLEX=${LOCALBASE}/bin/flex
 
+PERLTOOLS_DESC=	Install perl configuration tools
+PERLTOOLS_USES=	perl5
+PERLTOOLS_CONFIGURE_ENV=	PERL=${PERL}
+PERLTOOLS_CONFIGURE_ON=		--with-perltools=${LOCALBASE}/sbin
+PERLTOOLS_BUILD_DEPENDS=	p5-DBD-Pg>=0:${PORTSDIR}/databases/p5-DBD-Pg
+PERLTOOLS_RUN_DEPENDS=		p5-DBD-Pg>=0:${PORTSDIR}/databases/p5-DBD-Pg
+
 .include <bsd.port.options.mk>
 
 .if ${PORT_OPTIONS:MPERLTOOLS}
-USES+=		perl5
-CONFIGURE_ARGS+=--with-perltools=${LOCALBASE}/sbin
-RUN_DEPENDS+=	p5-DBD-Pg>=0:${PORTSDIR}/databases/p5-DBD-Pg
-BUILD_DEPENDS+=	p5-DBD-Pg>=0:${PORTSDIR}/databases/p5-DBD-Pg
-PLIST_SUB+=	PERLTOOLS=""
 SUB_LIST+=	PERLTOOLS=""
 .else
-PLIST_SUB+=	PERLTOOLS="@comment "
 SUB_LIST+=	PERLTOOLS="@comment "
 .endif
 
@@ -54,17 +56,6 @@
 		--with-pgpkglibdir=${LOCALBASE}/lib/postgresql \
 		--with-pgsharedir=${LOCALBASE}/share/postgresql
 
-# Setting/finding PostgreSQL version we want.
-.if exists(${LOCALBASE}/bin/postmaster)
-PGSQL_VER!=	${LOCALBASE}/bin/postmaster -V | \
-		${SED} -En 's/.*PostgreSQL[^0-9]*([0-9]+)\.([0-9]+)\..*/\1\2/p'
-.elif exists(${LOCALBASE}/bin/pg_config)
-PGSQL_VER!=	${LOCALBASE}/bin/pg_config --version | \
-		${SED} -En 's/PostgreSQL[^0-9]*([0-9]*)\.([0-9]+)\..*/\1\2/p'
-.else
-PGSQL_VER=	${DEFAULT_PGSQL_VER}
-.endif
-
 PORTDOCS=	*
 
 DOCS=		COPYRIGHT INSTALL README README.Unicode RELEASE \
--- slony1v2.diff ends here ---


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



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