aboutsummaryrefslogtreecommitdiff
path: root/databases/postgresql-pltcl
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/postgresql-pltcl
parentae2c26ad44dba87dd1377d70dfb1906132114c7b (diff)
downloadports-34fa6c853efa04ca648d3d4187d4aec40a00fc0d.tar.gz
ports-34fa6c853efa04ca648d3d4187d4aec40a00fc0d.zip
Notes
Diffstat (limited to 'databases/postgresql-pltcl')
-rw-r--r--databases/postgresql-pltcl/Makefile30
-rw-r--r--databases/postgresql-pltcl/pkg-message3
-rw-r--r--databases/postgresql-pltcl/pkg-plist7
3 files changed, 22 insertions, 18 deletions
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