blob: ebbc53e9d0cf5c2eba58e8d2b5da5311c7bf319e (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
  | 
# New ports collection makefile for:	PostgreSQL PL/Python
# Date created:		March 4, 2004
# Whom:			Dima Dorfman <dd@FreeBSD.org>
#
# $FreeBSD$
#
PORTNAME=	postgresql
PORTREVISION=	1
CATEGORIES=	databases python
PKGNAMESUFFIX=	-plpython
MAINTAINER=	ports@FreeBSD.org
COMMENT=	A module for using Python to write SQL functions
RUN_DEPENDS=	postgres:${PORTSDIR}/${POSTGRESQL_PORT}
MASTERDIR=	${.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?=	/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/.*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_PYTHON=	yes
CONFIGURE_ARGS=	--with-python
BUILD_DIRS=	src/pl/plpython
SLAVE_ONLY=	yes
POSTGRESQL_PORT=databases/postgresql${PGSQL_VER}-server
.include "${MASTERDIR}/Makefile"
 
  |