aboutsummaryrefslogtreecommitdiff
path: root/databases/p5-DBD-Pg
diff options
context:
space:
mode:
authorMax Khon <fjoe@FreeBSD.org>2002-03-12 20:29:24 +0000
committerMax Khon <fjoe@FreeBSD.org>2002-03-12 20:29:24 +0000
commit16b6bafa8bca86cb21e0128fbb42540e716248a1 (patch)
tree77e87bd3a966fbc4ea67b6c92b65623fc0ffea4a /databases/p5-DBD-Pg
parent43b9bc5f3edd59e948e2b00fc7a2f7839ad0ce4b (diff)
downloadports-16b6bafa8bca86cb21e0128fbb42540e716248a1.tar.gz
ports-16b6bafa8bca86cb21e0128fbb42540e716248a1.zip
Notes
Diffstat (limited to 'databases/p5-DBD-Pg')
-rw-r--r--databases/p5-DBD-Pg/Makefile18
1 files changed, 14 insertions, 4 deletions
diff --git a/databases/p5-DBD-Pg/Makefile b/databases/p5-DBD-Pg/Makefile
index 67bc13792183..f8845dbfa04d 100644
--- a/databases/p5-DBD-Pg/Makefile
+++ b/databases/p5-DBD-Pg/Makefile
@@ -12,17 +12,27 @@ MASTER_SITES= ${MASTER_SITE_PERL_CPAN}
MASTER_SITE_SUBDIR= DBD
PKGNAMEPREFIX= p5-
-MAINTAINER= ports@freebsd-services.com
+MAINTAINER= fjoe@freebsd.org
BUILD_DEPENDS= ${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/${PERL_ARCH}/DBI.pm:${PORTSDIR}/databases/p5-DBI
LIB_DEPENDS= pq.2:${PORTSDIR}/databases/postgresql7
RUN_DEPENDS= ${BUILD_DEPENDS}
PERL_CONFIGURE= yes
-CONFIGURE_ENV+= POSTGRES_INCLUDE=${PREFIX}/include \
- POSTGRES_LIB=${PREFIX}/lib
-
MANPREFIX= ${PREFIX}/lib/perl5/${PERL_VERSION}
MAN3= DBD::Pg.3 DBD::dbd-pg.3
.include <bsd.port.mk>
+
+.if exists(${LOCALBASE}/bin/pg_config)
+PG_CONFIG= ${LOCALBASE}/bin/pg_config
+.elif exists(${LOCALBASE}/pgsql/bin/pg_config)
+PG_CONFIG= ${LOCALBASE}/pgsql/bin/pg_config
+.endif
+.if defined(PG_CONFIG)
+CONFIGURE_ENV+= POSTGRES_INCLUDE=`${PG_CONFIG} --includedir` \
+ POSTGRES_LIB=`${PG_CONFIG} --libdir`
+.else
+CONFIGURE_ENV+= POSTGRES_INCLUDE=${PREFIX}/include/pgsql \
+ POSTGRES_LIB=${PREFIX}/lib
+.endif