summaryrefslogtreecommitdiff
path: root/databases/p5-DBD-PgSPI/Makefile
diff options
context:
space:
mode:
authorPalle Girgensohn <girgen@FreeBSD.org>2005-01-31 00:35:55 +0000
committerPalle Girgensohn <girgen@FreeBSD.org>2005-01-31 00:35:55 +0000
commit34fa6c853efa04ca648d3d4187d4aec40a00fc0d (patch)
tree3445b3e9b6e7650fd127ec078394a0d7a8e79076 /databases/p5-DBD-PgSPI/Makefile
parentSplit the postgresql ports into a server and a client part. (diff)
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)
Notes
Notes: svn path=/head/; revision=127737
Diffstat (limited to 'databases/p5-DBD-PgSPI/Makefile')
-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 b63138c984da..d1fe9f011bd3 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>