summaryrefslogtreecommitdiffstats
path: root/databases/p5-DBD-PgSPI
diff options
context:
space:
mode:
authorgirgen <girgen@FreeBSD.org>2005-01-31 00:35:55 +0000
committergirgen <girgen@FreeBSD.org>2005-01-31 00:35:55 +0000
commitca9d0e2291f677879c1b36a416eb2ad271850cbc (patch)
tree339f4530a6f0b38252173ddc8ba47c21226501d3 /databases/p5-DBD-PgSPI
parentcbe074a01a678ad3149123153f48962b4b035576 (diff)
downloadFreeBSD-ports-ca9d0e2291f677879c1b36a416eb2ad271850cbc.zip
FreeBSD-ports-ca9d0e2291f677879c1b36a416eb2ad271850cbc.tar.gz
Split the postgresql ports into a server and a client part.
All ports depending on postgresql shall use the USE_PGSQL=yes knob defined in Mk/bsd.ports.mk. Bumping portrevisions where needed. PR: 75344 Approved by: portmgr@ (kris), ade & sean (mentors)
Diffstat (limited to 'databases/p5-DBD-PgSPI')
-rw-r--r--databases/p5-DBD-PgSPI/Makefile40
1 files changed, 25 insertions, 15 deletions
diff --git a/databases/p5-DBD-PgSPI/Makefile b/databases/p5-DBD-PgSPI/Makefile
index b63138c..d1fe9f0 100644
--- a/databases/p5-DBD-PgSPI/Makefile
+++ b/databases/p5-DBD-PgSPI/Makefile
@@ -7,6 +7,7 @@
PORTNAME= DBD-PgSPI
PORTVERSION= 0.02
+PORTREVISION= 2
CATEGORIES= databases perl5
MASTER_SITES= ${MASTER_SITE_PERL_CPAN}
MASTER_SITE_SUBDIR= DBD
@@ -19,26 +20,29 @@ BUILD_DEPENDS= ${RUN_DEPENDS} \
${NONEXISTENT}:${PORTSDIR}/${POSTGRESQL_PORT}:configure
RUN_DEPENDS= ${LOCALBASE}/lib/postgresql/plperl.so:${PORTSDIR}/databases/p5-postgresql-plperl \
${SITE_PERL}/${PERL_ARCH}/DBD/Pg.pm:${PORTSDIR}/databases/p5-DBD-Pg
-LIB_DEPENDS= pq.3:${PORTSDIR}/${POSTGRESQL_PORT}
+USE_PGSQL= yes
PERL_CONFIGURE= yes
MAN3= DBD::PgSPI.3
-post-patch:
- @${PERL} -i -pe '$$_ = "" if /ppport.h/' \
- ${WRKSRC}/PgSPI.h
-
.if !defined(NOPORTDOCS)
PORTDOCS= Changes README
-post-install:
- @${MKDIR} ${DOCSDIR}
- @${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${DOCSDIR}
- @${ECHO_MSG} "===> Documentation installed in ${DOCSDIR}."
-.endif
+POSTGRESQL_PORT?= databases/postgresql${PGSQL_VER}-server
+PGSQL_PORTDIR?= ${PORTSDIR}/${POSTGRESQL_PORT}
+PGSQL_WRKSRC_CMD= cd ${PGSQL_PORTDIR} && ${MAKE} -V WRKSRC
.include <bsd.port.pre.mk>
+# Setting/finding PostgreSQL version we want.
+.if exists(${LOCALBASE}/bin/postmaster)
+PGSQL_VER!= ${LOCALBASE}/bin/postmaster -V | \
+ ${SED} -n 's/postmaster.*PostgreSQL[^0-9]*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\..*/\1\2/p'
+.elif exists(${LOCALBASE}/bin/pg_config)
+PGSQL_VER!= ${LOCALBASE}/bin/pg_config --version | ${SED} -n 's/PostgreSQL[^0-9]*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\..*/\1\2/p'
+.else
+PGSQL_VER= ${DEFAULT_PGSQL_VER}
+.endif
.if ${PERL_LEVEL} < 500600
RUN_DEPENDS+= ${SITE_PERL}/${PERL_ARCH}/DBI.pm:${PORTSDIR}/databases/p5-DBI-137
@@ -46,14 +50,20 @@ RUN_DEPENDS+= ${SITE_PERL}/${PERL_ARCH}/DBI.pm:${PORTSDIR}/databases/p5-DBI-137
RUN_DEPENDS+= ${SITE_PERL}/${PERL_ARCH}/DBI.pm:${PORTSDIR}/databases/p5-DBI
.endif
-POSTGRESQL_PORT?= databases/postgresql7
-PGSQL_PORTDIR?= ${PORTSDIR}/${POSTGRESQL_PORT}
-PGSQL_WRKSRC!= cd ${PGSQL_PORTDIR} && ${MAKE} -V WRKSRC
-
-CONFIGURE_ENV= POSTGRES_HOME="${PGSQL_WRKSRC}/src" \
+CONFIGURE_ENV= POSTGRES_HOME="`${PGSQL_WRKSRC_CMD}`/src" \
LOCALBASE="${LOCALBASE}"
+post-patch:
+ @${PERL} -i -pe '$$_ = "" if /ppport.h/' \
+ ${WRKSRC}/PgSPI.h
+
post-clean:
@cd ${PGSQL_PORTDIR} && ${MAKE} clean
+post-install:
+ @${MKDIR} ${DOCSDIR}
+ @${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${DOCSDIR}
+ @${ECHO_MSG} "===> Documentation installed in ${DOCSDIR}."
+.endif
+
.include <bsd.port.post.mk>
OpenPOWER on IntegriCloud