aboutsummaryrefslogtreecommitdiff
path: root/databases
diff options
context:
space:
mode:
Diffstat (limited to 'databases')
-rw-r--r--databases/Makefile9
-rw-r--r--databases/clip/Makefile3
-rw-r--r--databases/courier-authlib-mysql/Makefile3
-rw-r--r--databases/courier-authlib-pgsql/Makefile3
-rw-r--r--databases/courier-authlib-userdb/Makefile3
-rw-r--r--databases/courier-authlib-usergdbm/Makefile3
-rw-r--r--databases/dbconnect/Makefile2
-rw-r--r--databases/erserver/Makefile24
-rw-r--r--databases/grass-i18n/Makefile5
-rw-r--r--databases/grass/Makefile5
-rw-r--r--databases/gtksql/Makefile3
-rw-r--r--databases/hk_classes/Makefile3
-rw-r--r--databases/hs-hsql/Makefile9
-rw-r--r--databases/libdbi-drivers/Makefile2
-rw-r--r--databases/libgda2/Makefile29
-rw-r--r--databases/libgda3/Makefile29
-rw-r--r--databases/p5-DBD-Pg-13/Makefile13
-rw-r--r--databases/p5-DBD-Pg/Makefile13
-rw-r--r--databases/p5-DBD-PgSPI/Makefile40
-rw-r--r--databases/p5-Pg/Makefile5
-rw-r--r--databases/p5-postgresql-plperl/Makefile36
-rw-r--r--databases/p5-postgresql-plperl/files/patch-src-makefiles-Makefile.freebsd8
-rw-r--r--databases/p5-postgresql-plperl/pkg-message3
-rw-r--r--databases/p5-postgresql-plperl/pkg-plist2
-rw-r--r--databases/pgadmin3-12/Makefile6
-rw-r--r--databases/pgadmin3/Makefile6
-rw-r--r--databases/pgbash/Makefile4
-rw-r--r--databases/postgis/Makefile13
-rw-r--r--databases/postgresql-contrib/Makefile44
-rw-r--r--databases/postgresql-contrib/pkg-message3
-rw-r--r--databases/postgresql-contrib/pkg-plist144
-rw-r--r--databases/postgresql-docs/Makefile26
-rw-r--r--databases/postgresql-libpq++/Makefile6
-rw-r--r--databases/postgresql-libpqxx/Makefile5
-rw-r--r--databases/postgresql-libpqxx/pkg-plist1
-rw-r--r--databases/postgresql-libpqxx3/Makefile5
-rw-r--r--databases/postgresql-libpqxx3/pkg-plist1
-rw-r--r--databases/postgresql-libpqxx30/Makefile5
-rw-r--r--databases/postgresql-libpqxx30/pkg-plist1
-rw-r--r--databases/postgresql-plpython/Makefile33
-rw-r--r--databases/postgresql-plpython/files/patch-plpython-Makefile11
-rw-r--r--databases/postgresql-plpython/pkg-plist2
-rw-r--r--databases/postgresql-plruby/Makefile21
-rw-r--r--databases/postgresql-pltcl/Makefile30
-rw-r--r--databases/postgresql-pltcl/pkg-message3
-rw-r--r--databases/postgresql-pltcl/pkg-plist7
-rw-r--r--databases/py-PyGreSQL/Makefile4
-rw-r--r--databases/py-psycopg/Makefile4
-rw-r--r--databases/py-pyPgSQL/Makefile7
-rw-r--r--databases/qt-pgsql-plugin/Makefile7
-rw-r--r--databases/ruby-postgres/Makefile7
-rw-r--r--databases/rubygem-postgres/Makefile7
-rw-r--r--databases/slony1/Makefile18
-rw-r--r--databases/slony1v2/Makefile18
-rw-r--r--databases/sqlrelay/Makefile4
55 files changed, 279 insertions, 429 deletions
diff --git a/databases/Makefile b/databases/Makefile
index 8293127d07ab..cebc6d2c1973 100644
--- a/databases/Makefile
+++ b/databases/Makefile
@@ -263,9 +263,12 @@
SUBDIR += postgresql-pltcl
SUBDIR += postgresql-relay
SUBDIR += postgresql-tcltk
- SUBDIR += postgresql7
- SUBDIR += postgresql72
- SUBDIR += postgresql73
+ SUBDIR += postgresql73-client
+ SUBDIR += postgresql73-server
+ SUBDIR += postgresql74-client
+ SUBDIR += postgresql74-server
+ SUBDIR += postgresql80-client
+ SUBDIR += postgresql80-server
SUBDIR += postgresql_autodoc
SUBDIR += puredb
SUBDIR += pxtools
diff --git a/databases/clip/Makefile b/databases/clip/Makefile
index 02be281c0b38..46bba382310e 100644
--- a/databases/clip/Makefile
+++ b/databases/clip/Makefile
@@ -60,7 +60,7 @@ PLIST_SUB+= MYSQL="@comment "
.endif
.if defined(WITH_PGSQL) || exists(${LOCALBASE}/include/libpq-fe.h)
-LIB_DEPENDS+= pq.3:${PORTSDIR}/${PGSQL_PORT}
+USE_PGSQL= yes
PLIST_SUB+= PGSQL=""
.else
PLIST_SUB+= PGSQL="@comment "
@@ -89,7 +89,6 @@ MAKE_ENV= HOME=${WRKDIR} LANG=C
PKGMESSAGE= ${WRKDIR}/pkg-message
-PGSQL_PORT?= databases/postgresql7
FIREBIRD_PORT?= databases/firebird
BIN2STRIP= bdbf clip clip_bl clip_blank clip_cld clip_conv clip_dbf2txt \
diff --git a/databases/courier-authlib-mysql/Makefile b/databases/courier-authlib-mysql/Makefile
index 71952f4da9b4..ea2c8c5b15a5 100644
--- a/databases/courier-authlib-mysql/Makefile
+++ b/databases/courier-authlib-mysql/Makefile
@@ -86,8 +86,7 @@ CONFIGURE_ARGS+=--with-authmysql \
CONFIGURE_ARGS+=--without-authpgsql
PLIST_SUB+= PGSQLFLAG="@comment "
.else
-POSTGRESQL_PORT?= databases/postgresql7
-LIB_DEPENDS+= pq.3:${PORTSDIR}/${POSTGRESQL_PORT}
+USE_PGSQL= YES
PLIST_SUB+= PGSQLFLAG=""
.endif
diff --git a/databases/courier-authlib-pgsql/Makefile b/databases/courier-authlib-pgsql/Makefile
index 71952f4da9b4..ea2c8c5b15a5 100644
--- a/databases/courier-authlib-pgsql/Makefile
+++ b/databases/courier-authlib-pgsql/Makefile
@@ -86,8 +86,7 @@ CONFIGURE_ARGS+=--with-authmysql \
CONFIGURE_ARGS+=--without-authpgsql
PLIST_SUB+= PGSQLFLAG="@comment "
.else
-POSTGRESQL_PORT?= databases/postgresql7
-LIB_DEPENDS+= pq.3:${PORTSDIR}/${POSTGRESQL_PORT}
+USE_PGSQL= YES
PLIST_SUB+= PGSQLFLAG=""
.endif
diff --git a/databases/courier-authlib-userdb/Makefile b/databases/courier-authlib-userdb/Makefile
index 71952f4da9b4..ea2c8c5b15a5 100644
--- a/databases/courier-authlib-userdb/Makefile
+++ b/databases/courier-authlib-userdb/Makefile
@@ -86,8 +86,7 @@ CONFIGURE_ARGS+=--with-authmysql \
CONFIGURE_ARGS+=--without-authpgsql
PLIST_SUB+= PGSQLFLAG="@comment "
.else
-POSTGRESQL_PORT?= databases/postgresql7
-LIB_DEPENDS+= pq.3:${PORTSDIR}/${POSTGRESQL_PORT}
+USE_PGSQL= YES
PLIST_SUB+= PGSQLFLAG=""
.endif
diff --git a/databases/courier-authlib-usergdbm/Makefile b/databases/courier-authlib-usergdbm/Makefile
index 71952f4da9b4..ea2c8c5b15a5 100644
--- a/databases/courier-authlib-usergdbm/Makefile
+++ b/databases/courier-authlib-usergdbm/Makefile
@@ -86,8 +86,7 @@ CONFIGURE_ARGS+=--with-authmysql \
CONFIGURE_ARGS+=--without-authpgsql
PLIST_SUB+= PGSQLFLAG="@comment "
.else
-POSTGRESQL_PORT?= databases/postgresql7
-LIB_DEPENDS+= pq.3:${PORTSDIR}/${POSTGRESQL_PORT}
+USE_PGSQL= YES
PLIST_SUB+= PGSQLFLAG=""
.endif
diff --git a/databases/dbconnect/Makefile b/databases/dbconnect/Makefile
index 5efc2437adcd..5b4aa2114866 100644
--- a/databases/dbconnect/Makefile
+++ b/databases/dbconnect/Makefile
@@ -40,7 +40,7 @@ PLIST_SUB+= MYSQL="@comment "
.endif
.if defined(WITH_PGSQL)
-LIB_DEPENDS+= pq:${PORTSDIR}/databases/postgresql7
+USE_PGSQL= yes
CONFIGURE_ARGS+= --enable-pgsql=yes \
--with-pgsql_include=${LOCALBASE}/include \
--with-pgsql_lib=${LOCALBASE}/lib
diff --git a/databases/erserver/Makefile b/databases/erserver/Makefile
index b9079887243a..fdf84567b500 100644
--- a/databases/erserver/Makefile
+++ b/databases/erserver/Makefile
@@ -7,7 +7,7 @@
PORTNAME= erserver
PORTVERSION= 1.2
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= databases
MASTER_SITES= ftp://gborg.postgresql.org/pub/erserver/stable/
DISTNAME= ${PORTNAME}_v${PORTVERSION}
@@ -16,10 +16,11 @@ DIST_SUBDIR= postgresql
MAINTAINER= kuriyama@FreeBSD.org
COMMENT= Trigger-based asynchronous replication system for PostgreSQL
+PGSQL_PORT= ${PORTSDIR}/databases/postgresql${PGSQL_VER}-server
BUILD_DEPENDS= ant:${PORTSDIR}/devel/apache-ant \
- ${PGINC}/executor/spi.h:${PORTSDIR}/databases/postgresql7
+ ${PGINC}/executor/spi.h:${PGSQL_PORT}
RUN_DEPENDS= ${JAVAJARDIR}/log4j.jar:${PORTSDIR}/devel/log4j \
- psql:${PORTSDIR}/databases/postgresql7
+ postgres:${PGSQL_PORT}
USE_GMAKE= yes
GNU_CONFIGURE= yes
@@ -33,9 +34,22 @@ MAKE_ARGS= sqldir=${DATADIR} templdir=${DATADIR} docdir=${DOCSDIR} \
libdir=${PREFIX}/lib/postgresql javadir=${JAVAJARDIR} \
siteperldir=${SITE_PERL}
-PGINC= ${PREFIX}/include/postgresql/server
+DEFAULT_PGSQL_VER?=74
+
+.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
+
+PGINC= ${LOCALBASE}/include/postgresql/server
pre-install:
${MKDIR} ${DOCSDIR}
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff --git a/databases/grass-i18n/Makefile b/databases/grass-i18n/Makefile
index e99fb9e182ed..71e686b21324 100644
--- a/databases/grass-i18n/Makefile
+++ b/databases/grass-i18n/Makefile
@@ -32,9 +32,8 @@ FILES_TKI18N= tcltkgrass-i18n${EXTRACT_SUFX}
FILES_FONTS= grass${PORTVERSION}_i686-pc-linux-i18n-ipafull-gnu_bin${EXTRACT_SUFX}
.if defined(WITH_POSTGRES)
-POSTGRESQL_PORT?= databases/postgresql7
-LIB_DEPENDS+= pq.3:${PORTSDIR}/${POSTGRESQL_PORT} \
- odbc.1:${PORTSDIR}/databases/unixODBC
+USE_PGSQL= yes
+LIB_DEPENDS+= odbc.1:${PORTSDIR}/databases/unixODBC
CONFIGURE_ARGS+=--with-postgres \
--with-postgres-includes=${LOCALBASE}/include/postgresql/internal/ \
--with-odbc
diff --git a/databases/grass/Makefile b/databases/grass/Makefile
index 3f780e5d4b67..d33f0ba13fec 100644
--- a/databases/grass/Makefile
+++ b/databases/grass/Makefile
@@ -7,7 +7,7 @@
PORTNAME= grass
PORTVERSION= 5.0.2
-PORTREVISION= 3
+PORTREVISION= 4
PORTEPOCH= 2
CATEGORIES= databases
MASTER_SITES= http://grass.itc.it/grass50/source/ \
@@ -19,7 +19,6 @@ DISTNAME= ${PORTNAME}-${PORTVERSION}_src
MAINTAINER= ports@FreeBSD.org
COMMENT= An open source Geographical Information System (GIS)
-POSTGRESQL_PORT?= databases/postgresql7
LIB_DEPENDS= tiff.4:${PORTSDIR}/graphics/tiff \
png.5:${PORTSDIR}/graphics/png \
jpeg.9:${PORTSDIR}/graphics/jpeg \
@@ -27,7 +26,6 @@ LIB_DEPENDS= tiff.4:${PORTSDIR}/graphics/tiff \
fftw.2:${PORTSDIR}/math/fftw \
freetype.9:${PORTSDIR}/print/freetype2 \
gdbm.3:${PORTSDIR}/databases/gdbm \
- pq.3:${PORTSDIR}/${POSTGRESQL_PORT} \
odbc.1:${PORTSDIR}/databases/unixODBC \
lapack.3:${PORTSDIR}/math/lapack
BUILD_DEPENDS= tclsh8.3:${PORTSDIR}/lang/tcl83 \
@@ -39,6 +37,7 @@ EXTRACT_AFTER_ARGS= | ${TAR} -xf - --exclude *CVS*
WRKSRC= ${WRKDIR}/${PORTNAME}${PORTVERSION}
+USE_PGSQL= yes
USE_ICONV= yes
USE_XLIB= yes
USE_GL= yes
diff --git a/databases/gtksql/Makefile b/databases/gtksql/Makefile
index 2441fc0f2329..76b66f1b1343 100644
--- a/databases/gtksql/Makefile
+++ b/databases/gtksql/Makefile
@@ -21,7 +21,6 @@ WITH_MYSQL= yes
USE_X_PREFIX= yes
USE_GTK= yes
USE_REINPLACE= yes
-POSTGRESQL_PORT?= databases/postgresql7
.include <bsd.port.pre.mk>
@@ -33,7 +32,7 @@ LIB_DEPENDS+= mysqlclient.10:${PORTSDIR}/databases/mysql323-client
.if defined(WITH_PGSQL) || (exists(${LOCALBASE}/lib/libpq.a) \
&& !defined(WITHOUT_PGSQL))
HAVE_PGSQL= yes
-LIB_DEPENDS+= pq.3:${PORTSDIR}/${POSTGRESQL_PORT}
+USE_PGSQL= yes
.endif
pre-patch:
diff --git a/databases/hk_classes/Makefile b/databases/hk_classes/Makefile
index ab19e334c0de..2c1ebc9bb1e1 100644
--- a/databases/hk_classes/Makefile
+++ b/databases/hk_classes/Makefile
@@ -53,8 +53,7 @@ PLIST_SUB+= MYSQL="@comment "
.endif
.if defined(WITH_POSTGRESQL)
-POSTGRESQL_PORT?= databases/postgresql7
-LIB_DEPENDS+= pq.3:${PORTSDIR}/${POSTGRESQL_PORT}
+USE_PGSQL= yes
CONFIGURE_ARGS+= --with-postgres-incdir=${LOCALBASE}/include/ \
--with-postgres-libdir=${LOCALBASE}/lib
CONFIGURE_ENV+= CPPFLAGS="-I${LOCALBASE}/include" LIBS="-L${LOCALBASE}/lib"
diff --git a/databases/hs-hsql/Makefile b/databases/hs-hsql/Makefile
index bc82027cc106..fbac06fdb9cf 100644
--- a/databases/hs-hsql/Makefile
+++ b/databases/hs-hsql/Makefile
@@ -7,6 +7,7 @@
PORTNAME= hsql
PORTVERSION= 1.4
+PORTREVISION= 1
CATEGORIES= databases haskell
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= htoolkit
@@ -16,10 +17,10 @@ DISTNAME= HSQL-${PORTVERSION}
MAINTAINER= haskell@FreeBSD.org
COMMENT= Haskell access to SQL
-BUILD_DEPENDS= psql:${PORTSDIR}/databases/postgresql7 \
- ghc:${PORTSDIR}/lang/ghc
-RUN_DEPENDS= psql:${PORTSDIR}/databases/postgresql7 \
- ghc:${PORTSDIR}/lang/ghc
+BUILD_DEPENDS= ghc:${PORTSDIR}/lang/ghc
+RUN_DEPENDS= ghc:${PORTSDIR}/lang/ghc
+
+USE_PGSQL= yes
.if !defined(NOPORTDOCS)
BUILD_DEPENDS+= haddock:${PORTSDIR}/devel/hs-haddock
diff --git a/databases/libdbi-drivers/Makefile b/databases/libdbi-drivers/Makefile
index f767f63b66e8..b0820d7463c7 100644
--- a/databases/libdbi-drivers/Makefile
+++ b/databases/libdbi-drivers/Makefile
@@ -45,7 +45,7 @@ PLIST_SUB+= MYSQL="@comment "
.endif
.if defined(WITH_PGSQL)
-LIB_DEPENDS+= pq.3:${PORTSDIR}/databases/postgresql7
+USE_PGSQL= yes
CONFIGURE_ARGS+= --with-pgsql
PLIST_SUB+= PGSQL=""
.else
diff --git a/databases/libgda2/Makefile b/databases/libgda2/Makefile
index a801be2962ad..9028bea115c0 100644
--- a/databases/libgda2/Makefile
+++ b/databases/libgda2/Makefile
@@ -48,11 +48,7 @@ WITH_MYSQL= yes
.endif
.if exists(${LOCALBASE}/lib/libpq.so.3)
-WITH_POSTGRES7= yes
-.endif
-
-.if exists(${LOCALBASE}/lib/libpgeasy.so.2)
-WITH_POSTGRES72=yes
+WITH_PGSQL= yes
.endif
.if exists(${LOCALBASE}/lib/libldap.so.2)
@@ -92,21 +88,11 @@ CONFIGURE_ARGS+= --with-mysql=${LOCALBASE}
PLIST_SUB+= MYSQL:=""
.endif
-.if !defined(WITHOUT_POSTGRES7) && defined(WITH_POSTGRES7)
-POSTGRESQL_PORT?= databases/postgresql7
-LIB_DEPENDS+= pq.3:${PORTSDIR}/${POSTGRESQL_PORT}
-CONFIGURE_ARGS+= --with-postgres=${LOCALBASE}
-PLIST_SUB+= POSTGRES:=""
-.endif
-
-.if !defined(WITHOUT_POSTGRES72) && defined(WITH_POSTGRES72)
-POSTGRESQL_PORT?= databases/postgresql72
-LIB_DEPENDS+= pgeasy.2:${PORTSDIR}/${POSTGRESQL_PORT}
+.if !defined(WITHOUT_PGSQL) && defined(WITH_PGSQL)
+USE_PGSQL= yes
CONFIGURE_ARGS+= --with-postgres=${LOCALBASE}
PLIST_SUB+= POSTGRES:=""
-.endif
-
-.if !defined(WITH_POSTGRES7) && !defined(WITH_POSTGRES72)
+.else
PLIST_SUB+= POSTGRES:="@comment "
CONFIGURE_ARGS+= --without-postgres
.endif
@@ -178,11 +164,8 @@ pre-everything::
.if !defined(WITH_MYSQL)
@${ECHO_MSG} "You can enable support for MySQL databases by defining WITH_MYSQL."
.endif
-.if !defined(WITH_POSTGRES7)
- @${ECHO_MSG} "You can enable support for Postgres 7.0 databases by defining WITH_POSTGRES7."
-.endif
-.if !defined(WITH_POSTGRES72)
- @${ECHO_MSG} "You can enable support for Postgres 7.2 databases by defining WITH_POSTGRES72."
+.if !defined(WITH_PGSQL)
+ @${ECHO_MSG} "You can enable support for PostgreSQL databases by defining WITH_PGSQL."
.endif
.if !defined(WITH_LDAP)
@${ECHO_MSG} "You can enable support for LDAP databases by defining WITH_LDAP."
diff --git a/databases/libgda3/Makefile b/databases/libgda3/Makefile
index a801be2962ad..9028bea115c0 100644
--- a/databases/libgda3/Makefile
+++ b/databases/libgda3/Makefile
@@ -48,11 +48,7 @@ WITH_MYSQL= yes
.endif
.if exists(${LOCALBASE}/lib/libpq.so.3)
-WITH_POSTGRES7= yes
-.endif
-
-.if exists(${LOCALBASE}/lib/libpgeasy.so.2)
-WITH_POSTGRES72=yes
+WITH_PGSQL= yes
.endif
.if exists(${LOCALBASE}/lib/libldap.so.2)
@@ -92,21 +88,11 @@ CONFIGURE_ARGS+= --with-mysql=${LOCALBASE}
PLIST_SUB+= MYSQL:=""
.endif
-.if !defined(WITHOUT_POSTGRES7) && defined(WITH_POSTGRES7)
-POSTGRESQL_PORT?= databases/postgresql7
-LIB_DEPENDS+= pq.3:${PORTSDIR}/${POSTGRESQL_PORT}
-CONFIGURE_ARGS+= --with-postgres=${LOCALBASE}
-PLIST_SUB+= POSTGRES:=""
-.endif
-
-.if !defined(WITHOUT_POSTGRES72) && defined(WITH_POSTGRES72)
-POSTGRESQL_PORT?= databases/postgresql72
-LIB_DEPENDS+= pgeasy.2:${PORTSDIR}/${POSTGRESQL_PORT}
+.if !defined(WITHOUT_PGSQL) && defined(WITH_PGSQL)
+USE_PGSQL= yes
CONFIGURE_ARGS+= --with-postgres=${LOCALBASE}
PLIST_SUB+= POSTGRES:=""
-.endif
-
-.if !defined(WITH_POSTGRES7) && !defined(WITH_POSTGRES72)
+.else
PLIST_SUB+= POSTGRES:="@comment "
CONFIGURE_ARGS+= --without-postgres
.endif
@@ -178,11 +164,8 @@ pre-everything::
.if !defined(WITH_MYSQL)
@${ECHO_MSG} "You can enable support for MySQL databases by defining WITH_MYSQL."
.endif
-.if !defined(WITH_POSTGRES7)
- @${ECHO_MSG} "You can enable support for Postgres 7.0 databases by defining WITH_POSTGRES7."
-.endif
-.if !defined(WITH_POSTGRES72)
- @${ECHO_MSG} "You can enable support for Postgres 7.2 databases by defining WITH_POSTGRES72."
+.if !defined(WITH_PGSQL)
+ @${ECHO_MSG} "You can enable support for PostgreSQL databases by defining WITH_PGSQL."
.endif
.if !defined(WITH_LDAP)
@${ECHO_MSG} "You can enable support for LDAP databases by defining WITH_LDAP."
diff --git a/databases/p5-DBD-Pg-13/Makefile b/databases/p5-DBD-Pg-13/Makefile
index 5bb6ca8bc53a..83958486c8b7 100644
--- a/databases/p5-DBD-Pg-13/Makefile
+++ b/databases/p5-DBD-Pg-13/Makefile
@@ -16,9 +16,7 @@ PKGNAMEPREFIX= p5-
MAINTAINER= perl@FreeBSD.org
COMMENT= Provides access to PostgreSQL databases through the DBI
-LIB_DEPENDS= pq.3:${PORTSDIR}/${POSTGRESQL_PORT}
-
-POSTGRESQL_PORT?= databases/postgresql7
+USE_PGSQL= yes
PERL_CONFIGURE= yes
@@ -37,17 +35,8 @@ BUILD_DEPENDS+= ${SITE_PERL}/${PERL_ARCH}/DBI.pm:${PORTSDIR}/databases/p5-DBI
RUN_DEPENDS+= ${SITE_PERL}/${PERL_ARCH}/DBI.pm:${PORTSDIR}/databases/p5-DBI
.endif
-.if defined(WITH_OLD_LAYOUT)
-CONFIGURE_ENV+= POSTGRES_INCLUDE=${LOCALBASE}/include/pgsql \
- POSTGRES_LIB=${LOCALBASE}/lib
-.else
-.if exists(${LOCALBASE}/pgsql/bin/pg_config)
-PG_CONFIG= ${LOCALBASE}/pgsql/bin/pg_config
-.else
PG_CONFIG= ${LOCALBASE}/bin/pg_config
-.endif
CONFIGURE_ENV+= POSTGRES_INCLUDE=`${PG_CONFIG} --includedir` \
POSTGRES_LIB=`${PG_CONFIG} --libdir`
-.endif
.include <bsd.port.post.mk>
diff --git a/databases/p5-DBD-Pg/Makefile b/databases/p5-DBD-Pg/Makefile
index 5bb6ca8bc53a..83958486c8b7 100644
--- a/databases/p5-DBD-Pg/Makefile
+++ b/databases/p5-DBD-Pg/Makefile
@@ -16,9 +16,7 @@ PKGNAMEPREFIX= p5-
MAINTAINER= perl@FreeBSD.org
COMMENT= Provides access to PostgreSQL databases through the DBI
-LIB_DEPENDS= pq.3:${PORTSDIR}/${POSTGRESQL_PORT}
-
-POSTGRESQL_PORT?= databases/postgresql7
+USE_PGSQL= yes
PERL_CONFIGURE= yes
@@ -37,17 +35,8 @@ BUILD_DEPENDS+= ${SITE_PERL}/${PERL_ARCH}/DBI.pm:${PORTSDIR}/databases/p5-DBI
RUN_DEPENDS+= ${SITE_PERL}/${PERL_ARCH}/DBI.pm:${PORTSDIR}/databases/p5-DBI
.endif
-.if defined(WITH_OLD_LAYOUT)
-CONFIGURE_ENV+= POSTGRES_INCLUDE=${LOCALBASE}/include/pgsql \
- POSTGRES_LIB=${LOCALBASE}/lib
-.else
-.if exists(${LOCALBASE}/pgsql/bin/pg_config)
-PG_CONFIG= ${LOCALBASE}/pgsql/bin/pg_config
-.else
PG_CONFIG= ${LOCALBASE}/bin/pg_config
-.endif
CONFIGURE_ENV+= POSTGRES_INCLUDE=`${PG_CONFIG} --includedir` \
POSTGRES_LIB=`${PG_CONFIG} --libdir`
-.endif
.include <bsd.port.post.mk>
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>
diff --git a/databases/p5-Pg/Makefile b/databases/p5-Pg/Makefile
index 2e27b93f5773..ccaf0b8821c9 100644
--- a/databases/p5-Pg/Makefile
+++ b/databases/p5-Pg/Makefile
@@ -7,6 +7,7 @@
PORTNAME= Pg
PORTVERSION= 2.1.1
+PORTREVISION= 1
PORTEPOCH= 1
CATEGORIES= databases perl5
MASTER_SITES= ftp://gborg.postgresql.org/pub/pgperl/stable/
@@ -16,9 +17,7 @@ DIST_SUBDIR= postgresql
MAINTAINER= girgen@FreeBSD.org
COMMENT= An interface for using perl5 to access PostgreSQL databases
-POSTGRESQL_PORT?= databases/postgresql7
-LIB_DEPENDS= pq.3:${PORTSDIR}/${POSTGRESQL_PORT}
-
+USE_PGSQL= yes
USE_PERL5= yes
MAN3= Pg.3
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"
diff --git a/databases/p5-postgresql-plperl/files/patch-src-makefiles-Makefile.freebsd b/databases/p5-postgresql-plperl/files/patch-src-makefiles-Makefile.freebsd
deleted file mode 100644
index 9760f2ca7fa0..000000000000
--- a/databases/p5-postgresql-plperl/files/patch-src-makefiles-Makefile.freebsd
+++ /dev/null
@@ -1,8 +0,0 @@
---- src/makefiles/Makefile.freebsd.orig Wed Aug 29 21:14:40 2001
-+++ src/makefiles/Makefile.freebsd Mon Sep 1 10:16:26 2003
-@@ -23,3 +23,5 @@
- endif
-
- sqlmansect = 7
-+
-+allow_nonpic_in_shlib = yes
diff --git a/databases/p5-postgresql-plperl/pkg-message b/databases/p5-postgresql-plperl/pkg-message
deleted file mode 100644
index 5d0c83920563..000000000000
--- a/databases/p5-postgresql-plperl/pkg-message
+++ /dev/null
@@ -1,3 +0,0 @@
-PL/Perl has been installed. Check the createlang(l) manpage for more
-info. You can install PL/Perl as trusted or untrusted, by using either
-"createlang plperl" or "createlang plperlu".
diff --git a/databases/p5-postgresql-plperl/pkg-plist b/databases/p5-postgresql-plperl/pkg-plist
deleted file mode 100644
index 56bb75060a28..000000000000
--- a/databases/p5-postgresql-plperl/pkg-plist
+++ /dev/null
@@ -1,2 +0,0 @@
-lib/postgresql/plperl.so
-@unexec rmdir %D/lib/postgresql 2>/dev/null || true
diff --git a/databases/pgadmin3-12/Makefile b/databases/pgadmin3-12/Makefile
index 8ba5eba8f452..6a896b1e4e75 100644
--- a/databases/pgadmin3-12/Makefile
+++ b/databases/pgadmin3-12/Makefile
@@ -7,6 +7,7 @@
PORTNAME= pgadmin3
PORTVERSION= 1.2.0
+PORTREVISION= 1
CATEGORIES= databases
MASTER_SITES= ${MASTER_SITE_PGSQL}
MASTER_SITE_SUBDIR= pgadmin3/release/v${PORTVERSION}/src
@@ -14,16 +15,13 @@ MASTER_SITE_SUBDIR= pgadmin3/release/v${PORTVERSION}/src
MAINTAINER= fjoe@FreeBSD.org
COMMENT= PostgreSQL database design and management system
-LIB_DEPENDS= pq.3:${PORTSDIR}/${POSTGRESQL_PORT}
-
+USE_PGSQL= yes
USE_REINPLACE= yes
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --with-wx=${X11BASE}
CONFIGURE_TARGET= --build=${ARCH}-portbld-freebsd${OSREL}
CONFIGURE_ENV= CPPFLAGS="${PTHREAD_CFLAGS}" LIBS="${PTHREAD_LIBS}"
-POSTGRESQL_PORT?= databases/postgresql7
-
post-patch:
@${FIND} ${WRKSRC}/src \( -name '*.cpp' -or -name '*.h' \) -print0 | \
${XARGS} -0 ${REINPLACE_CMD} -e 's,wxNotifyEvent,wxCommandEvent,g'
diff --git a/databases/pgadmin3/Makefile b/databases/pgadmin3/Makefile
index 8ba5eba8f452..6a896b1e4e75 100644
--- a/databases/pgadmin3/Makefile
+++ b/databases/pgadmin3/Makefile
@@ -7,6 +7,7 @@
PORTNAME= pgadmin3
PORTVERSION= 1.2.0
+PORTREVISION= 1
CATEGORIES= databases
MASTER_SITES= ${MASTER_SITE_PGSQL}
MASTER_SITE_SUBDIR= pgadmin3/release/v${PORTVERSION}/src
@@ -14,16 +15,13 @@ MASTER_SITE_SUBDIR= pgadmin3/release/v${PORTVERSION}/src
MAINTAINER= fjoe@FreeBSD.org
COMMENT= PostgreSQL database design and management system
-LIB_DEPENDS= pq.3:${PORTSDIR}/${POSTGRESQL_PORT}
-
+USE_PGSQL= yes
USE_REINPLACE= yes
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --with-wx=${X11BASE}
CONFIGURE_TARGET= --build=${ARCH}-portbld-freebsd${OSREL}
CONFIGURE_ENV= CPPFLAGS="${PTHREAD_CFLAGS}" LIBS="${PTHREAD_LIBS}"
-POSTGRESQL_PORT?= databases/postgresql7
-
post-patch:
@${FIND} ${WRKSRC}/src \( -name '*.cpp' -or -name '*.h' \) -print0 | \
${XARGS} -0 ${REINPLACE_CMD} -e 's,wxNotifyEvent,wxCommandEvent,g'
diff --git a/databases/pgbash/Makefile b/databases/pgbash/Makefile
index 70ce1c5f0a96..13dad1f835fd 100644
--- a/databases/pgbash/Makefile
+++ b/databases/pgbash/Makefile
@@ -7,7 +7,7 @@
PORTNAME= pgbash
PORTVERSION= 7.3
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= databases
MASTER_SITES= http://www.psn.co.jp/PostgreSQL/pgbash/:pgsource \
${MASTER_SITE_GNU:S/$/:bashsrc/}
@@ -19,7 +19,7 @@ EXTRACT_ONLY= pgbash-7.3.tar.gz
MAINTAINER= sascha@root-login.org
COMMENT= SQL Bash Shell for PostgreSQL
-LIB_DEPENDS= pq.3:${PORTSDIR}/databases/postgresql7
+USE_PGSQL= yes
WRKSRC= ${WRKDIR}/pgbash-7.3/src/bash-2.05a
diff --git a/databases/postgis/Makefile b/databases/postgis/Makefile
index 1293fcd0f10e..9fe5ffa657d5 100644
--- a/databases/postgis/Makefile
+++ b/databases/postgis/Makefile
@@ -27,8 +27,9 @@ PGSQL_SRC= ${WRKDIR}/pgsql/postgresql
INSTALL_TARGET= install
INSTALLS_SHLIB= no
-OPTIONS= PGSQL8 "Use PostgreSQL 8 instead of PostgreSQL 7.4" off \
- GEOS "Include GEOS - the OpenGIS 'Simple Features for SQL'" off \
+OPTIONS= GEOS "Include GEOS - the OpenGIS 'Simple Features for SQL'" off \
+
+USE_PGSQL= YES
.include <bsd.port.pre.mk>
@@ -37,13 +38,7 @@ MAKE_ARGS= PGSQL_SRC="${PGSQL_SRC}" \
BINDIR="${PREFIX}/bin" \
LIBDIR="${PREFIX}/lib"
-.if defined(WITH_PGSQL8)
-PGSQL_PORTDIR= ${PORTSDIR}/databases/postgresql-devel
-.else
-PGSQL_PORTDIR= ${PORTSDIR}/databases/postgresql7
-.endif
-
-LIB_DEPENDS+= pq.3:${PGSQL_PORTDIR}
+PGSQL_PORTDIR= ${PORTSDIR}/databases/postgresql${PGSQL_VER}-client
.if !defined(NOPORTDOCS)
BUILD_DEPENDS+= xsltproc:${PORTSDIR}/textproc/libxslt \
diff --git a/databases/postgresql-contrib/Makefile b/databases/postgresql-contrib/Makefile
index 08144388bece..ffc336f65ead 100644
--- a/databases/postgresql-contrib/Makefile
+++ b/databases/postgresql-contrib/Makefile
@@ -5,40 +5,44 @@
# $FreeBSD$
#
+PORTNAME= postgresql
+PKGNAMESUFFIX= -contrib
PORTREVISION= 0
CATEGORIES= databases
-PKGNAMESUFFIX= -contrib
MAINTAINER= girgen@FreeBSD.org
COMMENT= The contrib utilities from the PostgreSQL distribution
-LIB_DEPENDS= pq:${PORTSDIR}/${POSTGRESQL_PORT}
+USE_PGSQL= yes
+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?= ${DESTDIR}/usr/local
+SED?= /usr/bin/sed
-POSTGRESQL_PORT?= databases/postgresql7
-POSTGRESQL_SUBPORT=YES
-.include <${.CURDIR}/../../${POSTGRESQL_PORT}/Makefile>
+# Setting/finding PostgreSQL version we want.
+.if 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
-INSTALLS_SHLIB= yes
USE_BISON= yes
-CONFIGURE_ARGS= --with-libraries=${LOCALBASE}/lib \
- --with-includes=${LOCALBASE}/include \
- --docdir=${DOCSDIR}
-MAKE_ARGS= -C contrib
+BUILD_DIRS= src/port contrib
+INSTALL_DIRS= contrib
-pre-build:
- cd ${WRKSRC}/src/backend ;\
- ${GMAKE} ../../src/include/parser/parse.h ../../src/include/utils/fmgroids.h
- cd ${WRKSRC}/src/port; ${GMAKE}
+SLAVE_ONLY= yes
+PKGMESSAGE= ${.CURDIR}/pkg-message
post-install:
- @ ${INSTALL_SCRIPT} ${WRKSRC}/contrib/ipc_check/ipc_check.pl ${PREFIX}/bin/ipc_check ;\
+ @- ${INSTALL_SCRIPT} ${WRKSRC}/contrib/ipc_check/ipc_check.pl ${PREFIX}/bin/ipc_check ;\
${INSTALL_DATA} ${WRKSRC}/contrib/ipc_check/README ${DOCSDIR}/contrib/README.ipc_check ;\
${INSTALL_SCRIPT} ${WRKSRC}/contrib/reindexdb/reindexdb ${PREFIX}/bin/reindexdb ;\
${INSTALL_DATA} ${WRKSRC}/contrib/reindexdb/README ${DOCSDIR}/contrib/README.reindexdb
- @ ${INSTALL_DATA} ${WRKSRC}/contrib/README ${DOCSDIR}/contrib/README
- @ ${ECHO} ==================================== ;\
- ${SED} -e "s,/usr/local,${PREFIX},g" ${PKGDIR}/pkg-message ;\
- ${ECHO} ====================================
+ @- ${INSTALL_DATA} ${WRKSRC}/contrib/README ${DOCSDIR}/contrib/README
-.include <bsd.port.mk>
+.include "${MASTERDIR}/Makefile"
diff --git a/databases/postgresql-contrib/pkg-message b/databases/postgresql-contrib/pkg-message
deleted file mode 100644
index 8120f2d8d89c..000000000000
--- a/databases/postgresql-contrib/pkg-message
+++ /dev/null
@@ -1,3 +0,0 @@
-The PostgreSQL contrib utilities have been installed. Please see
-/usr/local/share/doc/postgresql/contrib/README
-for more information.
diff --git a/databases/postgresql-contrib/pkg-plist b/databases/postgresql-contrib/pkg-plist
deleted file mode 100644
index d3af90cf4a59..000000000000
--- a/databases/postgresql-contrib/pkg-plist
+++ /dev/null
@@ -1,144 +0,0 @@
-bin/ApplySnapshot
-bin/CleanLog
-bin/GetSyncID
-bin/InitRservTest
-bin/MasterAddTable
-bin/MasterInit
-bin/MasterSync
-bin/PrepareSnapshot
-bin/Replicate
-bin/RservTest
-bin/SlaveAddTable
-bin/SlaveInit
-bin/dbf2pg
-bin/findoidjoins
-bin/fti.pl
-bin/ipc_check
-bin/make_oidjoins_check
-bin/oid2name
-bin/pg_autovacuum
-bin/pg_dumplo
-bin/pg_logger
-bin/pgbench
-bin/reindexdb
-bin/vacuumlo
-lib/postgresql/_int.so
-lib/postgresql/autoinc.so
-lib/postgresql/btree_gist.so
-lib/postgresql/chkpass.so
-lib/postgresql/cube.so
-lib/postgresql/dblink.so
-lib/postgresql/dbsize.so
-lib/postgresql/earthdistance.so
-lib/postgresql/fti.so
-lib/postgresql/fuzzystrmatch.so
-lib/postgresql/insert_username.so
-lib/postgresql/int_aggregate.so
-lib/postgresql/isbn_issn.so
-lib/postgresql/lo.so
-lib/postgresql/ltree.so
-lib/postgresql/misc_utils.so
-lib/postgresql/moddatetime.so
-lib/postgresql/noup.so
-lib/postgresql/pending.so
-lib/postgresql/pgcrypto.so
-lib/postgresql/pgstattuple.so
-lib/postgresql/refint.so
-lib/postgresql/rserv.so
-lib/postgresql/rtree_gist.so
-lib/postgresql/seg.so
-lib/postgresql/string_io.so
-lib/postgresql/tablefunc.so
-lib/postgresql/timetravel.so
-lib/postgresql/tsearch.so
-lib/postgresql/tsearch2.so
-lib/postgresql/user_locks.so
-%%DOCSDIR%%/contrib/README
-%%DOCSDIR%%/contrib/README.apachelog
-%%DOCSDIR%%/contrib/README.btree_gist
-%%DOCSDIR%%/contrib/README.chkpass
-%%DOCSDIR%%/contrib/README.cube
-%%DOCSDIR%%/contrib/README.dbf2pg
-%%DOCSDIR%%/contrib/README.dblink
-%%DOCSDIR%%/contrib/README.dbmirror
-%%DOCSDIR%%/contrib/README.dbsize
-%%DOCSDIR%%/contrib/README.earthdistance
-%%DOCSDIR%%/contrib/README.findoidjoins
-%%DOCSDIR%%/contrib/README.fti
-%%DOCSDIR%%/contrib/README.fuzzystrmatch
-%%DOCSDIR%%/contrib/README.int_aggregate
-%%DOCSDIR%%/contrib/README.intarray
-%%DOCSDIR%%/contrib/README.ipc_check
-%%DOCSDIR%%/contrib/README.isbn_issn
-%%DOCSDIR%%/contrib/README.lo
-%%DOCSDIR%%/contrib/README.ltree
-%%DOCSDIR%%/contrib/README.misc_utils
-%%DOCSDIR%%/contrib/README.noup
-%%DOCSDIR%%/contrib/README.oid2name
-%%DOCSDIR%%/contrib/README.pg_autovacuum
-%%DOCSDIR%%/contrib/README.pg_dumplo
-%%DOCSDIR%%/contrib/README.pg_logger
-%%DOCSDIR%%/contrib/README.pgbench
-%%DOCSDIR%%/contrib/README.pgbench_jis
-%%DOCSDIR%%/contrib/README.pgcrypto
-%%DOCSDIR%%/contrib/README.pgstattuple
-%%DOCSDIR%%/contrib/README.pgstattuple.euc_jp
-%%DOCSDIR%%/contrib/README.reindexdb
-%%DOCSDIR%%/contrib/README.rserv
-%%DOCSDIR%%/contrib/README.rtree_gist
-%%DOCSDIR%%/contrib/README.seg
-%%DOCSDIR%%/contrib/README.soundex
-%%DOCSDIR%%/contrib/README.spi
-%%DOCSDIR%%/contrib/README.string_io
-%%DOCSDIR%%/contrib/README.tablefunc
-%%DOCSDIR%%/contrib/README.tsearch
-%%DOCSDIR%%/contrib/README.tsearch2
-%%DOCSDIR%%/contrib/README.user_locks
-%%DOCSDIR%%/contrib/README.vacuumlo
-%%DOCSDIR%%/contrib/autoinc.example
-%%DOCSDIR%%/contrib/insert_username.example
-%%DOCSDIR%%/contrib/moddatetime.example
-%%DOCSDIR%%/contrib/refint.example
-%%DOCSDIR%%/contrib/timetravel.example
-share/postgresql/contrib/RServ.pm
-share/postgresql/contrib/_int.sql
-share/postgresql/contrib/autoinc.sql
-share/postgresql/contrib/btree_gist.sql
-share/postgresql/contrib/chkpass.sql
-share/postgresql/contrib/cube.sql
-share/postgresql/contrib/dblink.sql
-share/postgresql/contrib/dbsize.sql
-share/postgresql/contrib/earthdistance.sql
-share/postgresql/contrib/english.stop
-share/postgresql/contrib/fti.sql
-share/postgresql/contrib/fuzzystrmatch.sql
-share/postgresql/contrib/insert_username.sql
-share/postgresql/contrib/int_aggregate.sql
-share/postgresql/contrib/isbn_issn.sql
-share/postgresql/contrib/lo.sql
-share/postgresql/contrib/lo_drop.sql
-share/postgresql/contrib/lo_test.sql
-share/postgresql/contrib/ltree.sql
-share/postgresql/contrib/master.sql
-share/postgresql/contrib/misc_utils.sql
-share/postgresql/contrib/moddatetime.sql
-share/postgresql/contrib/noup.sql
-share/postgresql/contrib/pgcrypto.sql
-share/postgresql/contrib/pgstattuple.sql
-share/postgresql/contrib/refint.sql
-share/postgresql/contrib/rtree_gist.sql
-share/postgresql/contrib/russian.stop
-share/postgresql/contrib/seg.sql
-share/postgresql/contrib/slave.sql
-share/postgresql/contrib/string_io.sql
-share/postgresql/contrib/tablefunc.sql
-share/postgresql/contrib/timetravel.sql
-share/postgresql/contrib/tsearch.sql
-share/postgresql/contrib/tsearch2.sql
-share/postgresql/contrib/untsearch2.sql
-share/postgresql/contrib/user_locks.sql
-@unexec rmdir %D/share/postgresql/contrib >&2 2> /dev/null || true
-@unexec rmdir %D/share/postgresql >&2 2> /dev/null || true
-@unexec rmdir %D/%%DOCSDIR%%/contrib >&2 2> /dev/null || true
-@unexec rmdir %D/%%DOCSDIR%% >&2 2> /dev/null || true
-@unexec rmdir %D/lib/postgresql >&2 2> /dev/null || true
diff --git a/databases/postgresql-docs/Makefile b/databases/postgresql-docs/Makefile
index 3db6ae72b743..a2ee5df8f225 100644
--- a/databases/postgresql-docs/Makefile
+++ b/databases/postgresql-docs/Makefile
@@ -5,19 +5,33 @@
# $FreeBSD$
#
+PORTNAME= postgresql
PORTREVISION= 0
PKGNAMESUFFIX= -docs
MAINTAINER= girgen@FreeBSD.org
COMMENT= The PostgreSQL documentation set
-POSTGRESQL_SUBPORT= YES
-POSTGRESQL_PORT?= databases/postgresql7
-.include <${.CURDIR}/../../${POSTGRESQL_PORT}/Makefile>
+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?= ${DESTDIR}/usr/local
+SED?= /usr/bin/sed
+
+# Setting/finding PostgreSQL version we want.
+.if 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
+
DISTFILES= postgresql-docs-${PORTVERSION}${EXTRACT_SUFX}
-.undef USE_GMAKE
-.undef GNU_CONFIGURE
NO_BUILD= YES
+SLAVE_ONLY= YES
+PATCHDIR= mustnotexist
do-install:
@ $(MKDIR) ${DOCSDIR}/html; \
@@ -32,4 +46,4 @@ post-install:
${ECHO} @dirrm ${DOCSDIR:S,^${PREFIX}/,,}/html >> ${TMPPLIST} ;\
${ECHO} "@unexec rmdir %D/${DOCSDIR:S,^${PREFIX}/,,} 2> /dev/null || true" >> ${TMPPLIST}
-.include <bsd.port.mk>
+.include "${MASTERDIR}/Makefile"
diff --git a/databases/postgresql-libpq++/Makefile b/databases/postgresql-libpq++/Makefile
index a147bb85a858..2e395adab12d 100644
--- a/databases/postgresql-libpq++/Makefile
+++ b/databases/postgresql-libpq++/Makefile
@@ -7,7 +7,7 @@
PORTNAME= libpq++
PORTVERSION= 4.0
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= databases
MASTER_SITES= ftp://gborg.postgresql.org/pub/libpqpp/stable/
PKGNAMEPREFIX= postgresql-
@@ -16,9 +16,7 @@ DIST_SUBDIR= postgresql
MAINTAINER= girgen@FreeBSD.org
COMMENT= C++ interface for PostgreSQL
-POSTGRESQL_PORT?= databases/postgresql7
-LIB_DEPENDS= pq.3:${PORTSDIR}/${POSTGRESQL_PORT}
-
+USE_PGSQL= YES
USE_GMAKE= YES
USE_REINPLACE= YES
INSTALLS_SHLIB= YES
diff --git a/databases/postgresql-libpqxx/Makefile b/databases/postgresql-libpqxx/Makefile
index 00b477e2a98c..895ffb20e6eb 100644
--- a/databases/postgresql-libpqxx/Makefile
+++ b/databases/postgresql-libpqxx/Makefile
@@ -16,8 +16,7 @@ DIST_SUBDIR= postgresql
MAINTAINER= girgen@FreeBSD.org
COMMENT= A new C++ interface for PostgreSQL
-LIB_DEPENDS= pq.3:${PORTSDIR}/${POSTGRESQL_PORT}
-
+USE_PGSQL= YES
USE_INC_LIBTOOL_VER=15
USE_GMAKE= YES
GNU_CONFIGURE= YES
@@ -28,8 +27,6 @@ CONFIGURE_ARGS= --with-postgres=${LOCALBASE} \
--enable-shared \
--with-postgres-include=${LOCALBASE}/include/postgresql
-POSTGRESQL_PORT?= databases/postgresql7
-
.include <bsd.port.pre.mk>
.if ${OSVERSION} < 500035
diff --git a/databases/postgresql-libpqxx/pkg-plist b/databases/postgresql-libpqxx/pkg-plist
index bab88d7cc79b..3d1db56ff81c 100644
--- a/databases/postgresql-libpqxx/pkg-plist
+++ b/databases/postgresql-libpqxx/pkg-plist
@@ -71,3 +71,4 @@ lib/libpqxx.so
lib/libpqxx-%%PORTVERSION%%.so
libdata/pkgconfig/libpqxx.pc
@dirrm include/pqxx
+@unexec rmdir %D/libdata/pkgconfig 2>/dev/null || true
diff --git a/databases/postgresql-libpqxx3/Makefile b/databases/postgresql-libpqxx3/Makefile
index 00b477e2a98c..895ffb20e6eb 100644
--- a/databases/postgresql-libpqxx3/Makefile
+++ b/databases/postgresql-libpqxx3/Makefile
@@ -16,8 +16,7 @@ DIST_SUBDIR= postgresql
MAINTAINER= girgen@FreeBSD.org
COMMENT= A new C++ interface for PostgreSQL
-LIB_DEPENDS= pq.3:${PORTSDIR}/${POSTGRESQL_PORT}
-
+USE_PGSQL= YES
USE_INC_LIBTOOL_VER=15
USE_GMAKE= YES
GNU_CONFIGURE= YES
@@ -28,8 +27,6 @@ CONFIGURE_ARGS= --with-postgres=${LOCALBASE} \
--enable-shared \
--with-postgres-include=${LOCALBASE}/include/postgresql
-POSTGRESQL_PORT?= databases/postgresql7
-
.include <bsd.port.pre.mk>
.if ${OSVERSION} < 500035
diff --git a/databases/postgresql-libpqxx3/pkg-plist b/databases/postgresql-libpqxx3/pkg-plist
index bab88d7cc79b..3d1db56ff81c 100644
--- a/databases/postgresql-libpqxx3/pkg-plist
+++ b/databases/postgresql-libpqxx3/pkg-plist
@@ -71,3 +71,4 @@ lib/libpqxx.so
lib/libpqxx-%%PORTVERSION%%.so
libdata/pkgconfig/libpqxx.pc
@dirrm include/pqxx
+@unexec rmdir %D/libdata/pkgconfig 2>/dev/null || true
diff --git a/databases/postgresql-libpqxx30/Makefile b/databases/postgresql-libpqxx30/Makefile
index 00b477e2a98c..895ffb20e6eb 100644
--- a/databases/postgresql-libpqxx30/Makefile
+++ b/databases/postgresql-libpqxx30/Makefile
@@ -16,8 +16,7 @@ DIST_SUBDIR= postgresql
MAINTAINER= girgen@FreeBSD.org
COMMENT= A new C++ interface for PostgreSQL
-LIB_DEPENDS= pq.3:${PORTSDIR}/${POSTGRESQL_PORT}
-
+USE_PGSQL= YES
USE_INC_LIBTOOL_VER=15
USE_GMAKE= YES
GNU_CONFIGURE= YES
@@ -28,8 +27,6 @@ CONFIGURE_ARGS= --with-postgres=${LOCALBASE} \
--enable-shared \
--with-postgres-include=${LOCALBASE}/include/postgresql
-POSTGRESQL_PORT?= databases/postgresql7
-
.include <bsd.port.pre.mk>
.if ${OSVERSION} < 500035
diff --git a/databases/postgresql-libpqxx30/pkg-plist b/databases/postgresql-libpqxx30/pkg-plist
index bab88d7cc79b..3d1db56ff81c 100644
--- a/databases/postgresql-libpqxx30/pkg-plist
+++ b/databases/postgresql-libpqxx30/pkg-plist
@@ -71,3 +71,4 @@ lib/libpqxx.so
lib/libpqxx-%%PORTVERSION%%.so
libdata/pkgconfig/libpqxx.pc
@dirrm include/pqxx
+@unexec rmdir %D/libdata/pkgconfig 2>/dev/null || true
diff --git a/databases/postgresql-plpython/Makefile b/databases/postgresql-plpython/Makefile
index 63a600a7ca54..821eb01b3660 100644
--- a/databases/postgresql-plpython/Makefile
+++ b/databases/postgresql-plpython/Makefile
@@ -5,21 +5,40 @@
# $FreeBSD$
#
+PORTNAME= postgresql
+PORTREVISION= 1
CATEGORIES= databases python
PKGNAMESUFFIX= -plpython
MAINTAINER= dd@FreeBSD.org
COMMENT= A module for using Python to write SQL functions
-POSTGRESQL_PORT?= databases/postgresql7
-POSTGRESQL_SUBPORT=YES
-.include "../../${POSTGRESQL_PORT}/Makefile"
-
RUN_DEPENDS= postgres:${PORTSDIR}/${POSTGRESQL_PORT}
-USE_PYTHON= yes
+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?= ${DESTDIR}/usr/local
+SED?= /usr/bin/sed
-MAKE_ARGS+= -C src/pl/plpython
+# 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_PYTHON= yes
CONFIGURE_ARGS= --with-python
-.include <bsd.port.mk>
+BUILD_DIRS= src/pl/plpython
+SLAVE_ONLY= yes
+
+POSTGRESQL_PORT=databases/postgresql${PGSQL_VER}-server
+
+.include "${MASTERDIR}/Makefile"
diff --git a/databases/postgresql-plpython/files/patch-plpython-Makefile b/databases/postgresql-plpython/files/patch-plpython-Makefile
deleted file mode 100644
index a1303151170a..000000000000
--- a/databases/postgresql-plpython/files/patch-plpython-Makefile
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/pl/plpython/Makefile~ Thu Mar 4 08:06:19 2004
-+++ src/pl/plpython/Makefile Thu Mar 4 08:06:44 2004
-@@ -8,7 +8,7 @@
- # On some platforms we can only build PL/Python if libpython is a
- # shared library. Since there is no official way to determine this,
- # we see if there is a file that is named like a shared library.
--ifneq (,$(wildcard $(python_configdir)/libpython*$(DLSUFFIX)*))
-+ifneq (,$(wildcard $(python_configdir)/../../libpython*$(DLSUFFIX)*))
- shared_libpython = yes
- endif
-
diff --git a/databases/postgresql-plpython/pkg-plist b/databases/postgresql-plpython/pkg-plist
deleted file mode 100644
index 2e953a0a80d3..000000000000
--- a/databases/postgresql-plpython/pkg-plist
+++ /dev/null
@@ -1,2 +0,0 @@
-lib/postgresql/plpython.so
-@unexec rmdir %D/lib/postgresql 2>/dev/null || true
diff --git a/databases/postgresql-plruby/Makefile b/databases/postgresql-plruby/Makefile
index a9944ad6818b..82d65c0ed1dc 100644
--- a/databases/postgresql-plruby/Makefile
+++ b/databases/postgresql-plruby/Makefile
@@ -7,6 +7,7 @@
PORTNAME= plruby
PORTVERSION= 0.4.3
+PORTREVISION= 1
CATEGORIES= databases ruby
MASTER_SITES= ftp://moulon.inra.fr/pub/ruby/
PKGNAMEPREFIX= postgresql-
@@ -16,19 +17,18 @@ MAINTAINER= knu@FreeBSD.org
COMMENT= PL/Ruby procedural language for the PostgreSQL database system
BUILD_DEPENDS= postgres:${PORTSDIR}/${POSTGRESQL_PORT}
-LIB_DEPENDS= pq.3:${PGSQL_PORTDIR}
RUN_DEPENDS= postgres:${PORTSDIR}/${POSTGRESQL_PORT}
+USE_PGSQL= yes
USE_RUBY= yes
USE_RUBY_EXTCONF= yes
USE_RUBY_RDOC= yes
-POSTGRESQL_PORT?= databases/postgresql7
-PGSQL_VERSION?= 74
+POSTGRESQL_PORT?= databases/postgresql${PGSQL_VER}-server
PGSQL_PORTDIR?= ${PORTSDIR}/${POSTGRESQL_PORT}
PGSQL_WRKSRC_CMD= cd ${PGSQL_PORTDIR} && ${MAKE} -V WRKSRC
-CONFIGURE_ARGS= --with-pgsql-version="${PGSQL_VERSION}" \
+CONFIGURE_ARGS= --with-pgsql-version="${PGSQL_VER}" \
--with-pgsql-srcinc="`${PGSQL_WRKSRC_CMD}`/src/include" \
--with-pgsql-include="${LOCALBASE}/include" \
--with-pgsql-lib="${LOCALBASE}/lib"
@@ -58,6 +58,17 @@ post-build:
cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} rdoc
.endif
+.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
+
post-install:
.if !defined(NOPORTDOCS)
${MKDIR} ${RUBY_MODEXAMPLESDIR}/
@@ -70,4 +81,4 @@ post-install:
.endif
@${CAT} ${PKGMESSAGE}
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff --git a/databases/postgresql-pltcl/Makefile b/databases/postgresql-pltcl/Makefile
index f0814441f400..6da2bd8a9ff7 100644
--- a/databases/postgresql-pltcl/Makefile
+++ b/databases/postgresql-pltcl/Makefile
@@ -5,6 +5,7 @@
# $FreeBSD$
#
+PORTNAME= postgresql
PORTREVISION= 0
CATEGORIES= databases tcl${TCLVERSION:S/.//}
PKGNAMESUFFIX= -pltcl
@@ -12,12 +13,26 @@ PKGNAMESUFFIX= -pltcl
MAINTAINER= girgen@FreeBSD.org
COMMENT= A module for using Tcl to write SQL functions
-POSTGRESQL_PORT?= databases/postgresql7
-POSTGRESQL_SUBPORT=YES
-.include "../../${POSTGRESQL_PORT}/Makefile"
+MASTERDIR= ${.CURDIR}/../postgresql${PGSQL_VER}-server
+RUN_DEPENDS= postgres:${MASTERDIR}
LIB_DEPENDS= tcl${TCLVERSION:S/.//}:${PORTSDIR}/lang/tcl${TCLVERSION:S/.//}
-RUN_DEPENDS= postgres:${PORTSDIR}/${POSTGRESQL_PORT}
+
+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
# you can use "make TCLVERSION=8.4" or similar for your favourite tcl version
TCLVERSION?= 8.4
@@ -27,10 +42,9 @@ CONFIGURE_ARGS= --with-tcl --without-tk \
TCL_INCDIR= ${LOCALBASE}/include/tcl${TCLVERSION}
TCLCONFIG= ${LOCALBASE}/lib/tcl${TCLVERSION}
-MAKE_ARGS+= -C src/pl/tcl
MAKE_ENV+= TCL_INCDIR=${TCL_INCDIR}
-post-install:
- @ ${CAT} ${PKGMESSAGE}
+BUILD_DIRS= src/pl/tcl
+SLAVE_ONLY= yes
-.include <bsd.port.mk>
+.include "${MASTERDIR}/Makefile"
diff --git a/databases/postgresql-pltcl/pkg-message b/databases/postgresql-pltcl/pkg-message
deleted file mode 100644
index 0902b858de0b..000000000000
--- a/databases/postgresql-pltcl/pkg-message
+++ /dev/null
@@ -1,3 +0,0 @@
-PL/Tcl has been installed. Check the createlang(l) manpage for more
-info. You can install pltcl as trusted or untrusted, by using either
-"createlang pltcl" or "createlang pltclu".
diff --git a/databases/postgresql-pltcl/pkg-plist b/databases/postgresql-pltcl/pkg-plist
deleted file mode 100644
index 2c4bbd54fb36..000000000000
--- a/databases/postgresql-pltcl/pkg-plist
+++ /dev/null
@@ -1,7 +0,0 @@
-lib/postgresql/pltcl.so
-@unexec rmdir %D/lib/postgresql 2>/dev/null || true
-bin/pltcl_loadmod
-bin/pltcl_delmod
-bin/pltcl_listmod
-share/postgresql/unknown.pltcl
-@unexec rmdir %D/share/postgresql 2>/dev/null || true
diff --git a/databases/py-PyGreSQL/Makefile b/databases/py-PyGreSQL/Makefile
index a1d1b3bed9b2..7066d263ce26 100644
--- a/databases/py-PyGreSQL/Makefile
+++ b/databases/py-PyGreSQL/Makefile
@@ -7,6 +7,7 @@
PORTNAME= PyGreSQL
PORTVERSION= 3.5
+PORTREVISION= 1
PORTEPOCH= 1
CATEGORIES= databases python
MASTER_SITES= ftp://ftp.pygresql.org/pub/distrib/
@@ -18,9 +19,8 @@ COMMENT= A Python interface to PostgreSQL, both classic and DP-API 2.0
BUILD_DEPENDS= ${DATETIME_DEP}:${PORTSDIR}/lang/py-mx-base
RUN_DEPENDS= ${DATETIME_DEP}:${PORTSDIR}/lang/py-mx-base
-LIB_DEPENDS= pq:${PORTSDIR}/${POSTGRESQL_PORT}
-POSTGRESQL_PORT?= databases/postgresql7
+USE_PGSQL= yes
USE_PYTHON= yes
DATETIME_DEP= ${PYTHON_SITELIBDIR}/mx/DateTime/__init__.py
USE_REINPLACE=yes
diff --git a/databases/py-psycopg/Makefile b/databases/py-psycopg/Makefile
index 6e316ce9e92b..26bc00e43a0a 100644
--- a/databases/py-psycopg/Makefile
+++ b/databases/py-psycopg/Makefile
@@ -17,14 +17,12 @@ COMMENT= The high performance Python adapter for PostgreSQL
RUN_DEPENDS= ${DATETIME_DEP}:${PORTSDIR}/lang/py-mx-base
BUILD_DEPENDS= ${DATETIME_DEP}:${PORTSDIR}/lang/py-mx-base
-LIB_DEPENDS= pq.3:${PORTSDIR}/${POSTGRESQL_PORT}
+USE_PGSQL= yes
USE_GMAKE= yes
USE_PYTHON= yes
GNU_CONFIGURE= yes
-POSTGRESQL_PORT?= databases/postgresql7
-
ALL_TARGET= sharedmods
CONFIGURE_ARGS= --with-python=${PYTHON_CMD} \
diff --git a/databases/py-pyPgSQL/Makefile b/databases/py-pyPgSQL/Makefile
index b21e1813ef35..f2122326cfa1 100644
--- a/databases/py-pyPgSQL/Makefile
+++ b/databases/py-pyPgSQL/Makefile
@@ -7,7 +7,7 @@
PORTNAME= pyPgSQL
PORTVERSION= 2.4
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= databases python
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= pypgsql
@@ -18,11 +18,10 @@ MAINTAINER= gerhard.haering@gmx.de
COMMENT= A Python DB-API 2 compliant library for using PostgreSQL databases
RUN_DEPENDS= ${DATETIME_DEP}:${PORTSDIR}/lang/py-mx-base
-LIB_DEPENDS= pq.3:${PORTSDIR}/${POSTGRESQL_PORT}
-
-POSTGRESQL_PORT?= databases/postgresql7
WRKSRC= ${WRKDIR}/pypgsql
+
+USE_PGSQL= yes
USE_PYTHON= yes
USE_PYDISTUTILS= yes
diff --git a/databases/qt-pgsql-plugin/Makefile b/databases/qt-pgsql-plugin/Makefile
index 6ab09ad7fae9..5c01fa9e0bf1 100644
--- a/databases/qt-pgsql-plugin/Makefile
+++ b/databases/qt-pgsql-plugin/Makefile
@@ -8,6 +8,7 @@
PORTNAME= qt-${DB}-plugin
PORTVERSION= 3.3.3
+PORTREVISION= 1
CATEGORIES= databases
MASTER_SITES= ftp://ftp.trolltech.com/qt/source/ \
ftp://ftp.silug.org/pub/qt/ \
@@ -21,11 +22,9 @@ COMMENT= A plugin for QT to connect to PostgreSQL-Databases
DB= psql
-LIB_DEPENDS+= pq:${PORTSDIR}/${POSTGRESQL_PORT} \
- qt-mt:${PORTSDIR}/x11-toolkits/qt33
-
-POSTGRESQL_PORT?= databases/postgresql7
+LIB_DEPENDS+= qt-mt:${PORTSDIR}/x11-toolkits/qt33
+USE_PGSQL= yes
USE_BZIP2= yes
PLUGIN= plugins/src/sqldrivers/${DB}
DRIVER= src/sql/drivers/${DB}
diff --git a/databases/ruby-postgres/Makefile b/databases/ruby-postgres/Makefile
index 10b4ad5c3033..4332f422f132 100644
--- a/databases/ruby-postgres/Makefile
+++ b/databases/ruby-postgres/Makefile
@@ -7,7 +7,7 @@
PORTNAME= postgres
PORTVERSION= 0.7.1
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= databases ruby
MASTER_SITES= http://www.postgresql.jp/interfaces/ruby/archive/
PKGNAMEPREFIX= ${RUBY_PKGNAMEPREFIX}
@@ -17,10 +17,7 @@ DIST_SUBDIR= ruby
MAINTAINER= knu@FreeBSD.org
COMMENT= Ruby interface to PostgreSQL library
-LIB_DEPENDS= pq.3:${PORTSDIR}/${POSTGRESQL_PORT}
-
-POSTGRESQL_PORT?= databases/postgresql7
-
+USE_PGSQL= yes
USE_RUBY= yes
USE_RUBY_EXTCONF= yes
diff --git a/databases/rubygem-postgres/Makefile b/databases/rubygem-postgres/Makefile
index 10b4ad5c3033..4332f422f132 100644
--- a/databases/rubygem-postgres/Makefile
+++ b/databases/rubygem-postgres/Makefile
@@ -7,7 +7,7 @@
PORTNAME= postgres
PORTVERSION= 0.7.1
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= databases ruby
MASTER_SITES= http://www.postgresql.jp/interfaces/ruby/archive/
PKGNAMEPREFIX= ${RUBY_PKGNAMEPREFIX}
@@ -17,10 +17,7 @@ DIST_SUBDIR= ruby
MAINTAINER= knu@FreeBSD.org
COMMENT= Ruby interface to PostgreSQL library
-LIB_DEPENDS= pq.3:${PORTSDIR}/${POSTGRESQL_PORT}
-
-POSTGRESQL_PORT?= databases/postgresql7
-
+USE_PGSQL= yes
USE_RUBY= yes
USE_RUBY_EXTCONF= yes
diff --git a/databases/slony1/Makefile b/databases/slony1/Makefile
index 529185de450c..c5683f2896bd 100644
--- a/databases/slony1/Makefile
+++ b/databases/slony1/Makefile
@@ -7,13 +7,14 @@
PORTNAME= slony1
PORTVERSION= 1.0.5
+PORTREVISION= 1
CATEGORIES= databases
MASTER_SITES= http://developer.postgresql.org/~wieck/slony1/download/
MAINTAINER= vivek@khera.org
COMMENT= PostgreSQL master to multiple slaves replication system
-PGSQL_PORT= ${PORTSDIR}/databases/postgresql7
+PGSQL_PORT= ${PORTSDIR}/databases/postgresql${PGSQL_VER}-server
BUILD_DEPENDS= ${NONEXISTENT}:${PGSQL_PORT}:configure
.if ! defined(NOPORTDOCS)
BUILD_DEPENDS+= ${LOCALBASE}/bin/pnmtops:${PORTSDIR}/graphics/netpbm \
@@ -43,6 +44,19 @@ PLIST_FILES= bin/slon bin/slonik bin/slony_setup.pl \
share/postgresql/xxid.v74.sql
PORTDOCS= *.pdf howto COPYRIGHT README slonik_commands.html
+DEFAULT_PGSQL_VER?=74
+
+.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
+
pre-configure:
cd ${PGSQL_SRC}/src/interfaces/libpq && ${GMAKE} all
cd ${PGSQL_SRC}/src/port && ${GMAKE} all
@@ -61,4 +75,4 @@ do-install:
.endif
${CAT} ${PKGMESSAGE}
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff --git a/databases/slony1v2/Makefile b/databases/slony1v2/Makefile
index 529185de450c..c5683f2896bd 100644
--- a/databases/slony1v2/Makefile
+++ b/databases/slony1v2/Makefile
@@ -7,13 +7,14 @@
PORTNAME= slony1
PORTVERSION= 1.0.5
+PORTREVISION= 1
CATEGORIES= databases
MASTER_SITES= http://developer.postgresql.org/~wieck/slony1/download/
MAINTAINER= vivek@khera.org
COMMENT= PostgreSQL master to multiple slaves replication system
-PGSQL_PORT= ${PORTSDIR}/databases/postgresql7
+PGSQL_PORT= ${PORTSDIR}/databases/postgresql${PGSQL_VER}-server
BUILD_DEPENDS= ${NONEXISTENT}:${PGSQL_PORT}:configure
.if ! defined(NOPORTDOCS)
BUILD_DEPENDS+= ${LOCALBASE}/bin/pnmtops:${PORTSDIR}/graphics/netpbm \
@@ -43,6 +44,19 @@ PLIST_FILES= bin/slon bin/slonik bin/slony_setup.pl \
share/postgresql/xxid.v74.sql
PORTDOCS= *.pdf howto COPYRIGHT README slonik_commands.html
+DEFAULT_PGSQL_VER?=74
+
+.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
+
pre-configure:
cd ${PGSQL_SRC}/src/interfaces/libpq && ${GMAKE} all
cd ${PGSQL_SRC}/src/port && ${GMAKE} all
@@ -61,4 +75,4 @@ do-install:
.endif
${CAT} ${PKGMESSAGE}
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff --git a/databases/sqlrelay/Makefile b/databases/sqlrelay/Makefile
index 4c86b9e5f033..b41525043f4e 100644
--- a/databases/sqlrelay/Makefile
+++ b/databases/sqlrelay/Makefile
@@ -34,8 +34,6 @@ CONFIGURE_ARGS= ${SQLRELAY_CONFIGURE_ARGS} \
CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
INSTALLS_SHLIB= yes
-POSTGRESQL_PORT?= databases/postgresql7
-
.include "${.CURDIR}/Makefile.common"
OPTIONS= MSQL "Build MSQL connection" off \
@@ -89,7 +87,7 @@ IF_MSQL= "@comment "
.endif
.if defined(WITH_POSTGRESQL) && ${WITH_POSTGRESQL:L} != no
-LIB_DEPENDS+= pq.3:${PORTSDIR}/${POSTGRESQL_PORT}
+USE_PGSQL= yes
CONFIGURE_ARGS+= --with-postgresql-prefix="${LOCALBASE}"
IF_POSTGRESQL= ""
.else