aboutsummaryrefslogtreecommitdiff
path: root/databases/p5-postgresql-plperl/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-postgresql-plperl/Makefile
parentae2c26ad44dba87dd1377d70dfb1906132114c7b (diff)
Notes
Diffstat (limited to 'databases/p5-postgresql-plperl/Makefile')
-rw-r--r--databases/p5-postgresql-plperl/Makefile36
1 files changed, 23 insertions, 13 deletions
diff --git a/databases/p5-postgresql-plperl/Makefile b/databases/p5-postgresql-plperl/Makefile
index 3e2747b93f13..a9e83c84802e 100644
--- a/databases/p5-postgresql-plperl/Makefile
+++ b/databases/p5-postgresql-plperl/Makefile
@@ -5,27 +5,37 @@
# $FreeBSD$
#
-PORTREVISION= 1
+PORTNAME= postgresql
CATEGORIES= databases perl5
-PKGNAMEPREFIX= p5-
PKGNAMESUFFIX= -plperl
MAINTAINER= girgen@FreeBSD.org
-COMMENT= A module for using Perl5 to write SQL functions
+COMMENT= Write SQL functions for PostgreSQL using Perl5
-POSTGRESQL_PORT?= databases/postgresql7
-POSTGRESQL_SUBPORT=YES
-.include "../../${POSTGRESQL_PORT}/Makefile"
+MASTERDIR= ${.CURDIR}/../postgresql${PGSQL_VER}-server
-RUN_DEPENDS= postgres:${PORTSDIR}/${POSTGRESQL_PORT}
+RUN_DEPENDS= postgres:${.CURDIR}/../postgresql${PGSQL_VER}-server
+
+DEFAULT_PGSQL_VER?=74
+
+# can't include <bsd.port.pre.mk> in a slave port
+# so set these instead:
+LOCALBASE?= ${DESTDIR}/usr/local
+SED?= /usr/bin/sed
+
+# 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
USE_PERL5= yes
CONFIGURE_ARGS= --with-perl
-MAKE_ARGS+= -C src/pl/plperl
-MAKEFILE= GNUmakefile
-
-post-install:
- @ ${CAT} ${PKGMESSAGE}
+BUILD_DIRS= src/pl/plperl
+SLAVE_ONLY= yes
-.include <bsd.port.mk>
+.include "${MASTERDIR}/Makefile"