From 6059d46a0483cbcf0bfd39b1fc85ac5e35d0f3e6 Mon Sep 17 00:00:00 2001 From: Ruslan Makhmatkhanov Date: Sun, 20 Jan 2013 10:06:54 +0000 Subject: [PATCH] Split out postgresql-python port on to bunch of PostgreSQL version-dependent ones, so the packages can be built with different versions of PostgreSQL. The patch is from crees@ with couple additions from me. It has some problems that prevents the build with python3, but it was decided that it's better to add this as starting point. Maintainership of this port also was passed to pgsql@ team. PR: 166999 PR: 174152 Reported by: many Approved by: pgsql (crees) --- MOVED | 1 + databases/Makefile | 6 ++- databases/postgresql-plpython/Makefile | 45 ------------------- databases/postgresql83-plpython/Makefile | 6 +++ databases/postgresql84-plpython/Makefile | 6 +++ databases/postgresql90-plpython/Makefile | 31 +++++++++++++ .../pkg-descr | 2 +- databases/postgresql91-plpython/Makefile | 5 +++ databases/postgresql92-plpython/Makefile | 5 +++ 9 files changed, 60 insertions(+), 47 deletions(-) delete mode 100644 databases/postgresql-plpython/Makefile create mode 100644 databases/postgresql83-plpython/Makefile create mode 100644 databases/postgresql84-plpython/Makefile create mode 100644 databases/postgresql90-plpython/Makefile rename databases/{postgresql-plpython => postgresql90-plpython}/pkg-descr (84%) create mode 100644 databases/postgresql91-plpython/Makefile create mode 100644 databases/postgresql92-plpython/Makefile diff --git a/MOVED b/MOVED index ca1c3c737510..4cea9eed14e8 100644 --- a/MOVED +++ b/MOVED @@ -4015,3 +4015,4 @@ devel/lbpp||2013-01-13|Has expired: Dead upstream since 2001 devel/titano||2013-01-13|Has expired: Dead upstream since 2001 games/py-anki|games/anki|2013-01-16|Project was merged mail/claws-mail-synce||2013-01-16|Has expired: No longer supported by Claws Mail team +databases/postgresql-plpython|databases/postgresql90-python|2013-01-20|This port was splitted out to several versioned ports diff --git a/databases/Makefile b/databases/Makefile index 2c7f43ce7c15..191802820cc1 100644 --- a/databases/Makefile +++ b/databases/Makefile @@ -635,7 +635,6 @@ SUBDIR += postgresql-odbc SUBDIR += postgresql-pllua SUBDIR += postgresql-plproxy - SUBDIR += postgresql-plpython SUBDIR += postgresql-plruby SUBDIR += postgresql-relay SUBDIR += postgresql-repmgr @@ -643,12 +642,14 @@ SUBDIR += postgresql83-contrib SUBDIR += postgresql83-docs SUBDIR += postgresql83-plperl + SUBDIR += postgresql83-plpython SUBDIR += postgresql83-pltcl SUBDIR += postgresql83-server SUBDIR += postgresql84-client SUBDIR += postgresql84-contrib SUBDIR += postgresql84-docs SUBDIR += postgresql84-plperl + SUBDIR += postgresql84-plpython SUBDIR += postgresql84-pltcl SUBDIR += postgresql84-server SUBDIR += postgresql90-client @@ -656,6 +657,7 @@ SUBDIR += postgresql90-docs SUBDIR += postgresql90-pgtcl SUBDIR += postgresql90-plperl + SUBDIR += postgresql90-plpython SUBDIR += postgresql90-pltcl SUBDIR += postgresql90-server SUBDIR += postgresql91-client @@ -663,6 +665,7 @@ SUBDIR += postgresql91-docs SUBDIR += postgresql91-pgtcl SUBDIR += postgresql91-plperl + SUBDIR += postgresql91-plpython SUBDIR += postgresql91-pltcl SUBDIR += postgresql91-server SUBDIR += postgresql92-client @@ -670,6 +673,7 @@ SUBDIR += postgresql92-docs SUBDIR += postgresql92-pgtcl SUBDIR += postgresql92-plperl + SUBDIR += postgresql92-plpython SUBDIR += postgresql92-pltcl SUBDIR += postgresql92-server SUBDIR += postgresql_autodoc diff --git a/databases/postgresql-plpython/Makefile b/databases/postgresql-plpython/Makefile deleted file mode 100644 index 365f0788c05c..000000000000 --- a/databases/postgresql-plpython/Makefile +++ /dev/null @@ -1,45 +0,0 @@ -# New ports collection makefile for: PostgreSQL PL/Python -# Date created: March 4, 2004 -# Whom: Dima Dorfman -# -# $FreeBSD$ -# - -PORTNAME= postgresql -PORTREVISION= 2 -CATEGORIES= databases python -PKGNAMESUFFIX= -plpython - -MAINTAINER= rm@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?=90 - -# can't include 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 -PLIST_SUB= PYTHON_MAJOR_VER=${PYTHON_VER:R} - -.include "${MASTERDIR}/Makefile" diff --git a/databases/postgresql83-plpython/Makefile b/databases/postgresql83-plpython/Makefile new file mode 100644 index 000000000000..f28616640ad7 --- /dev/null +++ b/databases/postgresql83-plpython/Makefile @@ -0,0 +1,6 @@ +# $FreeBSD$ + +USE_PYTHON= -2.7 +WANT_PGSQL_VER= 83 + +.include "${.CURDIR}/../postgresql90-plpython/Makefile" diff --git a/databases/postgresql84-plpython/Makefile b/databases/postgresql84-plpython/Makefile new file mode 100644 index 000000000000..d404df6ca7e3 --- /dev/null +++ b/databases/postgresql84-plpython/Makefile @@ -0,0 +1,6 @@ +# $FreeBSD$ + +USE_PYTHON= -2.7 +WANT_PGSQL_VER= 84 + +.include "${.CURDIR}/../postgresql90-plpython/Makefile" diff --git a/databases/postgresql90-plpython/Makefile b/databases/postgresql90-plpython/Makefile new file mode 100644 index 000000000000..f704cfab043b --- /dev/null +++ b/databases/postgresql90-plpython/Makefile @@ -0,0 +1,31 @@ +# $FreeBSD$ + +PORTNAME= postgresql +CATEGORIES= databases python +PKGNAMESUFFIX= ${WANT_PGSQL_VER}-plpython + +MAINTAINER= pgsql@FreeBSD.org +COMMENT= Module for using Python to write SQL functions + +USE_PGSQL= server + +MASTERDIR= ${.CURDIR}/../postgresql${WANT_PGSQL_VER}-server + +WANT_PGSQL_VER?= 90 + +USE_PYTHON?= yes +PYTHON_MAJOR_VER= ${PYTHON_VER:R} +CONFIGURE_ARGS= --with-python +PLIST_SUB= PYTHON_MAJOR_VER=${PYTHON_MAJOR_VER} + +.if ${PYTHON_MAJOR_VER} == 3 +PLIST_SUB+= PYTHON3="" +.else +PLIST_SUB+= PYTHON3="@comment " +.endif + +BUILD_DIRS= src/backend src/pl/plpython +INSTALL_DIRS= src/pl/plpython +SLAVE_ONLY= yes + +.include "${MASTERDIR}/Makefile" diff --git a/databases/postgresql-plpython/pkg-descr b/databases/postgresql90-plpython/pkg-descr similarity index 84% rename from databases/postgresql-plpython/pkg-descr rename to databases/postgresql90-plpython/pkg-descr index 5c89f84ef6ad..1e121bca492d 100644 --- a/databases/postgresql-plpython/pkg-descr +++ b/databases/postgresql90-plpython/pkg-descr @@ -3,4 +3,4 @@ procedures in Python (http://www.python.org/). This software is part of the standard PostgreSQL distribution. -WWW: http://www.postgresql.org/ +WWW: http://www.postgresql.org/ diff --git a/databases/postgresql91-plpython/Makefile b/databases/postgresql91-plpython/Makefile new file mode 100644 index 000000000000..f5fe4f38ee99 --- /dev/null +++ b/databases/postgresql91-plpython/Makefile @@ -0,0 +1,5 @@ +# $FreeBSD$ + +WANT_PGSQL_VER= 91 + +.include "${.CURDIR}/../postgresql90-plpython/Makefile" diff --git a/databases/postgresql92-plpython/Makefile b/databases/postgresql92-plpython/Makefile new file mode 100644 index 000000000000..0fccab61ab19 --- /dev/null +++ b/databases/postgresql92-plpython/Makefile @@ -0,0 +1,5 @@ +# $FreeBSD$ + +WANT_PGSQL_VER= 92 + +.include "${.CURDIR}/../postgresql90-plpython/Makefile"