diff options
Diffstat (limited to 'databases')
196 files changed, 6258 insertions, 2240 deletions
diff --git a/databases/postgresql-devel-server/Makefile b/databases/postgresql-devel-server/Makefile index 5f64023c8cf5..08e0329a0795 100644 --- a/databases/postgresql-devel-server/Makefile +++ b/databases/postgresql-devel-server/Makefile @@ -6,7 +6,7 @@ # PORTNAME= postgresql -PORTVERSION= 7.0.2 +PORTVERSION= 7.0.3 CATEGORIES= databases MASTER_SITES= ftp://ftp.postgresql.org/pub/%SUBDIR%/ \ ftp://ftp.de.postgresql.org/%SUBDIR%/ \ @@ -22,59 +22,12 @@ DIST_SUBDIR= postgresql MAINTAINER= girgen@partitur.se +BUILD_DEPENDS= autoconf:${PORTSDIR}/devel/autoconf + Y2K= http://www.postgresql.org/y2k.html INSTALLS_SHLIB= YES LDCONFIG_DIRS= %%PREFIX%%/pgsql/lib -BUILD_DEPENDS= autoconf:${PORTSDIR}/devel/autoconf - -.if defined(KRB5_HOME) && exists(${KRB5_HOME}) -CONFIGURE_KRB= --with-krb5=${KRB5_HOME} \ - --with-krb-keytab=FILE:${PREFIX}/pgsql/etc/keytab -.endif - -# if you want to use the tcl/tk frontend pgaccess, then you need to build -# postgresql with tcl support by typing: make -DWITH_TCL -.if defined(WITH_TCL) -TCL_INCDIR= ${LOCALBASE}/include/tcl8.3 -TK_INCDIR= ${LOCALBASE}/include/tk8.3 -MAKE_ENV= TCL_INCDIR=${TCL_INCDIR} -CONFIGURE_ENV= WISH=${LOCALBASE}/bin/wish8.3 -LIB_DEPENDS= tcl83.1:${PORTSDIR}/lang/tcl83 \ - tk83.1:${PORTSDIR}/x11-toolkits/tk83 -CONFIGURE_TCL= --with-tcl --with-tclconfig="${LOCALBASE}/lib/tcl8.3 ${LOCALBASE}/lib/tk8.3" -.endif - -# if you want to disable the multibyte support, type: -# make -DWITHOUT_MULTIBYTE -# -# if you want to set the default encoding for the multibyte support, type: -# make DEFAULT_ENCODING=<encoding> -# where <encoding> is one of these: -# SQL_ASCII LATIN1 LATIN2 LATIN3 LATIN4 LATIN5 -# EUC_JP EUC_CN EUC_KR EUC_TW KOI8 -# UNICODE MULE_INTERNAL WIN ALT -.if defined(WITHOUT_MULTIBYTE) -CONFIGURE_MULTIBYTE= # none -.elif defined(DEFAULT_ENCODING) -CONFIGURE_MULTIBYTE= --enable-multibyte="${DEFAULT_ENCODING}" -.else -CONFIGURE_MULTIBYTE= --enable-multibyte -.endif -.if defined(WITH_PERL) -CONFIGURE_PERL= --with-perl -.endif -.if defined(WITH_ODBC) -CONFIGURE_ODBC= --with-odbc -.endif - -# if you want jdbc, type make -DWITH_JDBC -# Honors JAVA_HOME if you have it set, and don't want the dependency. -.if defined(WITH_JDBC) -JAVA_HOME?= ${LOCALBASE}/jdk1.1.8 -BUILD_DEPENDS= ${JAVA_HOME}/bin/javac:${PORTSDIR}/java/jdk -SCRIPTS_ENV+= JAVA_HOME=${JAVA_HOME} -.endif WRKSRC= ${WRKDIR}/${DISTNAME}/src DOCDIR= ${WRKDIR}/${DISTNAME}/doc @@ -86,11 +39,6 @@ CONFIGURE_ARGS= --prefix=${PREFIX}/pgsql \ --enable-locale \ --with-template=`uname -s | ${TR} '[A-Z]' '[a-z]'` \ --with-includes="${PREFIX}/include ${TCL_INCDIR} ${TK_INCDIR}" \ - ${CONFIGURE_KRB} \ - ${CONFIGURE_TCL} \ - ${CONFIGURE_MULTIBYTE} \ - ${CONFIGURE_PERL} \ - ${CONFIGURE_ODBC} \ --with-libraries=${PREFIX}/lib MAN1= createdb.1 createlang.1 createuser.1 dropdb.1 droplang.1 \ @@ -117,50 +65,21 @@ MANL= abort.l alter_group.l alter_table.l alter_user.l \ MANPREFIX= ${PREFIX}/pgsql -pre-fetch: - @${ECHO_MSG} "To install and run postgresql you need to compile kernel with:" - @${ECHO_MSG} " options \"SYSVSHM, SYSVSEM, SYSVMSG\"" -.if !defined(WITH_TCL) - @${ECHO_MSG} "To build the \"PostgreSQL to Tcl interface library\", libpgtcl, type:" - @${ECHO_MSG} " make -DWITH_TCL" -.else - @${ECHO_MSG} "Building PostgreSQL with \"libpgtcl\"." -.endif -.if !defined(WITHOUT_MULTIBYTE) - @${ECHO_MSG} "To disable multibyte support, type:" - @${ECHO_MSG} " make -DWITHOUT_MULTIBYTE" -.if !defined(DEFAULT_ENCODING) - @${ECHO_MSG} "To set the default encoding for the multibyte support, type:" - @${ECHO_MSG} " make DEFAULT_ENCODING=<encoding>" - @${ECHO_MSG} "where <encoding> is one of these:" - @${ECHO_MSG} " SQL_ASCII LATIN1 LATIN2 LATIN3 LATIN4 LATIN5" - @${ECHO_MSG} " EUC_JP EUC_CN EUC_KR EUC_TW KOI8" - @${ECHO_MSG} " UNICODE MULE_INTERNAL WIN ALT" -.else - @${ECHO_MSG} "The default encoding is '${DEFAULT_ENCODING}'." -.endif -.else - @${ECHO_MSG} "Building PostgreSQL without multibyte support." -.endif -.if !defined(WITH_JDBC) - @${ECHO_MSG} "To build Java (JDBC) support, type:" - @${ECHO_MSG} " make -DWITH_JDBC" -.else - @${ECHO_MSG} "Building PostgreSQL with \"postgresql.jar\"." -.endif -.if !defined(WITH_PERL) - @${ECHO_MSG} "To build Perl interface and pl/Perl interpreter:" - @${ECHO_MSG} " make -DWITH_PERL" -.else - @${ECHO_MSG} "Building PostgreSQL with \"pl/Perl\"." -.endif -.if !defined(WITH_ODBC) - @${ECHO_MSG} "To build the ODBC driver package:" - @${ECHO_MSG} " make -DWITH_ODBC" -.else - @${ECHO_MSG} "Building PostgreSQL with ODBC Drivers." +SCRIPTS_ENV= WRKDIRPREFIX="${WRKDIRPREFIX}" \ + WRKDIR="${WRKDIR}" \ + FILESDIR="${FILESDIR}" \ + TOUCH="${TOUCH}" \ + MKDIR="${MKDIR}" \ + NO_OPENSSL="${NO_OPENSSL}" \ + DISTNAME="${DISTNAME}" + +.if exists(${WRKDIRPREFIX}${.CURDIR}/Makefile.inc) +.include "${WRKDIRPREFIX}${.CURDIR}/Makefile.inc" .endif +pre-extract: + @ ${SETENV} ${SCRIPTS_ENV} ${SH} ${SCRIPTDIR}/configure.postgresql + post-patch: @ ${MV} ${WRKSRC}/template/freebsd ${WRKSRC}/template/freebsd.orig @ ${SED} -e 's#CFLAGS:-O2 -m486 -pipe#CFLAGS:${CFLAGS}#' \ @@ -180,16 +99,8 @@ pre-configure: post-build: .if defined(WITH_JDBC) - @ cd ${WRKSRC}/interfaces/jdbc && ${GMAKE} -.if !defined(NOPORTDOCS) - @ cd ${WRKSRC}/interfaces/jdbc && ${GMAKE} examples -.endif + @ ${GMAKE} -C ${WRKSRC}/interfaces/jdbc jdbc${JAVAVERSION} .endif - @ ${ECHO} "------------------------------------------------------------" - @ ${ECHO} "Dump existing databases, before installing new db version !!" - @ ${ECHO} "Detailed instructions, see" - @ ${ECHO} "${WRKDIR}/${DISTNAME}/INSTALL" - @ ${ECHO} "------------------------------------------------------------" pre-install: .if defined(PACKAGE_BUILDING) @@ -197,53 +108,54 @@ pre-install: .endif @ ${MKDIR} ${PREFIX}/pgsql @ ${SETENV} ${MAKE_ENV} perl ${SCRIPTDIR}/createuser +.if !defined(BATCH) + @ ${SED} -e "s#%%WRKDIR%%#${WRKDIR}#; s#%%DISTNAME%%#${DISTNAME}#" \ + < ${FILESDIR}/pre-install-notes | more -e +.endif post-install: .if defined(NOPORTDOCS) - @ ( cd ${DOCDIR}; ${GMAKE} man ) + @ ${GMAKE} -C ${DOCDIR} man .else - @ ( cd ${DOCDIR}; ${GMAKE} install ) + @ ${GMAKE} -C ${DOCDIR} install + ${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/FAQ* ${PREFIX}/share/doc/pgsql + ${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/README* ${PREFIX}/share/doc/pgsql + ${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/TODO ${PREFIX}/share/doc/pgsql +# ${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/*ps.gz ${PREFIX}/share/doc/pgsql + @ ${CAT} ${PKGDIR}/pkg-plist.doc >> ${TMPPLIST} .endif @ if [ ! -f ${PREFIX}/pgsql/.profile ]; then \ - ${ECHO} "PATH=${PATH}:${PREFIX}/pgsql/bin" \ + ${SED} 's|%%PREFIX%%|${PREFIX}|g' \ + < ${FILESDIR}/dot.profile.in \ > ${PREFIX}/pgsql/.profile; \ - ${ECHO} "MANPATH=${MANPATH}:${PREFIX}/pgsql/man" \ - >> ${PREFIX}/pgsql/.profile; \ - ${ECHO} "PGLIB=${PREFIX}/pgsql/lib" \ - >> ${PREFIX}/pgsql/.profile; \ - ${ECHO} "# note: PGDATA overwrites the -D startup option" \ - >> ${PREFIX}/pgsql/.profile; \ - ${ECHO} "PGDATA=${PREFIX}/pgsql/data" \ - >> ${PREFIX}/pgsql/.profile; \ - ${ECHO} "DISPLAY=:0" \ - >> ${PREFIX}/pgsql/.profile; \ - ${ECHO} "export PATH MANPATH PGLIB PGDATA DISPLAY" \ - >> ${PREFIX}/pgsql/.profile; \ - ${ECHO} "# if you want to make regression tests use this TZ" \ - >> ${PREFIX}/pgsql/.profile; \ - ${ECHO} "#TZ=PST8PDT" \ - >> ${PREFIX}/pgsql/.profile; \ - ${ECHO} "#export TZ" \ - >> ${PREFIX}/pgsql/.profile; \ fi @ ${CHOWN} -R pgsql:pgsql ${PREFIX}/pgsql @ ${CHOWN} root:pgsql ${PREFIX}/pgsql/lib @ ${ECHO} 'Initializing PostgreSQL Databases - this may take a few minutes...' @ ${SETENV} OBJFORMAT=${PORTOBJFORMAT} ${LDCONFIG} -m ${PREFIX}/pgsql/lib - @ su -l pgsql -c 'PATH=${PREFIX}/pgsql/bin:${PATH} LD_LIBRARY_PATH=${PREFIX}/pgsql/lib ${PREFIX}/pgsql/bin/initdb --pglib=${PREFIX}/pgsql/lib --pgdata=${PREFIX}/pgsql/data' +# '-' so we don't fail to create packagelist at this stage, +# when we already have everything installed on top of previous version + -@ su -l pgsql -c 'PATH=${PREFIX}/pgsql/bin:${PATH} ${PREFIX}/pgsql/bin/initdb --pglib=${PREFIX}/pgsql/lib --pgdata=${PREFIX}/pgsql/data' @ ${SED} -e "s=!!PREFIX!!=${PREFIX}=g" < ${FILESDIR}/pgsql.sh.tmpl \ > ${PREFIX}/etc/rc.d/pgsql.sh @ ${CHMOD} 554 ${PREFIX}/etc/rc.d/pgsql.sh @ ${CHOWN} root.pgsql ${PREFIX}/etc/rc.d/pgsql.sh - @ ${INSTALL_DATA} ${FILESDIR}/post-install-notes ${PREFIX}/pgsql + @ ${SED} -e 's#%%PREFIX%%#${PREFIX}#' < ${FILESDIR}/post-install-notes \ + > ${PREFIX}/pgsql/post-install-notes .if defined(WITHOUT_MULTIBYTE) @${CP} ${TMPPLIST} ${TMPPLIST}.nomulti @${GREP} -v pgsql/bin/pg_encoding ${TMPPLIST}.nomulti > ${TMPPLIST} .endif .if defined(WITH_TCL) @${CP} ${TMPPLIST} ${TMPPLIST}.notcl - @${CAT} ${PKGDIR}/pkg-plist.tcl ${TMPPLIST}.notcl > ${TMPPLIST} + @${CAT} ${PKGDIR}/${TCL_PLIST} ${TMPPLIST}.notcl > ${TMPPLIST} @${RM} ${TMPPLIST}.notcl +# Preparing a loadable TCL-package (pkgIndex.tcl) +# XXX This directory and the single file are not registered in +# XXX the PLIST, because of different PREFIX. + @${MKDIR} ${LOCALBASE}/lib/tcl${WITH_TCL}/Pgtcl1.3 + @${SED} 's|%%PREFIX%%|${PREFIX}|' < ${FILESDIR}/pkgIndex.tcl.in \ + > ${LOCALBASE}/lib/tcl${WITH_TCL}/Pgtcl1.3/pkgIndex.tcl .endif .if defined(WITH_ODBC) @${CP} ${TMPPLIST} ${TMPPLIST}.noodbc @@ -272,19 +184,10 @@ post-install: @ ${ECHO_MSG} "---------------------------------------------------------" @ ${ECHO_MSG} "Putting jdbc examples into ${PREFIX}/share/examples/pgsql" @ ${ECHO_MSG} "---------------------------------------------------------" - @ ${CAT} ${PKGDIR}/pkg-plist.doc >> ${TMPPLIST} -.endif .endif -.if !defined(NOPORTDOCS) - ${MKDIR} ${PREFIX}/share/doc/pgsql - @ ${GMAKE} -C ${WRKDIR}/${DISTNAME}/doc install - ${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/FAQ* ${PREFIX}/share/doc/pgsql - ${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/README* ${PREFIX}/share/doc/pgsql - ${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/TODO ${PREFIX}/share/doc/pgsql -# ${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/*ps.gz ${PREFIX}/share/doc/pgsql .endif .if !defined(BATCH) - @ more -e ${FILESDIR}/post-install-notes + @ more -e ${PREFIX}/pgsql/post-install-notes .endif .if !defined(DEBUG_FLAGS) .for file in ecpg pg_dump pg_id pg_passwd pg_version postgres psql @@ -292,4 +195,7 @@ post-install: .endfor .endif +post-clean: + @ ${RM} -f ${WRKDIRPREFIX}${.CURDIR}/Makefile.inc + .include <bsd.port.mk> diff --git a/databases/postgresql-devel-server/distinfo b/databases/postgresql-devel-server/distinfo index 309ea1e11614..fc87b8117bdc 100644 --- a/databases/postgresql-devel-server/distinfo +++ b/databases/postgresql-devel-server/distinfo @@ -1,4 +1,3 @@ -MD5 (postgresql/postgresql-7.0.2.base.tar.gz) = 871d23b85d9a3599a7ed75dfc7da7ba7 -MD5 (postgresql/postgresql-7.0.2.support.tar.gz) = c21180a6485d85785c8e69f0cbff05dd -MD5 (postgresql/postgresql-7.0.2.docs.tar.gz) = efac1f87463f252e54d72b256885b883 -MD5 (postgresql/postgresql-7.0.2.test.tar.gz) = 3443b3d83194c396f20aee2adc6f93bf +MD5 (postgresql/postgresql-7.0.3.base.tar.gz) = 0eeda8217b5b11e5a9351fc424808426 +MD5 (postgresql/postgresql-7.0.3.support.tar.gz) = b930f71068d776ef45402fcbebfa58cf +MD5 (postgresql/postgresql-7.0.3.docs.tar.gz) = 3d3fc76073f6d77febefc83f887fc87d diff --git a/databases/postgresql-devel-server/files/dot.profile.in b/databases/postgresql-devel-server/files/dot.profile.in new file mode 100644 index 000000000000..bd7ec45043be --- /dev/null +++ b/databases/postgresql-devel-server/files/dot.profile.in @@ -0,0 +1,16 @@ +PATH=${PATH}:%%PREFIX%%/pgsql/bin +PGLIB=%%PREFIX%%/pgsql/lib + +# note: PGDATA overwrites the -D startup option +PGDATA=%%PREFIX%%/pgsql/data + +export PATH MANPATH PGLIB PGDATA + +#You might want to set some locale stuff here +#PGDATESTYLE=ISO +#LC_ALL=sv_SE.ISO_88591-1 +#export PGDATESTYLE LC_ALL + +# if you want to make regression tests use this TZ +#TZ=PST8PDT +#export TZ diff --git a/databases/postgresql-devel-server/files/patch-au b/databases/postgresql-devel-server/files/patch-au new file mode 100644 index 000000000000..340521b49482 --- /dev/null +++ b/databases/postgresql-devel-server/files/patch-au @@ -0,0 +1,58 @@ +--- configure.in.orig Sun Nov 5 05:03:47 2000 ++++ configure.in Mon Dec 4 02:36:15 2000 +@@ -299,13 +299,28 @@ + [ --with-tcl build Tcl interfaces and pgtclsh ], + [ + case "$withval" in +- y | ye | yes) USE_TCL=true; USE_TK=true; AC_MSG_RESULT(enabled) ;; ++ y | ye | yes) USE_TCL=true; AC_MSG_RESULT(enabled) ;; + *) USE_TCL=; USE_TK=; AC_MSG_RESULT(disabled) ;; + esac + ], + [ USE_TCL=; USE_TK=; AC_MSG_RESULT(disabled) ] + ) + ++dnl We include tk support with tcl unless user says --without-tk ++if test USE_TCL = true ++then ++AC_MSG_CHECKING(setting USE_TK) ++AC_ARG_WITH( ++ tk, ++ [ --without-tk build Tcl *without* Tk ], ++ [ ++ case "$withval" in ++ y | ye | yes) USE_TK=true; USE_TK=true; AC_MSG_RESULT(enabled) ;; ++ *) USE_TK=n; AC_MSG_RESULT(disabled) ;; ++ esac ++ ] ++) ++fi + export USE_TCL + export USE_TK + +@@ -482,7 +497,7 @@ + #endif + ], + ELF_SYS=true, +-[if test "X$elf" = "Xyes" ++[if test "X$PORTOBJFORMAT" = "Xyes" + then + ELF_SYS=true + else +@@ -1248,10 +1263,15 @@ + else + AC_MSG_RESULT($TCL_CONFIG_SH) + AC_SUBST(TCL_CONFIG_SH) ++ . ${TCL_CONFIG_SH} ++ AC_SUBST(TCL_LIB_SPEC) + fi + fi + +-USE_TK=$USE_TCL # If TCL is disabled, disable TK ++USE_TK=${USE_TK:=$USE_TCL} # If TCL is disabled, disable TK ++ # otherwise -- enable unless explicitly ++ # disabled ++ + + dnl Check for Tk configuration script tkConfig.sh + if test "$USE_TK" = true diff --git a/databases/postgresql-devel-server/files/patch-av b/databases/postgresql-devel-server/files/patch-av new file mode 100644 index 000000000000..49b35f9e8dc1 --- /dev/null +++ b/databases/postgresql-devel-server/files/patch-av @@ -0,0 +1,17 @@ +--- interfaces/libpq/fe-connect.c Sun May 21 17:19:53 2000 ++++ interfaces/libpq/fe-connect.c Fri Sep 15 13:53:52 2000 +@@ -801 +801 @@ +- sprintf(conn->errorMessage, ++ printfPQExpBuffer(&conn->errorMessage, +@@ -809 +809 @@ +- sprintf(conn->errorMessage, "PQconnectDB() -- couldn't read postmaster response: errno=%d\n%s\n", ++ printfPQExpBuffer(&conn->errorMessage, "PQconnectDB() -- couldn't read postmaster response: errno=%d\n%s\n", +@@ -822 +822 @@ +- sprintf(conn->errorMessage, ++ printfPQExpBuffer(&conn->errorMessage, +@@ -832 +832 @@ +- sprintf(conn->errorMessage, ++ printfPQExpBuffer(&conn->errorMessage, +@@ -850 +850 @@ +- strcpy(conn->errorMessage, ++ printfPQExpBuffer(&conn->errorMessage, diff --git a/databases/postgresql-devel-server/files/patch-ba b/databases/postgresql-devel-server/files/patch-ba index a3b679b882c5..586d725c536a 100644 --- a/databases/postgresql-devel-server/files/patch-ba +++ b/databases/postgresql-devel-server/files/patch-ba @@ -1,5 +1,5 @@ ---- interfaces/jdbc/Makefile.orig Tue Mar 14 16:55:17 2000 -+++ interfaces/jdbc/Makefile Sun Apr 16 21:16:43 2000 +--- interfaces/jdbc/Makefile.orig Sun Nov 5 05:03:53 2000 ++++ interfaces/jdbc/Makefile Fri Dec 8 03:16:17 2000 @@ -10,10 +10,10 @@ FIND = find @@ -15,11 +15,3 @@ RM = rm -f TOUCH = touch -@@ -40,6 +40,7 @@ - @echo To compile, type: - @echo " $(MAKE) jdbc2" - @echo ------------------------------------------------------------ -+ $(MAKE) jdbc1 - - msg: - @echo ------------------------------------------------------------ diff --git a/databases/postgresql-devel-server/files/patch-be b/databases/postgresql-devel-server/files/patch-be new file mode 100644 index 000000000000..2f8c3c55566f --- /dev/null +++ b/databases/postgresql-devel-server/files/patch-be @@ -0,0 +1,9 @@ +This patches let you disable Tk even if you have it installed and +makes sure the TCL-library is added as a dependency for libpgtcl. +--- interfaces/libpgtcl/Makefile.in Tue Mar 7 20:58:36 2000 ++++ interfaces/libpgtcl/Makefile.in Wed Sep 20 08:57:28 2000 +@@ -29,3 +29,3 @@ + +-SHLIB_LINK+= $(LIBPQ) ++SHLIB_LINK+= $(LIBPQ) @TCL_LIB_SPEC@ + diff --git a/databases/postgresql-devel-server/files/pgsql.sh.tmpl b/databases/postgresql-devel-server/files/pgsql.sh.tmpl index e1673b4850c2..753e0b8aaf80 100644 --- a/databases/postgresql-devel-server/files/pgsql.sh.tmpl +++ b/databases/postgresql-devel-server/files/pgsql.sh.tmpl @@ -17,13 +17,13 @@ start) stop) [ -x !!PREFIX!!/pgsql/bin/pg_ctl ] && { - su -l pgsql -c 'exec !!PREFIX!!/pgsql/bin/pg_ctl -w -m fast stop' + exec su -l pgsql -c 'exec !!PREFIX!!/pgsql/bin/pg_ctl -w -m fast stop' } ;; status) [ -x !!PREFIX!!/pgsql/bin/pg_ctl ] && { - su -l pgsql -c 'exec !!PREFIX!!/pgsql/bin/pg_ctl status' + exec su -l pgsql -c 'exec !!PREFIX!!/pgsql/bin/pg_ctl status' } ;; diff --git a/databases/postgresql-devel-server/files/pkgIndex.tcl.in b/databases/postgresql-devel-server/files/pkgIndex.tcl.in new file mode 100644 index 000000000000..bd8329b15c69 --- /dev/null +++ b/databases/postgresql-devel-server/files/pkgIndex.tcl.in @@ -0,0 +1,4 @@ +# Package-index file for Pgtcl-package. Enables you to load PostgreSQL +# interface functions right into you TCL-interpreter as simply as +# package require Pgtcl +package ifneeded Pgtcl 1.3 "load %%PREFIX%%/lib/libpgtcl.so" diff --git a/databases/postgresql-devel-server/files/post-install-notes b/databases/postgresql-devel-server/files/post-install-notes index 289a7651109a..4c69908b2676 100644 --- a/databases/postgresql-devel-server/files/post-install-notes +++ b/databases/postgresql-devel-server/files/post-install-notes @@ -8,9 +8,12 @@ You may wish to subscribe to the PostgreSQL user-support mailing list. Send an e-mail to pgsql-questions-request@postgresql.org with the text "subscribe" in the message body. -If you built PostgreSQL with TCL support, you can install the port -"pgaccess" to get a TCL/TK based database frontend for database -operations. +If you built PostgreSQL with TCL/TK support, you can use the pgaccess +utility to get a TCL/TK based database frontend for database +operations. You do NOT need to install the pgaccess port separately. + +If you built in the TCL support, you can load the Pg package into your +TCL scripts as easily as ``package require Pgtcl''. To start PostgreSQL, run the startup script: -$PREFIX/etc/rc.d/pgsql.sh start +%%PREFIX%%/etc/rc.d/pgsql.sh start diff --git a/databases/postgresql-devel-server/files/pre-install-notes b/databases/postgresql-devel-server/files/pre-install-notes new file mode 100644 index 000000000000..72388933bd6d --- /dev/null +++ b/databases/postgresql-devel-server/files/pre-install-notes @@ -0,0 +1,9 @@ +# ---------------------------------------------------------------- +# UPGRADE NOTE! Depending on which version you are upgrading from, +# you may have to dump/restore existing databases +# as part of the update. +# This is *NOT* done by this port! +# For detailed instructions, see +# %%WRKDIR%%/%%DISTNAME%%/INSTALL +# after extraction. +# -------------------------------------------------------------- diff --git a/databases/postgresql-devel-server/pkg-plist.jdbc b/databases/postgresql-devel-server/pkg-plist.jdbc index bef5d75506b4..e751caa65063 100644 --- a/databases/postgresql-devel-server/pkg-plist.jdbc +++ b/databases/postgresql-devel-server/pkg-plist.jdbc @@ -10,4 +10,5 @@ share/examples/pgsql/jdbc/README_6.3 @dirrm share/examples/pgsql/jdbc @dirrm share/examples/pgsql share/java/classes/postgresql.jar +@unexec rmdir %D/share/java/classes 2>/dev/null || true @unexec rmdir %D/share/java 2>/dev/null || true diff --git a/databases/postgresql-devel-server/pkg-plist.notk b/databases/postgresql-devel-server/pkg-plist.notk new file mode 100644 index 000000000000..9f5d9e04af48 --- /dev/null +++ b/databases/postgresql-devel-server/pkg-plist.notk @@ -0,0 +1,6 @@ +pgsql/bin/pgtclsh +pgsql/include/libpgtcl.h +pgsql/lib/libpgtcl.a +pgsql/lib/libpgtcl.so +pgsql/lib/libpgtcl.so.2 +pgsql/lib/pltcl.so diff --git a/databases/postgresql-devel-server/scripts/configure.postgresql b/databases/postgresql-devel-server/scripts/configure.postgresql new file mode 100644 index 000000000000..5efe32a766f4 --- /dev/null +++ b/databases/postgresql-devel-server/scripts/configure.postgresql @@ -0,0 +1,267 @@ +#!/bin/sh +# -*- tab-width: 4; -*- +# ex:ts=4 +# +# $FreeBSD$ +# +if [ -f ${WRKDIRPREFIX}${CURDIR}/Makefile.inc ]; then + exit +fi + +if [ ! "${BATCH}" ]; then + dialog --title "Backup your data NOW" \ + --msgbox "`sed -e \"s#%%WRKDIR%%#${WRKDIR}#; s#%%DISTNAME%%#${DISTNAME}#\" < ${FILESDIR}/pre-install-notes`" \ + -1 -1 +fi + +#SSL=${NO_OPENSSL:+OFF} +#SSL=${NOSSL:-ON} + +if [ "${BATCH}" ]; then + set \"MultiByte\" +else + /usr/bin/dialog --title "configuration options" --clear \ + --checklist "\n\ +Please select desired options:" -1 -1 8 \ +JDBC "Java DataBase Connectivity" OFF \ +MultiByte "Multibyte for Multilingualism" ON \ +ODBC "Open Database Connectivity" OFF \ +Perl "Perl" OFF \ +TCL "Tcl" ON \ +TCLTK "Tcl/Tk" ON \ +SSL "Secure Socket Layer (requires certificate)" OFF \ +KRB5 "Kerberos 5" OFF \ +2> /tmp/checklist.tmp.$$ + + retval=$? + + if [ -s /tmp/checklist.tmp.$$ ]; then + set `cat /tmp/checklist.tmp.$$` + fi + rm -f /tmp/checklist.tmp.$$ + + case $retval in + 0) if [ -z "$*" ]; then + echo "Nothing selected" + fi + ;; + 1) echo "Cancel pressed." + exit 1 + ;; + esac +fi + +${MKDIR} -p ${WRKDIRPREFIX}${CURDIR} +exec > ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + +while [ "$1" ]; do + case $1 in + \"JDBC\") + # use JAVA_HOME if set correctly + echo "# JDBC" + if [ "${JAVA_HOME}" -a -x ${JAVA_HOME}/bin/javac ]; then + echo JAVA_HOME=${JAVA_HOME} + if [ "$(${JAVA_HOME}/bin/java -version 2>&1 | egrep \"1.1)" ]; then + JAVAVERSION=1 + echo BUILD_DEPENDS+= ${JAVA_HOME}/bin/javac:\${PORTSDIR}/java/jdk + else + JAVAVERSION=2 + echo BUILD_DEPENDS+= ${JAVA_HOME}/bin/javac:\${PORTSDIR}/java/jdk12-beta + fi + else + JAVAVERSION=1 + echo BUILD_DEPENDS+= \${LOCALBASE}/jdk1.1.8/bin/javac:\${PORTSDIR}/java/jdk + echo JAVA_HOME=\${LOCALBASE}/jdk1.1.8 + fi + cat <<-EOF + JAVAVERSION=${JAVAVERSION} + WITH_JDBC=YES + SCRIPTS_ENV+= JAVA_HOME=\${JAVA_HOME} + + EOF + ;; + \"MultiByte\") + MULTIBYTE=1 + ;; + \"ODBC\") + cat <<-EOF + # ODBC + WITH_ODBC=YES + CONFIGURE_ARGS+= --with-odbc + + EOF + ;; + \"Perl\") + cat <<-EOF + # PERL + WITH_PERL=YES + CONFIGURE_ARGS+= --with-perl + + EOF + ;; + \"TCL\") + TCL=1 + ;; + \"TCLTK\") + echo "#TCLTK" + echo WITH_TK=YES + echo + TCL=1 + ;; + \"SSL\") + cat <<-EOF + # SSL + USE_OPENSSL= yes + CFLAGS+= -DUSE_SSL + WITH_SSL= yes + CONFIGURE_ENV+= LDFLAGS="-L\${OPENSSLLIB} -lssl -lcrypto" + + EOF + ;; + \"KRB5\") + KRB5=1 + ;; + \"nothing\"|true) + ;; + *) + echo "Invalid option(s): $*" > /dev/stderr + rm -f ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + exit 1 + ;; + esac + shift +done + +exec > /dev/stderr + +# if multibyte, determine charset +echo "# Multibyte" + +if [ ! "${MULTIBYTE}" ]; then + echo "WITHOUT_MULTIBYTE=YES" >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc +else + if [ "${BATCH}" ]; then + set \"nothing\" + else + /usr/bin/dialog --title "configuration options" --clear \ + --radiolist "\n\ +Please select desired options:" -1 -1 16 \ +nothing "Default Encoding" ON \ +SQL_ASCII "SQL_ASCII" OFF \ +LATIN1 "LATIN1" OFF \ +LATIN2 "LATIN2" OFF \ +LATIN3 "LATIN3" OFF \ +LATIN4 "LATIN4" OFF \ +LATIN5 "LATIN5" OFF \ +EUC_JP "EUC_JP" OFF \ +EUC_CN "EUC_CN" OFF \ +EUC_KR "EUC_KR" OFF \ +EUC_TW "EUC_TW" OFF \ +KOI8 "KOI8" OFF \ +UNICODE "UNICODE" OFF \ +MULE_INTERNAL "MULE_INTERNAL" OFF \ +WIN "WIN" OFF \ +ALT "ALT" OFF \ +2> /tmp/checklist.tmp.$$ + + retval=$? + + if [ -s /tmp/checklist.tmp.$$ ]; then + set `cat /tmp/checklist.tmp.$$` + fi + rm -f /tmp/checklist.tmp.$$ + if [ $retval = 1 ]; then + echo "Cancel pressed." + rm ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + exit 1 + fi + fi + + if [ "$1" = "nothing" ]; then + echo "CONFIGURE_ARGS+= --enable-multibyte" \ + >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + else + echo "CONFIGURE_ARGS+= --enable-multibyte=$1" \ + >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + fi +fi +echo + +if [ "${TCL}" ]; then + echo "# TCL" >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + if [ "${BATCH}" ]; then + echo WITH_TCL=8.3 >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + else + dialog --title "TCL version" \ + --inputbox "Please enter TCL version. Default is 8.3." -1 -1 "8.3" \ + 2> /tmp/checklist.tmp.$$ + retval=$? + if [ -s /tmp/checklist.tmp.$$ ]; then + set `cat /tmp/checklist.tmp.$$` + fi + rm -f /tmp/checklist.tmp.$$ + case $retval in + 0) if [ -z "$*" ]; then + echo "Nothing selected" + fi + ;; + 1) echo "Cancel pressed." + rm -f ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + exit 1 + ;; + esac + echo WITH_TCL=\"$1\" >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + fi + cat <<-EOF >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + CONFIGURE_ARGS+= --with-tcl --with-tclconfig="\${TCLCONFIG}" + TCLV=\${WITH_TCL:S/.//} + TCL_INCDIR= \${LOCALBASE}/include/tcl\${WITH_TCL} + MAKE_ENV= TCL_INCDIR=\${TCL_INCDIR} + LIB_DEPENDS= tcl\${TCLV}.1:\${PORTSDIR}/lang/tcl\${TCLV} + TCLCONFIG= '\${LOCALBASE}/lib/tcl\${WITH_TCL}' + .if defined(WITH_TK) + TK_INCDIR= \${LOCALBASE}/include/tk\${WITH_TCL} + CONFIGURE_ENV+= WISH=\${LOCALBASE}/bin/wish\${WITH_TCL} + LIB_DEPENDS+= tk\${TCLV}.1:\${PORTSDIR}/x11-toolkits/tk\${TCLV} + TCLCONFIG+= '\${LOCALBASE}/lib/tk\${WITH_TCL}' + TCL_PLIST= pkg-plist.tcl + .else + TCL_PLIST= pkg-plist.notk + CONFIGURE_ARGS+= --without-tk + .endif + + EOF +fi + +if [ "${KRB5}" ]; then + if [ "${BATCH}" ]; then + # never gets here, but what the heck... + echo KRB5_HOME=\${LOCALBASE} >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + else + dialog --inputbox "Please enter the KRB5_HOME path" -1 -1 "${KRB_HOME:-${LOCALBASE}}" \ + 2> /tmp/checklist.tmp.$$ + retval=$? + if [ -s /tmp/checklist.tmp.$$ ]; then + set `cat /tmp/checklist.tmp.$$` + fi + rm -f /tmp/checklist.tmp.$$ + case $retval in + 0) if [ -z "$*" ]; then + echo "No input" + fi + ;; + 1) echo "Cancel pressed." + rm -f ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + exit 1 + ;; + esac + echo KRB5_HOME=\"$1\" >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + fi + cat <<-EOF >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + .if defined(KRB5_HOME) && exists(\${KRB5_HOME}) + CONFIGURE_KRB= --with-krb5=\${KRB5_HOME} \ + --with-krb-keytab=FILE:\${PREFIX}/pgsql/etc/keytab + .endif + + EOF +fi diff --git a/databases/postgresql-devel/Makefile b/databases/postgresql-devel/Makefile index 5f64023c8cf5..08e0329a0795 100644 --- a/databases/postgresql-devel/Makefile +++ b/databases/postgresql-devel/Makefile @@ -6,7 +6,7 @@ # PORTNAME= postgresql -PORTVERSION= 7.0.2 +PORTVERSION= 7.0.3 CATEGORIES= databases MASTER_SITES= ftp://ftp.postgresql.org/pub/%SUBDIR%/ \ ftp://ftp.de.postgresql.org/%SUBDIR%/ \ @@ -22,59 +22,12 @@ DIST_SUBDIR= postgresql MAINTAINER= girgen@partitur.se +BUILD_DEPENDS= autoconf:${PORTSDIR}/devel/autoconf + Y2K= http://www.postgresql.org/y2k.html INSTALLS_SHLIB= YES LDCONFIG_DIRS= %%PREFIX%%/pgsql/lib -BUILD_DEPENDS= autoconf:${PORTSDIR}/devel/autoconf - -.if defined(KRB5_HOME) && exists(${KRB5_HOME}) -CONFIGURE_KRB= --with-krb5=${KRB5_HOME} \ - --with-krb-keytab=FILE:${PREFIX}/pgsql/etc/keytab -.endif - -# if you want to use the tcl/tk frontend pgaccess, then you need to build -# postgresql with tcl support by typing: make -DWITH_TCL -.if defined(WITH_TCL) -TCL_INCDIR= ${LOCALBASE}/include/tcl8.3 -TK_INCDIR= ${LOCALBASE}/include/tk8.3 -MAKE_ENV= TCL_INCDIR=${TCL_INCDIR} -CONFIGURE_ENV= WISH=${LOCALBASE}/bin/wish8.3 -LIB_DEPENDS= tcl83.1:${PORTSDIR}/lang/tcl83 \ - tk83.1:${PORTSDIR}/x11-toolkits/tk83 -CONFIGURE_TCL= --with-tcl --with-tclconfig="${LOCALBASE}/lib/tcl8.3 ${LOCALBASE}/lib/tk8.3" -.endif - -# if you want to disable the multibyte support, type: -# make -DWITHOUT_MULTIBYTE -# -# if you want to set the default encoding for the multibyte support, type: -# make DEFAULT_ENCODING=<encoding> -# where <encoding> is one of these: -# SQL_ASCII LATIN1 LATIN2 LATIN3 LATIN4 LATIN5 -# EUC_JP EUC_CN EUC_KR EUC_TW KOI8 -# UNICODE MULE_INTERNAL WIN ALT -.if defined(WITHOUT_MULTIBYTE) -CONFIGURE_MULTIBYTE= # none -.elif defined(DEFAULT_ENCODING) -CONFIGURE_MULTIBYTE= --enable-multibyte="${DEFAULT_ENCODING}" -.else -CONFIGURE_MULTIBYTE= --enable-multibyte -.endif -.if defined(WITH_PERL) -CONFIGURE_PERL= --with-perl -.endif -.if defined(WITH_ODBC) -CONFIGURE_ODBC= --with-odbc -.endif - -# if you want jdbc, type make -DWITH_JDBC -# Honors JAVA_HOME if you have it set, and don't want the dependency. -.if defined(WITH_JDBC) -JAVA_HOME?= ${LOCALBASE}/jdk1.1.8 -BUILD_DEPENDS= ${JAVA_HOME}/bin/javac:${PORTSDIR}/java/jdk -SCRIPTS_ENV+= JAVA_HOME=${JAVA_HOME} -.endif WRKSRC= ${WRKDIR}/${DISTNAME}/src DOCDIR= ${WRKDIR}/${DISTNAME}/doc @@ -86,11 +39,6 @@ CONFIGURE_ARGS= --prefix=${PREFIX}/pgsql \ --enable-locale \ --with-template=`uname -s | ${TR} '[A-Z]' '[a-z]'` \ --with-includes="${PREFIX}/include ${TCL_INCDIR} ${TK_INCDIR}" \ - ${CONFIGURE_KRB} \ - ${CONFIGURE_TCL} \ - ${CONFIGURE_MULTIBYTE} \ - ${CONFIGURE_PERL} \ - ${CONFIGURE_ODBC} \ --with-libraries=${PREFIX}/lib MAN1= createdb.1 createlang.1 createuser.1 dropdb.1 droplang.1 \ @@ -117,50 +65,21 @@ MANL= abort.l alter_group.l alter_table.l alter_user.l \ MANPREFIX= ${PREFIX}/pgsql -pre-fetch: - @${ECHO_MSG} "To install and run postgresql you need to compile kernel with:" - @${ECHO_MSG} " options \"SYSVSHM, SYSVSEM, SYSVMSG\"" -.if !defined(WITH_TCL) - @${ECHO_MSG} "To build the \"PostgreSQL to Tcl interface library\", libpgtcl, type:" - @${ECHO_MSG} " make -DWITH_TCL" -.else - @${ECHO_MSG} "Building PostgreSQL with \"libpgtcl\"." -.endif -.if !defined(WITHOUT_MULTIBYTE) - @${ECHO_MSG} "To disable multibyte support, type:" - @${ECHO_MSG} " make -DWITHOUT_MULTIBYTE" -.if !defined(DEFAULT_ENCODING) - @${ECHO_MSG} "To set the default encoding for the multibyte support, type:" - @${ECHO_MSG} " make DEFAULT_ENCODING=<encoding>" - @${ECHO_MSG} "where <encoding> is one of these:" - @${ECHO_MSG} " SQL_ASCII LATIN1 LATIN2 LATIN3 LATIN4 LATIN5" - @${ECHO_MSG} " EUC_JP EUC_CN EUC_KR EUC_TW KOI8" - @${ECHO_MSG} " UNICODE MULE_INTERNAL WIN ALT" -.else - @${ECHO_MSG} "The default encoding is '${DEFAULT_ENCODING}'." -.endif -.else - @${ECHO_MSG} "Building PostgreSQL without multibyte support." -.endif -.if !defined(WITH_JDBC) - @${ECHO_MSG} "To build Java (JDBC) support, type:" - @${ECHO_MSG} " make -DWITH_JDBC" -.else - @${ECHO_MSG} "Building PostgreSQL with \"postgresql.jar\"." -.endif -.if !defined(WITH_PERL) - @${ECHO_MSG} "To build Perl interface and pl/Perl interpreter:" - @${ECHO_MSG} " make -DWITH_PERL" -.else - @${ECHO_MSG} "Building PostgreSQL with \"pl/Perl\"." -.endif -.if !defined(WITH_ODBC) - @${ECHO_MSG} "To build the ODBC driver package:" - @${ECHO_MSG} " make -DWITH_ODBC" -.else - @${ECHO_MSG} "Building PostgreSQL with ODBC Drivers." +SCRIPTS_ENV= WRKDIRPREFIX="${WRKDIRPREFIX}" \ + WRKDIR="${WRKDIR}" \ + FILESDIR="${FILESDIR}" \ + TOUCH="${TOUCH}" \ + MKDIR="${MKDIR}" \ + NO_OPENSSL="${NO_OPENSSL}" \ + DISTNAME="${DISTNAME}" + +.if exists(${WRKDIRPREFIX}${.CURDIR}/Makefile.inc) +.include "${WRKDIRPREFIX}${.CURDIR}/Makefile.inc" .endif +pre-extract: + @ ${SETENV} ${SCRIPTS_ENV} ${SH} ${SCRIPTDIR}/configure.postgresql + post-patch: @ ${MV} ${WRKSRC}/template/freebsd ${WRKSRC}/template/freebsd.orig @ ${SED} -e 's#CFLAGS:-O2 -m486 -pipe#CFLAGS:${CFLAGS}#' \ @@ -180,16 +99,8 @@ pre-configure: post-build: .if defined(WITH_JDBC) - @ cd ${WRKSRC}/interfaces/jdbc && ${GMAKE} -.if !defined(NOPORTDOCS) - @ cd ${WRKSRC}/interfaces/jdbc && ${GMAKE} examples -.endif + @ ${GMAKE} -C ${WRKSRC}/interfaces/jdbc jdbc${JAVAVERSION} .endif - @ ${ECHO} "------------------------------------------------------------" - @ ${ECHO} "Dump existing databases, before installing new db version !!" - @ ${ECHO} "Detailed instructions, see" - @ ${ECHO} "${WRKDIR}/${DISTNAME}/INSTALL" - @ ${ECHO} "------------------------------------------------------------" pre-install: .if defined(PACKAGE_BUILDING) @@ -197,53 +108,54 @@ pre-install: .endif @ ${MKDIR} ${PREFIX}/pgsql @ ${SETENV} ${MAKE_ENV} perl ${SCRIPTDIR}/createuser +.if !defined(BATCH) + @ ${SED} -e "s#%%WRKDIR%%#${WRKDIR}#; s#%%DISTNAME%%#${DISTNAME}#" \ + < ${FILESDIR}/pre-install-notes | more -e +.endif post-install: .if defined(NOPORTDOCS) - @ ( cd ${DOCDIR}; ${GMAKE} man ) + @ ${GMAKE} -C ${DOCDIR} man .else - @ ( cd ${DOCDIR}; ${GMAKE} install ) + @ ${GMAKE} -C ${DOCDIR} install + ${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/FAQ* ${PREFIX}/share/doc/pgsql + ${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/README* ${PREFIX}/share/doc/pgsql + ${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/TODO ${PREFIX}/share/doc/pgsql +# ${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/*ps.gz ${PREFIX}/share/doc/pgsql + @ ${CAT} ${PKGDIR}/pkg-plist.doc >> ${TMPPLIST} .endif @ if [ ! -f ${PREFIX}/pgsql/.profile ]; then \ - ${ECHO} "PATH=${PATH}:${PREFIX}/pgsql/bin" \ + ${SED} 's|%%PREFIX%%|${PREFIX}|g' \ + < ${FILESDIR}/dot.profile.in \ > ${PREFIX}/pgsql/.profile; \ - ${ECHO} "MANPATH=${MANPATH}:${PREFIX}/pgsql/man" \ - >> ${PREFIX}/pgsql/.profile; \ - ${ECHO} "PGLIB=${PREFIX}/pgsql/lib" \ - >> ${PREFIX}/pgsql/.profile; \ - ${ECHO} "# note: PGDATA overwrites the -D startup option" \ - >> ${PREFIX}/pgsql/.profile; \ - ${ECHO} "PGDATA=${PREFIX}/pgsql/data" \ - >> ${PREFIX}/pgsql/.profile; \ - ${ECHO} "DISPLAY=:0" \ - >> ${PREFIX}/pgsql/.profile; \ - ${ECHO} "export PATH MANPATH PGLIB PGDATA DISPLAY" \ - >> ${PREFIX}/pgsql/.profile; \ - ${ECHO} "# if you want to make regression tests use this TZ" \ - >> ${PREFIX}/pgsql/.profile; \ - ${ECHO} "#TZ=PST8PDT" \ - >> ${PREFIX}/pgsql/.profile; \ - ${ECHO} "#export TZ" \ - >> ${PREFIX}/pgsql/.profile; \ fi @ ${CHOWN} -R pgsql:pgsql ${PREFIX}/pgsql @ ${CHOWN} root:pgsql ${PREFIX}/pgsql/lib @ ${ECHO} 'Initializing PostgreSQL Databases - this may take a few minutes...' @ ${SETENV} OBJFORMAT=${PORTOBJFORMAT} ${LDCONFIG} -m ${PREFIX}/pgsql/lib - @ su -l pgsql -c 'PATH=${PREFIX}/pgsql/bin:${PATH} LD_LIBRARY_PATH=${PREFIX}/pgsql/lib ${PREFIX}/pgsql/bin/initdb --pglib=${PREFIX}/pgsql/lib --pgdata=${PREFIX}/pgsql/data' +# '-' so we don't fail to create packagelist at this stage, +# when we already have everything installed on top of previous version + -@ su -l pgsql -c 'PATH=${PREFIX}/pgsql/bin:${PATH} ${PREFIX}/pgsql/bin/initdb --pglib=${PREFIX}/pgsql/lib --pgdata=${PREFIX}/pgsql/data' @ ${SED} -e "s=!!PREFIX!!=${PREFIX}=g" < ${FILESDIR}/pgsql.sh.tmpl \ > ${PREFIX}/etc/rc.d/pgsql.sh @ ${CHMOD} 554 ${PREFIX}/etc/rc.d/pgsql.sh @ ${CHOWN} root.pgsql ${PREFIX}/etc/rc.d/pgsql.sh - @ ${INSTALL_DATA} ${FILESDIR}/post-install-notes ${PREFIX}/pgsql + @ ${SED} -e 's#%%PREFIX%%#${PREFIX}#' < ${FILESDIR}/post-install-notes \ + > ${PREFIX}/pgsql/post-install-notes .if defined(WITHOUT_MULTIBYTE) @${CP} ${TMPPLIST} ${TMPPLIST}.nomulti @${GREP} -v pgsql/bin/pg_encoding ${TMPPLIST}.nomulti > ${TMPPLIST} .endif .if defined(WITH_TCL) @${CP} ${TMPPLIST} ${TMPPLIST}.notcl - @${CAT} ${PKGDIR}/pkg-plist.tcl ${TMPPLIST}.notcl > ${TMPPLIST} + @${CAT} ${PKGDIR}/${TCL_PLIST} ${TMPPLIST}.notcl > ${TMPPLIST} @${RM} ${TMPPLIST}.notcl +# Preparing a loadable TCL-package (pkgIndex.tcl) +# XXX This directory and the single file are not registered in +# XXX the PLIST, because of different PREFIX. + @${MKDIR} ${LOCALBASE}/lib/tcl${WITH_TCL}/Pgtcl1.3 + @${SED} 's|%%PREFIX%%|${PREFIX}|' < ${FILESDIR}/pkgIndex.tcl.in \ + > ${LOCALBASE}/lib/tcl${WITH_TCL}/Pgtcl1.3/pkgIndex.tcl .endif .if defined(WITH_ODBC) @${CP} ${TMPPLIST} ${TMPPLIST}.noodbc @@ -272,19 +184,10 @@ post-install: @ ${ECHO_MSG} "---------------------------------------------------------" @ ${ECHO_MSG} "Putting jdbc examples into ${PREFIX}/share/examples/pgsql" @ ${ECHO_MSG} "---------------------------------------------------------" - @ ${CAT} ${PKGDIR}/pkg-plist.doc >> ${TMPPLIST} -.endif .endif -.if !defined(NOPORTDOCS) - ${MKDIR} ${PREFIX}/share/doc/pgsql - @ ${GMAKE} -C ${WRKDIR}/${DISTNAME}/doc install - ${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/FAQ* ${PREFIX}/share/doc/pgsql - ${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/README* ${PREFIX}/share/doc/pgsql - ${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/TODO ${PREFIX}/share/doc/pgsql -# ${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/*ps.gz ${PREFIX}/share/doc/pgsql .endif .if !defined(BATCH) - @ more -e ${FILESDIR}/post-install-notes + @ more -e ${PREFIX}/pgsql/post-install-notes .endif .if !defined(DEBUG_FLAGS) .for file in ecpg pg_dump pg_id pg_passwd pg_version postgres psql @@ -292,4 +195,7 @@ post-install: .endfor .endif +post-clean: + @ ${RM} -f ${WRKDIRPREFIX}${.CURDIR}/Makefile.inc + .include <bsd.port.mk> diff --git a/databases/postgresql-devel/distinfo b/databases/postgresql-devel/distinfo index 309ea1e11614..fc87b8117bdc 100644 --- a/databases/postgresql-devel/distinfo +++ b/databases/postgresql-devel/distinfo @@ -1,4 +1,3 @@ -MD5 (postgresql/postgresql-7.0.2.base.tar.gz) = 871d23b85d9a3599a7ed75dfc7da7ba7 -MD5 (postgresql/postgresql-7.0.2.support.tar.gz) = c21180a6485d85785c8e69f0cbff05dd -MD5 (postgresql/postgresql-7.0.2.docs.tar.gz) = efac1f87463f252e54d72b256885b883 -MD5 (postgresql/postgresql-7.0.2.test.tar.gz) = 3443b3d83194c396f20aee2adc6f93bf +MD5 (postgresql/postgresql-7.0.3.base.tar.gz) = 0eeda8217b5b11e5a9351fc424808426 +MD5 (postgresql/postgresql-7.0.3.support.tar.gz) = b930f71068d776ef45402fcbebfa58cf +MD5 (postgresql/postgresql-7.0.3.docs.tar.gz) = 3d3fc76073f6d77febefc83f887fc87d diff --git a/databases/postgresql-devel/files/dot.profile.in b/databases/postgresql-devel/files/dot.profile.in new file mode 100644 index 000000000000..bd7ec45043be --- /dev/null +++ b/databases/postgresql-devel/files/dot.profile.in @@ -0,0 +1,16 @@ +PATH=${PATH}:%%PREFIX%%/pgsql/bin +PGLIB=%%PREFIX%%/pgsql/lib + +# note: PGDATA overwrites the -D startup option +PGDATA=%%PREFIX%%/pgsql/data + +export PATH MANPATH PGLIB PGDATA + +#You might want to set some locale stuff here +#PGDATESTYLE=ISO +#LC_ALL=sv_SE.ISO_88591-1 +#export PGDATESTYLE LC_ALL + +# if you want to make regression tests use this TZ +#TZ=PST8PDT +#export TZ diff --git a/databases/postgresql-devel/files/patch-au b/databases/postgresql-devel/files/patch-au new file mode 100644 index 000000000000..340521b49482 --- /dev/null +++ b/databases/postgresql-devel/files/patch-au @@ -0,0 +1,58 @@ +--- configure.in.orig Sun Nov 5 05:03:47 2000 ++++ configure.in Mon Dec 4 02:36:15 2000 +@@ -299,13 +299,28 @@ + [ --with-tcl build Tcl interfaces and pgtclsh ], + [ + case "$withval" in +- y | ye | yes) USE_TCL=true; USE_TK=true; AC_MSG_RESULT(enabled) ;; ++ y | ye | yes) USE_TCL=true; AC_MSG_RESULT(enabled) ;; + *) USE_TCL=; USE_TK=; AC_MSG_RESULT(disabled) ;; + esac + ], + [ USE_TCL=; USE_TK=; AC_MSG_RESULT(disabled) ] + ) + ++dnl We include tk support with tcl unless user says --without-tk ++if test USE_TCL = true ++then ++AC_MSG_CHECKING(setting USE_TK) ++AC_ARG_WITH( ++ tk, ++ [ --without-tk build Tcl *without* Tk ], ++ [ ++ case "$withval" in ++ y | ye | yes) USE_TK=true; USE_TK=true; AC_MSG_RESULT(enabled) ;; ++ *) USE_TK=n; AC_MSG_RESULT(disabled) ;; ++ esac ++ ] ++) ++fi + export USE_TCL + export USE_TK + +@@ -482,7 +497,7 @@ + #endif + ], + ELF_SYS=true, +-[if test "X$elf" = "Xyes" ++[if test "X$PORTOBJFORMAT" = "Xyes" + then + ELF_SYS=true + else +@@ -1248,10 +1263,15 @@ + else + AC_MSG_RESULT($TCL_CONFIG_SH) + AC_SUBST(TCL_CONFIG_SH) ++ . ${TCL_CONFIG_SH} ++ AC_SUBST(TCL_LIB_SPEC) + fi + fi + +-USE_TK=$USE_TCL # If TCL is disabled, disable TK ++USE_TK=${USE_TK:=$USE_TCL} # If TCL is disabled, disable TK ++ # otherwise -- enable unless explicitly ++ # disabled ++ + + dnl Check for Tk configuration script tkConfig.sh + if test "$USE_TK" = true diff --git a/databases/postgresql-devel/files/patch-av b/databases/postgresql-devel/files/patch-av new file mode 100644 index 000000000000..49b35f9e8dc1 --- /dev/null +++ b/databases/postgresql-devel/files/patch-av @@ -0,0 +1,17 @@ +--- interfaces/libpq/fe-connect.c Sun May 21 17:19:53 2000 ++++ interfaces/libpq/fe-connect.c Fri Sep 15 13:53:52 2000 +@@ -801 +801 @@ +- sprintf(conn->errorMessage, ++ printfPQExpBuffer(&conn->errorMessage, +@@ -809 +809 @@ +- sprintf(conn->errorMessage, "PQconnectDB() -- couldn't read postmaster response: errno=%d\n%s\n", ++ printfPQExpBuffer(&conn->errorMessage, "PQconnectDB() -- couldn't read postmaster response: errno=%d\n%s\n", +@@ -822 +822 @@ +- sprintf(conn->errorMessage, ++ printfPQExpBuffer(&conn->errorMessage, +@@ -832 +832 @@ +- sprintf(conn->errorMessage, ++ printfPQExpBuffer(&conn->errorMessage, +@@ -850 +850 @@ +- strcpy(conn->errorMessage, ++ printfPQExpBuffer(&conn->errorMessage, diff --git a/databases/postgresql-devel/files/patch-ba b/databases/postgresql-devel/files/patch-ba index a3b679b882c5..586d725c536a 100644 --- a/databases/postgresql-devel/files/patch-ba +++ b/databases/postgresql-devel/files/patch-ba @@ -1,5 +1,5 @@ ---- interfaces/jdbc/Makefile.orig Tue Mar 14 16:55:17 2000 -+++ interfaces/jdbc/Makefile Sun Apr 16 21:16:43 2000 +--- interfaces/jdbc/Makefile.orig Sun Nov 5 05:03:53 2000 ++++ interfaces/jdbc/Makefile Fri Dec 8 03:16:17 2000 @@ -10,10 +10,10 @@ FIND = find @@ -15,11 +15,3 @@ RM = rm -f TOUCH = touch -@@ -40,6 +40,7 @@ - @echo To compile, type: - @echo " $(MAKE) jdbc2" - @echo ------------------------------------------------------------ -+ $(MAKE) jdbc1 - - msg: - @echo ------------------------------------------------------------ diff --git a/databases/postgresql-devel/files/patch-be b/databases/postgresql-devel/files/patch-be new file mode 100644 index 000000000000..2f8c3c55566f --- /dev/null +++ b/databases/postgresql-devel/files/patch-be @@ -0,0 +1,9 @@ +This patches let you disable Tk even if you have it installed and +makes sure the TCL-library is added as a dependency for libpgtcl. +--- interfaces/libpgtcl/Makefile.in Tue Mar 7 20:58:36 2000 ++++ interfaces/libpgtcl/Makefile.in Wed Sep 20 08:57:28 2000 +@@ -29,3 +29,3 @@ + +-SHLIB_LINK+= $(LIBPQ) ++SHLIB_LINK+= $(LIBPQ) @TCL_LIB_SPEC@ + diff --git a/databases/postgresql-devel/files/pgsql.sh.tmpl b/databases/postgresql-devel/files/pgsql.sh.tmpl index e1673b4850c2..753e0b8aaf80 100644 --- a/databases/postgresql-devel/files/pgsql.sh.tmpl +++ b/databases/postgresql-devel/files/pgsql.sh.tmpl @@ -17,13 +17,13 @@ start) stop) [ -x !!PREFIX!!/pgsql/bin/pg_ctl ] && { - su -l pgsql -c 'exec !!PREFIX!!/pgsql/bin/pg_ctl -w -m fast stop' + exec su -l pgsql -c 'exec !!PREFIX!!/pgsql/bin/pg_ctl -w -m fast stop' } ;; status) [ -x !!PREFIX!!/pgsql/bin/pg_ctl ] && { - su -l pgsql -c 'exec !!PREFIX!!/pgsql/bin/pg_ctl status' + exec su -l pgsql -c 'exec !!PREFIX!!/pgsql/bin/pg_ctl status' } ;; diff --git a/databases/postgresql-devel/files/pkgIndex.tcl.in b/databases/postgresql-devel/files/pkgIndex.tcl.in new file mode 100644 index 000000000000..bd8329b15c69 --- /dev/null +++ b/databases/postgresql-devel/files/pkgIndex.tcl.in @@ -0,0 +1,4 @@ +# Package-index file for Pgtcl-package. Enables you to load PostgreSQL +# interface functions right into you TCL-interpreter as simply as +# package require Pgtcl +package ifneeded Pgtcl 1.3 "load %%PREFIX%%/lib/libpgtcl.so" diff --git a/databases/postgresql-devel/files/post-install-notes b/databases/postgresql-devel/files/post-install-notes index 289a7651109a..4c69908b2676 100644 --- a/databases/postgresql-devel/files/post-install-notes +++ b/databases/postgresql-devel/files/post-install-notes @@ -8,9 +8,12 @@ You may wish to subscribe to the PostgreSQL user-support mailing list. Send an e-mail to pgsql-questions-request@postgresql.org with the text "subscribe" in the message body. -If you built PostgreSQL with TCL support, you can install the port -"pgaccess" to get a TCL/TK based database frontend for database -operations. +If you built PostgreSQL with TCL/TK support, you can use the pgaccess +utility to get a TCL/TK based database frontend for database +operations. You do NOT need to install the pgaccess port separately. + +If you built in the TCL support, you can load the Pg package into your +TCL scripts as easily as ``package require Pgtcl''. To start PostgreSQL, run the startup script: -$PREFIX/etc/rc.d/pgsql.sh start +%%PREFIX%%/etc/rc.d/pgsql.sh start diff --git a/databases/postgresql-devel/files/pre-install-notes b/databases/postgresql-devel/files/pre-install-notes new file mode 100644 index 000000000000..72388933bd6d --- /dev/null +++ b/databases/postgresql-devel/files/pre-install-notes @@ -0,0 +1,9 @@ +# ---------------------------------------------------------------- +# UPGRADE NOTE! Depending on which version you are upgrading from, +# you may have to dump/restore existing databases +# as part of the update. +# This is *NOT* done by this port! +# For detailed instructions, see +# %%WRKDIR%%/%%DISTNAME%%/INSTALL +# after extraction. +# -------------------------------------------------------------- diff --git a/databases/postgresql-devel/pkg-plist.jdbc b/databases/postgresql-devel/pkg-plist.jdbc index bef5d75506b4..e751caa65063 100644 --- a/databases/postgresql-devel/pkg-plist.jdbc +++ b/databases/postgresql-devel/pkg-plist.jdbc @@ -10,4 +10,5 @@ share/examples/pgsql/jdbc/README_6.3 @dirrm share/examples/pgsql/jdbc @dirrm share/examples/pgsql share/java/classes/postgresql.jar +@unexec rmdir %D/share/java/classes 2>/dev/null || true @unexec rmdir %D/share/java 2>/dev/null || true diff --git a/databases/postgresql-devel/pkg-plist.notk b/databases/postgresql-devel/pkg-plist.notk new file mode 100644 index 000000000000..9f5d9e04af48 --- /dev/null +++ b/databases/postgresql-devel/pkg-plist.notk @@ -0,0 +1,6 @@ +pgsql/bin/pgtclsh +pgsql/include/libpgtcl.h +pgsql/lib/libpgtcl.a +pgsql/lib/libpgtcl.so +pgsql/lib/libpgtcl.so.2 +pgsql/lib/pltcl.so diff --git a/databases/postgresql-devel/scripts/configure.postgresql b/databases/postgresql-devel/scripts/configure.postgresql new file mode 100644 index 000000000000..5efe32a766f4 --- /dev/null +++ b/databases/postgresql-devel/scripts/configure.postgresql @@ -0,0 +1,267 @@ +#!/bin/sh +# -*- tab-width: 4; -*- +# ex:ts=4 +# +# $FreeBSD$ +# +if [ -f ${WRKDIRPREFIX}${CURDIR}/Makefile.inc ]; then + exit +fi + +if [ ! "${BATCH}" ]; then + dialog --title "Backup your data NOW" \ + --msgbox "`sed -e \"s#%%WRKDIR%%#${WRKDIR}#; s#%%DISTNAME%%#${DISTNAME}#\" < ${FILESDIR}/pre-install-notes`" \ + -1 -1 +fi + +#SSL=${NO_OPENSSL:+OFF} +#SSL=${NOSSL:-ON} + +if [ "${BATCH}" ]; then + set \"MultiByte\" +else + /usr/bin/dialog --title "configuration options" --clear \ + --checklist "\n\ +Please select desired options:" -1 -1 8 \ +JDBC "Java DataBase Connectivity" OFF \ +MultiByte "Multibyte for Multilingualism" ON \ +ODBC "Open Database Connectivity" OFF \ +Perl "Perl" OFF \ +TCL "Tcl" ON \ +TCLTK "Tcl/Tk" ON \ +SSL "Secure Socket Layer (requires certificate)" OFF \ +KRB5 "Kerberos 5" OFF \ +2> /tmp/checklist.tmp.$$ + + retval=$? + + if [ -s /tmp/checklist.tmp.$$ ]; then + set `cat /tmp/checklist.tmp.$$` + fi + rm -f /tmp/checklist.tmp.$$ + + case $retval in + 0) if [ -z "$*" ]; then + echo "Nothing selected" + fi + ;; + 1) echo "Cancel pressed." + exit 1 + ;; + esac +fi + +${MKDIR} -p ${WRKDIRPREFIX}${CURDIR} +exec > ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + +while [ "$1" ]; do + case $1 in + \"JDBC\") + # use JAVA_HOME if set correctly + echo "# JDBC" + if [ "${JAVA_HOME}" -a -x ${JAVA_HOME}/bin/javac ]; then + echo JAVA_HOME=${JAVA_HOME} + if [ "$(${JAVA_HOME}/bin/java -version 2>&1 | egrep \"1.1)" ]; then + JAVAVERSION=1 + echo BUILD_DEPENDS+= ${JAVA_HOME}/bin/javac:\${PORTSDIR}/java/jdk + else + JAVAVERSION=2 + echo BUILD_DEPENDS+= ${JAVA_HOME}/bin/javac:\${PORTSDIR}/java/jdk12-beta + fi + else + JAVAVERSION=1 + echo BUILD_DEPENDS+= \${LOCALBASE}/jdk1.1.8/bin/javac:\${PORTSDIR}/java/jdk + echo JAVA_HOME=\${LOCALBASE}/jdk1.1.8 + fi + cat <<-EOF + JAVAVERSION=${JAVAVERSION} + WITH_JDBC=YES + SCRIPTS_ENV+= JAVA_HOME=\${JAVA_HOME} + + EOF + ;; + \"MultiByte\") + MULTIBYTE=1 + ;; + \"ODBC\") + cat <<-EOF + # ODBC + WITH_ODBC=YES + CONFIGURE_ARGS+= --with-odbc + + EOF + ;; + \"Perl\") + cat <<-EOF + # PERL + WITH_PERL=YES + CONFIGURE_ARGS+= --with-perl + + EOF + ;; + \"TCL\") + TCL=1 + ;; + \"TCLTK\") + echo "#TCLTK" + echo WITH_TK=YES + echo + TCL=1 + ;; + \"SSL\") + cat <<-EOF + # SSL + USE_OPENSSL= yes + CFLAGS+= -DUSE_SSL + WITH_SSL= yes + CONFIGURE_ENV+= LDFLAGS="-L\${OPENSSLLIB} -lssl -lcrypto" + + EOF + ;; + \"KRB5\") + KRB5=1 + ;; + \"nothing\"|true) + ;; + *) + echo "Invalid option(s): $*" > /dev/stderr + rm -f ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + exit 1 + ;; + esac + shift +done + +exec > /dev/stderr + +# if multibyte, determine charset +echo "# Multibyte" + +if [ ! "${MULTIBYTE}" ]; then + echo "WITHOUT_MULTIBYTE=YES" >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc +else + if [ "${BATCH}" ]; then + set \"nothing\" + else + /usr/bin/dialog --title "configuration options" --clear \ + --radiolist "\n\ +Please select desired options:" -1 -1 16 \ +nothing "Default Encoding" ON \ +SQL_ASCII "SQL_ASCII" OFF \ +LATIN1 "LATIN1" OFF \ +LATIN2 "LATIN2" OFF \ +LATIN3 "LATIN3" OFF \ +LATIN4 "LATIN4" OFF \ +LATIN5 "LATIN5" OFF \ +EUC_JP "EUC_JP" OFF \ +EUC_CN "EUC_CN" OFF \ +EUC_KR "EUC_KR" OFF \ +EUC_TW "EUC_TW" OFF \ +KOI8 "KOI8" OFF \ +UNICODE "UNICODE" OFF \ +MULE_INTERNAL "MULE_INTERNAL" OFF \ +WIN "WIN" OFF \ +ALT "ALT" OFF \ +2> /tmp/checklist.tmp.$$ + + retval=$? + + if [ -s /tmp/checklist.tmp.$$ ]; then + set `cat /tmp/checklist.tmp.$$` + fi + rm -f /tmp/checklist.tmp.$$ + if [ $retval = 1 ]; then + echo "Cancel pressed." + rm ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + exit 1 + fi + fi + + if [ "$1" = "nothing" ]; then + echo "CONFIGURE_ARGS+= --enable-multibyte" \ + >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + else + echo "CONFIGURE_ARGS+= --enable-multibyte=$1" \ + >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + fi +fi +echo + +if [ "${TCL}" ]; then + echo "# TCL" >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + if [ "${BATCH}" ]; then + echo WITH_TCL=8.3 >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + else + dialog --title "TCL version" \ + --inputbox "Please enter TCL version. Default is 8.3." -1 -1 "8.3" \ + 2> /tmp/checklist.tmp.$$ + retval=$? + if [ -s /tmp/checklist.tmp.$$ ]; then + set `cat /tmp/checklist.tmp.$$` + fi + rm -f /tmp/checklist.tmp.$$ + case $retval in + 0) if [ -z "$*" ]; then + echo "Nothing selected" + fi + ;; + 1) echo "Cancel pressed." + rm -f ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + exit 1 + ;; + esac + echo WITH_TCL=\"$1\" >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + fi + cat <<-EOF >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + CONFIGURE_ARGS+= --with-tcl --with-tclconfig="\${TCLCONFIG}" + TCLV=\${WITH_TCL:S/.//} + TCL_INCDIR= \${LOCALBASE}/include/tcl\${WITH_TCL} + MAKE_ENV= TCL_INCDIR=\${TCL_INCDIR} + LIB_DEPENDS= tcl\${TCLV}.1:\${PORTSDIR}/lang/tcl\${TCLV} + TCLCONFIG= '\${LOCALBASE}/lib/tcl\${WITH_TCL}' + .if defined(WITH_TK) + TK_INCDIR= \${LOCALBASE}/include/tk\${WITH_TCL} + CONFIGURE_ENV+= WISH=\${LOCALBASE}/bin/wish\${WITH_TCL} + LIB_DEPENDS+= tk\${TCLV}.1:\${PORTSDIR}/x11-toolkits/tk\${TCLV} + TCLCONFIG+= '\${LOCALBASE}/lib/tk\${WITH_TCL}' + TCL_PLIST= pkg-plist.tcl + .else + TCL_PLIST= pkg-plist.notk + CONFIGURE_ARGS+= --without-tk + .endif + + EOF +fi + +if [ "${KRB5}" ]; then + if [ "${BATCH}" ]; then + # never gets here, but what the heck... + echo KRB5_HOME=\${LOCALBASE} >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + else + dialog --inputbox "Please enter the KRB5_HOME path" -1 -1 "${KRB_HOME:-${LOCALBASE}}" \ + 2> /tmp/checklist.tmp.$$ + retval=$? + if [ -s /tmp/checklist.tmp.$$ ]; then + set `cat /tmp/checklist.tmp.$$` + fi + rm -f /tmp/checklist.tmp.$$ + case $retval in + 0) if [ -z "$*" ]; then + echo "No input" + fi + ;; + 1) echo "Cancel pressed." + rm -f ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + exit 1 + ;; + esac + echo KRB5_HOME=\"$1\" >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + fi + cat <<-EOF >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + .if defined(KRB5_HOME) && exists(\${KRB5_HOME}) + CONFIGURE_KRB= --with-krb5=\${KRB5_HOME} \ + --with-krb-keytab=FILE:\${PREFIX}/pgsql/etc/keytab + .endif + + EOF +fi diff --git a/databases/postgresql7/Makefile b/databases/postgresql7/Makefile index 5f64023c8cf5..08e0329a0795 100644 --- a/databases/postgresql7/Makefile +++ b/databases/postgresql7/Makefile @@ -6,7 +6,7 @@ # PORTNAME= postgresql -PORTVERSION= 7.0.2 +PORTVERSION= 7.0.3 CATEGORIES= databases MASTER_SITES= ftp://ftp.postgresql.org/pub/%SUBDIR%/ \ ftp://ftp.de.postgresql.org/%SUBDIR%/ \ @@ -22,59 +22,12 @@ DIST_SUBDIR= postgresql MAINTAINER= girgen@partitur.se +BUILD_DEPENDS= autoconf:${PORTSDIR}/devel/autoconf + Y2K= http://www.postgresql.org/y2k.html INSTALLS_SHLIB= YES LDCONFIG_DIRS= %%PREFIX%%/pgsql/lib -BUILD_DEPENDS= autoconf:${PORTSDIR}/devel/autoconf - -.if defined(KRB5_HOME) && exists(${KRB5_HOME}) -CONFIGURE_KRB= --with-krb5=${KRB5_HOME} \ - --with-krb-keytab=FILE:${PREFIX}/pgsql/etc/keytab -.endif - -# if you want to use the tcl/tk frontend pgaccess, then you need to build -# postgresql with tcl support by typing: make -DWITH_TCL -.if defined(WITH_TCL) -TCL_INCDIR= ${LOCALBASE}/include/tcl8.3 -TK_INCDIR= ${LOCALBASE}/include/tk8.3 -MAKE_ENV= TCL_INCDIR=${TCL_INCDIR} -CONFIGURE_ENV= WISH=${LOCALBASE}/bin/wish8.3 -LIB_DEPENDS= tcl83.1:${PORTSDIR}/lang/tcl83 \ - tk83.1:${PORTSDIR}/x11-toolkits/tk83 -CONFIGURE_TCL= --with-tcl --with-tclconfig="${LOCALBASE}/lib/tcl8.3 ${LOCALBASE}/lib/tk8.3" -.endif - -# if you want to disable the multibyte support, type: -# make -DWITHOUT_MULTIBYTE -# -# if you want to set the default encoding for the multibyte support, type: -# make DEFAULT_ENCODING=<encoding> -# where <encoding> is one of these: -# SQL_ASCII LATIN1 LATIN2 LATIN3 LATIN4 LATIN5 -# EUC_JP EUC_CN EUC_KR EUC_TW KOI8 -# UNICODE MULE_INTERNAL WIN ALT -.if defined(WITHOUT_MULTIBYTE) -CONFIGURE_MULTIBYTE= # none -.elif defined(DEFAULT_ENCODING) -CONFIGURE_MULTIBYTE= --enable-multibyte="${DEFAULT_ENCODING}" -.else -CONFIGURE_MULTIBYTE= --enable-multibyte -.endif -.if defined(WITH_PERL) -CONFIGURE_PERL= --with-perl -.endif -.if defined(WITH_ODBC) -CONFIGURE_ODBC= --with-odbc -.endif - -# if you want jdbc, type make -DWITH_JDBC -# Honors JAVA_HOME if you have it set, and don't want the dependency. -.if defined(WITH_JDBC) -JAVA_HOME?= ${LOCALBASE}/jdk1.1.8 -BUILD_DEPENDS= ${JAVA_HOME}/bin/javac:${PORTSDIR}/java/jdk -SCRIPTS_ENV+= JAVA_HOME=${JAVA_HOME} -.endif WRKSRC= ${WRKDIR}/${DISTNAME}/src DOCDIR= ${WRKDIR}/${DISTNAME}/doc @@ -86,11 +39,6 @@ CONFIGURE_ARGS= --prefix=${PREFIX}/pgsql \ --enable-locale \ --with-template=`uname -s | ${TR} '[A-Z]' '[a-z]'` \ --with-includes="${PREFIX}/include ${TCL_INCDIR} ${TK_INCDIR}" \ - ${CONFIGURE_KRB} \ - ${CONFIGURE_TCL} \ - ${CONFIGURE_MULTIBYTE} \ - ${CONFIGURE_PERL} \ - ${CONFIGURE_ODBC} \ --with-libraries=${PREFIX}/lib MAN1= createdb.1 createlang.1 createuser.1 dropdb.1 droplang.1 \ @@ -117,50 +65,21 @@ MANL= abort.l alter_group.l alter_table.l alter_user.l \ MANPREFIX= ${PREFIX}/pgsql -pre-fetch: - @${ECHO_MSG} "To install and run postgresql you need to compile kernel with:" - @${ECHO_MSG} " options \"SYSVSHM, SYSVSEM, SYSVMSG\"" -.if !defined(WITH_TCL) - @${ECHO_MSG} "To build the \"PostgreSQL to Tcl interface library\", libpgtcl, type:" - @${ECHO_MSG} " make -DWITH_TCL" -.else - @${ECHO_MSG} "Building PostgreSQL with \"libpgtcl\"." -.endif -.if !defined(WITHOUT_MULTIBYTE) - @${ECHO_MSG} "To disable multibyte support, type:" - @${ECHO_MSG} " make -DWITHOUT_MULTIBYTE" -.if !defined(DEFAULT_ENCODING) - @${ECHO_MSG} "To set the default encoding for the multibyte support, type:" - @${ECHO_MSG} " make DEFAULT_ENCODING=<encoding>" - @${ECHO_MSG} "where <encoding> is one of these:" - @${ECHO_MSG} " SQL_ASCII LATIN1 LATIN2 LATIN3 LATIN4 LATIN5" - @${ECHO_MSG} " EUC_JP EUC_CN EUC_KR EUC_TW KOI8" - @${ECHO_MSG} " UNICODE MULE_INTERNAL WIN ALT" -.else - @${ECHO_MSG} "The default encoding is '${DEFAULT_ENCODING}'." -.endif -.else - @${ECHO_MSG} "Building PostgreSQL without multibyte support." -.endif -.if !defined(WITH_JDBC) - @${ECHO_MSG} "To build Java (JDBC) support, type:" - @${ECHO_MSG} " make -DWITH_JDBC" -.else - @${ECHO_MSG} "Building PostgreSQL with \"postgresql.jar\"." -.endif -.if !defined(WITH_PERL) - @${ECHO_MSG} "To build Perl interface and pl/Perl interpreter:" - @${ECHO_MSG} " make -DWITH_PERL" -.else - @${ECHO_MSG} "Building PostgreSQL with \"pl/Perl\"." -.endif -.if !defined(WITH_ODBC) - @${ECHO_MSG} "To build the ODBC driver package:" - @${ECHO_MSG} " make -DWITH_ODBC" -.else - @${ECHO_MSG} "Building PostgreSQL with ODBC Drivers." +SCRIPTS_ENV= WRKDIRPREFIX="${WRKDIRPREFIX}" \ + WRKDIR="${WRKDIR}" \ + FILESDIR="${FILESDIR}" \ + TOUCH="${TOUCH}" \ + MKDIR="${MKDIR}" \ + NO_OPENSSL="${NO_OPENSSL}" \ + DISTNAME="${DISTNAME}" + +.if exists(${WRKDIRPREFIX}${.CURDIR}/Makefile.inc) +.include "${WRKDIRPREFIX}${.CURDIR}/Makefile.inc" .endif +pre-extract: + @ ${SETENV} ${SCRIPTS_ENV} ${SH} ${SCRIPTDIR}/configure.postgresql + post-patch: @ ${MV} ${WRKSRC}/template/freebsd ${WRKSRC}/template/freebsd.orig @ ${SED} -e 's#CFLAGS:-O2 -m486 -pipe#CFLAGS:${CFLAGS}#' \ @@ -180,16 +99,8 @@ pre-configure: post-build: .if defined(WITH_JDBC) - @ cd ${WRKSRC}/interfaces/jdbc && ${GMAKE} -.if !defined(NOPORTDOCS) - @ cd ${WRKSRC}/interfaces/jdbc && ${GMAKE} examples -.endif + @ ${GMAKE} -C ${WRKSRC}/interfaces/jdbc jdbc${JAVAVERSION} .endif - @ ${ECHO} "------------------------------------------------------------" - @ ${ECHO} "Dump existing databases, before installing new db version !!" - @ ${ECHO} "Detailed instructions, see" - @ ${ECHO} "${WRKDIR}/${DISTNAME}/INSTALL" - @ ${ECHO} "------------------------------------------------------------" pre-install: .if defined(PACKAGE_BUILDING) @@ -197,53 +108,54 @@ pre-install: .endif @ ${MKDIR} ${PREFIX}/pgsql @ ${SETENV} ${MAKE_ENV} perl ${SCRIPTDIR}/createuser +.if !defined(BATCH) + @ ${SED} -e "s#%%WRKDIR%%#${WRKDIR}#; s#%%DISTNAME%%#${DISTNAME}#" \ + < ${FILESDIR}/pre-install-notes | more -e +.endif post-install: .if defined(NOPORTDOCS) - @ ( cd ${DOCDIR}; ${GMAKE} man ) + @ ${GMAKE} -C ${DOCDIR} man .else - @ ( cd ${DOCDIR}; ${GMAKE} install ) + @ ${GMAKE} -C ${DOCDIR} install + ${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/FAQ* ${PREFIX}/share/doc/pgsql + ${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/README* ${PREFIX}/share/doc/pgsql + ${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/TODO ${PREFIX}/share/doc/pgsql +# ${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/*ps.gz ${PREFIX}/share/doc/pgsql + @ ${CAT} ${PKGDIR}/pkg-plist.doc >> ${TMPPLIST} .endif @ if [ ! -f ${PREFIX}/pgsql/.profile ]; then \ - ${ECHO} "PATH=${PATH}:${PREFIX}/pgsql/bin" \ + ${SED} 's|%%PREFIX%%|${PREFIX}|g' \ + < ${FILESDIR}/dot.profile.in \ > ${PREFIX}/pgsql/.profile; \ - ${ECHO} "MANPATH=${MANPATH}:${PREFIX}/pgsql/man" \ - >> ${PREFIX}/pgsql/.profile; \ - ${ECHO} "PGLIB=${PREFIX}/pgsql/lib" \ - >> ${PREFIX}/pgsql/.profile; \ - ${ECHO} "# note: PGDATA overwrites the -D startup option" \ - >> ${PREFIX}/pgsql/.profile; \ - ${ECHO} "PGDATA=${PREFIX}/pgsql/data" \ - >> ${PREFIX}/pgsql/.profile; \ - ${ECHO} "DISPLAY=:0" \ - >> ${PREFIX}/pgsql/.profile; \ - ${ECHO} "export PATH MANPATH PGLIB PGDATA DISPLAY" \ - >> ${PREFIX}/pgsql/.profile; \ - ${ECHO} "# if you want to make regression tests use this TZ" \ - >> ${PREFIX}/pgsql/.profile; \ - ${ECHO} "#TZ=PST8PDT" \ - >> ${PREFIX}/pgsql/.profile; \ - ${ECHO} "#export TZ" \ - >> ${PREFIX}/pgsql/.profile; \ fi @ ${CHOWN} -R pgsql:pgsql ${PREFIX}/pgsql @ ${CHOWN} root:pgsql ${PREFIX}/pgsql/lib @ ${ECHO} 'Initializing PostgreSQL Databases - this may take a few minutes...' @ ${SETENV} OBJFORMAT=${PORTOBJFORMAT} ${LDCONFIG} -m ${PREFIX}/pgsql/lib - @ su -l pgsql -c 'PATH=${PREFIX}/pgsql/bin:${PATH} LD_LIBRARY_PATH=${PREFIX}/pgsql/lib ${PREFIX}/pgsql/bin/initdb --pglib=${PREFIX}/pgsql/lib --pgdata=${PREFIX}/pgsql/data' +# '-' so we don't fail to create packagelist at this stage, +# when we already have everything installed on top of previous version + -@ su -l pgsql -c 'PATH=${PREFIX}/pgsql/bin:${PATH} ${PREFIX}/pgsql/bin/initdb --pglib=${PREFIX}/pgsql/lib --pgdata=${PREFIX}/pgsql/data' @ ${SED} -e "s=!!PREFIX!!=${PREFIX}=g" < ${FILESDIR}/pgsql.sh.tmpl \ > ${PREFIX}/etc/rc.d/pgsql.sh @ ${CHMOD} 554 ${PREFIX}/etc/rc.d/pgsql.sh @ ${CHOWN} root.pgsql ${PREFIX}/etc/rc.d/pgsql.sh - @ ${INSTALL_DATA} ${FILESDIR}/post-install-notes ${PREFIX}/pgsql + @ ${SED} -e 's#%%PREFIX%%#${PREFIX}#' < ${FILESDIR}/post-install-notes \ + > ${PREFIX}/pgsql/post-install-notes .if defined(WITHOUT_MULTIBYTE) @${CP} ${TMPPLIST} ${TMPPLIST}.nomulti @${GREP} -v pgsql/bin/pg_encoding ${TMPPLIST}.nomulti > ${TMPPLIST} .endif .if defined(WITH_TCL) @${CP} ${TMPPLIST} ${TMPPLIST}.notcl - @${CAT} ${PKGDIR}/pkg-plist.tcl ${TMPPLIST}.notcl > ${TMPPLIST} + @${CAT} ${PKGDIR}/${TCL_PLIST} ${TMPPLIST}.notcl > ${TMPPLIST} @${RM} ${TMPPLIST}.notcl +# Preparing a loadable TCL-package (pkgIndex.tcl) +# XXX This directory and the single file are not registered in +# XXX the PLIST, because of different PREFIX. + @${MKDIR} ${LOCALBASE}/lib/tcl${WITH_TCL}/Pgtcl1.3 + @${SED} 's|%%PREFIX%%|${PREFIX}|' < ${FILESDIR}/pkgIndex.tcl.in \ + > ${LOCALBASE}/lib/tcl${WITH_TCL}/Pgtcl1.3/pkgIndex.tcl .endif .if defined(WITH_ODBC) @${CP} ${TMPPLIST} ${TMPPLIST}.noodbc @@ -272,19 +184,10 @@ post-install: @ ${ECHO_MSG} "---------------------------------------------------------" @ ${ECHO_MSG} "Putting jdbc examples into ${PREFIX}/share/examples/pgsql" @ ${ECHO_MSG} "---------------------------------------------------------" - @ ${CAT} ${PKGDIR}/pkg-plist.doc >> ${TMPPLIST} -.endif .endif -.if !defined(NOPORTDOCS) - ${MKDIR} ${PREFIX}/share/doc/pgsql - @ ${GMAKE} -C ${WRKDIR}/${DISTNAME}/doc install - ${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/FAQ* ${PREFIX}/share/doc/pgsql - ${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/README* ${PREFIX}/share/doc/pgsql - ${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/TODO ${PREFIX}/share/doc/pgsql -# ${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/*ps.gz ${PREFIX}/share/doc/pgsql .endif .if !defined(BATCH) - @ more -e ${FILESDIR}/post-install-notes + @ more -e ${PREFIX}/pgsql/post-install-notes .endif .if !defined(DEBUG_FLAGS) .for file in ecpg pg_dump pg_id pg_passwd pg_version postgres psql @@ -292,4 +195,7 @@ post-install: .endfor .endif +post-clean: + @ ${RM} -f ${WRKDIRPREFIX}${.CURDIR}/Makefile.inc + .include <bsd.port.mk> diff --git a/databases/postgresql7/distinfo b/databases/postgresql7/distinfo index 309ea1e11614..fc87b8117bdc 100644 --- a/databases/postgresql7/distinfo +++ b/databases/postgresql7/distinfo @@ -1,4 +1,3 @@ -MD5 (postgresql/postgresql-7.0.2.base.tar.gz) = 871d23b85d9a3599a7ed75dfc7da7ba7 -MD5 (postgresql/postgresql-7.0.2.support.tar.gz) = c21180a6485d85785c8e69f0cbff05dd -MD5 (postgresql/postgresql-7.0.2.docs.tar.gz) = efac1f87463f252e54d72b256885b883 -MD5 (postgresql/postgresql-7.0.2.test.tar.gz) = 3443b3d83194c396f20aee2adc6f93bf +MD5 (postgresql/postgresql-7.0.3.base.tar.gz) = 0eeda8217b5b11e5a9351fc424808426 +MD5 (postgresql/postgresql-7.0.3.support.tar.gz) = b930f71068d776ef45402fcbebfa58cf +MD5 (postgresql/postgresql-7.0.3.docs.tar.gz) = 3d3fc76073f6d77febefc83f887fc87d diff --git a/databases/postgresql7/files/dot.profile.in b/databases/postgresql7/files/dot.profile.in new file mode 100644 index 000000000000..bd7ec45043be --- /dev/null +++ b/databases/postgresql7/files/dot.profile.in @@ -0,0 +1,16 @@ +PATH=${PATH}:%%PREFIX%%/pgsql/bin +PGLIB=%%PREFIX%%/pgsql/lib + +# note: PGDATA overwrites the -D startup option +PGDATA=%%PREFIX%%/pgsql/data + +export PATH MANPATH PGLIB PGDATA + +#You might want to set some locale stuff here +#PGDATESTYLE=ISO +#LC_ALL=sv_SE.ISO_88591-1 +#export PGDATESTYLE LC_ALL + +# if you want to make regression tests use this TZ +#TZ=PST8PDT +#export TZ diff --git a/databases/postgresql7/files/patch-au b/databases/postgresql7/files/patch-au new file mode 100644 index 000000000000..340521b49482 --- /dev/null +++ b/databases/postgresql7/files/patch-au @@ -0,0 +1,58 @@ +--- configure.in.orig Sun Nov 5 05:03:47 2000 ++++ configure.in Mon Dec 4 02:36:15 2000 +@@ -299,13 +299,28 @@ + [ --with-tcl build Tcl interfaces and pgtclsh ], + [ + case "$withval" in +- y | ye | yes) USE_TCL=true; USE_TK=true; AC_MSG_RESULT(enabled) ;; ++ y | ye | yes) USE_TCL=true; AC_MSG_RESULT(enabled) ;; + *) USE_TCL=; USE_TK=; AC_MSG_RESULT(disabled) ;; + esac + ], + [ USE_TCL=; USE_TK=; AC_MSG_RESULT(disabled) ] + ) + ++dnl We include tk support with tcl unless user says --without-tk ++if test USE_TCL = true ++then ++AC_MSG_CHECKING(setting USE_TK) ++AC_ARG_WITH( ++ tk, ++ [ --without-tk build Tcl *without* Tk ], ++ [ ++ case "$withval" in ++ y | ye | yes) USE_TK=true; USE_TK=true; AC_MSG_RESULT(enabled) ;; ++ *) USE_TK=n; AC_MSG_RESULT(disabled) ;; ++ esac ++ ] ++) ++fi + export USE_TCL + export USE_TK + +@@ -482,7 +497,7 @@ + #endif + ], + ELF_SYS=true, +-[if test "X$elf" = "Xyes" ++[if test "X$PORTOBJFORMAT" = "Xyes" + then + ELF_SYS=true + else +@@ -1248,10 +1263,15 @@ + else + AC_MSG_RESULT($TCL_CONFIG_SH) + AC_SUBST(TCL_CONFIG_SH) ++ . ${TCL_CONFIG_SH} ++ AC_SUBST(TCL_LIB_SPEC) + fi + fi + +-USE_TK=$USE_TCL # If TCL is disabled, disable TK ++USE_TK=${USE_TK:=$USE_TCL} # If TCL is disabled, disable TK ++ # otherwise -- enable unless explicitly ++ # disabled ++ + + dnl Check for Tk configuration script tkConfig.sh + if test "$USE_TK" = true diff --git a/databases/postgresql7/files/patch-av b/databases/postgresql7/files/patch-av new file mode 100644 index 000000000000..49b35f9e8dc1 --- /dev/null +++ b/databases/postgresql7/files/patch-av @@ -0,0 +1,17 @@ +--- interfaces/libpq/fe-connect.c Sun May 21 17:19:53 2000 ++++ interfaces/libpq/fe-connect.c Fri Sep 15 13:53:52 2000 +@@ -801 +801 @@ +- sprintf(conn->errorMessage, ++ printfPQExpBuffer(&conn->errorMessage, +@@ -809 +809 @@ +- sprintf(conn->errorMessage, "PQconnectDB() -- couldn't read postmaster response: errno=%d\n%s\n", ++ printfPQExpBuffer(&conn->errorMessage, "PQconnectDB() -- couldn't read postmaster response: errno=%d\n%s\n", +@@ -822 +822 @@ +- sprintf(conn->errorMessage, ++ printfPQExpBuffer(&conn->errorMessage, +@@ -832 +832 @@ +- sprintf(conn->errorMessage, ++ printfPQExpBuffer(&conn->errorMessage, +@@ -850 +850 @@ +- strcpy(conn->errorMessage, ++ printfPQExpBuffer(&conn->errorMessage, diff --git a/databases/postgresql7/files/patch-ba b/databases/postgresql7/files/patch-ba index a3b679b882c5..586d725c536a 100644 --- a/databases/postgresql7/files/patch-ba +++ b/databases/postgresql7/files/patch-ba @@ -1,5 +1,5 @@ ---- interfaces/jdbc/Makefile.orig Tue Mar 14 16:55:17 2000 -+++ interfaces/jdbc/Makefile Sun Apr 16 21:16:43 2000 +--- interfaces/jdbc/Makefile.orig Sun Nov 5 05:03:53 2000 ++++ interfaces/jdbc/Makefile Fri Dec 8 03:16:17 2000 @@ -10,10 +10,10 @@ FIND = find @@ -15,11 +15,3 @@ RM = rm -f TOUCH = touch -@@ -40,6 +40,7 @@ - @echo To compile, type: - @echo " $(MAKE) jdbc2" - @echo ------------------------------------------------------------ -+ $(MAKE) jdbc1 - - msg: - @echo ------------------------------------------------------------ diff --git a/databases/postgresql7/files/patch-be b/databases/postgresql7/files/patch-be new file mode 100644 index 000000000000..2f8c3c55566f --- /dev/null +++ b/databases/postgresql7/files/patch-be @@ -0,0 +1,9 @@ +This patches let you disable Tk even if you have it installed and +makes sure the TCL-library is added as a dependency for libpgtcl. +--- interfaces/libpgtcl/Makefile.in Tue Mar 7 20:58:36 2000 ++++ interfaces/libpgtcl/Makefile.in Wed Sep 20 08:57:28 2000 +@@ -29,3 +29,3 @@ + +-SHLIB_LINK+= $(LIBPQ) ++SHLIB_LINK+= $(LIBPQ) @TCL_LIB_SPEC@ + diff --git a/databases/postgresql7/files/pgsql.sh.tmpl b/databases/postgresql7/files/pgsql.sh.tmpl index e1673b4850c2..753e0b8aaf80 100644 --- a/databases/postgresql7/files/pgsql.sh.tmpl +++ b/databases/postgresql7/files/pgsql.sh.tmpl @@ -17,13 +17,13 @@ start) stop) [ -x !!PREFIX!!/pgsql/bin/pg_ctl ] && { - su -l pgsql -c 'exec !!PREFIX!!/pgsql/bin/pg_ctl -w -m fast stop' + exec su -l pgsql -c 'exec !!PREFIX!!/pgsql/bin/pg_ctl -w -m fast stop' } ;; status) [ -x !!PREFIX!!/pgsql/bin/pg_ctl ] && { - su -l pgsql -c 'exec !!PREFIX!!/pgsql/bin/pg_ctl status' + exec su -l pgsql -c 'exec !!PREFIX!!/pgsql/bin/pg_ctl status' } ;; diff --git a/databases/postgresql7/files/pkgIndex.tcl.in b/databases/postgresql7/files/pkgIndex.tcl.in new file mode 100644 index 000000000000..bd8329b15c69 --- /dev/null +++ b/databases/postgresql7/files/pkgIndex.tcl.in @@ -0,0 +1,4 @@ +# Package-index file for Pgtcl-package. Enables you to load PostgreSQL +# interface functions right into you TCL-interpreter as simply as +# package require Pgtcl +package ifneeded Pgtcl 1.3 "load %%PREFIX%%/lib/libpgtcl.so" diff --git a/databases/postgresql7/files/post-install-notes b/databases/postgresql7/files/post-install-notes index 289a7651109a..4c69908b2676 100644 --- a/databases/postgresql7/files/post-install-notes +++ b/databases/postgresql7/files/post-install-notes @@ -8,9 +8,12 @@ You may wish to subscribe to the PostgreSQL user-support mailing list. Send an e-mail to pgsql-questions-request@postgresql.org with the text "subscribe" in the message body. -If you built PostgreSQL with TCL support, you can install the port -"pgaccess" to get a TCL/TK based database frontend for database -operations. +If you built PostgreSQL with TCL/TK support, you can use the pgaccess +utility to get a TCL/TK based database frontend for database +operations. You do NOT need to install the pgaccess port separately. + +If you built in the TCL support, you can load the Pg package into your +TCL scripts as easily as ``package require Pgtcl''. To start PostgreSQL, run the startup script: -$PREFIX/etc/rc.d/pgsql.sh start +%%PREFIX%%/etc/rc.d/pgsql.sh start diff --git a/databases/postgresql7/files/pre-install-notes b/databases/postgresql7/files/pre-install-notes new file mode 100644 index 000000000000..72388933bd6d --- /dev/null +++ b/databases/postgresql7/files/pre-install-notes @@ -0,0 +1,9 @@ +# ---------------------------------------------------------------- +# UPGRADE NOTE! Depending on which version you are upgrading from, +# you may have to dump/restore existing databases +# as part of the update. +# This is *NOT* done by this port! +# For detailed instructions, see +# %%WRKDIR%%/%%DISTNAME%%/INSTALL +# after extraction. +# -------------------------------------------------------------- diff --git a/databases/postgresql7/pkg-plist.jdbc b/databases/postgresql7/pkg-plist.jdbc index bef5d75506b4..e751caa65063 100644 --- a/databases/postgresql7/pkg-plist.jdbc +++ b/databases/postgresql7/pkg-plist.jdbc @@ -10,4 +10,5 @@ share/examples/pgsql/jdbc/README_6.3 @dirrm share/examples/pgsql/jdbc @dirrm share/examples/pgsql share/java/classes/postgresql.jar +@unexec rmdir %D/share/java/classes 2>/dev/null || true @unexec rmdir %D/share/java 2>/dev/null || true diff --git a/databases/postgresql7/pkg-plist.notk b/databases/postgresql7/pkg-plist.notk new file mode 100644 index 000000000000..9f5d9e04af48 --- /dev/null +++ b/databases/postgresql7/pkg-plist.notk @@ -0,0 +1,6 @@ +pgsql/bin/pgtclsh +pgsql/include/libpgtcl.h +pgsql/lib/libpgtcl.a +pgsql/lib/libpgtcl.so +pgsql/lib/libpgtcl.so.2 +pgsql/lib/pltcl.so diff --git a/databases/postgresql7/scripts/configure.postgresql b/databases/postgresql7/scripts/configure.postgresql new file mode 100644 index 000000000000..5efe32a766f4 --- /dev/null +++ b/databases/postgresql7/scripts/configure.postgresql @@ -0,0 +1,267 @@ +#!/bin/sh +# -*- tab-width: 4; -*- +# ex:ts=4 +# +# $FreeBSD$ +# +if [ -f ${WRKDIRPREFIX}${CURDIR}/Makefile.inc ]; then + exit +fi + +if [ ! "${BATCH}" ]; then + dialog --title "Backup your data NOW" \ + --msgbox "`sed -e \"s#%%WRKDIR%%#${WRKDIR}#; s#%%DISTNAME%%#${DISTNAME}#\" < ${FILESDIR}/pre-install-notes`" \ + -1 -1 +fi + +#SSL=${NO_OPENSSL:+OFF} +#SSL=${NOSSL:-ON} + +if [ "${BATCH}" ]; then + set \"MultiByte\" +else + /usr/bin/dialog --title "configuration options" --clear \ + --checklist "\n\ +Please select desired options:" -1 -1 8 \ +JDBC "Java DataBase Connectivity" OFF \ +MultiByte "Multibyte for Multilingualism" ON \ +ODBC "Open Database Connectivity" OFF \ +Perl "Perl" OFF \ +TCL "Tcl" ON \ +TCLTK "Tcl/Tk" ON \ +SSL "Secure Socket Layer (requires certificate)" OFF \ +KRB5 "Kerberos 5" OFF \ +2> /tmp/checklist.tmp.$$ + + retval=$? + + if [ -s /tmp/checklist.tmp.$$ ]; then + set `cat /tmp/checklist.tmp.$$` + fi + rm -f /tmp/checklist.tmp.$$ + + case $retval in + 0) if [ -z "$*" ]; then + echo "Nothing selected" + fi + ;; + 1) echo "Cancel pressed." + exit 1 + ;; + esac +fi + +${MKDIR} -p ${WRKDIRPREFIX}${CURDIR} +exec > ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + +while [ "$1" ]; do + case $1 in + \"JDBC\") + # use JAVA_HOME if set correctly + echo "# JDBC" + if [ "${JAVA_HOME}" -a -x ${JAVA_HOME}/bin/javac ]; then + echo JAVA_HOME=${JAVA_HOME} + if [ "$(${JAVA_HOME}/bin/java -version 2>&1 | egrep \"1.1)" ]; then + JAVAVERSION=1 + echo BUILD_DEPENDS+= ${JAVA_HOME}/bin/javac:\${PORTSDIR}/java/jdk + else + JAVAVERSION=2 + echo BUILD_DEPENDS+= ${JAVA_HOME}/bin/javac:\${PORTSDIR}/java/jdk12-beta + fi + else + JAVAVERSION=1 + echo BUILD_DEPENDS+= \${LOCALBASE}/jdk1.1.8/bin/javac:\${PORTSDIR}/java/jdk + echo JAVA_HOME=\${LOCALBASE}/jdk1.1.8 + fi + cat <<-EOF + JAVAVERSION=${JAVAVERSION} + WITH_JDBC=YES + SCRIPTS_ENV+= JAVA_HOME=\${JAVA_HOME} + + EOF + ;; + \"MultiByte\") + MULTIBYTE=1 + ;; + \"ODBC\") + cat <<-EOF + # ODBC + WITH_ODBC=YES + CONFIGURE_ARGS+= --with-odbc + + EOF + ;; + \"Perl\") + cat <<-EOF + # PERL + WITH_PERL=YES + CONFIGURE_ARGS+= --with-perl + + EOF + ;; + \"TCL\") + TCL=1 + ;; + \"TCLTK\") + echo "#TCLTK" + echo WITH_TK=YES + echo + TCL=1 + ;; + \"SSL\") + cat <<-EOF + # SSL + USE_OPENSSL= yes + CFLAGS+= -DUSE_SSL + WITH_SSL= yes + CONFIGURE_ENV+= LDFLAGS="-L\${OPENSSLLIB} -lssl -lcrypto" + + EOF + ;; + \"KRB5\") + KRB5=1 + ;; + \"nothing\"|true) + ;; + *) + echo "Invalid option(s): $*" > /dev/stderr + rm -f ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + exit 1 + ;; + esac + shift +done + +exec > /dev/stderr + +# if multibyte, determine charset +echo "# Multibyte" + +if [ ! "${MULTIBYTE}" ]; then + echo "WITHOUT_MULTIBYTE=YES" >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc +else + if [ "${BATCH}" ]; then + set \"nothing\" + else + /usr/bin/dialog --title "configuration options" --clear \ + --radiolist "\n\ +Please select desired options:" -1 -1 16 \ +nothing "Default Encoding" ON \ +SQL_ASCII "SQL_ASCII" OFF \ +LATIN1 "LATIN1" OFF \ +LATIN2 "LATIN2" OFF \ +LATIN3 "LATIN3" OFF \ +LATIN4 "LATIN4" OFF \ +LATIN5 "LATIN5" OFF \ +EUC_JP "EUC_JP" OFF \ +EUC_CN "EUC_CN" OFF \ +EUC_KR "EUC_KR" OFF \ +EUC_TW "EUC_TW" OFF \ +KOI8 "KOI8" OFF \ +UNICODE "UNICODE" OFF \ +MULE_INTERNAL "MULE_INTERNAL" OFF \ +WIN "WIN" OFF \ +ALT "ALT" OFF \ +2> /tmp/checklist.tmp.$$ + + retval=$? + + if [ -s /tmp/checklist.tmp.$$ ]; then + set `cat /tmp/checklist.tmp.$$` + fi + rm -f /tmp/checklist.tmp.$$ + if [ $retval = 1 ]; then + echo "Cancel pressed." + rm ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + exit 1 + fi + fi + + if [ "$1" = "nothing" ]; then + echo "CONFIGURE_ARGS+= --enable-multibyte" \ + >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + else + echo "CONFIGURE_ARGS+= --enable-multibyte=$1" \ + >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + fi +fi +echo + +if [ "${TCL}" ]; then + echo "# TCL" >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + if [ "${BATCH}" ]; then + echo WITH_TCL=8.3 >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + else + dialog --title "TCL version" \ + --inputbox "Please enter TCL version. Default is 8.3." -1 -1 "8.3" \ + 2> /tmp/checklist.tmp.$$ + retval=$? + if [ -s /tmp/checklist.tmp.$$ ]; then + set `cat /tmp/checklist.tmp.$$` + fi + rm -f /tmp/checklist.tmp.$$ + case $retval in + 0) if [ -z "$*" ]; then + echo "Nothing selected" + fi + ;; + 1) echo "Cancel pressed." + rm -f ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + exit 1 + ;; + esac + echo WITH_TCL=\"$1\" >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + fi + cat <<-EOF >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + CONFIGURE_ARGS+= --with-tcl --with-tclconfig="\${TCLCONFIG}" + TCLV=\${WITH_TCL:S/.//} + TCL_INCDIR= \${LOCALBASE}/include/tcl\${WITH_TCL} + MAKE_ENV= TCL_INCDIR=\${TCL_INCDIR} + LIB_DEPENDS= tcl\${TCLV}.1:\${PORTSDIR}/lang/tcl\${TCLV} + TCLCONFIG= '\${LOCALBASE}/lib/tcl\${WITH_TCL}' + .if defined(WITH_TK) + TK_INCDIR= \${LOCALBASE}/include/tk\${WITH_TCL} + CONFIGURE_ENV+= WISH=\${LOCALBASE}/bin/wish\${WITH_TCL} + LIB_DEPENDS+= tk\${TCLV}.1:\${PORTSDIR}/x11-toolkits/tk\${TCLV} + TCLCONFIG+= '\${LOCALBASE}/lib/tk\${WITH_TCL}' + TCL_PLIST= pkg-plist.tcl + .else + TCL_PLIST= pkg-plist.notk + CONFIGURE_ARGS+= --without-tk + .endif + + EOF +fi + +if [ "${KRB5}" ]; then + if [ "${BATCH}" ]; then + # never gets here, but what the heck... + echo KRB5_HOME=\${LOCALBASE} >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + else + dialog --inputbox "Please enter the KRB5_HOME path" -1 -1 "${KRB_HOME:-${LOCALBASE}}" \ + 2> /tmp/checklist.tmp.$$ + retval=$? + if [ -s /tmp/checklist.tmp.$$ ]; then + set `cat /tmp/checklist.tmp.$$` + fi + rm -f /tmp/checklist.tmp.$$ + case $retval in + 0) if [ -z "$*" ]; then + echo "No input" + fi + ;; + 1) echo "Cancel pressed." + rm -f ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + exit 1 + ;; + esac + echo KRB5_HOME=\"$1\" >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + fi + cat <<-EOF >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + .if defined(KRB5_HOME) && exists(\${KRB5_HOME}) + CONFIGURE_KRB= --with-krb5=\${KRB5_HOME} \ + --with-krb-keytab=FILE:\${PREFIX}/pgsql/etc/keytab + .endif + + EOF +fi diff --git a/databases/postgresql73-server/Makefile b/databases/postgresql73-server/Makefile index 5f64023c8cf5..08e0329a0795 100644 --- a/databases/postgresql73-server/Makefile +++ b/databases/postgresql73-server/Makefile @@ -6,7 +6,7 @@ # PORTNAME= postgresql -PORTVERSION= 7.0.2 +PORTVERSION= 7.0.3 CATEGORIES= databases MASTER_SITES= ftp://ftp.postgresql.org/pub/%SUBDIR%/ \ ftp://ftp.de.postgresql.org/%SUBDIR%/ \ @@ -22,59 +22,12 @@ DIST_SUBDIR= postgresql MAINTAINER= girgen@partitur.se +BUILD_DEPENDS= autoconf:${PORTSDIR}/devel/autoconf + Y2K= http://www.postgresql.org/y2k.html INSTALLS_SHLIB= YES LDCONFIG_DIRS= %%PREFIX%%/pgsql/lib -BUILD_DEPENDS= autoconf:${PORTSDIR}/devel/autoconf - -.if defined(KRB5_HOME) && exists(${KRB5_HOME}) -CONFIGURE_KRB= --with-krb5=${KRB5_HOME} \ - --with-krb-keytab=FILE:${PREFIX}/pgsql/etc/keytab -.endif - -# if you want to use the tcl/tk frontend pgaccess, then you need to build -# postgresql with tcl support by typing: make -DWITH_TCL -.if defined(WITH_TCL) -TCL_INCDIR= ${LOCALBASE}/include/tcl8.3 -TK_INCDIR= ${LOCALBASE}/include/tk8.3 -MAKE_ENV= TCL_INCDIR=${TCL_INCDIR} -CONFIGURE_ENV= WISH=${LOCALBASE}/bin/wish8.3 -LIB_DEPENDS= tcl83.1:${PORTSDIR}/lang/tcl83 \ - tk83.1:${PORTSDIR}/x11-toolkits/tk83 -CONFIGURE_TCL= --with-tcl --with-tclconfig="${LOCALBASE}/lib/tcl8.3 ${LOCALBASE}/lib/tk8.3" -.endif - -# if you want to disable the multibyte support, type: -# make -DWITHOUT_MULTIBYTE -# -# if you want to set the default encoding for the multibyte support, type: -# make DEFAULT_ENCODING=<encoding> -# where <encoding> is one of these: -# SQL_ASCII LATIN1 LATIN2 LATIN3 LATIN4 LATIN5 -# EUC_JP EUC_CN EUC_KR EUC_TW KOI8 -# UNICODE MULE_INTERNAL WIN ALT -.if defined(WITHOUT_MULTIBYTE) -CONFIGURE_MULTIBYTE= # none -.elif defined(DEFAULT_ENCODING) -CONFIGURE_MULTIBYTE= --enable-multibyte="${DEFAULT_ENCODING}" -.else -CONFIGURE_MULTIBYTE= --enable-multibyte -.endif -.if defined(WITH_PERL) -CONFIGURE_PERL= --with-perl -.endif -.if defined(WITH_ODBC) -CONFIGURE_ODBC= --with-odbc -.endif - -# if you want jdbc, type make -DWITH_JDBC -# Honors JAVA_HOME if you have it set, and don't want the dependency. -.if defined(WITH_JDBC) -JAVA_HOME?= ${LOCALBASE}/jdk1.1.8 -BUILD_DEPENDS= ${JAVA_HOME}/bin/javac:${PORTSDIR}/java/jdk -SCRIPTS_ENV+= JAVA_HOME=${JAVA_HOME} -.endif WRKSRC= ${WRKDIR}/${DISTNAME}/src DOCDIR= ${WRKDIR}/${DISTNAME}/doc @@ -86,11 +39,6 @@ CONFIGURE_ARGS= --prefix=${PREFIX}/pgsql \ --enable-locale \ --with-template=`uname -s | ${TR} '[A-Z]' '[a-z]'` \ --with-includes="${PREFIX}/include ${TCL_INCDIR} ${TK_INCDIR}" \ - ${CONFIGURE_KRB} \ - ${CONFIGURE_TCL} \ - ${CONFIGURE_MULTIBYTE} \ - ${CONFIGURE_PERL} \ - ${CONFIGURE_ODBC} \ --with-libraries=${PREFIX}/lib MAN1= createdb.1 createlang.1 createuser.1 dropdb.1 droplang.1 \ @@ -117,50 +65,21 @@ MANL= abort.l alter_group.l alter_table.l alter_user.l \ MANPREFIX= ${PREFIX}/pgsql -pre-fetch: - @${ECHO_MSG} "To install and run postgresql you need to compile kernel with:" - @${ECHO_MSG} " options \"SYSVSHM, SYSVSEM, SYSVMSG\"" -.if !defined(WITH_TCL) - @${ECHO_MSG} "To build the \"PostgreSQL to Tcl interface library\", libpgtcl, type:" - @${ECHO_MSG} " make -DWITH_TCL" -.else - @${ECHO_MSG} "Building PostgreSQL with \"libpgtcl\"." -.endif -.if !defined(WITHOUT_MULTIBYTE) - @${ECHO_MSG} "To disable multibyte support, type:" - @${ECHO_MSG} " make -DWITHOUT_MULTIBYTE" -.if !defined(DEFAULT_ENCODING) - @${ECHO_MSG} "To set the default encoding for the multibyte support, type:" - @${ECHO_MSG} " make DEFAULT_ENCODING=<encoding>" - @${ECHO_MSG} "where <encoding> is one of these:" - @${ECHO_MSG} " SQL_ASCII LATIN1 LATIN2 LATIN3 LATIN4 LATIN5" - @${ECHO_MSG} " EUC_JP EUC_CN EUC_KR EUC_TW KOI8" - @${ECHO_MSG} " UNICODE MULE_INTERNAL WIN ALT" -.else - @${ECHO_MSG} "The default encoding is '${DEFAULT_ENCODING}'." -.endif -.else - @${ECHO_MSG} "Building PostgreSQL without multibyte support." -.endif -.if !defined(WITH_JDBC) - @${ECHO_MSG} "To build Java (JDBC) support, type:" - @${ECHO_MSG} " make -DWITH_JDBC" -.else - @${ECHO_MSG} "Building PostgreSQL with \"postgresql.jar\"." -.endif -.if !defined(WITH_PERL) - @${ECHO_MSG} "To build Perl interface and pl/Perl interpreter:" - @${ECHO_MSG} " make -DWITH_PERL" -.else - @${ECHO_MSG} "Building PostgreSQL with \"pl/Perl\"." -.endif -.if !defined(WITH_ODBC) - @${ECHO_MSG} "To build the ODBC driver package:" - @${ECHO_MSG} " make -DWITH_ODBC" -.else - @${ECHO_MSG} "Building PostgreSQL with ODBC Drivers." +SCRIPTS_ENV= WRKDIRPREFIX="${WRKDIRPREFIX}" \ + WRKDIR="${WRKDIR}" \ + FILESDIR="${FILESDIR}" \ + TOUCH="${TOUCH}" \ + MKDIR="${MKDIR}" \ + NO_OPENSSL="${NO_OPENSSL}" \ + DISTNAME="${DISTNAME}" + +.if exists(${WRKDIRPREFIX}${.CURDIR}/Makefile.inc) +.include "${WRKDIRPREFIX}${.CURDIR}/Makefile.inc" .endif +pre-extract: + @ ${SETENV} ${SCRIPTS_ENV} ${SH} ${SCRIPTDIR}/configure.postgresql + post-patch: @ ${MV} ${WRKSRC}/template/freebsd ${WRKSRC}/template/freebsd.orig @ ${SED} -e 's#CFLAGS:-O2 -m486 -pipe#CFLAGS:${CFLAGS}#' \ @@ -180,16 +99,8 @@ pre-configure: post-build: .if defined(WITH_JDBC) - @ cd ${WRKSRC}/interfaces/jdbc && ${GMAKE} -.if !defined(NOPORTDOCS) - @ cd ${WRKSRC}/interfaces/jdbc && ${GMAKE} examples -.endif + @ ${GMAKE} -C ${WRKSRC}/interfaces/jdbc jdbc${JAVAVERSION} .endif - @ ${ECHO} "------------------------------------------------------------" - @ ${ECHO} "Dump existing databases, before installing new db version !!" - @ ${ECHO} "Detailed instructions, see" - @ ${ECHO} "${WRKDIR}/${DISTNAME}/INSTALL" - @ ${ECHO} "------------------------------------------------------------" pre-install: .if defined(PACKAGE_BUILDING) @@ -197,53 +108,54 @@ pre-install: .endif @ ${MKDIR} ${PREFIX}/pgsql @ ${SETENV} ${MAKE_ENV} perl ${SCRIPTDIR}/createuser +.if !defined(BATCH) + @ ${SED} -e "s#%%WRKDIR%%#${WRKDIR}#; s#%%DISTNAME%%#${DISTNAME}#" \ + < ${FILESDIR}/pre-install-notes | more -e +.endif post-install: .if defined(NOPORTDOCS) - @ ( cd ${DOCDIR}; ${GMAKE} man ) + @ ${GMAKE} -C ${DOCDIR} man .else - @ ( cd ${DOCDIR}; ${GMAKE} install ) + @ ${GMAKE} -C ${DOCDIR} install + ${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/FAQ* ${PREFIX}/share/doc/pgsql + ${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/README* ${PREFIX}/share/doc/pgsql + ${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/TODO ${PREFIX}/share/doc/pgsql +# ${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/*ps.gz ${PREFIX}/share/doc/pgsql + @ ${CAT} ${PKGDIR}/pkg-plist.doc >> ${TMPPLIST} .endif @ if [ ! -f ${PREFIX}/pgsql/.profile ]; then \ - ${ECHO} "PATH=${PATH}:${PREFIX}/pgsql/bin" \ + ${SED} 's|%%PREFIX%%|${PREFIX}|g' \ + < ${FILESDIR}/dot.profile.in \ > ${PREFIX}/pgsql/.profile; \ - ${ECHO} "MANPATH=${MANPATH}:${PREFIX}/pgsql/man" \ - >> ${PREFIX}/pgsql/.profile; \ - ${ECHO} "PGLIB=${PREFIX}/pgsql/lib" \ - >> ${PREFIX}/pgsql/.profile; \ - ${ECHO} "# note: PGDATA overwrites the -D startup option" \ - >> ${PREFIX}/pgsql/.profile; \ - ${ECHO} "PGDATA=${PREFIX}/pgsql/data" \ - >> ${PREFIX}/pgsql/.profile; \ - ${ECHO} "DISPLAY=:0" \ - >> ${PREFIX}/pgsql/.profile; \ - ${ECHO} "export PATH MANPATH PGLIB PGDATA DISPLAY" \ - >> ${PREFIX}/pgsql/.profile; \ - ${ECHO} "# if you want to make regression tests use this TZ" \ - >> ${PREFIX}/pgsql/.profile; \ - ${ECHO} "#TZ=PST8PDT" \ - >> ${PREFIX}/pgsql/.profile; \ - ${ECHO} "#export TZ" \ - >> ${PREFIX}/pgsql/.profile; \ fi @ ${CHOWN} -R pgsql:pgsql ${PREFIX}/pgsql @ ${CHOWN} root:pgsql ${PREFIX}/pgsql/lib @ ${ECHO} 'Initializing PostgreSQL Databases - this may take a few minutes...' @ ${SETENV} OBJFORMAT=${PORTOBJFORMAT} ${LDCONFIG} -m ${PREFIX}/pgsql/lib - @ su -l pgsql -c 'PATH=${PREFIX}/pgsql/bin:${PATH} LD_LIBRARY_PATH=${PREFIX}/pgsql/lib ${PREFIX}/pgsql/bin/initdb --pglib=${PREFIX}/pgsql/lib --pgdata=${PREFIX}/pgsql/data' +# '-' so we don't fail to create packagelist at this stage, +# when we already have everything installed on top of previous version + -@ su -l pgsql -c 'PATH=${PREFIX}/pgsql/bin:${PATH} ${PREFIX}/pgsql/bin/initdb --pglib=${PREFIX}/pgsql/lib --pgdata=${PREFIX}/pgsql/data' @ ${SED} -e "s=!!PREFIX!!=${PREFIX}=g" < ${FILESDIR}/pgsql.sh.tmpl \ > ${PREFIX}/etc/rc.d/pgsql.sh @ ${CHMOD} 554 ${PREFIX}/etc/rc.d/pgsql.sh @ ${CHOWN} root.pgsql ${PREFIX}/etc/rc.d/pgsql.sh - @ ${INSTALL_DATA} ${FILESDIR}/post-install-notes ${PREFIX}/pgsql + @ ${SED} -e 's#%%PREFIX%%#${PREFIX}#' < ${FILESDIR}/post-install-notes \ + > ${PREFIX}/pgsql/post-install-notes .if defined(WITHOUT_MULTIBYTE) @${CP} ${TMPPLIST} ${TMPPLIST}.nomulti @${GREP} -v pgsql/bin/pg_encoding ${TMPPLIST}.nomulti > ${TMPPLIST} .endif .if defined(WITH_TCL) @${CP} ${TMPPLIST} ${TMPPLIST}.notcl - @${CAT} ${PKGDIR}/pkg-plist.tcl ${TMPPLIST}.notcl > ${TMPPLIST} + @${CAT} ${PKGDIR}/${TCL_PLIST} ${TMPPLIST}.notcl > ${TMPPLIST} @${RM} ${TMPPLIST}.notcl +# Preparing a loadable TCL-package (pkgIndex.tcl) +# XXX This directory and the single file are not registered in +# XXX the PLIST, because of different PREFIX. + @${MKDIR} ${LOCALBASE}/lib/tcl${WITH_TCL}/Pgtcl1.3 + @${SED} 's|%%PREFIX%%|${PREFIX}|' < ${FILESDIR}/pkgIndex.tcl.in \ + > ${LOCALBASE}/lib/tcl${WITH_TCL}/Pgtcl1.3/pkgIndex.tcl .endif .if defined(WITH_ODBC) @${CP} ${TMPPLIST} ${TMPPLIST}.noodbc @@ -272,19 +184,10 @@ post-install: @ ${ECHO_MSG} "---------------------------------------------------------" @ ${ECHO_MSG} "Putting jdbc examples into ${PREFIX}/share/examples/pgsql" @ ${ECHO_MSG} "---------------------------------------------------------" - @ ${CAT} ${PKGDIR}/pkg-plist.doc >> ${TMPPLIST} -.endif .endif -.if !defined(NOPORTDOCS) - ${MKDIR} ${PREFIX}/share/doc/pgsql - @ ${GMAKE} -C ${WRKDIR}/${DISTNAME}/doc install - ${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/FAQ* ${PREFIX}/share/doc/pgsql - ${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/README* ${PREFIX}/share/doc/pgsql - ${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/TODO ${PREFIX}/share/doc/pgsql -# ${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/*ps.gz ${PREFIX}/share/doc/pgsql .endif .if !defined(BATCH) - @ more -e ${FILESDIR}/post-install-notes + @ more -e ${PREFIX}/pgsql/post-install-notes .endif .if !defined(DEBUG_FLAGS) .for file in ecpg pg_dump pg_id pg_passwd pg_version postgres psql @@ -292,4 +195,7 @@ post-install: .endfor .endif +post-clean: + @ ${RM} -f ${WRKDIRPREFIX}${.CURDIR}/Makefile.inc + .include <bsd.port.mk> diff --git a/databases/postgresql73-server/distinfo b/databases/postgresql73-server/distinfo index 309ea1e11614..fc87b8117bdc 100644 --- a/databases/postgresql73-server/distinfo +++ b/databases/postgresql73-server/distinfo @@ -1,4 +1,3 @@ -MD5 (postgresql/postgresql-7.0.2.base.tar.gz) = 871d23b85d9a3599a7ed75dfc7da7ba7 -MD5 (postgresql/postgresql-7.0.2.support.tar.gz) = c21180a6485d85785c8e69f0cbff05dd -MD5 (postgresql/postgresql-7.0.2.docs.tar.gz) = efac1f87463f252e54d72b256885b883 -MD5 (postgresql/postgresql-7.0.2.test.tar.gz) = 3443b3d83194c396f20aee2adc6f93bf +MD5 (postgresql/postgresql-7.0.3.base.tar.gz) = 0eeda8217b5b11e5a9351fc424808426 +MD5 (postgresql/postgresql-7.0.3.support.tar.gz) = b930f71068d776ef45402fcbebfa58cf +MD5 (postgresql/postgresql-7.0.3.docs.tar.gz) = 3d3fc76073f6d77febefc83f887fc87d diff --git a/databases/postgresql73-server/files/dot.profile.in b/databases/postgresql73-server/files/dot.profile.in new file mode 100644 index 000000000000..bd7ec45043be --- /dev/null +++ b/databases/postgresql73-server/files/dot.profile.in @@ -0,0 +1,16 @@ +PATH=${PATH}:%%PREFIX%%/pgsql/bin +PGLIB=%%PREFIX%%/pgsql/lib + +# note: PGDATA overwrites the -D startup option +PGDATA=%%PREFIX%%/pgsql/data + +export PATH MANPATH PGLIB PGDATA + +#You might want to set some locale stuff here +#PGDATESTYLE=ISO +#LC_ALL=sv_SE.ISO_88591-1 +#export PGDATESTYLE LC_ALL + +# if you want to make regression tests use this TZ +#TZ=PST8PDT +#export TZ diff --git a/databases/postgresql73-server/files/patch-au b/databases/postgresql73-server/files/patch-au new file mode 100644 index 000000000000..340521b49482 --- /dev/null +++ b/databases/postgresql73-server/files/patch-au @@ -0,0 +1,58 @@ +--- configure.in.orig Sun Nov 5 05:03:47 2000 ++++ configure.in Mon Dec 4 02:36:15 2000 +@@ -299,13 +299,28 @@ + [ --with-tcl build Tcl interfaces and pgtclsh ], + [ + case "$withval" in +- y | ye | yes) USE_TCL=true; USE_TK=true; AC_MSG_RESULT(enabled) ;; ++ y | ye | yes) USE_TCL=true; AC_MSG_RESULT(enabled) ;; + *) USE_TCL=; USE_TK=; AC_MSG_RESULT(disabled) ;; + esac + ], + [ USE_TCL=; USE_TK=; AC_MSG_RESULT(disabled) ] + ) + ++dnl We include tk support with tcl unless user says --without-tk ++if test USE_TCL = true ++then ++AC_MSG_CHECKING(setting USE_TK) ++AC_ARG_WITH( ++ tk, ++ [ --without-tk build Tcl *without* Tk ], ++ [ ++ case "$withval" in ++ y | ye | yes) USE_TK=true; USE_TK=true; AC_MSG_RESULT(enabled) ;; ++ *) USE_TK=n; AC_MSG_RESULT(disabled) ;; ++ esac ++ ] ++) ++fi + export USE_TCL + export USE_TK + +@@ -482,7 +497,7 @@ + #endif + ], + ELF_SYS=true, +-[if test "X$elf" = "Xyes" ++[if test "X$PORTOBJFORMAT" = "Xyes" + then + ELF_SYS=true + else +@@ -1248,10 +1263,15 @@ + else + AC_MSG_RESULT($TCL_CONFIG_SH) + AC_SUBST(TCL_CONFIG_SH) ++ . ${TCL_CONFIG_SH} ++ AC_SUBST(TCL_LIB_SPEC) + fi + fi + +-USE_TK=$USE_TCL # If TCL is disabled, disable TK ++USE_TK=${USE_TK:=$USE_TCL} # If TCL is disabled, disable TK ++ # otherwise -- enable unless explicitly ++ # disabled ++ + + dnl Check for Tk configuration script tkConfig.sh + if test "$USE_TK" = true diff --git a/databases/postgresql73-server/files/patch-av b/databases/postgresql73-server/files/patch-av new file mode 100644 index 000000000000..49b35f9e8dc1 --- /dev/null +++ b/databases/postgresql73-server/files/patch-av @@ -0,0 +1,17 @@ +--- interfaces/libpq/fe-connect.c Sun May 21 17:19:53 2000 ++++ interfaces/libpq/fe-connect.c Fri Sep 15 13:53:52 2000 +@@ -801 +801 @@ +- sprintf(conn->errorMessage, ++ printfPQExpBuffer(&conn->errorMessage, +@@ -809 +809 @@ +- sprintf(conn->errorMessage, "PQconnectDB() -- couldn't read postmaster response: errno=%d\n%s\n", ++ printfPQExpBuffer(&conn->errorMessage, "PQconnectDB() -- couldn't read postmaster response: errno=%d\n%s\n", +@@ -822 +822 @@ +- sprintf(conn->errorMessage, ++ printfPQExpBuffer(&conn->errorMessage, +@@ -832 +832 @@ +- sprintf(conn->errorMessage, ++ printfPQExpBuffer(&conn->errorMessage, +@@ -850 +850 @@ +- strcpy(conn->errorMessage, ++ printfPQExpBuffer(&conn->errorMessage, diff --git a/databases/postgresql73-server/files/patch-ba b/databases/postgresql73-server/files/patch-ba index a3b679b882c5..586d725c536a 100644 --- a/databases/postgresql73-server/files/patch-ba +++ b/databases/postgresql73-server/files/patch-ba @@ -1,5 +1,5 @@ ---- interfaces/jdbc/Makefile.orig Tue Mar 14 16:55:17 2000 -+++ interfaces/jdbc/Makefile Sun Apr 16 21:16:43 2000 +--- interfaces/jdbc/Makefile.orig Sun Nov 5 05:03:53 2000 ++++ interfaces/jdbc/Makefile Fri Dec 8 03:16:17 2000 @@ -10,10 +10,10 @@ FIND = find @@ -15,11 +15,3 @@ RM = rm -f TOUCH = touch -@@ -40,6 +40,7 @@ - @echo To compile, type: - @echo " $(MAKE) jdbc2" - @echo ------------------------------------------------------------ -+ $(MAKE) jdbc1 - - msg: - @echo ------------------------------------------------------------ diff --git a/databases/postgresql73-server/files/patch-be b/databases/postgresql73-server/files/patch-be new file mode 100644 index 000000000000..2f8c3c55566f --- /dev/null +++ b/databases/postgresql73-server/files/patch-be @@ -0,0 +1,9 @@ +This patches let you disable Tk even if you have it installed and +makes sure the TCL-library is added as a dependency for libpgtcl. +--- interfaces/libpgtcl/Makefile.in Tue Mar 7 20:58:36 2000 ++++ interfaces/libpgtcl/Makefile.in Wed Sep 20 08:57:28 2000 +@@ -29,3 +29,3 @@ + +-SHLIB_LINK+= $(LIBPQ) ++SHLIB_LINK+= $(LIBPQ) @TCL_LIB_SPEC@ + diff --git a/databases/postgresql73-server/files/pgsql.sh.tmpl b/databases/postgresql73-server/files/pgsql.sh.tmpl index e1673b4850c2..753e0b8aaf80 100644 --- a/databases/postgresql73-server/files/pgsql.sh.tmpl +++ b/databases/postgresql73-server/files/pgsql.sh.tmpl @@ -17,13 +17,13 @@ start) stop) [ -x !!PREFIX!!/pgsql/bin/pg_ctl ] && { - su -l pgsql -c 'exec !!PREFIX!!/pgsql/bin/pg_ctl -w -m fast stop' + exec su -l pgsql -c 'exec !!PREFIX!!/pgsql/bin/pg_ctl -w -m fast stop' } ;; status) [ -x !!PREFIX!!/pgsql/bin/pg_ctl ] && { - su -l pgsql -c 'exec !!PREFIX!!/pgsql/bin/pg_ctl status' + exec su -l pgsql -c 'exec !!PREFIX!!/pgsql/bin/pg_ctl status' } ;; diff --git a/databases/postgresql73-server/files/pkgIndex.tcl.in b/databases/postgresql73-server/files/pkgIndex.tcl.in new file mode 100644 index 000000000000..bd8329b15c69 --- /dev/null +++ b/databases/postgresql73-server/files/pkgIndex.tcl.in @@ -0,0 +1,4 @@ +# Package-index file for Pgtcl-package. Enables you to load PostgreSQL +# interface functions right into you TCL-interpreter as simply as +# package require Pgtcl +package ifneeded Pgtcl 1.3 "load %%PREFIX%%/lib/libpgtcl.so" diff --git a/databases/postgresql73-server/files/post-install-notes b/databases/postgresql73-server/files/post-install-notes index 289a7651109a..4c69908b2676 100644 --- a/databases/postgresql73-server/files/post-install-notes +++ b/databases/postgresql73-server/files/post-install-notes @@ -8,9 +8,12 @@ You may wish to subscribe to the PostgreSQL user-support mailing list. Send an e-mail to pgsql-questions-request@postgresql.org with the text "subscribe" in the message body. -If you built PostgreSQL with TCL support, you can install the port -"pgaccess" to get a TCL/TK based database frontend for database -operations. +If you built PostgreSQL with TCL/TK support, you can use the pgaccess +utility to get a TCL/TK based database frontend for database +operations. You do NOT need to install the pgaccess port separately. + +If you built in the TCL support, you can load the Pg package into your +TCL scripts as easily as ``package require Pgtcl''. To start PostgreSQL, run the startup script: -$PREFIX/etc/rc.d/pgsql.sh start +%%PREFIX%%/etc/rc.d/pgsql.sh start diff --git a/databases/postgresql73-server/files/pre-install-notes b/databases/postgresql73-server/files/pre-install-notes new file mode 100644 index 000000000000..72388933bd6d --- /dev/null +++ b/databases/postgresql73-server/files/pre-install-notes @@ -0,0 +1,9 @@ +# ---------------------------------------------------------------- +# UPGRADE NOTE! Depending on which version you are upgrading from, +# you may have to dump/restore existing databases +# as part of the update. +# This is *NOT* done by this port! +# For detailed instructions, see +# %%WRKDIR%%/%%DISTNAME%%/INSTALL +# after extraction. +# -------------------------------------------------------------- diff --git a/databases/postgresql73-server/pkg-plist.jdbc b/databases/postgresql73-server/pkg-plist.jdbc index bef5d75506b4..e751caa65063 100644 --- a/databases/postgresql73-server/pkg-plist.jdbc +++ b/databases/postgresql73-server/pkg-plist.jdbc @@ -10,4 +10,5 @@ share/examples/pgsql/jdbc/README_6.3 @dirrm share/examples/pgsql/jdbc @dirrm share/examples/pgsql share/java/classes/postgresql.jar +@unexec rmdir %D/share/java/classes 2>/dev/null || true @unexec rmdir %D/share/java 2>/dev/null || true diff --git a/databases/postgresql73-server/pkg-plist.notk b/databases/postgresql73-server/pkg-plist.notk new file mode 100644 index 000000000000..9f5d9e04af48 --- /dev/null +++ b/databases/postgresql73-server/pkg-plist.notk @@ -0,0 +1,6 @@ +pgsql/bin/pgtclsh +pgsql/include/libpgtcl.h +pgsql/lib/libpgtcl.a +pgsql/lib/libpgtcl.so +pgsql/lib/libpgtcl.so.2 +pgsql/lib/pltcl.so diff --git a/databases/postgresql73-server/scripts/configure.postgresql b/databases/postgresql73-server/scripts/configure.postgresql new file mode 100644 index 000000000000..5efe32a766f4 --- /dev/null +++ b/databases/postgresql73-server/scripts/configure.postgresql @@ -0,0 +1,267 @@ +#!/bin/sh +# -*- tab-width: 4; -*- +# ex:ts=4 +# +# $FreeBSD$ +# +if [ -f ${WRKDIRPREFIX}${CURDIR}/Makefile.inc ]; then + exit +fi + +if [ ! "${BATCH}" ]; then + dialog --title "Backup your data NOW" \ + --msgbox "`sed -e \"s#%%WRKDIR%%#${WRKDIR}#; s#%%DISTNAME%%#${DISTNAME}#\" < ${FILESDIR}/pre-install-notes`" \ + -1 -1 +fi + +#SSL=${NO_OPENSSL:+OFF} +#SSL=${NOSSL:-ON} + +if [ "${BATCH}" ]; then + set \"MultiByte\" +else + /usr/bin/dialog --title "configuration options" --clear \ + --checklist "\n\ +Please select desired options:" -1 -1 8 \ +JDBC "Java DataBase Connectivity" OFF \ +MultiByte "Multibyte for Multilingualism" ON \ +ODBC "Open Database Connectivity" OFF \ +Perl "Perl" OFF \ +TCL "Tcl" ON \ +TCLTK "Tcl/Tk" ON \ +SSL "Secure Socket Layer (requires certificate)" OFF \ +KRB5 "Kerberos 5" OFF \ +2> /tmp/checklist.tmp.$$ + + retval=$? + + if [ -s /tmp/checklist.tmp.$$ ]; then + set `cat /tmp/checklist.tmp.$$` + fi + rm -f /tmp/checklist.tmp.$$ + + case $retval in + 0) if [ -z "$*" ]; then + echo "Nothing selected" + fi + ;; + 1) echo "Cancel pressed." + exit 1 + ;; + esac +fi + +${MKDIR} -p ${WRKDIRPREFIX}${CURDIR} +exec > ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + +while [ "$1" ]; do + case $1 in + \"JDBC\") + # use JAVA_HOME if set correctly + echo "# JDBC" + if [ "${JAVA_HOME}" -a -x ${JAVA_HOME}/bin/javac ]; then + echo JAVA_HOME=${JAVA_HOME} + if [ "$(${JAVA_HOME}/bin/java -version 2>&1 | egrep \"1.1)" ]; then + JAVAVERSION=1 + echo BUILD_DEPENDS+= ${JAVA_HOME}/bin/javac:\${PORTSDIR}/java/jdk + else + JAVAVERSION=2 + echo BUILD_DEPENDS+= ${JAVA_HOME}/bin/javac:\${PORTSDIR}/java/jdk12-beta + fi + else + JAVAVERSION=1 + echo BUILD_DEPENDS+= \${LOCALBASE}/jdk1.1.8/bin/javac:\${PORTSDIR}/java/jdk + echo JAVA_HOME=\${LOCALBASE}/jdk1.1.8 + fi + cat <<-EOF + JAVAVERSION=${JAVAVERSION} + WITH_JDBC=YES + SCRIPTS_ENV+= JAVA_HOME=\${JAVA_HOME} + + EOF + ;; + \"MultiByte\") + MULTIBYTE=1 + ;; + \"ODBC\") + cat <<-EOF + # ODBC + WITH_ODBC=YES + CONFIGURE_ARGS+= --with-odbc + + EOF + ;; + \"Perl\") + cat <<-EOF + # PERL + WITH_PERL=YES + CONFIGURE_ARGS+= --with-perl + + EOF + ;; + \"TCL\") + TCL=1 + ;; + \"TCLTK\") + echo "#TCLTK" + echo WITH_TK=YES + echo + TCL=1 + ;; + \"SSL\") + cat <<-EOF + # SSL + USE_OPENSSL= yes + CFLAGS+= -DUSE_SSL + WITH_SSL= yes + CONFIGURE_ENV+= LDFLAGS="-L\${OPENSSLLIB} -lssl -lcrypto" + + EOF + ;; + \"KRB5\") + KRB5=1 + ;; + \"nothing\"|true) + ;; + *) + echo "Invalid option(s): $*" > /dev/stderr + rm -f ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + exit 1 + ;; + esac + shift +done + +exec > /dev/stderr + +# if multibyte, determine charset +echo "# Multibyte" + +if [ ! "${MULTIBYTE}" ]; then + echo "WITHOUT_MULTIBYTE=YES" >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc +else + if [ "${BATCH}" ]; then + set \"nothing\" + else + /usr/bin/dialog --title "configuration options" --clear \ + --radiolist "\n\ +Please select desired options:" -1 -1 16 \ +nothing "Default Encoding" ON \ +SQL_ASCII "SQL_ASCII" OFF \ +LATIN1 "LATIN1" OFF \ +LATIN2 "LATIN2" OFF \ +LATIN3 "LATIN3" OFF \ +LATIN4 "LATIN4" OFF \ +LATIN5 "LATIN5" OFF \ +EUC_JP "EUC_JP" OFF \ +EUC_CN "EUC_CN" OFF \ +EUC_KR "EUC_KR" OFF \ +EUC_TW "EUC_TW" OFF \ +KOI8 "KOI8" OFF \ +UNICODE "UNICODE" OFF \ +MULE_INTERNAL "MULE_INTERNAL" OFF \ +WIN "WIN" OFF \ +ALT "ALT" OFF \ +2> /tmp/checklist.tmp.$$ + + retval=$? + + if [ -s /tmp/checklist.tmp.$$ ]; then + set `cat /tmp/checklist.tmp.$$` + fi + rm -f /tmp/checklist.tmp.$$ + if [ $retval = 1 ]; then + echo "Cancel pressed." + rm ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + exit 1 + fi + fi + + if [ "$1" = "nothing" ]; then + echo "CONFIGURE_ARGS+= --enable-multibyte" \ + >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + else + echo "CONFIGURE_ARGS+= --enable-multibyte=$1" \ + >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + fi +fi +echo + +if [ "${TCL}" ]; then + echo "# TCL" >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + if [ "${BATCH}" ]; then + echo WITH_TCL=8.3 >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + else + dialog --title "TCL version" \ + --inputbox "Please enter TCL version. Default is 8.3." -1 -1 "8.3" \ + 2> /tmp/checklist.tmp.$$ + retval=$? + if [ -s /tmp/checklist.tmp.$$ ]; then + set `cat /tmp/checklist.tmp.$$` + fi + rm -f /tmp/checklist.tmp.$$ + case $retval in + 0) if [ -z "$*" ]; then + echo "Nothing selected" + fi + ;; + 1) echo "Cancel pressed." + rm -f ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + exit 1 + ;; + esac + echo WITH_TCL=\"$1\" >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + fi + cat <<-EOF >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + CONFIGURE_ARGS+= --with-tcl --with-tclconfig="\${TCLCONFIG}" + TCLV=\${WITH_TCL:S/.//} + TCL_INCDIR= \${LOCALBASE}/include/tcl\${WITH_TCL} + MAKE_ENV= TCL_INCDIR=\${TCL_INCDIR} + LIB_DEPENDS= tcl\${TCLV}.1:\${PORTSDIR}/lang/tcl\${TCLV} + TCLCONFIG= '\${LOCALBASE}/lib/tcl\${WITH_TCL}' + .if defined(WITH_TK) + TK_INCDIR= \${LOCALBASE}/include/tk\${WITH_TCL} + CONFIGURE_ENV+= WISH=\${LOCALBASE}/bin/wish\${WITH_TCL} + LIB_DEPENDS+= tk\${TCLV}.1:\${PORTSDIR}/x11-toolkits/tk\${TCLV} + TCLCONFIG+= '\${LOCALBASE}/lib/tk\${WITH_TCL}' + TCL_PLIST= pkg-plist.tcl + .else + TCL_PLIST= pkg-plist.notk + CONFIGURE_ARGS+= --without-tk + .endif + + EOF +fi + +if [ "${KRB5}" ]; then + if [ "${BATCH}" ]; then + # never gets here, but what the heck... + echo KRB5_HOME=\${LOCALBASE} >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + else + dialog --inputbox "Please enter the KRB5_HOME path" -1 -1 "${KRB_HOME:-${LOCALBASE}}" \ + 2> /tmp/checklist.tmp.$$ + retval=$? + if [ -s /tmp/checklist.tmp.$$ ]; then + set `cat /tmp/checklist.tmp.$$` + fi + rm -f /tmp/checklist.tmp.$$ + case $retval in + 0) if [ -z "$*" ]; then + echo "No input" + fi + ;; + 1) echo "Cancel pressed." + rm -f ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + exit 1 + ;; + esac + echo KRB5_HOME=\"$1\" >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + fi + cat <<-EOF >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + .if defined(KRB5_HOME) && exists(\${KRB5_HOME}) + CONFIGURE_KRB= --with-krb5=\${KRB5_HOME} \ + --with-krb-keytab=FILE:\${PREFIX}/pgsql/etc/keytab + .endif + + EOF +fi diff --git a/databases/postgresql73/Makefile b/databases/postgresql73/Makefile index 5f64023c8cf5..08e0329a0795 100644 --- a/databases/postgresql73/Makefile +++ b/databases/postgresql73/Makefile @@ -6,7 +6,7 @@ # PORTNAME= postgresql -PORTVERSION= 7.0.2 +PORTVERSION= 7.0.3 CATEGORIES= databases MASTER_SITES= ftp://ftp.postgresql.org/pub/%SUBDIR%/ \ ftp://ftp.de.postgresql.org/%SUBDIR%/ \ @@ -22,59 +22,12 @@ DIST_SUBDIR= postgresql MAINTAINER= girgen@partitur.se +BUILD_DEPENDS= autoconf:${PORTSDIR}/devel/autoconf + Y2K= http://www.postgresql.org/y2k.html INSTALLS_SHLIB= YES LDCONFIG_DIRS= %%PREFIX%%/pgsql/lib -BUILD_DEPENDS= autoconf:${PORTSDIR}/devel/autoconf - -.if defined(KRB5_HOME) && exists(${KRB5_HOME}) -CONFIGURE_KRB= --with-krb5=${KRB5_HOME} \ - --with-krb-keytab=FILE:${PREFIX}/pgsql/etc/keytab -.endif - -# if you want to use the tcl/tk frontend pgaccess, then you need to build -# postgresql with tcl support by typing: make -DWITH_TCL -.if defined(WITH_TCL) -TCL_INCDIR= ${LOCALBASE}/include/tcl8.3 -TK_INCDIR= ${LOCALBASE}/include/tk8.3 -MAKE_ENV= TCL_INCDIR=${TCL_INCDIR} -CONFIGURE_ENV= WISH=${LOCALBASE}/bin/wish8.3 -LIB_DEPENDS= tcl83.1:${PORTSDIR}/lang/tcl83 \ - tk83.1:${PORTSDIR}/x11-toolkits/tk83 -CONFIGURE_TCL= --with-tcl --with-tclconfig="${LOCALBASE}/lib/tcl8.3 ${LOCALBASE}/lib/tk8.3" -.endif - -# if you want to disable the multibyte support, type: -# make -DWITHOUT_MULTIBYTE -# -# if you want to set the default encoding for the multibyte support, type: -# make DEFAULT_ENCODING=<encoding> -# where <encoding> is one of these: -# SQL_ASCII LATIN1 LATIN2 LATIN3 LATIN4 LATIN5 -# EUC_JP EUC_CN EUC_KR EUC_TW KOI8 -# UNICODE MULE_INTERNAL WIN ALT -.if defined(WITHOUT_MULTIBYTE) -CONFIGURE_MULTIBYTE= # none -.elif defined(DEFAULT_ENCODING) -CONFIGURE_MULTIBYTE= --enable-multibyte="${DEFAULT_ENCODING}" -.else -CONFIGURE_MULTIBYTE= --enable-multibyte -.endif -.if defined(WITH_PERL) -CONFIGURE_PERL= --with-perl -.endif -.if defined(WITH_ODBC) -CONFIGURE_ODBC= --with-odbc -.endif - -# if you want jdbc, type make -DWITH_JDBC -# Honors JAVA_HOME if you have it set, and don't want the dependency. -.if defined(WITH_JDBC) -JAVA_HOME?= ${LOCALBASE}/jdk1.1.8 -BUILD_DEPENDS= ${JAVA_HOME}/bin/javac:${PORTSDIR}/java/jdk -SCRIPTS_ENV+= JAVA_HOME=${JAVA_HOME} -.endif WRKSRC= ${WRKDIR}/${DISTNAME}/src DOCDIR= ${WRKDIR}/${DISTNAME}/doc @@ -86,11 +39,6 @@ CONFIGURE_ARGS= --prefix=${PREFIX}/pgsql \ --enable-locale \ --with-template=`uname -s | ${TR} '[A-Z]' '[a-z]'` \ --with-includes="${PREFIX}/include ${TCL_INCDIR} ${TK_INCDIR}" \ - ${CONFIGURE_KRB} \ - ${CONFIGURE_TCL} \ - ${CONFIGURE_MULTIBYTE} \ - ${CONFIGURE_PERL} \ - ${CONFIGURE_ODBC} \ --with-libraries=${PREFIX}/lib MAN1= createdb.1 createlang.1 createuser.1 dropdb.1 droplang.1 \ @@ -117,50 +65,21 @@ MANL= abort.l alter_group.l alter_table.l alter_user.l \ MANPREFIX= ${PREFIX}/pgsql -pre-fetch: - @${ECHO_MSG} "To install and run postgresql you need to compile kernel with:" - @${ECHO_MSG} " options \"SYSVSHM, SYSVSEM, SYSVMSG\"" -.if !defined(WITH_TCL) - @${ECHO_MSG} "To build the \"PostgreSQL to Tcl interface library\", libpgtcl, type:" - @${ECHO_MSG} " make -DWITH_TCL" -.else - @${ECHO_MSG} "Building PostgreSQL with \"libpgtcl\"." -.endif -.if !defined(WITHOUT_MULTIBYTE) - @${ECHO_MSG} "To disable multibyte support, type:" - @${ECHO_MSG} " make -DWITHOUT_MULTIBYTE" -.if !defined(DEFAULT_ENCODING) - @${ECHO_MSG} "To set the default encoding for the multibyte support, type:" - @${ECHO_MSG} " make DEFAULT_ENCODING=<encoding>" - @${ECHO_MSG} "where <encoding> is one of these:" - @${ECHO_MSG} " SQL_ASCII LATIN1 LATIN2 LATIN3 LATIN4 LATIN5" - @${ECHO_MSG} " EUC_JP EUC_CN EUC_KR EUC_TW KOI8" - @${ECHO_MSG} " UNICODE MULE_INTERNAL WIN ALT" -.else - @${ECHO_MSG} "The default encoding is '${DEFAULT_ENCODING}'." -.endif -.else - @${ECHO_MSG} "Building PostgreSQL without multibyte support." -.endif -.if !defined(WITH_JDBC) - @${ECHO_MSG} "To build Java (JDBC) support, type:" - @${ECHO_MSG} " make -DWITH_JDBC" -.else - @${ECHO_MSG} "Building PostgreSQL with \"postgresql.jar\"." -.endif -.if !defined(WITH_PERL) - @${ECHO_MSG} "To build Perl interface and pl/Perl interpreter:" - @${ECHO_MSG} " make -DWITH_PERL" -.else - @${ECHO_MSG} "Building PostgreSQL with \"pl/Perl\"." -.endif -.if !defined(WITH_ODBC) - @${ECHO_MSG} "To build the ODBC driver package:" - @${ECHO_MSG} " make -DWITH_ODBC" -.else - @${ECHO_MSG} "Building PostgreSQL with ODBC Drivers." +SCRIPTS_ENV= WRKDIRPREFIX="${WRKDIRPREFIX}" \ + WRKDIR="${WRKDIR}" \ + FILESDIR="${FILESDIR}" \ + TOUCH="${TOUCH}" \ + MKDIR="${MKDIR}" \ + NO_OPENSSL="${NO_OPENSSL}" \ + DISTNAME="${DISTNAME}" + +.if exists(${WRKDIRPREFIX}${.CURDIR}/Makefile.inc) +.include "${WRKDIRPREFIX}${.CURDIR}/Makefile.inc" .endif +pre-extract: + @ ${SETENV} ${SCRIPTS_ENV} ${SH} ${SCRIPTDIR}/configure.postgresql + post-patch: @ ${MV} ${WRKSRC}/template/freebsd ${WRKSRC}/template/freebsd.orig @ ${SED} -e 's#CFLAGS:-O2 -m486 -pipe#CFLAGS:${CFLAGS}#' \ @@ -180,16 +99,8 @@ pre-configure: post-build: .if defined(WITH_JDBC) - @ cd ${WRKSRC}/interfaces/jdbc && ${GMAKE} -.if !defined(NOPORTDOCS) - @ cd ${WRKSRC}/interfaces/jdbc && ${GMAKE} examples -.endif + @ ${GMAKE} -C ${WRKSRC}/interfaces/jdbc jdbc${JAVAVERSION} .endif - @ ${ECHO} "------------------------------------------------------------" - @ ${ECHO} "Dump existing databases, before installing new db version !!" - @ ${ECHO} "Detailed instructions, see" - @ ${ECHO} "${WRKDIR}/${DISTNAME}/INSTALL" - @ ${ECHO} "------------------------------------------------------------" pre-install: .if defined(PACKAGE_BUILDING) @@ -197,53 +108,54 @@ pre-install: .endif @ ${MKDIR} ${PREFIX}/pgsql @ ${SETENV} ${MAKE_ENV} perl ${SCRIPTDIR}/createuser +.if !defined(BATCH) + @ ${SED} -e "s#%%WRKDIR%%#${WRKDIR}#; s#%%DISTNAME%%#${DISTNAME}#" \ + < ${FILESDIR}/pre-install-notes | more -e +.endif post-install: .if defined(NOPORTDOCS) - @ ( cd ${DOCDIR}; ${GMAKE} man ) + @ ${GMAKE} -C ${DOCDIR} man .else - @ ( cd ${DOCDIR}; ${GMAKE} install ) + @ ${GMAKE} -C ${DOCDIR} install + ${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/FAQ* ${PREFIX}/share/doc/pgsql + ${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/README* ${PREFIX}/share/doc/pgsql + ${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/TODO ${PREFIX}/share/doc/pgsql +# ${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/*ps.gz ${PREFIX}/share/doc/pgsql + @ ${CAT} ${PKGDIR}/pkg-plist.doc >> ${TMPPLIST} .endif @ if [ ! -f ${PREFIX}/pgsql/.profile ]; then \ - ${ECHO} "PATH=${PATH}:${PREFIX}/pgsql/bin" \ + ${SED} 's|%%PREFIX%%|${PREFIX}|g' \ + < ${FILESDIR}/dot.profile.in \ > ${PREFIX}/pgsql/.profile; \ - ${ECHO} "MANPATH=${MANPATH}:${PREFIX}/pgsql/man" \ - >> ${PREFIX}/pgsql/.profile; \ - ${ECHO} "PGLIB=${PREFIX}/pgsql/lib" \ - >> ${PREFIX}/pgsql/.profile; \ - ${ECHO} "# note: PGDATA overwrites the -D startup option" \ - >> ${PREFIX}/pgsql/.profile; \ - ${ECHO} "PGDATA=${PREFIX}/pgsql/data" \ - >> ${PREFIX}/pgsql/.profile; \ - ${ECHO} "DISPLAY=:0" \ - >> ${PREFIX}/pgsql/.profile; \ - ${ECHO} "export PATH MANPATH PGLIB PGDATA DISPLAY" \ - >> ${PREFIX}/pgsql/.profile; \ - ${ECHO} "# if you want to make regression tests use this TZ" \ - >> ${PREFIX}/pgsql/.profile; \ - ${ECHO} "#TZ=PST8PDT" \ - >> ${PREFIX}/pgsql/.profile; \ - ${ECHO} "#export TZ" \ - >> ${PREFIX}/pgsql/.profile; \ fi @ ${CHOWN} -R pgsql:pgsql ${PREFIX}/pgsql @ ${CHOWN} root:pgsql ${PREFIX}/pgsql/lib @ ${ECHO} 'Initializing PostgreSQL Databases - this may take a few minutes...' @ ${SETENV} OBJFORMAT=${PORTOBJFORMAT} ${LDCONFIG} -m ${PREFIX}/pgsql/lib - @ su -l pgsql -c 'PATH=${PREFIX}/pgsql/bin:${PATH} LD_LIBRARY_PATH=${PREFIX}/pgsql/lib ${PREFIX}/pgsql/bin/initdb --pglib=${PREFIX}/pgsql/lib --pgdata=${PREFIX}/pgsql/data' +# '-' so we don't fail to create packagelist at this stage, +# when we already have everything installed on top of previous version + -@ su -l pgsql -c 'PATH=${PREFIX}/pgsql/bin:${PATH} ${PREFIX}/pgsql/bin/initdb --pglib=${PREFIX}/pgsql/lib --pgdata=${PREFIX}/pgsql/data' @ ${SED} -e "s=!!PREFIX!!=${PREFIX}=g" < ${FILESDIR}/pgsql.sh.tmpl \ > ${PREFIX}/etc/rc.d/pgsql.sh @ ${CHMOD} 554 ${PREFIX}/etc/rc.d/pgsql.sh @ ${CHOWN} root.pgsql ${PREFIX}/etc/rc.d/pgsql.sh - @ ${INSTALL_DATA} ${FILESDIR}/post-install-notes ${PREFIX}/pgsql + @ ${SED} -e 's#%%PREFIX%%#${PREFIX}#' < ${FILESDIR}/post-install-notes \ + > ${PREFIX}/pgsql/post-install-notes .if defined(WITHOUT_MULTIBYTE) @${CP} ${TMPPLIST} ${TMPPLIST}.nomulti @${GREP} -v pgsql/bin/pg_encoding ${TMPPLIST}.nomulti > ${TMPPLIST} .endif .if defined(WITH_TCL) @${CP} ${TMPPLIST} ${TMPPLIST}.notcl - @${CAT} ${PKGDIR}/pkg-plist.tcl ${TMPPLIST}.notcl > ${TMPPLIST} + @${CAT} ${PKGDIR}/${TCL_PLIST} ${TMPPLIST}.notcl > ${TMPPLIST} @${RM} ${TMPPLIST}.notcl +# Preparing a loadable TCL-package (pkgIndex.tcl) +# XXX This directory and the single file are not registered in +# XXX the PLIST, because of different PREFIX. + @${MKDIR} ${LOCALBASE}/lib/tcl${WITH_TCL}/Pgtcl1.3 + @${SED} 's|%%PREFIX%%|${PREFIX}|' < ${FILESDIR}/pkgIndex.tcl.in \ + > ${LOCALBASE}/lib/tcl${WITH_TCL}/Pgtcl1.3/pkgIndex.tcl .endif .if defined(WITH_ODBC) @${CP} ${TMPPLIST} ${TMPPLIST}.noodbc @@ -272,19 +184,10 @@ post-install: @ ${ECHO_MSG} "---------------------------------------------------------" @ ${ECHO_MSG} "Putting jdbc examples into ${PREFIX}/share/examples/pgsql" @ ${ECHO_MSG} "---------------------------------------------------------" - @ ${CAT} ${PKGDIR}/pkg-plist.doc >> ${TMPPLIST} -.endif .endif -.if !defined(NOPORTDOCS) - ${MKDIR} ${PREFIX}/share/doc/pgsql - @ ${GMAKE} -C ${WRKDIR}/${DISTNAME}/doc install - ${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/FAQ* ${PREFIX}/share/doc/pgsql - ${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/README* ${PREFIX}/share/doc/pgsql - ${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/TODO ${PREFIX}/share/doc/pgsql -# ${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/*ps.gz ${PREFIX}/share/doc/pgsql .endif .if !defined(BATCH) - @ more -e ${FILESDIR}/post-install-notes + @ more -e ${PREFIX}/pgsql/post-install-notes .endif .if !defined(DEBUG_FLAGS) .for file in ecpg pg_dump pg_id pg_passwd pg_version postgres psql @@ -292,4 +195,7 @@ post-install: .endfor .endif +post-clean: + @ ${RM} -f ${WRKDIRPREFIX}${.CURDIR}/Makefile.inc + .include <bsd.port.mk> diff --git a/databases/postgresql73/distinfo b/databases/postgresql73/distinfo index 309ea1e11614..fc87b8117bdc 100644 --- a/databases/postgresql73/distinfo +++ b/databases/postgresql73/distinfo @@ -1,4 +1,3 @@ -MD5 (postgresql/postgresql-7.0.2.base.tar.gz) = 871d23b85d9a3599a7ed75dfc7da7ba7 -MD5 (postgresql/postgresql-7.0.2.support.tar.gz) = c21180a6485d85785c8e69f0cbff05dd -MD5 (postgresql/postgresql-7.0.2.docs.tar.gz) = efac1f87463f252e54d72b256885b883 -MD5 (postgresql/postgresql-7.0.2.test.tar.gz) = 3443b3d83194c396f20aee2adc6f93bf +MD5 (postgresql/postgresql-7.0.3.base.tar.gz) = 0eeda8217b5b11e5a9351fc424808426 +MD5 (postgresql/postgresql-7.0.3.support.tar.gz) = b930f71068d776ef45402fcbebfa58cf +MD5 (postgresql/postgresql-7.0.3.docs.tar.gz) = 3d3fc76073f6d77febefc83f887fc87d diff --git a/databases/postgresql73/files/dot.profile.in b/databases/postgresql73/files/dot.profile.in new file mode 100644 index 000000000000..bd7ec45043be --- /dev/null +++ b/databases/postgresql73/files/dot.profile.in @@ -0,0 +1,16 @@ +PATH=${PATH}:%%PREFIX%%/pgsql/bin +PGLIB=%%PREFIX%%/pgsql/lib + +# note: PGDATA overwrites the -D startup option +PGDATA=%%PREFIX%%/pgsql/data + +export PATH MANPATH PGLIB PGDATA + +#You might want to set some locale stuff here +#PGDATESTYLE=ISO +#LC_ALL=sv_SE.ISO_88591-1 +#export PGDATESTYLE LC_ALL + +# if you want to make regression tests use this TZ +#TZ=PST8PDT +#export TZ diff --git a/databases/postgresql73/files/patch-au b/databases/postgresql73/files/patch-au new file mode 100644 index 000000000000..340521b49482 --- /dev/null +++ b/databases/postgresql73/files/patch-au @@ -0,0 +1,58 @@ +--- configure.in.orig Sun Nov 5 05:03:47 2000 ++++ configure.in Mon Dec 4 02:36:15 2000 +@@ -299,13 +299,28 @@ + [ --with-tcl build Tcl interfaces and pgtclsh ], + [ + case "$withval" in +- y | ye | yes) USE_TCL=true; USE_TK=true; AC_MSG_RESULT(enabled) ;; ++ y | ye | yes) USE_TCL=true; AC_MSG_RESULT(enabled) ;; + *) USE_TCL=; USE_TK=; AC_MSG_RESULT(disabled) ;; + esac + ], + [ USE_TCL=; USE_TK=; AC_MSG_RESULT(disabled) ] + ) + ++dnl We include tk support with tcl unless user says --without-tk ++if test USE_TCL = true ++then ++AC_MSG_CHECKING(setting USE_TK) ++AC_ARG_WITH( ++ tk, ++ [ --without-tk build Tcl *without* Tk ], ++ [ ++ case "$withval" in ++ y | ye | yes) USE_TK=true; USE_TK=true; AC_MSG_RESULT(enabled) ;; ++ *) USE_TK=n; AC_MSG_RESULT(disabled) ;; ++ esac ++ ] ++) ++fi + export USE_TCL + export USE_TK + +@@ -482,7 +497,7 @@ + #endif + ], + ELF_SYS=true, +-[if test "X$elf" = "Xyes" ++[if test "X$PORTOBJFORMAT" = "Xyes" + then + ELF_SYS=true + else +@@ -1248,10 +1263,15 @@ + else + AC_MSG_RESULT($TCL_CONFIG_SH) + AC_SUBST(TCL_CONFIG_SH) ++ . ${TCL_CONFIG_SH} ++ AC_SUBST(TCL_LIB_SPEC) + fi + fi + +-USE_TK=$USE_TCL # If TCL is disabled, disable TK ++USE_TK=${USE_TK:=$USE_TCL} # If TCL is disabled, disable TK ++ # otherwise -- enable unless explicitly ++ # disabled ++ + + dnl Check for Tk configuration script tkConfig.sh + if test "$USE_TK" = true diff --git a/databases/postgresql73/files/patch-av b/databases/postgresql73/files/patch-av new file mode 100644 index 000000000000..49b35f9e8dc1 --- /dev/null +++ b/databases/postgresql73/files/patch-av @@ -0,0 +1,17 @@ +--- interfaces/libpq/fe-connect.c Sun May 21 17:19:53 2000 ++++ interfaces/libpq/fe-connect.c Fri Sep 15 13:53:52 2000 +@@ -801 +801 @@ +- sprintf(conn->errorMessage, ++ printfPQExpBuffer(&conn->errorMessage, +@@ -809 +809 @@ +- sprintf(conn->errorMessage, "PQconnectDB() -- couldn't read postmaster response: errno=%d\n%s\n", ++ printfPQExpBuffer(&conn->errorMessage, "PQconnectDB() -- couldn't read postmaster response: errno=%d\n%s\n", +@@ -822 +822 @@ +- sprintf(conn->errorMessage, ++ printfPQExpBuffer(&conn->errorMessage, +@@ -832 +832 @@ +- sprintf(conn->errorMessage, ++ printfPQExpBuffer(&conn->errorMessage, +@@ -850 +850 @@ +- strcpy(conn->errorMessage, ++ printfPQExpBuffer(&conn->errorMessage, diff --git a/databases/postgresql73/files/patch-ba b/databases/postgresql73/files/patch-ba index a3b679b882c5..586d725c536a 100644 --- a/databases/postgresql73/files/patch-ba +++ b/databases/postgresql73/files/patch-ba @@ -1,5 +1,5 @@ ---- interfaces/jdbc/Makefile.orig Tue Mar 14 16:55:17 2000 -+++ interfaces/jdbc/Makefile Sun Apr 16 21:16:43 2000 +--- interfaces/jdbc/Makefile.orig Sun Nov 5 05:03:53 2000 ++++ interfaces/jdbc/Makefile Fri Dec 8 03:16:17 2000 @@ -10,10 +10,10 @@ FIND = find @@ -15,11 +15,3 @@ RM = rm -f TOUCH = touch -@@ -40,6 +40,7 @@ - @echo To compile, type: - @echo " $(MAKE) jdbc2" - @echo ------------------------------------------------------------ -+ $(MAKE) jdbc1 - - msg: - @echo ------------------------------------------------------------ diff --git a/databases/postgresql73/files/patch-be b/databases/postgresql73/files/patch-be new file mode 100644 index 000000000000..2f8c3c55566f --- /dev/null +++ b/databases/postgresql73/files/patch-be @@ -0,0 +1,9 @@ +This patches let you disable Tk even if you have it installed and +makes sure the TCL-library is added as a dependency for libpgtcl. +--- interfaces/libpgtcl/Makefile.in Tue Mar 7 20:58:36 2000 ++++ interfaces/libpgtcl/Makefile.in Wed Sep 20 08:57:28 2000 +@@ -29,3 +29,3 @@ + +-SHLIB_LINK+= $(LIBPQ) ++SHLIB_LINK+= $(LIBPQ) @TCL_LIB_SPEC@ + diff --git a/databases/postgresql73/files/pgsql.sh.tmpl b/databases/postgresql73/files/pgsql.sh.tmpl index e1673b4850c2..753e0b8aaf80 100644 --- a/databases/postgresql73/files/pgsql.sh.tmpl +++ b/databases/postgresql73/files/pgsql.sh.tmpl @@ -17,13 +17,13 @@ start) stop) [ -x !!PREFIX!!/pgsql/bin/pg_ctl ] && { - su -l pgsql -c 'exec !!PREFIX!!/pgsql/bin/pg_ctl -w -m fast stop' + exec su -l pgsql -c 'exec !!PREFIX!!/pgsql/bin/pg_ctl -w -m fast stop' } ;; status) [ -x !!PREFIX!!/pgsql/bin/pg_ctl ] && { - su -l pgsql -c 'exec !!PREFIX!!/pgsql/bin/pg_ctl status' + exec su -l pgsql -c 'exec !!PREFIX!!/pgsql/bin/pg_ctl status' } ;; diff --git a/databases/postgresql73/files/pkgIndex.tcl.in b/databases/postgresql73/files/pkgIndex.tcl.in new file mode 100644 index 000000000000..bd8329b15c69 --- /dev/null +++ b/databases/postgresql73/files/pkgIndex.tcl.in @@ -0,0 +1,4 @@ +# Package-index file for Pgtcl-package. Enables you to load PostgreSQL +# interface functions right into you TCL-interpreter as simply as +# package require Pgtcl +package ifneeded Pgtcl 1.3 "load %%PREFIX%%/lib/libpgtcl.so" diff --git a/databases/postgresql73/files/post-install-notes b/databases/postgresql73/files/post-install-notes index 289a7651109a..4c69908b2676 100644 --- a/databases/postgresql73/files/post-install-notes +++ b/databases/postgresql73/files/post-install-notes @@ -8,9 +8,12 @@ You may wish to subscribe to the PostgreSQL user-support mailing list. Send an e-mail to pgsql-questions-request@postgresql.org with the text "subscribe" in the message body. -If you built PostgreSQL with TCL support, you can install the port -"pgaccess" to get a TCL/TK based database frontend for database -operations. +If you built PostgreSQL with TCL/TK support, you can use the pgaccess +utility to get a TCL/TK based database frontend for database +operations. You do NOT need to install the pgaccess port separately. + +If you built in the TCL support, you can load the Pg package into your +TCL scripts as easily as ``package require Pgtcl''. To start PostgreSQL, run the startup script: -$PREFIX/etc/rc.d/pgsql.sh start +%%PREFIX%%/etc/rc.d/pgsql.sh start diff --git a/databases/postgresql73/files/pre-install-notes b/databases/postgresql73/files/pre-install-notes new file mode 100644 index 000000000000..72388933bd6d --- /dev/null +++ b/databases/postgresql73/files/pre-install-notes @@ -0,0 +1,9 @@ +# ---------------------------------------------------------------- +# UPGRADE NOTE! Depending on which version you are upgrading from, +# you may have to dump/restore existing databases +# as part of the update. +# This is *NOT* done by this port! +# For detailed instructions, see +# %%WRKDIR%%/%%DISTNAME%%/INSTALL +# after extraction. +# -------------------------------------------------------------- diff --git a/databases/postgresql73/pkg-plist.jdbc b/databases/postgresql73/pkg-plist.jdbc index bef5d75506b4..e751caa65063 100644 --- a/databases/postgresql73/pkg-plist.jdbc +++ b/databases/postgresql73/pkg-plist.jdbc @@ -10,4 +10,5 @@ share/examples/pgsql/jdbc/README_6.3 @dirrm share/examples/pgsql/jdbc @dirrm share/examples/pgsql share/java/classes/postgresql.jar +@unexec rmdir %D/share/java/classes 2>/dev/null || true @unexec rmdir %D/share/java 2>/dev/null || true diff --git a/databases/postgresql73/pkg-plist.notk b/databases/postgresql73/pkg-plist.notk new file mode 100644 index 000000000000..9f5d9e04af48 --- /dev/null +++ b/databases/postgresql73/pkg-plist.notk @@ -0,0 +1,6 @@ +pgsql/bin/pgtclsh +pgsql/include/libpgtcl.h +pgsql/lib/libpgtcl.a +pgsql/lib/libpgtcl.so +pgsql/lib/libpgtcl.so.2 +pgsql/lib/pltcl.so diff --git a/databases/postgresql73/scripts/configure.postgresql b/databases/postgresql73/scripts/configure.postgresql new file mode 100644 index 000000000000..5efe32a766f4 --- /dev/null +++ b/databases/postgresql73/scripts/configure.postgresql @@ -0,0 +1,267 @@ +#!/bin/sh +# -*- tab-width: 4; -*- +# ex:ts=4 +# +# $FreeBSD$ +# +if [ -f ${WRKDIRPREFIX}${CURDIR}/Makefile.inc ]; then + exit +fi + +if [ ! "${BATCH}" ]; then + dialog --title "Backup your data NOW" \ + --msgbox "`sed -e \"s#%%WRKDIR%%#${WRKDIR}#; s#%%DISTNAME%%#${DISTNAME}#\" < ${FILESDIR}/pre-install-notes`" \ + -1 -1 +fi + +#SSL=${NO_OPENSSL:+OFF} +#SSL=${NOSSL:-ON} + +if [ "${BATCH}" ]; then + set \"MultiByte\" +else + /usr/bin/dialog --title "configuration options" --clear \ + --checklist "\n\ +Please select desired options:" -1 -1 8 \ +JDBC "Java DataBase Connectivity" OFF \ +MultiByte "Multibyte for Multilingualism" ON \ +ODBC "Open Database Connectivity" OFF \ +Perl "Perl" OFF \ +TCL "Tcl" ON \ +TCLTK "Tcl/Tk" ON \ +SSL "Secure Socket Layer (requires certificate)" OFF \ +KRB5 "Kerberos 5" OFF \ +2> /tmp/checklist.tmp.$$ + + retval=$? + + if [ -s /tmp/checklist.tmp.$$ ]; then + set `cat /tmp/checklist.tmp.$$` + fi + rm -f /tmp/checklist.tmp.$$ + + case $retval in + 0) if [ -z "$*" ]; then + echo "Nothing selected" + fi + ;; + 1) echo "Cancel pressed." + exit 1 + ;; + esac +fi + +${MKDIR} -p ${WRKDIRPREFIX}${CURDIR} +exec > ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + +while [ "$1" ]; do + case $1 in + \"JDBC\") + # use JAVA_HOME if set correctly + echo "# JDBC" + if [ "${JAVA_HOME}" -a -x ${JAVA_HOME}/bin/javac ]; then + echo JAVA_HOME=${JAVA_HOME} + if [ "$(${JAVA_HOME}/bin/java -version 2>&1 | egrep \"1.1)" ]; then + JAVAVERSION=1 + echo BUILD_DEPENDS+= ${JAVA_HOME}/bin/javac:\${PORTSDIR}/java/jdk + else + JAVAVERSION=2 + echo BUILD_DEPENDS+= ${JAVA_HOME}/bin/javac:\${PORTSDIR}/java/jdk12-beta + fi + else + JAVAVERSION=1 + echo BUILD_DEPENDS+= \${LOCALBASE}/jdk1.1.8/bin/javac:\${PORTSDIR}/java/jdk + echo JAVA_HOME=\${LOCALBASE}/jdk1.1.8 + fi + cat <<-EOF + JAVAVERSION=${JAVAVERSION} + WITH_JDBC=YES + SCRIPTS_ENV+= JAVA_HOME=\${JAVA_HOME} + + EOF + ;; + \"MultiByte\") + MULTIBYTE=1 + ;; + \"ODBC\") + cat <<-EOF + # ODBC + WITH_ODBC=YES + CONFIGURE_ARGS+= --with-odbc + + EOF + ;; + \"Perl\") + cat <<-EOF + # PERL + WITH_PERL=YES + CONFIGURE_ARGS+= --with-perl + + EOF + ;; + \"TCL\") + TCL=1 + ;; + \"TCLTK\") + echo "#TCLTK" + echo WITH_TK=YES + echo + TCL=1 + ;; + \"SSL\") + cat <<-EOF + # SSL + USE_OPENSSL= yes + CFLAGS+= -DUSE_SSL + WITH_SSL= yes + CONFIGURE_ENV+= LDFLAGS="-L\${OPENSSLLIB} -lssl -lcrypto" + + EOF + ;; + \"KRB5\") + KRB5=1 + ;; + \"nothing\"|true) + ;; + *) + echo "Invalid option(s): $*" > /dev/stderr + rm -f ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + exit 1 + ;; + esac + shift +done + +exec > /dev/stderr + +# if multibyte, determine charset +echo "# Multibyte" + +if [ ! "${MULTIBYTE}" ]; then + echo "WITHOUT_MULTIBYTE=YES" >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc +else + if [ "${BATCH}" ]; then + set \"nothing\" + else + /usr/bin/dialog --title "configuration options" --clear \ + --radiolist "\n\ +Please select desired options:" -1 -1 16 \ +nothing "Default Encoding" ON \ +SQL_ASCII "SQL_ASCII" OFF \ +LATIN1 "LATIN1" OFF \ +LATIN2 "LATIN2" OFF \ +LATIN3 "LATIN3" OFF \ +LATIN4 "LATIN4" OFF \ +LATIN5 "LATIN5" OFF \ +EUC_JP "EUC_JP" OFF \ +EUC_CN "EUC_CN" OFF \ +EUC_KR "EUC_KR" OFF \ +EUC_TW "EUC_TW" OFF \ +KOI8 "KOI8" OFF \ +UNICODE "UNICODE" OFF \ +MULE_INTERNAL "MULE_INTERNAL" OFF \ +WIN "WIN" OFF \ +ALT "ALT" OFF \ +2> /tmp/checklist.tmp.$$ + + retval=$? + + if [ -s /tmp/checklist.tmp.$$ ]; then + set `cat /tmp/checklist.tmp.$$` + fi + rm -f /tmp/checklist.tmp.$$ + if [ $retval = 1 ]; then + echo "Cancel pressed." + rm ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + exit 1 + fi + fi + + if [ "$1" = "nothing" ]; then + echo "CONFIGURE_ARGS+= --enable-multibyte" \ + >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + else + echo "CONFIGURE_ARGS+= --enable-multibyte=$1" \ + >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + fi +fi +echo + +if [ "${TCL}" ]; then + echo "# TCL" >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + if [ "${BATCH}" ]; then + echo WITH_TCL=8.3 >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + else + dialog --title "TCL version" \ + --inputbox "Please enter TCL version. Default is 8.3." -1 -1 "8.3" \ + 2> /tmp/checklist.tmp.$$ + retval=$? + if [ -s /tmp/checklist.tmp.$$ ]; then + set `cat /tmp/checklist.tmp.$$` + fi + rm -f /tmp/checklist.tmp.$$ + case $retval in + 0) if [ -z "$*" ]; then + echo "Nothing selected" + fi + ;; + 1) echo "Cancel pressed." + rm -f ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + exit 1 + ;; + esac + echo WITH_TCL=\"$1\" >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + fi + cat <<-EOF >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + CONFIGURE_ARGS+= --with-tcl --with-tclconfig="\${TCLCONFIG}" + TCLV=\${WITH_TCL:S/.//} + TCL_INCDIR= \${LOCALBASE}/include/tcl\${WITH_TCL} + MAKE_ENV= TCL_INCDIR=\${TCL_INCDIR} + LIB_DEPENDS= tcl\${TCLV}.1:\${PORTSDIR}/lang/tcl\${TCLV} + TCLCONFIG= '\${LOCALBASE}/lib/tcl\${WITH_TCL}' + .if defined(WITH_TK) + TK_INCDIR= \${LOCALBASE}/include/tk\${WITH_TCL} + CONFIGURE_ENV+= WISH=\${LOCALBASE}/bin/wish\${WITH_TCL} + LIB_DEPENDS+= tk\${TCLV}.1:\${PORTSDIR}/x11-toolkits/tk\${TCLV} + TCLCONFIG+= '\${LOCALBASE}/lib/tk\${WITH_TCL}' + TCL_PLIST= pkg-plist.tcl + .else + TCL_PLIST= pkg-plist.notk + CONFIGURE_ARGS+= --without-tk + .endif + + EOF +fi + +if [ "${KRB5}" ]; then + if [ "${BATCH}" ]; then + # never gets here, but what the heck... + echo KRB5_HOME=\${LOCALBASE} >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + else + dialog --inputbox "Please enter the KRB5_HOME path" -1 -1 "${KRB_HOME:-${LOCALBASE}}" \ + 2> /tmp/checklist.tmp.$$ + retval=$? + if [ -s /tmp/checklist.tmp.$$ ]; then + set `cat /tmp/checklist.tmp.$$` + fi + rm -f /tmp/checklist.tmp.$$ + case $retval in + 0) if [ -z "$*" ]; then + echo "No input" + fi + ;; + 1) echo "Cancel pressed." + rm -f ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + exit 1 + ;; + esac + echo KRB5_HOME=\"$1\" >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + fi + cat <<-EOF >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + .if defined(KRB5_HOME) && exists(\${KRB5_HOME}) + CONFIGURE_KRB= --with-krb5=\${KRB5_HOME} \ + --with-krb-keytab=FILE:\${PREFIX}/pgsql/etc/keytab + .endif + + EOF +fi diff --git a/databases/postgresql74-server/Makefile b/databases/postgresql74-server/Makefile index 5f64023c8cf5..08e0329a0795 100644 --- a/databases/postgresql74-server/Makefile +++ b/databases/postgresql74-server/Makefile @@ -6,7 +6,7 @@ # PORTNAME= postgresql -PORTVERSION= 7.0.2 +PORTVERSION= 7.0.3 CATEGORIES= databases MASTER_SITES= ftp://ftp.postgresql.org/pub/%SUBDIR%/ \ ftp://ftp.de.postgresql.org/%SUBDIR%/ \ @@ -22,59 +22,12 @@ DIST_SUBDIR= postgresql MAINTAINER= girgen@partitur.se +BUILD_DEPENDS= autoconf:${PORTSDIR}/devel/autoconf + Y2K= http://www.postgresql.org/y2k.html INSTALLS_SHLIB= YES LDCONFIG_DIRS= %%PREFIX%%/pgsql/lib -BUILD_DEPENDS= autoconf:${PORTSDIR}/devel/autoconf - -.if defined(KRB5_HOME) && exists(${KRB5_HOME}) -CONFIGURE_KRB= --with-krb5=${KRB5_HOME} \ - --with-krb-keytab=FILE:${PREFIX}/pgsql/etc/keytab -.endif - -# if you want to use the tcl/tk frontend pgaccess, then you need to build -# postgresql with tcl support by typing: make -DWITH_TCL -.if defined(WITH_TCL) -TCL_INCDIR= ${LOCALBASE}/include/tcl8.3 -TK_INCDIR= ${LOCALBASE}/include/tk8.3 -MAKE_ENV= TCL_INCDIR=${TCL_INCDIR} -CONFIGURE_ENV= WISH=${LOCALBASE}/bin/wish8.3 -LIB_DEPENDS= tcl83.1:${PORTSDIR}/lang/tcl83 \ - tk83.1:${PORTSDIR}/x11-toolkits/tk83 -CONFIGURE_TCL= --with-tcl --with-tclconfig="${LOCALBASE}/lib/tcl8.3 ${LOCALBASE}/lib/tk8.3" -.endif - -# if you want to disable the multibyte support, type: -# make -DWITHOUT_MULTIBYTE -# -# if you want to set the default encoding for the multibyte support, type: -# make DEFAULT_ENCODING=<encoding> -# where <encoding> is one of these: -# SQL_ASCII LATIN1 LATIN2 LATIN3 LATIN4 LATIN5 -# EUC_JP EUC_CN EUC_KR EUC_TW KOI8 -# UNICODE MULE_INTERNAL WIN ALT -.if defined(WITHOUT_MULTIBYTE) -CONFIGURE_MULTIBYTE= # none -.elif defined(DEFAULT_ENCODING) -CONFIGURE_MULTIBYTE= --enable-multibyte="${DEFAULT_ENCODING}" -.else -CONFIGURE_MULTIBYTE= --enable-multibyte -.endif -.if defined(WITH_PERL) -CONFIGURE_PERL= --with-perl -.endif -.if defined(WITH_ODBC) -CONFIGURE_ODBC= --with-odbc -.endif - -# if you want jdbc, type make -DWITH_JDBC -# Honors JAVA_HOME if you have it set, and don't want the dependency. -.if defined(WITH_JDBC) -JAVA_HOME?= ${LOCALBASE}/jdk1.1.8 -BUILD_DEPENDS= ${JAVA_HOME}/bin/javac:${PORTSDIR}/java/jdk -SCRIPTS_ENV+= JAVA_HOME=${JAVA_HOME} -.endif WRKSRC= ${WRKDIR}/${DISTNAME}/src DOCDIR= ${WRKDIR}/${DISTNAME}/doc @@ -86,11 +39,6 @@ CONFIGURE_ARGS= --prefix=${PREFIX}/pgsql \ --enable-locale \ --with-template=`uname -s | ${TR} '[A-Z]' '[a-z]'` \ --with-includes="${PREFIX}/include ${TCL_INCDIR} ${TK_INCDIR}" \ - ${CONFIGURE_KRB} \ - ${CONFIGURE_TCL} \ - ${CONFIGURE_MULTIBYTE} \ - ${CONFIGURE_PERL} \ - ${CONFIGURE_ODBC} \ --with-libraries=${PREFIX}/lib MAN1= createdb.1 createlang.1 createuser.1 dropdb.1 droplang.1 \ @@ -117,50 +65,21 @@ MANL= abort.l alter_group.l alter_table.l alter_user.l \ MANPREFIX= ${PREFIX}/pgsql -pre-fetch: - @${ECHO_MSG} "To install and run postgresql you need to compile kernel with:" - @${ECHO_MSG} " options \"SYSVSHM, SYSVSEM, SYSVMSG\"" -.if !defined(WITH_TCL) - @${ECHO_MSG} "To build the \"PostgreSQL to Tcl interface library\", libpgtcl, type:" - @${ECHO_MSG} " make -DWITH_TCL" -.else - @${ECHO_MSG} "Building PostgreSQL with \"libpgtcl\"." -.endif -.if !defined(WITHOUT_MULTIBYTE) - @${ECHO_MSG} "To disable multibyte support, type:" - @${ECHO_MSG} " make -DWITHOUT_MULTIBYTE" -.if !defined(DEFAULT_ENCODING) - @${ECHO_MSG} "To set the default encoding for the multibyte support, type:" - @${ECHO_MSG} " make DEFAULT_ENCODING=<encoding>" - @${ECHO_MSG} "where <encoding> is one of these:" - @${ECHO_MSG} " SQL_ASCII LATIN1 LATIN2 LATIN3 LATIN4 LATIN5" - @${ECHO_MSG} " EUC_JP EUC_CN EUC_KR EUC_TW KOI8" - @${ECHO_MSG} " UNICODE MULE_INTERNAL WIN ALT" -.else - @${ECHO_MSG} "The default encoding is '${DEFAULT_ENCODING}'." -.endif -.else - @${ECHO_MSG} "Building PostgreSQL without multibyte support." -.endif -.if !defined(WITH_JDBC) - @${ECHO_MSG} "To build Java (JDBC) support, type:" - @${ECHO_MSG} " make -DWITH_JDBC" -.else - @${ECHO_MSG} "Building PostgreSQL with \"postgresql.jar\"." -.endif -.if !defined(WITH_PERL) - @${ECHO_MSG} "To build Perl interface and pl/Perl interpreter:" - @${ECHO_MSG} " make -DWITH_PERL" -.else - @${ECHO_MSG} "Building PostgreSQL with \"pl/Perl\"." -.endif -.if !defined(WITH_ODBC) - @${ECHO_MSG} "To build the ODBC driver package:" - @${ECHO_MSG} " make -DWITH_ODBC" -.else - @${ECHO_MSG} "Building PostgreSQL with ODBC Drivers." +SCRIPTS_ENV= WRKDIRPREFIX="${WRKDIRPREFIX}" \ + WRKDIR="${WRKDIR}" \ + FILESDIR="${FILESDIR}" \ + TOUCH="${TOUCH}" \ + MKDIR="${MKDIR}" \ + NO_OPENSSL="${NO_OPENSSL}" \ + DISTNAME="${DISTNAME}" + +.if exists(${WRKDIRPREFIX}${.CURDIR}/Makefile.inc) +.include "${WRKDIRPREFIX}${.CURDIR}/Makefile.inc" .endif +pre-extract: + @ ${SETENV} ${SCRIPTS_ENV} ${SH} ${SCRIPTDIR}/configure.postgresql + post-patch: @ ${MV} ${WRKSRC}/template/freebsd ${WRKSRC}/template/freebsd.orig @ ${SED} -e 's#CFLAGS:-O2 -m486 -pipe#CFLAGS:${CFLAGS}#' \ @@ -180,16 +99,8 @@ pre-configure: post-build: .if defined(WITH_JDBC) - @ cd ${WRKSRC}/interfaces/jdbc && ${GMAKE} -.if !defined(NOPORTDOCS) - @ cd ${WRKSRC}/interfaces/jdbc && ${GMAKE} examples -.endif + @ ${GMAKE} -C ${WRKSRC}/interfaces/jdbc jdbc${JAVAVERSION} .endif - @ ${ECHO} "------------------------------------------------------------" - @ ${ECHO} "Dump existing databases, before installing new db version !!" - @ ${ECHO} "Detailed instructions, see" - @ ${ECHO} "${WRKDIR}/${DISTNAME}/INSTALL" - @ ${ECHO} "------------------------------------------------------------" pre-install: .if defined(PACKAGE_BUILDING) @@ -197,53 +108,54 @@ pre-install: .endif @ ${MKDIR} ${PREFIX}/pgsql @ ${SETENV} ${MAKE_ENV} perl ${SCRIPTDIR}/createuser +.if !defined(BATCH) + @ ${SED} -e "s#%%WRKDIR%%#${WRKDIR}#; s#%%DISTNAME%%#${DISTNAME}#" \ + < ${FILESDIR}/pre-install-notes | more -e +.endif post-install: .if defined(NOPORTDOCS) - @ ( cd ${DOCDIR}; ${GMAKE} man ) + @ ${GMAKE} -C ${DOCDIR} man .else - @ ( cd ${DOCDIR}; ${GMAKE} install ) + @ ${GMAKE} -C ${DOCDIR} install + ${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/FAQ* ${PREFIX}/share/doc/pgsql + ${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/README* ${PREFIX}/share/doc/pgsql + ${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/TODO ${PREFIX}/share/doc/pgsql +# ${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/*ps.gz ${PREFIX}/share/doc/pgsql + @ ${CAT} ${PKGDIR}/pkg-plist.doc >> ${TMPPLIST} .endif @ if [ ! -f ${PREFIX}/pgsql/.profile ]; then \ - ${ECHO} "PATH=${PATH}:${PREFIX}/pgsql/bin" \ + ${SED} 's|%%PREFIX%%|${PREFIX}|g' \ + < ${FILESDIR}/dot.profile.in \ > ${PREFIX}/pgsql/.profile; \ - ${ECHO} "MANPATH=${MANPATH}:${PREFIX}/pgsql/man" \ - >> ${PREFIX}/pgsql/.profile; \ - ${ECHO} "PGLIB=${PREFIX}/pgsql/lib" \ - >> ${PREFIX}/pgsql/.profile; \ - ${ECHO} "# note: PGDATA overwrites the -D startup option" \ - >> ${PREFIX}/pgsql/.profile; \ - ${ECHO} "PGDATA=${PREFIX}/pgsql/data" \ - >> ${PREFIX}/pgsql/.profile; \ - ${ECHO} "DISPLAY=:0" \ - >> ${PREFIX}/pgsql/.profile; \ - ${ECHO} "export PATH MANPATH PGLIB PGDATA DISPLAY" \ - >> ${PREFIX}/pgsql/.profile; \ - ${ECHO} "# if you want to make regression tests use this TZ" \ - >> ${PREFIX}/pgsql/.profile; \ - ${ECHO} "#TZ=PST8PDT" \ - >> ${PREFIX}/pgsql/.profile; \ - ${ECHO} "#export TZ" \ - >> ${PREFIX}/pgsql/.profile; \ fi @ ${CHOWN} -R pgsql:pgsql ${PREFIX}/pgsql @ ${CHOWN} root:pgsql ${PREFIX}/pgsql/lib @ ${ECHO} 'Initializing PostgreSQL Databases - this may take a few minutes...' @ ${SETENV} OBJFORMAT=${PORTOBJFORMAT} ${LDCONFIG} -m ${PREFIX}/pgsql/lib - @ su -l pgsql -c 'PATH=${PREFIX}/pgsql/bin:${PATH} LD_LIBRARY_PATH=${PREFIX}/pgsql/lib ${PREFIX}/pgsql/bin/initdb --pglib=${PREFIX}/pgsql/lib --pgdata=${PREFIX}/pgsql/data' +# '-' so we don't fail to create packagelist at this stage, +# when we already have everything installed on top of previous version + -@ su -l pgsql -c 'PATH=${PREFIX}/pgsql/bin:${PATH} ${PREFIX}/pgsql/bin/initdb --pglib=${PREFIX}/pgsql/lib --pgdata=${PREFIX}/pgsql/data' @ ${SED} -e "s=!!PREFIX!!=${PREFIX}=g" < ${FILESDIR}/pgsql.sh.tmpl \ > ${PREFIX}/etc/rc.d/pgsql.sh @ ${CHMOD} 554 ${PREFIX}/etc/rc.d/pgsql.sh @ ${CHOWN} root.pgsql ${PREFIX}/etc/rc.d/pgsql.sh - @ ${INSTALL_DATA} ${FILESDIR}/post-install-notes ${PREFIX}/pgsql + @ ${SED} -e 's#%%PREFIX%%#${PREFIX}#' < ${FILESDIR}/post-install-notes \ + > ${PREFIX}/pgsql/post-install-notes .if defined(WITHOUT_MULTIBYTE) @${CP} ${TMPPLIST} ${TMPPLIST}.nomulti @${GREP} -v pgsql/bin/pg_encoding ${TMPPLIST}.nomulti > ${TMPPLIST} .endif .if defined(WITH_TCL) @${CP} ${TMPPLIST} ${TMPPLIST}.notcl - @${CAT} ${PKGDIR}/pkg-plist.tcl ${TMPPLIST}.notcl > ${TMPPLIST} + @${CAT} ${PKGDIR}/${TCL_PLIST} ${TMPPLIST}.notcl > ${TMPPLIST} @${RM} ${TMPPLIST}.notcl +# Preparing a loadable TCL-package (pkgIndex.tcl) +# XXX This directory and the single file are not registered in +# XXX the PLIST, because of different PREFIX. + @${MKDIR} ${LOCALBASE}/lib/tcl${WITH_TCL}/Pgtcl1.3 + @${SED} 's|%%PREFIX%%|${PREFIX}|' < ${FILESDIR}/pkgIndex.tcl.in \ + > ${LOCALBASE}/lib/tcl${WITH_TCL}/Pgtcl1.3/pkgIndex.tcl .endif .if defined(WITH_ODBC) @${CP} ${TMPPLIST} ${TMPPLIST}.noodbc @@ -272,19 +184,10 @@ post-install: @ ${ECHO_MSG} "---------------------------------------------------------" @ ${ECHO_MSG} "Putting jdbc examples into ${PREFIX}/share/examples/pgsql" @ ${ECHO_MSG} "---------------------------------------------------------" - @ ${CAT} ${PKGDIR}/pkg-plist.doc >> ${TMPPLIST} -.endif .endif -.if !defined(NOPORTDOCS) - ${MKDIR} ${PREFIX}/share/doc/pgsql - @ ${GMAKE} -C ${WRKDIR}/${DISTNAME}/doc install - ${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/FAQ* ${PREFIX}/share/doc/pgsql - ${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/README* ${PREFIX}/share/doc/pgsql - ${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/TODO ${PREFIX}/share/doc/pgsql -# ${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/*ps.gz ${PREFIX}/share/doc/pgsql .endif .if !defined(BATCH) - @ more -e ${FILESDIR}/post-install-notes + @ more -e ${PREFIX}/pgsql/post-install-notes .endif .if !defined(DEBUG_FLAGS) .for file in ecpg pg_dump pg_id pg_passwd pg_version postgres psql @@ -292,4 +195,7 @@ post-install: .endfor .endif +post-clean: + @ ${RM} -f ${WRKDIRPREFIX}${.CURDIR}/Makefile.inc + .include <bsd.port.mk> diff --git a/databases/postgresql74-server/distinfo b/databases/postgresql74-server/distinfo index 309ea1e11614..fc87b8117bdc 100644 --- a/databases/postgresql74-server/distinfo +++ b/databases/postgresql74-server/distinfo @@ -1,4 +1,3 @@ -MD5 (postgresql/postgresql-7.0.2.base.tar.gz) = 871d23b85d9a3599a7ed75dfc7da7ba7 -MD5 (postgresql/postgresql-7.0.2.support.tar.gz) = c21180a6485d85785c8e69f0cbff05dd -MD5 (postgresql/postgresql-7.0.2.docs.tar.gz) = efac1f87463f252e54d72b256885b883 -MD5 (postgresql/postgresql-7.0.2.test.tar.gz) = 3443b3d83194c396f20aee2adc6f93bf +MD5 (postgresql/postgresql-7.0.3.base.tar.gz) = 0eeda8217b5b11e5a9351fc424808426 +MD5 (postgresql/postgresql-7.0.3.support.tar.gz) = b930f71068d776ef45402fcbebfa58cf +MD5 (postgresql/postgresql-7.0.3.docs.tar.gz) = 3d3fc76073f6d77febefc83f887fc87d diff --git a/databases/postgresql74-server/files/dot.profile.in b/databases/postgresql74-server/files/dot.profile.in new file mode 100644 index 000000000000..bd7ec45043be --- /dev/null +++ b/databases/postgresql74-server/files/dot.profile.in @@ -0,0 +1,16 @@ +PATH=${PATH}:%%PREFIX%%/pgsql/bin +PGLIB=%%PREFIX%%/pgsql/lib + +# note: PGDATA overwrites the -D startup option +PGDATA=%%PREFIX%%/pgsql/data + +export PATH MANPATH PGLIB PGDATA + +#You might want to set some locale stuff here +#PGDATESTYLE=ISO +#LC_ALL=sv_SE.ISO_88591-1 +#export PGDATESTYLE LC_ALL + +# if you want to make regression tests use this TZ +#TZ=PST8PDT +#export TZ diff --git a/databases/postgresql74-server/files/patch-au b/databases/postgresql74-server/files/patch-au new file mode 100644 index 000000000000..340521b49482 --- /dev/null +++ b/databases/postgresql74-server/files/patch-au @@ -0,0 +1,58 @@ +--- configure.in.orig Sun Nov 5 05:03:47 2000 ++++ configure.in Mon Dec 4 02:36:15 2000 +@@ -299,13 +299,28 @@ + [ --with-tcl build Tcl interfaces and pgtclsh ], + [ + case "$withval" in +- y | ye | yes) USE_TCL=true; USE_TK=true; AC_MSG_RESULT(enabled) ;; ++ y | ye | yes) USE_TCL=true; AC_MSG_RESULT(enabled) ;; + *) USE_TCL=; USE_TK=; AC_MSG_RESULT(disabled) ;; + esac + ], + [ USE_TCL=; USE_TK=; AC_MSG_RESULT(disabled) ] + ) + ++dnl We include tk support with tcl unless user says --without-tk ++if test USE_TCL = true ++then ++AC_MSG_CHECKING(setting USE_TK) ++AC_ARG_WITH( ++ tk, ++ [ --without-tk build Tcl *without* Tk ], ++ [ ++ case "$withval" in ++ y | ye | yes) USE_TK=true; USE_TK=true; AC_MSG_RESULT(enabled) ;; ++ *) USE_TK=n; AC_MSG_RESULT(disabled) ;; ++ esac ++ ] ++) ++fi + export USE_TCL + export USE_TK + +@@ -482,7 +497,7 @@ + #endif + ], + ELF_SYS=true, +-[if test "X$elf" = "Xyes" ++[if test "X$PORTOBJFORMAT" = "Xyes" + then + ELF_SYS=true + else +@@ -1248,10 +1263,15 @@ + else + AC_MSG_RESULT($TCL_CONFIG_SH) + AC_SUBST(TCL_CONFIG_SH) ++ . ${TCL_CONFIG_SH} ++ AC_SUBST(TCL_LIB_SPEC) + fi + fi + +-USE_TK=$USE_TCL # If TCL is disabled, disable TK ++USE_TK=${USE_TK:=$USE_TCL} # If TCL is disabled, disable TK ++ # otherwise -- enable unless explicitly ++ # disabled ++ + + dnl Check for Tk configuration script tkConfig.sh + if test "$USE_TK" = true diff --git a/databases/postgresql74-server/files/patch-av b/databases/postgresql74-server/files/patch-av new file mode 100644 index 000000000000..49b35f9e8dc1 --- /dev/null +++ b/databases/postgresql74-server/files/patch-av @@ -0,0 +1,17 @@ +--- interfaces/libpq/fe-connect.c Sun May 21 17:19:53 2000 ++++ interfaces/libpq/fe-connect.c Fri Sep 15 13:53:52 2000 +@@ -801 +801 @@ +- sprintf(conn->errorMessage, ++ printfPQExpBuffer(&conn->errorMessage, +@@ -809 +809 @@ +- sprintf(conn->errorMessage, "PQconnectDB() -- couldn't read postmaster response: errno=%d\n%s\n", ++ printfPQExpBuffer(&conn->errorMessage, "PQconnectDB() -- couldn't read postmaster response: errno=%d\n%s\n", +@@ -822 +822 @@ +- sprintf(conn->errorMessage, ++ printfPQExpBuffer(&conn->errorMessage, +@@ -832 +832 @@ +- sprintf(conn->errorMessage, ++ printfPQExpBuffer(&conn->errorMessage, +@@ -850 +850 @@ +- strcpy(conn->errorMessage, ++ printfPQExpBuffer(&conn->errorMessage, diff --git a/databases/postgresql74-server/files/patch-ba b/databases/postgresql74-server/files/patch-ba index a3b679b882c5..586d725c536a 100644 --- a/databases/postgresql74-server/files/patch-ba +++ b/databases/postgresql74-server/files/patch-ba @@ -1,5 +1,5 @@ ---- interfaces/jdbc/Makefile.orig Tue Mar 14 16:55:17 2000 -+++ interfaces/jdbc/Makefile Sun Apr 16 21:16:43 2000 +--- interfaces/jdbc/Makefile.orig Sun Nov 5 05:03:53 2000 ++++ interfaces/jdbc/Makefile Fri Dec 8 03:16:17 2000 @@ -10,10 +10,10 @@ FIND = find @@ -15,11 +15,3 @@ RM = rm -f TOUCH = touch -@@ -40,6 +40,7 @@ - @echo To compile, type: - @echo " $(MAKE) jdbc2" - @echo ------------------------------------------------------------ -+ $(MAKE) jdbc1 - - msg: - @echo ------------------------------------------------------------ diff --git a/databases/postgresql74-server/files/patch-be b/databases/postgresql74-server/files/patch-be new file mode 100644 index 000000000000..2f8c3c55566f --- /dev/null +++ b/databases/postgresql74-server/files/patch-be @@ -0,0 +1,9 @@ +This patches let you disable Tk even if you have it installed and +makes sure the TCL-library is added as a dependency for libpgtcl. +--- interfaces/libpgtcl/Makefile.in Tue Mar 7 20:58:36 2000 ++++ interfaces/libpgtcl/Makefile.in Wed Sep 20 08:57:28 2000 +@@ -29,3 +29,3 @@ + +-SHLIB_LINK+= $(LIBPQ) ++SHLIB_LINK+= $(LIBPQ) @TCL_LIB_SPEC@ + diff --git a/databases/postgresql74-server/files/pgsql.sh.tmpl b/databases/postgresql74-server/files/pgsql.sh.tmpl index e1673b4850c2..753e0b8aaf80 100644 --- a/databases/postgresql74-server/files/pgsql.sh.tmpl +++ b/databases/postgresql74-server/files/pgsql.sh.tmpl @@ -17,13 +17,13 @@ start) stop) [ -x !!PREFIX!!/pgsql/bin/pg_ctl ] && { - su -l pgsql -c 'exec !!PREFIX!!/pgsql/bin/pg_ctl -w -m fast stop' + exec su -l pgsql -c 'exec !!PREFIX!!/pgsql/bin/pg_ctl -w -m fast stop' } ;; status) [ -x !!PREFIX!!/pgsql/bin/pg_ctl ] && { - su -l pgsql -c 'exec !!PREFIX!!/pgsql/bin/pg_ctl status' + exec su -l pgsql -c 'exec !!PREFIX!!/pgsql/bin/pg_ctl status' } ;; diff --git a/databases/postgresql74-server/files/pkgIndex.tcl.in b/databases/postgresql74-server/files/pkgIndex.tcl.in new file mode 100644 index 000000000000..bd8329b15c69 --- /dev/null +++ b/databases/postgresql74-server/files/pkgIndex.tcl.in @@ -0,0 +1,4 @@ +# Package-index file for Pgtcl-package. Enables you to load PostgreSQL +# interface functions right into you TCL-interpreter as simply as +# package require Pgtcl +package ifneeded Pgtcl 1.3 "load %%PREFIX%%/lib/libpgtcl.so" diff --git a/databases/postgresql74-server/files/post-install-notes b/databases/postgresql74-server/files/post-install-notes index 289a7651109a..4c69908b2676 100644 --- a/databases/postgresql74-server/files/post-install-notes +++ b/databases/postgresql74-server/files/post-install-notes @@ -8,9 +8,12 @@ You may wish to subscribe to the PostgreSQL user-support mailing list. Send an e-mail to pgsql-questions-request@postgresql.org with the text "subscribe" in the message body. -If you built PostgreSQL with TCL support, you can install the port -"pgaccess" to get a TCL/TK based database frontend for database -operations. +If you built PostgreSQL with TCL/TK support, you can use the pgaccess +utility to get a TCL/TK based database frontend for database +operations. You do NOT need to install the pgaccess port separately. + +If you built in the TCL support, you can load the Pg package into your +TCL scripts as easily as ``package require Pgtcl''. To start PostgreSQL, run the startup script: -$PREFIX/etc/rc.d/pgsql.sh start +%%PREFIX%%/etc/rc.d/pgsql.sh start diff --git a/databases/postgresql74-server/files/pre-install-notes b/databases/postgresql74-server/files/pre-install-notes new file mode 100644 index 000000000000..72388933bd6d --- /dev/null +++ b/databases/postgresql74-server/files/pre-install-notes @@ -0,0 +1,9 @@ +# ---------------------------------------------------------------- +# UPGRADE NOTE! Depending on which version you are upgrading from, +# you may have to dump/restore existing databases +# as part of the update. +# This is *NOT* done by this port! +# For detailed instructions, see +# %%WRKDIR%%/%%DISTNAME%%/INSTALL +# after extraction. +# -------------------------------------------------------------- diff --git a/databases/postgresql74-server/pkg-plist.jdbc b/databases/postgresql74-server/pkg-plist.jdbc index bef5d75506b4..e751caa65063 100644 --- a/databases/postgresql74-server/pkg-plist.jdbc +++ b/databases/postgresql74-server/pkg-plist.jdbc @@ -10,4 +10,5 @@ share/examples/pgsql/jdbc/README_6.3 @dirrm share/examples/pgsql/jdbc @dirrm share/examples/pgsql share/java/classes/postgresql.jar +@unexec rmdir %D/share/java/classes 2>/dev/null || true @unexec rmdir %D/share/java 2>/dev/null || true diff --git a/databases/postgresql74-server/pkg-plist.notk b/databases/postgresql74-server/pkg-plist.notk new file mode 100644 index 000000000000..9f5d9e04af48 --- /dev/null +++ b/databases/postgresql74-server/pkg-plist.notk @@ -0,0 +1,6 @@ +pgsql/bin/pgtclsh +pgsql/include/libpgtcl.h +pgsql/lib/libpgtcl.a +pgsql/lib/libpgtcl.so +pgsql/lib/libpgtcl.so.2 +pgsql/lib/pltcl.so diff --git a/databases/postgresql74-server/scripts/configure.postgresql b/databases/postgresql74-server/scripts/configure.postgresql new file mode 100644 index 000000000000..5efe32a766f4 --- /dev/null +++ b/databases/postgresql74-server/scripts/configure.postgresql @@ -0,0 +1,267 @@ +#!/bin/sh +# -*- tab-width: 4; -*- +# ex:ts=4 +# +# $FreeBSD$ +# +if [ -f ${WRKDIRPREFIX}${CURDIR}/Makefile.inc ]; then + exit +fi + +if [ ! "${BATCH}" ]; then + dialog --title "Backup your data NOW" \ + --msgbox "`sed -e \"s#%%WRKDIR%%#${WRKDIR}#; s#%%DISTNAME%%#${DISTNAME}#\" < ${FILESDIR}/pre-install-notes`" \ + -1 -1 +fi + +#SSL=${NO_OPENSSL:+OFF} +#SSL=${NOSSL:-ON} + +if [ "${BATCH}" ]; then + set \"MultiByte\" +else + /usr/bin/dialog --title "configuration options" --clear \ + --checklist "\n\ +Please select desired options:" -1 -1 8 \ +JDBC "Java DataBase Connectivity" OFF \ +MultiByte "Multibyte for Multilingualism" ON \ +ODBC "Open Database Connectivity" OFF \ +Perl "Perl" OFF \ +TCL "Tcl" ON \ +TCLTK "Tcl/Tk" ON \ +SSL "Secure Socket Layer (requires certificate)" OFF \ +KRB5 "Kerberos 5" OFF \ +2> /tmp/checklist.tmp.$$ + + retval=$? + + if [ -s /tmp/checklist.tmp.$$ ]; then + set `cat /tmp/checklist.tmp.$$` + fi + rm -f /tmp/checklist.tmp.$$ + + case $retval in + 0) if [ -z "$*" ]; then + echo "Nothing selected" + fi + ;; + 1) echo "Cancel pressed." + exit 1 + ;; + esac +fi + +${MKDIR} -p ${WRKDIRPREFIX}${CURDIR} +exec > ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + +while [ "$1" ]; do + case $1 in + \"JDBC\") + # use JAVA_HOME if set correctly + echo "# JDBC" + if [ "${JAVA_HOME}" -a -x ${JAVA_HOME}/bin/javac ]; then + echo JAVA_HOME=${JAVA_HOME} + if [ "$(${JAVA_HOME}/bin/java -version 2>&1 | egrep \"1.1)" ]; then + JAVAVERSION=1 + echo BUILD_DEPENDS+= ${JAVA_HOME}/bin/javac:\${PORTSDIR}/java/jdk + else + JAVAVERSION=2 + echo BUILD_DEPENDS+= ${JAVA_HOME}/bin/javac:\${PORTSDIR}/java/jdk12-beta + fi + else + JAVAVERSION=1 + echo BUILD_DEPENDS+= \${LOCALBASE}/jdk1.1.8/bin/javac:\${PORTSDIR}/java/jdk + echo JAVA_HOME=\${LOCALBASE}/jdk1.1.8 + fi + cat <<-EOF + JAVAVERSION=${JAVAVERSION} + WITH_JDBC=YES + SCRIPTS_ENV+= JAVA_HOME=\${JAVA_HOME} + + EOF + ;; + \"MultiByte\") + MULTIBYTE=1 + ;; + \"ODBC\") + cat <<-EOF + # ODBC + WITH_ODBC=YES + CONFIGURE_ARGS+= --with-odbc + + EOF + ;; + \"Perl\") + cat <<-EOF + # PERL + WITH_PERL=YES + CONFIGURE_ARGS+= --with-perl + + EOF + ;; + \"TCL\") + TCL=1 + ;; + \"TCLTK\") + echo "#TCLTK" + echo WITH_TK=YES + echo + TCL=1 + ;; + \"SSL\") + cat <<-EOF + # SSL + USE_OPENSSL= yes + CFLAGS+= -DUSE_SSL + WITH_SSL= yes + CONFIGURE_ENV+= LDFLAGS="-L\${OPENSSLLIB} -lssl -lcrypto" + + EOF + ;; + \"KRB5\") + KRB5=1 + ;; + \"nothing\"|true) + ;; + *) + echo "Invalid option(s): $*" > /dev/stderr + rm -f ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + exit 1 + ;; + esac + shift +done + +exec > /dev/stderr + +# if multibyte, determine charset +echo "# Multibyte" + +if [ ! "${MULTIBYTE}" ]; then + echo "WITHOUT_MULTIBYTE=YES" >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc +else + if [ "${BATCH}" ]; then + set \"nothing\" + else + /usr/bin/dialog --title "configuration options" --clear \ + --radiolist "\n\ +Please select desired options:" -1 -1 16 \ +nothing "Default Encoding" ON \ +SQL_ASCII "SQL_ASCII" OFF \ +LATIN1 "LATIN1" OFF \ +LATIN2 "LATIN2" OFF \ +LATIN3 "LATIN3" OFF \ +LATIN4 "LATIN4" OFF \ +LATIN5 "LATIN5" OFF \ +EUC_JP "EUC_JP" OFF \ +EUC_CN "EUC_CN" OFF \ +EUC_KR "EUC_KR" OFF \ +EUC_TW "EUC_TW" OFF \ +KOI8 "KOI8" OFF \ +UNICODE "UNICODE" OFF \ +MULE_INTERNAL "MULE_INTERNAL" OFF \ +WIN "WIN" OFF \ +ALT "ALT" OFF \ +2> /tmp/checklist.tmp.$$ + + retval=$? + + if [ -s /tmp/checklist.tmp.$$ ]; then + set `cat /tmp/checklist.tmp.$$` + fi + rm -f /tmp/checklist.tmp.$$ + if [ $retval = 1 ]; then + echo "Cancel pressed." + rm ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + exit 1 + fi + fi + + if [ "$1" = "nothing" ]; then + echo "CONFIGURE_ARGS+= --enable-multibyte" \ + >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + else + echo "CONFIGURE_ARGS+= --enable-multibyte=$1" \ + >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + fi +fi +echo + +if [ "${TCL}" ]; then + echo "# TCL" >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + if [ "${BATCH}" ]; then + echo WITH_TCL=8.3 >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + else + dialog --title "TCL version" \ + --inputbox "Please enter TCL version. Default is 8.3." -1 -1 "8.3" \ + 2> /tmp/checklist.tmp.$$ + retval=$? + if [ -s /tmp/checklist.tmp.$$ ]; then + set `cat /tmp/checklist.tmp.$$` + fi + rm -f /tmp/checklist.tmp.$$ + case $retval in + 0) if [ -z "$*" ]; then + echo "Nothing selected" + fi + ;; + 1) echo "Cancel pressed." + rm -f ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + exit 1 + ;; + esac + echo WITH_TCL=\"$1\" >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + fi + cat <<-EOF >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + CONFIGURE_ARGS+= --with-tcl --with-tclconfig="\${TCLCONFIG}" + TCLV=\${WITH_TCL:S/.//} + TCL_INCDIR= \${LOCALBASE}/include/tcl\${WITH_TCL} + MAKE_ENV= TCL_INCDIR=\${TCL_INCDIR} + LIB_DEPENDS= tcl\${TCLV}.1:\${PORTSDIR}/lang/tcl\${TCLV} + TCLCONFIG= '\${LOCALBASE}/lib/tcl\${WITH_TCL}' + .if defined(WITH_TK) + TK_INCDIR= \${LOCALBASE}/include/tk\${WITH_TCL} + CONFIGURE_ENV+= WISH=\${LOCALBASE}/bin/wish\${WITH_TCL} + LIB_DEPENDS+= tk\${TCLV}.1:\${PORTSDIR}/x11-toolkits/tk\${TCLV} + TCLCONFIG+= '\${LOCALBASE}/lib/tk\${WITH_TCL}' + TCL_PLIST= pkg-plist.tcl + .else + TCL_PLIST= pkg-plist.notk + CONFIGURE_ARGS+= --without-tk + .endif + + EOF +fi + +if [ "${KRB5}" ]; then + if [ "${BATCH}" ]; then + # never gets here, but what the heck... + echo KRB5_HOME=\${LOCALBASE} >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + else + dialog --inputbox "Please enter the KRB5_HOME path" -1 -1 "${KRB_HOME:-${LOCALBASE}}" \ + 2> /tmp/checklist.tmp.$$ + retval=$? + if [ -s /tmp/checklist.tmp.$$ ]; then + set `cat /tmp/checklist.tmp.$$` + fi + rm -f /tmp/checklist.tmp.$$ + case $retval in + 0) if [ -z "$*" ]; then + echo "No input" + fi + ;; + 1) echo "Cancel pressed." + rm -f ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + exit 1 + ;; + esac + echo KRB5_HOME=\"$1\" >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + fi + cat <<-EOF >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + .if defined(KRB5_HOME) && exists(\${KRB5_HOME}) + CONFIGURE_KRB= --with-krb5=\${KRB5_HOME} \ + --with-krb-keytab=FILE:\${PREFIX}/pgsql/etc/keytab + .endif + + EOF +fi diff --git a/databases/postgresql80-server/Makefile b/databases/postgresql80-server/Makefile index 5f64023c8cf5..08e0329a0795 100644 --- a/databases/postgresql80-server/Makefile +++ b/databases/postgresql80-server/Makefile @@ -6,7 +6,7 @@ # PORTNAME= postgresql -PORTVERSION= 7.0.2 +PORTVERSION= 7.0.3 CATEGORIES= databases MASTER_SITES= ftp://ftp.postgresql.org/pub/%SUBDIR%/ \ ftp://ftp.de.postgresql.org/%SUBDIR%/ \ @@ -22,59 +22,12 @@ DIST_SUBDIR= postgresql MAINTAINER= girgen@partitur.se +BUILD_DEPENDS= autoconf:${PORTSDIR}/devel/autoconf + Y2K= http://www.postgresql.org/y2k.html INSTALLS_SHLIB= YES LDCONFIG_DIRS= %%PREFIX%%/pgsql/lib -BUILD_DEPENDS= autoconf:${PORTSDIR}/devel/autoconf - -.if defined(KRB5_HOME) && exists(${KRB5_HOME}) -CONFIGURE_KRB= --with-krb5=${KRB5_HOME} \ - --with-krb-keytab=FILE:${PREFIX}/pgsql/etc/keytab -.endif - -# if you want to use the tcl/tk frontend pgaccess, then you need to build -# postgresql with tcl support by typing: make -DWITH_TCL -.if defined(WITH_TCL) -TCL_INCDIR= ${LOCALBASE}/include/tcl8.3 -TK_INCDIR= ${LOCALBASE}/include/tk8.3 -MAKE_ENV= TCL_INCDIR=${TCL_INCDIR} -CONFIGURE_ENV= WISH=${LOCALBASE}/bin/wish8.3 -LIB_DEPENDS= tcl83.1:${PORTSDIR}/lang/tcl83 \ - tk83.1:${PORTSDIR}/x11-toolkits/tk83 -CONFIGURE_TCL= --with-tcl --with-tclconfig="${LOCALBASE}/lib/tcl8.3 ${LOCALBASE}/lib/tk8.3" -.endif - -# if you want to disable the multibyte support, type: -# make -DWITHOUT_MULTIBYTE -# -# if you want to set the default encoding for the multibyte support, type: -# make DEFAULT_ENCODING=<encoding> -# where <encoding> is one of these: -# SQL_ASCII LATIN1 LATIN2 LATIN3 LATIN4 LATIN5 -# EUC_JP EUC_CN EUC_KR EUC_TW KOI8 -# UNICODE MULE_INTERNAL WIN ALT -.if defined(WITHOUT_MULTIBYTE) -CONFIGURE_MULTIBYTE= # none -.elif defined(DEFAULT_ENCODING) -CONFIGURE_MULTIBYTE= --enable-multibyte="${DEFAULT_ENCODING}" -.else -CONFIGURE_MULTIBYTE= --enable-multibyte -.endif -.if defined(WITH_PERL) -CONFIGURE_PERL= --with-perl -.endif -.if defined(WITH_ODBC) -CONFIGURE_ODBC= --with-odbc -.endif - -# if you want jdbc, type make -DWITH_JDBC -# Honors JAVA_HOME if you have it set, and don't want the dependency. -.if defined(WITH_JDBC) -JAVA_HOME?= ${LOCALBASE}/jdk1.1.8 -BUILD_DEPENDS= ${JAVA_HOME}/bin/javac:${PORTSDIR}/java/jdk -SCRIPTS_ENV+= JAVA_HOME=${JAVA_HOME} -.endif WRKSRC= ${WRKDIR}/${DISTNAME}/src DOCDIR= ${WRKDIR}/${DISTNAME}/doc @@ -86,11 +39,6 @@ CONFIGURE_ARGS= --prefix=${PREFIX}/pgsql \ --enable-locale \ --with-template=`uname -s | ${TR} '[A-Z]' '[a-z]'` \ --with-includes="${PREFIX}/include ${TCL_INCDIR} ${TK_INCDIR}" \ - ${CONFIGURE_KRB} \ - ${CONFIGURE_TCL} \ - ${CONFIGURE_MULTIBYTE} \ - ${CONFIGURE_PERL} \ - ${CONFIGURE_ODBC} \ --with-libraries=${PREFIX}/lib MAN1= createdb.1 createlang.1 createuser.1 dropdb.1 droplang.1 \ @@ -117,50 +65,21 @@ MANL= abort.l alter_group.l alter_table.l alter_user.l \ MANPREFIX= ${PREFIX}/pgsql -pre-fetch: - @${ECHO_MSG} "To install and run postgresql you need to compile kernel with:" - @${ECHO_MSG} " options \"SYSVSHM, SYSVSEM, SYSVMSG\"" -.if !defined(WITH_TCL) - @${ECHO_MSG} "To build the \"PostgreSQL to Tcl interface library\", libpgtcl, type:" - @${ECHO_MSG} " make -DWITH_TCL" -.else - @${ECHO_MSG} "Building PostgreSQL with \"libpgtcl\"." -.endif -.if !defined(WITHOUT_MULTIBYTE) - @${ECHO_MSG} "To disable multibyte support, type:" - @${ECHO_MSG} " make -DWITHOUT_MULTIBYTE" -.if !defined(DEFAULT_ENCODING) - @${ECHO_MSG} "To set the default encoding for the multibyte support, type:" - @${ECHO_MSG} " make DEFAULT_ENCODING=<encoding>" - @${ECHO_MSG} "where <encoding> is one of these:" - @${ECHO_MSG} " SQL_ASCII LATIN1 LATIN2 LATIN3 LATIN4 LATIN5" - @${ECHO_MSG} " EUC_JP EUC_CN EUC_KR EUC_TW KOI8" - @${ECHO_MSG} " UNICODE MULE_INTERNAL WIN ALT" -.else - @${ECHO_MSG} "The default encoding is '${DEFAULT_ENCODING}'." -.endif -.else - @${ECHO_MSG} "Building PostgreSQL without multibyte support." -.endif -.if !defined(WITH_JDBC) - @${ECHO_MSG} "To build Java (JDBC) support, type:" - @${ECHO_MSG} " make -DWITH_JDBC" -.else - @${ECHO_MSG} "Building PostgreSQL with \"postgresql.jar\"." -.endif -.if !defined(WITH_PERL) - @${ECHO_MSG} "To build Perl interface and pl/Perl interpreter:" - @${ECHO_MSG} " make -DWITH_PERL" -.else - @${ECHO_MSG} "Building PostgreSQL with \"pl/Perl\"." -.endif -.if !defined(WITH_ODBC) - @${ECHO_MSG} "To build the ODBC driver package:" - @${ECHO_MSG} " make -DWITH_ODBC" -.else - @${ECHO_MSG} "Building PostgreSQL with ODBC Drivers." +SCRIPTS_ENV= WRKDIRPREFIX="${WRKDIRPREFIX}" \ + WRKDIR="${WRKDIR}" \ + FILESDIR="${FILESDIR}" \ + TOUCH="${TOUCH}" \ + MKDIR="${MKDIR}" \ + NO_OPENSSL="${NO_OPENSSL}" \ + DISTNAME="${DISTNAME}" + +.if exists(${WRKDIRPREFIX}${.CURDIR}/Makefile.inc) +.include "${WRKDIRPREFIX}${.CURDIR}/Makefile.inc" .endif +pre-extract: + @ ${SETENV} ${SCRIPTS_ENV} ${SH} ${SCRIPTDIR}/configure.postgresql + post-patch: @ ${MV} ${WRKSRC}/template/freebsd ${WRKSRC}/template/freebsd.orig @ ${SED} -e 's#CFLAGS:-O2 -m486 -pipe#CFLAGS:${CFLAGS}#' \ @@ -180,16 +99,8 @@ pre-configure: post-build: .if defined(WITH_JDBC) - @ cd ${WRKSRC}/interfaces/jdbc && ${GMAKE} -.if !defined(NOPORTDOCS) - @ cd ${WRKSRC}/interfaces/jdbc && ${GMAKE} examples -.endif + @ ${GMAKE} -C ${WRKSRC}/interfaces/jdbc jdbc${JAVAVERSION} .endif - @ ${ECHO} "------------------------------------------------------------" - @ ${ECHO} "Dump existing databases, before installing new db version !!" - @ ${ECHO} "Detailed instructions, see" - @ ${ECHO} "${WRKDIR}/${DISTNAME}/INSTALL" - @ ${ECHO} "------------------------------------------------------------" pre-install: .if defined(PACKAGE_BUILDING) @@ -197,53 +108,54 @@ pre-install: .endif @ ${MKDIR} ${PREFIX}/pgsql @ ${SETENV} ${MAKE_ENV} perl ${SCRIPTDIR}/createuser +.if !defined(BATCH) + @ ${SED} -e "s#%%WRKDIR%%#${WRKDIR}#; s#%%DISTNAME%%#${DISTNAME}#" \ + < ${FILESDIR}/pre-install-notes | more -e +.endif post-install: .if defined(NOPORTDOCS) - @ ( cd ${DOCDIR}; ${GMAKE} man ) + @ ${GMAKE} -C ${DOCDIR} man .else - @ ( cd ${DOCDIR}; ${GMAKE} install ) + @ ${GMAKE} -C ${DOCDIR} install + ${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/FAQ* ${PREFIX}/share/doc/pgsql + ${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/README* ${PREFIX}/share/doc/pgsql + ${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/TODO ${PREFIX}/share/doc/pgsql +# ${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/*ps.gz ${PREFIX}/share/doc/pgsql + @ ${CAT} ${PKGDIR}/pkg-plist.doc >> ${TMPPLIST} .endif @ if [ ! -f ${PREFIX}/pgsql/.profile ]; then \ - ${ECHO} "PATH=${PATH}:${PREFIX}/pgsql/bin" \ + ${SED} 's|%%PREFIX%%|${PREFIX}|g' \ + < ${FILESDIR}/dot.profile.in \ > ${PREFIX}/pgsql/.profile; \ - ${ECHO} "MANPATH=${MANPATH}:${PREFIX}/pgsql/man" \ - >> ${PREFIX}/pgsql/.profile; \ - ${ECHO} "PGLIB=${PREFIX}/pgsql/lib" \ - >> ${PREFIX}/pgsql/.profile; \ - ${ECHO} "# note: PGDATA overwrites the -D startup option" \ - >> ${PREFIX}/pgsql/.profile; \ - ${ECHO} "PGDATA=${PREFIX}/pgsql/data" \ - >> ${PREFIX}/pgsql/.profile; \ - ${ECHO} "DISPLAY=:0" \ - >> ${PREFIX}/pgsql/.profile; \ - ${ECHO} "export PATH MANPATH PGLIB PGDATA DISPLAY" \ - >> ${PREFIX}/pgsql/.profile; \ - ${ECHO} "# if you want to make regression tests use this TZ" \ - >> ${PREFIX}/pgsql/.profile; \ - ${ECHO} "#TZ=PST8PDT" \ - >> ${PREFIX}/pgsql/.profile; \ - ${ECHO} "#export TZ" \ - >> ${PREFIX}/pgsql/.profile; \ fi @ ${CHOWN} -R pgsql:pgsql ${PREFIX}/pgsql @ ${CHOWN} root:pgsql ${PREFIX}/pgsql/lib @ ${ECHO} 'Initializing PostgreSQL Databases - this may take a few minutes...' @ ${SETENV} OBJFORMAT=${PORTOBJFORMAT} ${LDCONFIG} -m ${PREFIX}/pgsql/lib - @ su -l pgsql -c 'PATH=${PREFIX}/pgsql/bin:${PATH} LD_LIBRARY_PATH=${PREFIX}/pgsql/lib ${PREFIX}/pgsql/bin/initdb --pglib=${PREFIX}/pgsql/lib --pgdata=${PREFIX}/pgsql/data' +# '-' so we don't fail to create packagelist at this stage, +# when we already have everything installed on top of previous version + -@ su -l pgsql -c 'PATH=${PREFIX}/pgsql/bin:${PATH} ${PREFIX}/pgsql/bin/initdb --pglib=${PREFIX}/pgsql/lib --pgdata=${PREFIX}/pgsql/data' @ ${SED} -e "s=!!PREFIX!!=${PREFIX}=g" < ${FILESDIR}/pgsql.sh.tmpl \ > ${PREFIX}/etc/rc.d/pgsql.sh @ ${CHMOD} 554 ${PREFIX}/etc/rc.d/pgsql.sh @ ${CHOWN} root.pgsql ${PREFIX}/etc/rc.d/pgsql.sh - @ ${INSTALL_DATA} ${FILESDIR}/post-install-notes ${PREFIX}/pgsql + @ ${SED} -e 's#%%PREFIX%%#${PREFIX}#' < ${FILESDIR}/post-install-notes \ + > ${PREFIX}/pgsql/post-install-notes .if defined(WITHOUT_MULTIBYTE) @${CP} ${TMPPLIST} ${TMPPLIST}.nomulti @${GREP} -v pgsql/bin/pg_encoding ${TMPPLIST}.nomulti > ${TMPPLIST} .endif .if defined(WITH_TCL) @${CP} ${TMPPLIST} ${TMPPLIST}.notcl - @${CAT} ${PKGDIR}/pkg-plist.tcl ${TMPPLIST}.notcl > ${TMPPLIST} + @${CAT} ${PKGDIR}/${TCL_PLIST} ${TMPPLIST}.notcl > ${TMPPLIST} @${RM} ${TMPPLIST}.notcl +# Preparing a loadable TCL-package (pkgIndex.tcl) +# XXX This directory and the single file are not registered in +# XXX the PLIST, because of different PREFIX. + @${MKDIR} ${LOCALBASE}/lib/tcl${WITH_TCL}/Pgtcl1.3 + @${SED} 's|%%PREFIX%%|${PREFIX}|' < ${FILESDIR}/pkgIndex.tcl.in \ + > ${LOCALBASE}/lib/tcl${WITH_TCL}/Pgtcl1.3/pkgIndex.tcl .endif .if defined(WITH_ODBC) @${CP} ${TMPPLIST} ${TMPPLIST}.noodbc @@ -272,19 +184,10 @@ post-install: @ ${ECHO_MSG} "---------------------------------------------------------" @ ${ECHO_MSG} "Putting jdbc examples into ${PREFIX}/share/examples/pgsql" @ ${ECHO_MSG} "---------------------------------------------------------" - @ ${CAT} ${PKGDIR}/pkg-plist.doc >> ${TMPPLIST} -.endif .endif -.if !defined(NOPORTDOCS) - ${MKDIR} ${PREFIX}/share/doc/pgsql - @ ${GMAKE} -C ${WRKDIR}/${DISTNAME}/doc install - ${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/FAQ* ${PREFIX}/share/doc/pgsql - ${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/README* ${PREFIX}/share/doc/pgsql - ${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/TODO ${PREFIX}/share/doc/pgsql -# ${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/*ps.gz ${PREFIX}/share/doc/pgsql .endif .if !defined(BATCH) - @ more -e ${FILESDIR}/post-install-notes + @ more -e ${PREFIX}/pgsql/post-install-notes .endif .if !defined(DEBUG_FLAGS) .for file in ecpg pg_dump pg_id pg_passwd pg_version postgres psql @@ -292,4 +195,7 @@ post-install: .endfor .endif +post-clean: + @ ${RM} -f ${WRKDIRPREFIX}${.CURDIR}/Makefile.inc + .include <bsd.port.mk> diff --git a/databases/postgresql80-server/distinfo b/databases/postgresql80-server/distinfo index 309ea1e11614..fc87b8117bdc 100644 --- a/databases/postgresql80-server/distinfo +++ b/databases/postgresql80-server/distinfo @@ -1,4 +1,3 @@ -MD5 (postgresql/postgresql-7.0.2.base.tar.gz) = 871d23b85d9a3599a7ed75dfc7da7ba7 -MD5 (postgresql/postgresql-7.0.2.support.tar.gz) = c21180a6485d85785c8e69f0cbff05dd -MD5 (postgresql/postgresql-7.0.2.docs.tar.gz) = efac1f87463f252e54d72b256885b883 -MD5 (postgresql/postgresql-7.0.2.test.tar.gz) = 3443b3d83194c396f20aee2adc6f93bf +MD5 (postgresql/postgresql-7.0.3.base.tar.gz) = 0eeda8217b5b11e5a9351fc424808426 +MD5 (postgresql/postgresql-7.0.3.support.tar.gz) = b930f71068d776ef45402fcbebfa58cf +MD5 (postgresql/postgresql-7.0.3.docs.tar.gz) = 3d3fc76073f6d77febefc83f887fc87d diff --git a/databases/postgresql80-server/files/dot.profile.in b/databases/postgresql80-server/files/dot.profile.in new file mode 100644 index 000000000000..bd7ec45043be --- /dev/null +++ b/databases/postgresql80-server/files/dot.profile.in @@ -0,0 +1,16 @@ +PATH=${PATH}:%%PREFIX%%/pgsql/bin +PGLIB=%%PREFIX%%/pgsql/lib + +# note: PGDATA overwrites the -D startup option +PGDATA=%%PREFIX%%/pgsql/data + +export PATH MANPATH PGLIB PGDATA + +#You might want to set some locale stuff here +#PGDATESTYLE=ISO +#LC_ALL=sv_SE.ISO_88591-1 +#export PGDATESTYLE LC_ALL + +# if you want to make regression tests use this TZ +#TZ=PST8PDT +#export TZ diff --git a/databases/postgresql80-server/files/patch-au b/databases/postgresql80-server/files/patch-au new file mode 100644 index 000000000000..340521b49482 --- /dev/null +++ b/databases/postgresql80-server/files/patch-au @@ -0,0 +1,58 @@ +--- configure.in.orig Sun Nov 5 05:03:47 2000 ++++ configure.in Mon Dec 4 02:36:15 2000 +@@ -299,13 +299,28 @@ + [ --with-tcl build Tcl interfaces and pgtclsh ], + [ + case "$withval" in +- y | ye | yes) USE_TCL=true; USE_TK=true; AC_MSG_RESULT(enabled) ;; ++ y | ye | yes) USE_TCL=true; AC_MSG_RESULT(enabled) ;; + *) USE_TCL=; USE_TK=; AC_MSG_RESULT(disabled) ;; + esac + ], + [ USE_TCL=; USE_TK=; AC_MSG_RESULT(disabled) ] + ) + ++dnl We include tk support with tcl unless user says --without-tk ++if test USE_TCL = true ++then ++AC_MSG_CHECKING(setting USE_TK) ++AC_ARG_WITH( ++ tk, ++ [ --without-tk build Tcl *without* Tk ], ++ [ ++ case "$withval" in ++ y | ye | yes) USE_TK=true; USE_TK=true; AC_MSG_RESULT(enabled) ;; ++ *) USE_TK=n; AC_MSG_RESULT(disabled) ;; ++ esac ++ ] ++) ++fi + export USE_TCL + export USE_TK + +@@ -482,7 +497,7 @@ + #endif + ], + ELF_SYS=true, +-[if test "X$elf" = "Xyes" ++[if test "X$PORTOBJFORMAT" = "Xyes" + then + ELF_SYS=true + else +@@ -1248,10 +1263,15 @@ + else + AC_MSG_RESULT($TCL_CONFIG_SH) + AC_SUBST(TCL_CONFIG_SH) ++ . ${TCL_CONFIG_SH} ++ AC_SUBST(TCL_LIB_SPEC) + fi + fi + +-USE_TK=$USE_TCL # If TCL is disabled, disable TK ++USE_TK=${USE_TK:=$USE_TCL} # If TCL is disabled, disable TK ++ # otherwise -- enable unless explicitly ++ # disabled ++ + + dnl Check for Tk configuration script tkConfig.sh + if test "$USE_TK" = true diff --git a/databases/postgresql80-server/files/patch-av b/databases/postgresql80-server/files/patch-av new file mode 100644 index 000000000000..49b35f9e8dc1 --- /dev/null +++ b/databases/postgresql80-server/files/patch-av @@ -0,0 +1,17 @@ +--- interfaces/libpq/fe-connect.c Sun May 21 17:19:53 2000 ++++ interfaces/libpq/fe-connect.c Fri Sep 15 13:53:52 2000 +@@ -801 +801 @@ +- sprintf(conn->errorMessage, ++ printfPQExpBuffer(&conn->errorMessage, +@@ -809 +809 @@ +- sprintf(conn->errorMessage, "PQconnectDB() -- couldn't read postmaster response: errno=%d\n%s\n", ++ printfPQExpBuffer(&conn->errorMessage, "PQconnectDB() -- couldn't read postmaster response: errno=%d\n%s\n", +@@ -822 +822 @@ +- sprintf(conn->errorMessage, ++ printfPQExpBuffer(&conn->errorMessage, +@@ -832 +832 @@ +- sprintf(conn->errorMessage, ++ printfPQExpBuffer(&conn->errorMessage, +@@ -850 +850 @@ +- strcpy(conn->errorMessage, ++ printfPQExpBuffer(&conn->errorMessage, diff --git a/databases/postgresql80-server/files/patch-ba b/databases/postgresql80-server/files/patch-ba index a3b679b882c5..586d725c536a 100644 --- a/databases/postgresql80-server/files/patch-ba +++ b/databases/postgresql80-server/files/patch-ba @@ -1,5 +1,5 @@ ---- interfaces/jdbc/Makefile.orig Tue Mar 14 16:55:17 2000 -+++ interfaces/jdbc/Makefile Sun Apr 16 21:16:43 2000 +--- interfaces/jdbc/Makefile.orig Sun Nov 5 05:03:53 2000 ++++ interfaces/jdbc/Makefile Fri Dec 8 03:16:17 2000 @@ -10,10 +10,10 @@ FIND = find @@ -15,11 +15,3 @@ RM = rm -f TOUCH = touch -@@ -40,6 +40,7 @@ - @echo To compile, type: - @echo " $(MAKE) jdbc2" - @echo ------------------------------------------------------------ -+ $(MAKE) jdbc1 - - msg: - @echo ------------------------------------------------------------ diff --git a/databases/postgresql80-server/files/patch-be b/databases/postgresql80-server/files/patch-be new file mode 100644 index 000000000000..2f8c3c55566f --- /dev/null +++ b/databases/postgresql80-server/files/patch-be @@ -0,0 +1,9 @@ +This patches let you disable Tk even if you have it installed and +makes sure the TCL-library is added as a dependency for libpgtcl. +--- interfaces/libpgtcl/Makefile.in Tue Mar 7 20:58:36 2000 ++++ interfaces/libpgtcl/Makefile.in Wed Sep 20 08:57:28 2000 +@@ -29,3 +29,3 @@ + +-SHLIB_LINK+= $(LIBPQ) ++SHLIB_LINK+= $(LIBPQ) @TCL_LIB_SPEC@ + diff --git a/databases/postgresql80-server/files/pgsql.sh.tmpl b/databases/postgresql80-server/files/pgsql.sh.tmpl index e1673b4850c2..753e0b8aaf80 100644 --- a/databases/postgresql80-server/files/pgsql.sh.tmpl +++ b/databases/postgresql80-server/files/pgsql.sh.tmpl @@ -17,13 +17,13 @@ start) stop) [ -x !!PREFIX!!/pgsql/bin/pg_ctl ] && { - su -l pgsql -c 'exec !!PREFIX!!/pgsql/bin/pg_ctl -w -m fast stop' + exec su -l pgsql -c 'exec !!PREFIX!!/pgsql/bin/pg_ctl -w -m fast stop' } ;; status) [ -x !!PREFIX!!/pgsql/bin/pg_ctl ] && { - su -l pgsql -c 'exec !!PREFIX!!/pgsql/bin/pg_ctl status' + exec su -l pgsql -c 'exec !!PREFIX!!/pgsql/bin/pg_ctl status' } ;; diff --git a/databases/postgresql80-server/files/pkgIndex.tcl.in b/databases/postgresql80-server/files/pkgIndex.tcl.in new file mode 100644 index 000000000000..bd8329b15c69 --- /dev/null +++ b/databases/postgresql80-server/files/pkgIndex.tcl.in @@ -0,0 +1,4 @@ +# Package-index file for Pgtcl-package. Enables you to load PostgreSQL +# interface functions right into you TCL-interpreter as simply as +# package require Pgtcl +package ifneeded Pgtcl 1.3 "load %%PREFIX%%/lib/libpgtcl.so" diff --git a/databases/postgresql80-server/files/post-install-notes b/databases/postgresql80-server/files/post-install-notes index 289a7651109a..4c69908b2676 100644 --- a/databases/postgresql80-server/files/post-install-notes +++ b/databases/postgresql80-server/files/post-install-notes @@ -8,9 +8,12 @@ You may wish to subscribe to the PostgreSQL user-support mailing list. Send an e-mail to pgsql-questions-request@postgresql.org with the text "subscribe" in the message body. -If you built PostgreSQL with TCL support, you can install the port -"pgaccess" to get a TCL/TK based database frontend for database -operations. +If you built PostgreSQL with TCL/TK support, you can use the pgaccess +utility to get a TCL/TK based database frontend for database +operations. You do NOT need to install the pgaccess port separately. + +If you built in the TCL support, you can load the Pg package into your +TCL scripts as easily as ``package require Pgtcl''. To start PostgreSQL, run the startup script: -$PREFIX/etc/rc.d/pgsql.sh start +%%PREFIX%%/etc/rc.d/pgsql.sh start diff --git a/databases/postgresql80-server/files/pre-install-notes b/databases/postgresql80-server/files/pre-install-notes new file mode 100644 index 000000000000..72388933bd6d --- /dev/null +++ b/databases/postgresql80-server/files/pre-install-notes @@ -0,0 +1,9 @@ +# ---------------------------------------------------------------- +# UPGRADE NOTE! Depending on which version you are upgrading from, +# you may have to dump/restore existing databases +# as part of the update. +# This is *NOT* done by this port! +# For detailed instructions, see +# %%WRKDIR%%/%%DISTNAME%%/INSTALL +# after extraction. +# -------------------------------------------------------------- diff --git a/databases/postgresql80-server/pkg-plist.jdbc b/databases/postgresql80-server/pkg-plist.jdbc index bef5d75506b4..e751caa65063 100644 --- a/databases/postgresql80-server/pkg-plist.jdbc +++ b/databases/postgresql80-server/pkg-plist.jdbc @@ -10,4 +10,5 @@ share/examples/pgsql/jdbc/README_6.3 @dirrm share/examples/pgsql/jdbc @dirrm share/examples/pgsql share/java/classes/postgresql.jar +@unexec rmdir %D/share/java/classes 2>/dev/null || true @unexec rmdir %D/share/java 2>/dev/null || true diff --git a/databases/postgresql80-server/pkg-plist.notk b/databases/postgresql80-server/pkg-plist.notk new file mode 100644 index 000000000000..9f5d9e04af48 --- /dev/null +++ b/databases/postgresql80-server/pkg-plist.notk @@ -0,0 +1,6 @@ +pgsql/bin/pgtclsh +pgsql/include/libpgtcl.h +pgsql/lib/libpgtcl.a +pgsql/lib/libpgtcl.so +pgsql/lib/libpgtcl.so.2 +pgsql/lib/pltcl.so diff --git a/databases/postgresql80-server/scripts/configure.postgresql b/databases/postgresql80-server/scripts/configure.postgresql new file mode 100644 index 000000000000..5efe32a766f4 --- /dev/null +++ b/databases/postgresql80-server/scripts/configure.postgresql @@ -0,0 +1,267 @@ +#!/bin/sh +# -*- tab-width: 4; -*- +# ex:ts=4 +# +# $FreeBSD$ +# +if [ -f ${WRKDIRPREFIX}${CURDIR}/Makefile.inc ]; then + exit +fi + +if [ ! "${BATCH}" ]; then + dialog --title "Backup your data NOW" \ + --msgbox "`sed -e \"s#%%WRKDIR%%#${WRKDIR}#; s#%%DISTNAME%%#${DISTNAME}#\" < ${FILESDIR}/pre-install-notes`" \ + -1 -1 +fi + +#SSL=${NO_OPENSSL:+OFF} +#SSL=${NOSSL:-ON} + +if [ "${BATCH}" ]; then + set \"MultiByte\" +else + /usr/bin/dialog --title "configuration options" --clear \ + --checklist "\n\ +Please select desired options:" -1 -1 8 \ +JDBC "Java DataBase Connectivity" OFF \ +MultiByte "Multibyte for Multilingualism" ON \ +ODBC "Open Database Connectivity" OFF \ +Perl "Perl" OFF \ +TCL "Tcl" ON \ +TCLTK "Tcl/Tk" ON \ +SSL "Secure Socket Layer (requires certificate)" OFF \ +KRB5 "Kerberos 5" OFF \ +2> /tmp/checklist.tmp.$$ + + retval=$? + + if [ -s /tmp/checklist.tmp.$$ ]; then + set `cat /tmp/checklist.tmp.$$` + fi + rm -f /tmp/checklist.tmp.$$ + + case $retval in + 0) if [ -z "$*" ]; then + echo "Nothing selected" + fi + ;; + 1) echo "Cancel pressed." + exit 1 + ;; + esac +fi + +${MKDIR} -p ${WRKDIRPREFIX}${CURDIR} +exec > ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + +while [ "$1" ]; do + case $1 in + \"JDBC\") + # use JAVA_HOME if set correctly + echo "# JDBC" + if [ "${JAVA_HOME}" -a -x ${JAVA_HOME}/bin/javac ]; then + echo JAVA_HOME=${JAVA_HOME} + if [ "$(${JAVA_HOME}/bin/java -version 2>&1 | egrep \"1.1)" ]; then + JAVAVERSION=1 + echo BUILD_DEPENDS+= ${JAVA_HOME}/bin/javac:\${PORTSDIR}/java/jdk + else + JAVAVERSION=2 + echo BUILD_DEPENDS+= ${JAVA_HOME}/bin/javac:\${PORTSDIR}/java/jdk12-beta + fi + else + JAVAVERSION=1 + echo BUILD_DEPENDS+= \${LOCALBASE}/jdk1.1.8/bin/javac:\${PORTSDIR}/java/jdk + echo JAVA_HOME=\${LOCALBASE}/jdk1.1.8 + fi + cat <<-EOF + JAVAVERSION=${JAVAVERSION} + WITH_JDBC=YES + SCRIPTS_ENV+= JAVA_HOME=\${JAVA_HOME} + + EOF + ;; + \"MultiByte\") + MULTIBYTE=1 + ;; + \"ODBC\") + cat <<-EOF + # ODBC + WITH_ODBC=YES + CONFIGURE_ARGS+= --with-odbc + + EOF + ;; + \"Perl\") + cat <<-EOF + # PERL + WITH_PERL=YES + CONFIGURE_ARGS+= --with-perl + + EOF + ;; + \"TCL\") + TCL=1 + ;; + \"TCLTK\") + echo "#TCLTK" + echo WITH_TK=YES + echo + TCL=1 + ;; + \"SSL\") + cat <<-EOF + # SSL + USE_OPENSSL= yes + CFLAGS+= -DUSE_SSL + WITH_SSL= yes + CONFIGURE_ENV+= LDFLAGS="-L\${OPENSSLLIB} -lssl -lcrypto" + + EOF + ;; + \"KRB5\") + KRB5=1 + ;; + \"nothing\"|true) + ;; + *) + echo "Invalid option(s): $*" > /dev/stderr + rm -f ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + exit 1 + ;; + esac + shift +done + +exec > /dev/stderr + +# if multibyte, determine charset +echo "# Multibyte" + +if [ ! "${MULTIBYTE}" ]; then + echo "WITHOUT_MULTIBYTE=YES" >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc +else + if [ "${BATCH}" ]; then + set \"nothing\" + else + /usr/bin/dialog --title "configuration options" --clear \ + --radiolist "\n\ +Please select desired options:" -1 -1 16 \ +nothing "Default Encoding" ON \ +SQL_ASCII "SQL_ASCII" OFF \ +LATIN1 "LATIN1" OFF \ +LATIN2 "LATIN2" OFF \ +LATIN3 "LATIN3" OFF \ +LATIN4 "LATIN4" OFF \ +LATIN5 "LATIN5" OFF \ +EUC_JP "EUC_JP" OFF \ +EUC_CN "EUC_CN" OFF \ +EUC_KR "EUC_KR" OFF \ +EUC_TW "EUC_TW" OFF \ +KOI8 "KOI8" OFF \ +UNICODE "UNICODE" OFF \ +MULE_INTERNAL "MULE_INTERNAL" OFF \ +WIN "WIN" OFF \ +ALT "ALT" OFF \ +2> /tmp/checklist.tmp.$$ + + retval=$? + + if [ -s /tmp/checklist.tmp.$$ ]; then + set `cat /tmp/checklist.tmp.$$` + fi + rm -f /tmp/checklist.tmp.$$ + if [ $retval = 1 ]; then + echo "Cancel pressed." + rm ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + exit 1 + fi + fi + + if [ "$1" = "nothing" ]; then + echo "CONFIGURE_ARGS+= --enable-multibyte" \ + >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + else + echo "CONFIGURE_ARGS+= --enable-multibyte=$1" \ + >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + fi +fi +echo + +if [ "${TCL}" ]; then + echo "# TCL" >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + if [ "${BATCH}" ]; then + echo WITH_TCL=8.3 >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + else + dialog --title "TCL version" \ + --inputbox "Please enter TCL version. Default is 8.3." -1 -1 "8.3" \ + 2> /tmp/checklist.tmp.$$ + retval=$? + if [ -s /tmp/checklist.tmp.$$ ]; then + set `cat /tmp/checklist.tmp.$$` + fi + rm -f /tmp/checklist.tmp.$$ + case $retval in + 0) if [ -z "$*" ]; then + echo "Nothing selected" + fi + ;; + 1) echo "Cancel pressed." + rm -f ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + exit 1 + ;; + esac + echo WITH_TCL=\"$1\" >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + fi + cat <<-EOF >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + CONFIGURE_ARGS+= --with-tcl --with-tclconfig="\${TCLCONFIG}" + TCLV=\${WITH_TCL:S/.//} + TCL_INCDIR= \${LOCALBASE}/include/tcl\${WITH_TCL} + MAKE_ENV= TCL_INCDIR=\${TCL_INCDIR} + LIB_DEPENDS= tcl\${TCLV}.1:\${PORTSDIR}/lang/tcl\${TCLV} + TCLCONFIG= '\${LOCALBASE}/lib/tcl\${WITH_TCL}' + .if defined(WITH_TK) + TK_INCDIR= \${LOCALBASE}/include/tk\${WITH_TCL} + CONFIGURE_ENV+= WISH=\${LOCALBASE}/bin/wish\${WITH_TCL} + LIB_DEPENDS+= tk\${TCLV}.1:\${PORTSDIR}/x11-toolkits/tk\${TCLV} + TCLCONFIG+= '\${LOCALBASE}/lib/tk\${WITH_TCL}' + TCL_PLIST= pkg-plist.tcl + .else + TCL_PLIST= pkg-plist.notk + CONFIGURE_ARGS+= --without-tk + .endif + + EOF +fi + +if [ "${KRB5}" ]; then + if [ "${BATCH}" ]; then + # never gets here, but what the heck... + echo KRB5_HOME=\${LOCALBASE} >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + else + dialog --inputbox "Please enter the KRB5_HOME path" -1 -1 "${KRB_HOME:-${LOCALBASE}}" \ + 2> /tmp/checklist.tmp.$$ + retval=$? + if [ -s /tmp/checklist.tmp.$$ ]; then + set `cat /tmp/checklist.tmp.$$` + fi + rm -f /tmp/checklist.tmp.$$ + case $retval in + 0) if [ -z "$*" ]; then + echo "No input" + fi + ;; + 1) echo "Cancel pressed." + rm -f ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + exit 1 + ;; + esac + echo KRB5_HOME=\"$1\" >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + fi + cat <<-EOF >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + .if defined(KRB5_HOME) && exists(\${KRB5_HOME}) + CONFIGURE_KRB= --with-krb5=\${KRB5_HOME} \ + --with-krb-keytab=FILE:\${PREFIX}/pgsql/etc/keytab + .endif + + EOF +fi diff --git a/databases/postgresql81-server/Makefile b/databases/postgresql81-server/Makefile index 5f64023c8cf5..08e0329a0795 100644 --- a/databases/postgresql81-server/Makefile +++ b/databases/postgresql81-server/Makefile @@ -6,7 +6,7 @@ # PORTNAME= postgresql -PORTVERSION= 7.0.2 +PORTVERSION= 7.0.3 CATEGORIES= databases MASTER_SITES= ftp://ftp.postgresql.org/pub/%SUBDIR%/ \ ftp://ftp.de.postgresql.org/%SUBDIR%/ \ @@ -22,59 +22,12 @@ DIST_SUBDIR= postgresql MAINTAINER= girgen@partitur.se +BUILD_DEPENDS= autoconf:${PORTSDIR}/devel/autoconf + Y2K= http://www.postgresql.org/y2k.html INSTALLS_SHLIB= YES LDCONFIG_DIRS= %%PREFIX%%/pgsql/lib -BUILD_DEPENDS= autoconf:${PORTSDIR}/devel/autoconf - -.if defined(KRB5_HOME) && exists(${KRB5_HOME}) -CONFIGURE_KRB= --with-krb5=${KRB5_HOME} \ - --with-krb-keytab=FILE:${PREFIX}/pgsql/etc/keytab -.endif - -# if you want to use the tcl/tk frontend pgaccess, then you need to build -# postgresql with tcl support by typing: make -DWITH_TCL -.if defined(WITH_TCL) -TCL_INCDIR= ${LOCALBASE}/include/tcl8.3 -TK_INCDIR= ${LOCALBASE}/include/tk8.3 -MAKE_ENV= TCL_INCDIR=${TCL_INCDIR} -CONFIGURE_ENV= WISH=${LOCALBASE}/bin/wish8.3 -LIB_DEPENDS= tcl83.1:${PORTSDIR}/lang/tcl83 \ - tk83.1:${PORTSDIR}/x11-toolkits/tk83 -CONFIGURE_TCL= --with-tcl --with-tclconfig="${LOCALBASE}/lib/tcl8.3 ${LOCALBASE}/lib/tk8.3" -.endif - -# if you want to disable the multibyte support, type: -# make -DWITHOUT_MULTIBYTE -# -# if you want to set the default encoding for the multibyte support, type: -# make DEFAULT_ENCODING=<encoding> -# where <encoding> is one of these: -# SQL_ASCII LATIN1 LATIN2 LATIN3 LATIN4 LATIN5 -# EUC_JP EUC_CN EUC_KR EUC_TW KOI8 -# UNICODE MULE_INTERNAL WIN ALT -.if defined(WITHOUT_MULTIBYTE) -CONFIGURE_MULTIBYTE= # none -.elif defined(DEFAULT_ENCODING) -CONFIGURE_MULTIBYTE= --enable-multibyte="${DEFAULT_ENCODING}" -.else -CONFIGURE_MULTIBYTE= --enable-multibyte -.endif -.if defined(WITH_PERL) -CONFIGURE_PERL= --with-perl -.endif -.if defined(WITH_ODBC) -CONFIGURE_ODBC= --with-odbc -.endif - -# if you want jdbc, type make -DWITH_JDBC -# Honors JAVA_HOME if you have it set, and don't want the dependency. -.if defined(WITH_JDBC) -JAVA_HOME?= ${LOCALBASE}/jdk1.1.8 -BUILD_DEPENDS= ${JAVA_HOME}/bin/javac:${PORTSDIR}/java/jdk -SCRIPTS_ENV+= JAVA_HOME=${JAVA_HOME} -.endif WRKSRC= ${WRKDIR}/${DISTNAME}/src DOCDIR= ${WRKDIR}/${DISTNAME}/doc @@ -86,11 +39,6 @@ CONFIGURE_ARGS= --prefix=${PREFIX}/pgsql \ --enable-locale \ --with-template=`uname -s | ${TR} '[A-Z]' '[a-z]'` \ --with-includes="${PREFIX}/include ${TCL_INCDIR} ${TK_INCDIR}" \ - ${CONFIGURE_KRB} \ - ${CONFIGURE_TCL} \ - ${CONFIGURE_MULTIBYTE} \ - ${CONFIGURE_PERL} \ - ${CONFIGURE_ODBC} \ --with-libraries=${PREFIX}/lib MAN1= createdb.1 createlang.1 createuser.1 dropdb.1 droplang.1 \ @@ -117,50 +65,21 @@ MANL= abort.l alter_group.l alter_table.l alter_user.l \ MANPREFIX= ${PREFIX}/pgsql -pre-fetch: - @${ECHO_MSG} "To install and run postgresql you need to compile kernel with:" - @${ECHO_MSG} " options \"SYSVSHM, SYSVSEM, SYSVMSG\"" -.if !defined(WITH_TCL) - @${ECHO_MSG} "To build the \"PostgreSQL to Tcl interface library\", libpgtcl, type:" - @${ECHO_MSG} " make -DWITH_TCL" -.else - @${ECHO_MSG} "Building PostgreSQL with \"libpgtcl\"." -.endif -.if !defined(WITHOUT_MULTIBYTE) - @${ECHO_MSG} "To disable multibyte support, type:" - @${ECHO_MSG} " make -DWITHOUT_MULTIBYTE" -.if !defined(DEFAULT_ENCODING) - @${ECHO_MSG} "To set the default encoding for the multibyte support, type:" - @${ECHO_MSG} " make DEFAULT_ENCODING=<encoding>" - @${ECHO_MSG} "where <encoding> is one of these:" - @${ECHO_MSG} " SQL_ASCII LATIN1 LATIN2 LATIN3 LATIN4 LATIN5" - @${ECHO_MSG} " EUC_JP EUC_CN EUC_KR EUC_TW KOI8" - @${ECHO_MSG} " UNICODE MULE_INTERNAL WIN ALT" -.else - @${ECHO_MSG} "The default encoding is '${DEFAULT_ENCODING}'." -.endif -.else - @${ECHO_MSG} "Building PostgreSQL without multibyte support." -.endif -.if !defined(WITH_JDBC) - @${ECHO_MSG} "To build Java (JDBC) support, type:" - @${ECHO_MSG} " make -DWITH_JDBC" -.else - @${ECHO_MSG} "Building PostgreSQL with \"postgresql.jar\"." -.endif -.if !defined(WITH_PERL) - @${ECHO_MSG} "To build Perl interface and pl/Perl interpreter:" - @${ECHO_MSG} " make -DWITH_PERL" -.else - @${ECHO_MSG} "Building PostgreSQL with \"pl/Perl\"." -.endif -.if !defined(WITH_ODBC) - @${ECHO_MSG} "To build the ODBC driver package:" - @${ECHO_MSG} " make -DWITH_ODBC" -.else - @${ECHO_MSG} "Building PostgreSQL with ODBC Drivers." +SCRIPTS_ENV= WRKDIRPREFIX="${WRKDIRPREFIX}" \ + WRKDIR="${WRKDIR}" \ + FILESDIR="${FILESDIR}" \ + TOUCH="${TOUCH}" \ + MKDIR="${MKDIR}" \ + NO_OPENSSL="${NO_OPENSSL}" \ + DISTNAME="${DISTNAME}" + +.if exists(${WRKDIRPREFIX}${.CURDIR}/Makefile.inc) +.include "${WRKDIRPREFIX}${.CURDIR}/Makefile.inc" .endif +pre-extract: + @ ${SETENV} ${SCRIPTS_ENV} ${SH} ${SCRIPTDIR}/configure.postgresql + post-patch: @ ${MV} ${WRKSRC}/template/freebsd ${WRKSRC}/template/freebsd.orig @ ${SED} -e 's#CFLAGS:-O2 -m486 -pipe#CFLAGS:${CFLAGS}#' \ @@ -180,16 +99,8 @@ pre-configure: post-build: .if defined(WITH_JDBC) - @ cd ${WRKSRC}/interfaces/jdbc && ${GMAKE} -.if !defined(NOPORTDOCS) - @ cd ${WRKSRC}/interfaces/jdbc && ${GMAKE} examples -.endif + @ ${GMAKE} -C ${WRKSRC}/interfaces/jdbc jdbc${JAVAVERSION} .endif - @ ${ECHO} "------------------------------------------------------------" - @ ${ECHO} "Dump existing databases, before installing new db version !!" - @ ${ECHO} "Detailed instructions, see" - @ ${ECHO} "${WRKDIR}/${DISTNAME}/INSTALL" - @ ${ECHO} "------------------------------------------------------------" pre-install: .if defined(PACKAGE_BUILDING) @@ -197,53 +108,54 @@ pre-install: .endif @ ${MKDIR} ${PREFIX}/pgsql @ ${SETENV} ${MAKE_ENV} perl ${SCRIPTDIR}/createuser +.if !defined(BATCH) + @ ${SED} -e "s#%%WRKDIR%%#${WRKDIR}#; s#%%DISTNAME%%#${DISTNAME}#" \ + < ${FILESDIR}/pre-install-notes | more -e +.endif post-install: .if defined(NOPORTDOCS) - @ ( cd ${DOCDIR}; ${GMAKE} man ) + @ ${GMAKE} -C ${DOCDIR} man .else - @ ( cd ${DOCDIR}; ${GMAKE} install ) + @ ${GMAKE} -C ${DOCDIR} install + ${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/FAQ* ${PREFIX}/share/doc/pgsql + ${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/README* ${PREFIX}/share/doc/pgsql + ${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/TODO ${PREFIX}/share/doc/pgsql +# ${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/*ps.gz ${PREFIX}/share/doc/pgsql + @ ${CAT} ${PKGDIR}/pkg-plist.doc >> ${TMPPLIST} .endif @ if [ ! -f ${PREFIX}/pgsql/.profile ]; then \ - ${ECHO} "PATH=${PATH}:${PREFIX}/pgsql/bin" \ + ${SED} 's|%%PREFIX%%|${PREFIX}|g' \ + < ${FILESDIR}/dot.profile.in \ > ${PREFIX}/pgsql/.profile; \ - ${ECHO} "MANPATH=${MANPATH}:${PREFIX}/pgsql/man" \ - >> ${PREFIX}/pgsql/.profile; \ - ${ECHO} "PGLIB=${PREFIX}/pgsql/lib" \ - >> ${PREFIX}/pgsql/.profile; \ - ${ECHO} "# note: PGDATA overwrites the -D startup option" \ - >> ${PREFIX}/pgsql/.profile; \ - ${ECHO} "PGDATA=${PREFIX}/pgsql/data" \ - >> ${PREFIX}/pgsql/.profile; \ - ${ECHO} "DISPLAY=:0" \ - >> ${PREFIX}/pgsql/.profile; \ - ${ECHO} "export PATH MANPATH PGLIB PGDATA DISPLAY" \ - >> ${PREFIX}/pgsql/.profile; \ - ${ECHO} "# if you want to make regression tests use this TZ" \ - >> ${PREFIX}/pgsql/.profile; \ - ${ECHO} "#TZ=PST8PDT" \ - >> ${PREFIX}/pgsql/.profile; \ - ${ECHO} "#export TZ" \ - >> ${PREFIX}/pgsql/.profile; \ fi @ ${CHOWN} -R pgsql:pgsql ${PREFIX}/pgsql @ ${CHOWN} root:pgsql ${PREFIX}/pgsql/lib @ ${ECHO} 'Initializing PostgreSQL Databases - this may take a few minutes...' @ ${SETENV} OBJFORMAT=${PORTOBJFORMAT} ${LDCONFIG} -m ${PREFIX}/pgsql/lib - @ su -l pgsql -c 'PATH=${PREFIX}/pgsql/bin:${PATH} LD_LIBRARY_PATH=${PREFIX}/pgsql/lib ${PREFIX}/pgsql/bin/initdb --pglib=${PREFIX}/pgsql/lib --pgdata=${PREFIX}/pgsql/data' +# '-' so we don't fail to create packagelist at this stage, +# when we already have everything installed on top of previous version + -@ su -l pgsql -c 'PATH=${PREFIX}/pgsql/bin:${PATH} ${PREFIX}/pgsql/bin/initdb --pglib=${PREFIX}/pgsql/lib --pgdata=${PREFIX}/pgsql/data' @ ${SED} -e "s=!!PREFIX!!=${PREFIX}=g" < ${FILESDIR}/pgsql.sh.tmpl \ > ${PREFIX}/etc/rc.d/pgsql.sh @ ${CHMOD} 554 ${PREFIX}/etc/rc.d/pgsql.sh @ ${CHOWN} root.pgsql ${PREFIX}/etc/rc.d/pgsql.sh - @ ${INSTALL_DATA} ${FILESDIR}/post-install-notes ${PREFIX}/pgsql + @ ${SED} -e 's#%%PREFIX%%#${PREFIX}#' < ${FILESDIR}/post-install-notes \ + > ${PREFIX}/pgsql/post-install-notes .if defined(WITHOUT_MULTIBYTE) @${CP} ${TMPPLIST} ${TMPPLIST}.nomulti @${GREP} -v pgsql/bin/pg_encoding ${TMPPLIST}.nomulti > ${TMPPLIST} .endif .if defined(WITH_TCL) @${CP} ${TMPPLIST} ${TMPPLIST}.notcl - @${CAT} ${PKGDIR}/pkg-plist.tcl ${TMPPLIST}.notcl > ${TMPPLIST} + @${CAT} ${PKGDIR}/${TCL_PLIST} ${TMPPLIST}.notcl > ${TMPPLIST} @${RM} ${TMPPLIST}.notcl +# Preparing a loadable TCL-package (pkgIndex.tcl) +# XXX This directory and the single file are not registered in +# XXX the PLIST, because of different PREFIX. + @${MKDIR} ${LOCALBASE}/lib/tcl${WITH_TCL}/Pgtcl1.3 + @${SED} 's|%%PREFIX%%|${PREFIX}|' < ${FILESDIR}/pkgIndex.tcl.in \ + > ${LOCALBASE}/lib/tcl${WITH_TCL}/Pgtcl1.3/pkgIndex.tcl .endif .if defined(WITH_ODBC) @${CP} ${TMPPLIST} ${TMPPLIST}.noodbc @@ -272,19 +184,10 @@ post-install: @ ${ECHO_MSG} "---------------------------------------------------------" @ ${ECHO_MSG} "Putting jdbc examples into ${PREFIX}/share/examples/pgsql" @ ${ECHO_MSG} "---------------------------------------------------------" - @ ${CAT} ${PKGDIR}/pkg-plist.doc >> ${TMPPLIST} -.endif .endif -.if !defined(NOPORTDOCS) - ${MKDIR} ${PREFIX}/share/doc/pgsql - @ ${GMAKE} -C ${WRKDIR}/${DISTNAME}/doc install - ${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/FAQ* ${PREFIX}/share/doc/pgsql - ${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/README* ${PREFIX}/share/doc/pgsql - ${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/TODO ${PREFIX}/share/doc/pgsql -# ${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/*ps.gz ${PREFIX}/share/doc/pgsql .endif .if !defined(BATCH) - @ more -e ${FILESDIR}/post-install-notes + @ more -e ${PREFIX}/pgsql/post-install-notes .endif .if !defined(DEBUG_FLAGS) .for file in ecpg pg_dump pg_id pg_passwd pg_version postgres psql @@ -292,4 +195,7 @@ post-install: .endfor .endif +post-clean: + @ ${RM} -f ${WRKDIRPREFIX}${.CURDIR}/Makefile.inc + .include <bsd.port.mk> diff --git a/databases/postgresql81-server/distinfo b/databases/postgresql81-server/distinfo index 309ea1e11614..fc87b8117bdc 100644 --- a/databases/postgresql81-server/distinfo +++ b/databases/postgresql81-server/distinfo @@ -1,4 +1,3 @@ -MD5 (postgresql/postgresql-7.0.2.base.tar.gz) = 871d23b85d9a3599a7ed75dfc7da7ba7 -MD5 (postgresql/postgresql-7.0.2.support.tar.gz) = c21180a6485d85785c8e69f0cbff05dd -MD5 (postgresql/postgresql-7.0.2.docs.tar.gz) = efac1f87463f252e54d72b256885b883 -MD5 (postgresql/postgresql-7.0.2.test.tar.gz) = 3443b3d83194c396f20aee2adc6f93bf +MD5 (postgresql/postgresql-7.0.3.base.tar.gz) = 0eeda8217b5b11e5a9351fc424808426 +MD5 (postgresql/postgresql-7.0.3.support.tar.gz) = b930f71068d776ef45402fcbebfa58cf +MD5 (postgresql/postgresql-7.0.3.docs.tar.gz) = 3d3fc76073f6d77febefc83f887fc87d diff --git a/databases/postgresql81-server/files/dot.profile.in b/databases/postgresql81-server/files/dot.profile.in new file mode 100644 index 000000000000..bd7ec45043be --- /dev/null +++ b/databases/postgresql81-server/files/dot.profile.in @@ -0,0 +1,16 @@ +PATH=${PATH}:%%PREFIX%%/pgsql/bin +PGLIB=%%PREFIX%%/pgsql/lib + +# note: PGDATA overwrites the -D startup option +PGDATA=%%PREFIX%%/pgsql/data + +export PATH MANPATH PGLIB PGDATA + +#You might want to set some locale stuff here +#PGDATESTYLE=ISO +#LC_ALL=sv_SE.ISO_88591-1 +#export PGDATESTYLE LC_ALL + +# if you want to make regression tests use this TZ +#TZ=PST8PDT +#export TZ diff --git a/databases/postgresql81-server/files/patch-au b/databases/postgresql81-server/files/patch-au new file mode 100644 index 000000000000..340521b49482 --- /dev/null +++ b/databases/postgresql81-server/files/patch-au @@ -0,0 +1,58 @@ +--- configure.in.orig Sun Nov 5 05:03:47 2000 ++++ configure.in Mon Dec 4 02:36:15 2000 +@@ -299,13 +299,28 @@ + [ --with-tcl build Tcl interfaces and pgtclsh ], + [ + case "$withval" in +- y | ye | yes) USE_TCL=true; USE_TK=true; AC_MSG_RESULT(enabled) ;; ++ y | ye | yes) USE_TCL=true; AC_MSG_RESULT(enabled) ;; + *) USE_TCL=; USE_TK=; AC_MSG_RESULT(disabled) ;; + esac + ], + [ USE_TCL=; USE_TK=; AC_MSG_RESULT(disabled) ] + ) + ++dnl We include tk support with tcl unless user says --without-tk ++if test USE_TCL = true ++then ++AC_MSG_CHECKING(setting USE_TK) ++AC_ARG_WITH( ++ tk, ++ [ --without-tk build Tcl *without* Tk ], ++ [ ++ case "$withval" in ++ y | ye | yes) USE_TK=true; USE_TK=true; AC_MSG_RESULT(enabled) ;; ++ *) USE_TK=n; AC_MSG_RESULT(disabled) ;; ++ esac ++ ] ++) ++fi + export USE_TCL + export USE_TK + +@@ -482,7 +497,7 @@ + #endif + ], + ELF_SYS=true, +-[if test "X$elf" = "Xyes" ++[if test "X$PORTOBJFORMAT" = "Xyes" + then + ELF_SYS=true + else +@@ -1248,10 +1263,15 @@ + else + AC_MSG_RESULT($TCL_CONFIG_SH) + AC_SUBST(TCL_CONFIG_SH) ++ . ${TCL_CONFIG_SH} ++ AC_SUBST(TCL_LIB_SPEC) + fi + fi + +-USE_TK=$USE_TCL # If TCL is disabled, disable TK ++USE_TK=${USE_TK:=$USE_TCL} # If TCL is disabled, disable TK ++ # otherwise -- enable unless explicitly ++ # disabled ++ + + dnl Check for Tk configuration script tkConfig.sh + if test "$USE_TK" = true diff --git a/databases/postgresql81-server/files/patch-av b/databases/postgresql81-server/files/patch-av new file mode 100644 index 000000000000..49b35f9e8dc1 --- /dev/null +++ b/databases/postgresql81-server/files/patch-av @@ -0,0 +1,17 @@ +--- interfaces/libpq/fe-connect.c Sun May 21 17:19:53 2000 ++++ interfaces/libpq/fe-connect.c Fri Sep 15 13:53:52 2000 +@@ -801 +801 @@ +- sprintf(conn->errorMessage, ++ printfPQExpBuffer(&conn->errorMessage, +@@ -809 +809 @@ +- sprintf(conn->errorMessage, "PQconnectDB() -- couldn't read postmaster response: errno=%d\n%s\n", ++ printfPQExpBuffer(&conn->errorMessage, "PQconnectDB() -- couldn't read postmaster response: errno=%d\n%s\n", +@@ -822 +822 @@ +- sprintf(conn->errorMessage, ++ printfPQExpBuffer(&conn->errorMessage, +@@ -832 +832 @@ +- sprintf(conn->errorMessage, ++ printfPQExpBuffer(&conn->errorMessage, +@@ -850 +850 @@ +- strcpy(conn->errorMessage, ++ printfPQExpBuffer(&conn->errorMessage, diff --git a/databases/postgresql81-server/files/patch-ba b/databases/postgresql81-server/files/patch-ba index a3b679b882c5..586d725c536a 100644 --- a/databases/postgresql81-server/files/patch-ba +++ b/databases/postgresql81-server/files/patch-ba @@ -1,5 +1,5 @@ ---- interfaces/jdbc/Makefile.orig Tue Mar 14 16:55:17 2000 -+++ interfaces/jdbc/Makefile Sun Apr 16 21:16:43 2000 +--- interfaces/jdbc/Makefile.orig Sun Nov 5 05:03:53 2000 ++++ interfaces/jdbc/Makefile Fri Dec 8 03:16:17 2000 @@ -10,10 +10,10 @@ FIND = find @@ -15,11 +15,3 @@ RM = rm -f TOUCH = touch -@@ -40,6 +40,7 @@ - @echo To compile, type: - @echo " $(MAKE) jdbc2" - @echo ------------------------------------------------------------ -+ $(MAKE) jdbc1 - - msg: - @echo ------------------------------------------------------------ diff --git a/databases/postgresql81-server/files/patch-be b/databases/postgresql81-server/files/patch-be new file mode 100644 index 000000000000..2f8c3c55566f --- /dev/null +++ b/databases/postgresql81-server/files/patch-be @@ -0,0 +1,9 @@ +This patches let you disable Tk even if you have it installed and +makes sure the TCL-library is added as a dependency for libpgtcl. +--- interfaces/libpgtcl/Makefile.in Tue Mar 7 20:58:36 2000 ++++ interfaces/libpgtcl/Makefile.in Wed Sep 20 08:57:28 2000 +@@ -29,3 +29,3 @@ + +-SHLIB_LINK+= $(LIBPQ) ++SHLIB_LINK+= $(LIBPQ) @TCL_LIB_SPEC@ + diff --git a/databases/postgresql81-server/files/pgsql.sh.tmpl b/databases/postgresql81-server/files/pgsql.sh.tmpl index e1673b4850c2..753e0b8aaf80 100644 --- a/databases/postgresql81-server/files/pgsql.sh.tmpl +++ b/databases/postgresql81-server/files/pgsql.sh.tmpl @@ -17,13 +17,13 @@ start) stop) [ -x !!PREFIX!!/pgsql/bin/pg_ctl ] && { - su -l pgsql -c 'exec !!PREFIX!!/pgsql/bin/pg_ctl -w -m fast stop' + exec su -l pgsql -c 'exec !!PREFIX!!/pgsql/bin/pg_ctl -w -m fast stop' } ;; status) [ -x !!PREFIX!!/pgsql/bin/pg_ctl ] && { - su -l pgsql -c 'exec !!PREFIX!!/pgsql/bin/pg_ctl status' + exec su -l pgsql -c 'exec !!PREFIX!!/pgsql/bin/pg_ctl status' } ;; diff --git a/databases/postgresql81-server/files/pkgIndex.tcl.in b/databases/postgresql81-server/files/pkgIndex.tcl.in new file mode 100644 index 000000000000..bd8329b15c69 --- /dev/null +++ b/databases/postgresql81-server/files/pkgIndex.tcl.in @@ -0,0 +1,4 @@ +# Package-index file for Pgtcl-package. Enables you to load PostgreSQL +# interface functions right into you TCL-interpreter as simply as +# package require Pgtcl +package ifneeded Pgtcl 1.3 "load %%PREFIX%%/lib/libpgtcl.so" diff --git a/databases/postgresql81-server/files/post-install-notes b/databases/postgresql81-server/files/post-install-notes index 289a7651109a..4c69908b2676 100644 --- a/databases/postgresql81-server/files/post-install-notes +++ b/databases/postgresql81-server/files/post-install-notes @@ -8,9 +8,12 @@ You may wish to subscribe to the PostgreSQL user-support mailing list. Send an e-mail to pgsql-questions-request@postgresql.org with the text "subscribe" in the message body. -If you built PostgreSQL with TCL support, you can install the port -"pgaccess" to get a TCL/TK based database frontend for database -operations. +If you built PostgreSQL with TCL/TK support, you can use the pgaccess +utility to get a TCL/TK based database frontend for database +operations. You do NOT need to install the pgaccess port separately. + +If you built in the TCL support, you can load the Pg package into your +TCL scripts as easily as ``package require Pgtcl''. To start PostgreSQL, run the startup script: -$PREFIX/etc/rc.d/pgsql.sh start +%%PREFIX%%/etc/rc.d/pgsql.sh start diff --git a/databases/postgresql81-server/files/pre-install-notes b/databases/postgresql81-server/files/pre-install-notes new file mode 100644 index 000000000000..72388933bd6d --- /dev/null +++ b/databases/postgresql81-server/files/pre-install-notes @@ -0,0 +1,9 @@ +# ---------------------------------------------------------------- +# UPGRADE NOTE! Depending on which version you are upgrading from, +# you may have to dump/restore existing databases +# as part of the update. +# This is *NOT* done by this port! +# For detailed instructions, see +# %%WRKDIR%%/%%DISTNAME%%/INSTALL +# after extraction. +# -------------------------------------------------------------- diff --git a/databases/postgresql81-server/pkg-plist.jdbc b/databases/postgresql81-server/pkg-plist.jdbc index bef5d75506b4..e751caa65063 100644 --- a/databases/postgresql81-server/pkg-plist.jdbc +++ b/databases/postgresql81-server/pkg-plist.jdbc @@ -10,4 +10,5 @@ share/examples/pgsql/jdbc/README_6.3 @dirrm share/examples/pgsql/jdbc @dirrm share/examples/pgsql share/java/classes/postgresql.jar +@unexec rmdir %D/share/java/classes 2>/dev/null || true @unexec rmdir %D/share/java 2>/dev/null || true diff --git a/databases/postgresql81-server/pkg-plist.notk b/databases/postgresql81-server/pkg-plist.notk new file mode 100644 index 000000000000..9f5d9e04af48 --- /dev/null +++ b/databases/postgresql81-server/pkg-plist.notk @@ -0,0 +1,6 @@ +pgsql/bin/pgtclsh +pgsql/include/libpgtcl.h +pgsql/lib/libpgtcl.a +pgsql/lib/libpgtcl.so +pgsql/lib/libpgtcl.so.2 +pgsql/lib/pltcl.so diff --git a/databases/postgresql81-server/scripts/configure.postgresql b/databases/postgresql81-server/scripts/configure.postgresql new file mode 100644 index 000000000000..5efe32a766f4 --- /dev/null +++ b/databases/postgresql81-server/scripts/configure.postgresql @@ -0,0 +1,267 @@ +#!/bin/sh +# -*- tab-width: 4; -*- +# ex:ts=4 +# +# $FreeBSD$ +# +if [ -f ${WRKDIRPREFIX}${CURDIR}/Makefile.inc ]; then + exit +fi + +if [ ! "${BATCH}" ]; then + dialog --title "Backup your data NOW" \ + --msgbox "`sed -e \"s#%%WRKDIR%%#${WRKDIR}#; s#%%DISTNAME%%#${DISTNAME}#\" < ${FILESDIR}/pre-install-notes`" \ + -1 -1 +fi + +#SSL=${NO_OPENSSL:+OFF} +#SSL=${NOSSL:-ON} + +if [ "${BATCH}" ]; then + set \"MultiByte\" +else + /usr/bin/dialog --title "configuration options" --clear \ + --checklist "\n\ +Please select desired options:" -1 -1 8 \ +JDBC "Java DataBase Connectivity" OFF \ +MultiByte "Multibyte for Multilingualism" ON \ +ODBC "Open Database Connectivity" OFF \ +Perl "Perl" OFF \ +TCL "Tcl" ON \ +TCLTK "Tcl/Tk" ON \ +SSL "Secure Socket Layer (requires certificate)" OFF \ +KRB5 "Kerberos 5" OFF \ +2> /tmp/checklist.tmp.$$ + + retval=$? + + if [ -s /tmp/checklist.tmp.$$ ]; then + set `cat /tmp/checklist.tmp.$$` + fi + rm -f /tmp/checklist.tmp.$$ + + case $retval in + 0) if [ -z "$*" ]; then + echo "Nothing selected" + fi + ;; + 1) echo "Cancel pressed." + exit 1 + ;; + esac +fi + +${MKDIR} -p ${WRKDIRPREFIX}${CURDIR} +exec > ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + +while [ "$1" ]; do + case $1 in + \"JDBC\") + # use JAVA_HOME if set correctly + echo "# JDBC" + if [ "${JAVA_HOME}" -a -x ${JAVA_HOME}/bin/javac ]; then + echo JAVA_HOME=${JAVA_HOME} + if [ "$(${JAVA_HOME}/bin/java -version 2>&1 | egrep \"1.1)" ]; then + JAVAVERSION=1 + echo BUILD_DEPENDS+= ${JAVA_HOME}/bin/javac:\${PORTSDIR}/java/jdk + else + JAVAVERSION=2 + echo BUILD_DEPENDS+= ${JAVA_HOME}/bin/javac:\${PORTSDIR}/java/jdk12-beta + fi + else + JAVAVERSION=1 + echo BUILD_DEPENDS+= \${LOCALBASE}/jdk1.1.8/bin/javac:\${PORTSDIR}/java/jdk + echo JAVA_HOME=\${LOCALBASE}/jdk1.1.8 + fi + cat <<-EOF + JAVAVERSION=${JAVAVERSION} + WITH_JDBC=YES + SCRIPTS_ENV+= JAVA_HOME=\${JAVA_HOME} + + EOF + ;; + \"MultiByte\") + MULTIBYTE=1 + ;; + \"ODBC\") + cat <<-EOF + # ODBC + WITH_ODBC=YES + CONFIGURE_ARGS+= --with-odbc + + EOF + ;; + \"Perl\") + cat <<-EOF + # PERL + WITH_PERL=YES + CONFIGURE_ARGS+= --with-perl + + EOF + ;; + \"TCL\") + TCL=1 + ;; + \"TCLTK\") + echo "#TCLTK" + echo WITH_TK=YES + echo + TCL=1 + ;; + \"SSL\") + cat <<-EOF + # SSL + USE_OPENSSL= yes + CFLAGS+= -DUSE_SSL + WITH_SSL= yes + CONFIGURE_ENV+= LDFLAGS="-L\${OPENSSLLIB} -lssl -lcrypto" + + EOF + ;; + \"KRB5\") + KRB5=1 + ;; + \"nothing\"|true) + ;; + *) + echo "Invalid option(s): $*" > /dev/stderr + rm -f ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + exit 1 + ;; + esac + shift +done + +exec > /dev/stderr + +# if multibyte, determine charset +echo "# Multibyte" + +if [ ! "${MULTIBYTE}" ]; then + echo "WITHOUT_MULTIBYTE=YES" >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc +else + if [ "${BATCH}" ]; then + set \"nothing\" + else + /usr/bin/dialog --title "configuration options" --clear \ + --radiolist "\n\ +Please select desired options:" -1 -1 16 \ +nothing "Default Encoding" ON \ +SQL_ASCII "SQL_ASCII" OFF \ +LATIN1 "LATIN1" OFF \ +LATIN2 "LATIN2" OFF \ +LATIN3 "LATIN3" OFF \ +LATIN4 "LATIN4" OFF \ +LATIN5 "LATIN5" OFF \ +EUC_JP "EUC_JP" OFF \ +EUC_CN "EUC_CN" OFF \ +EUC_KR "EUC_KR" OFF \ +EUC_TW "EUC_TW" OFF \ +KOI8 "KOI8" OFF \ +UNICODE "UNICODE" OFF \ +MULE_INTERNAL "MULE_INTERNAL" OFF \ +WIN "WIN" OFF \ +ALT "ALT" OFF \ +2> /tmp/checklist.tmp.$$ + + retval=$? + + if [ -s /tmp/checklist.tmp.$$ ]; then + set `cat /tmp/checklist.tmp.$$` + fi + rm -f /tmp/checklist.tmp.$$ + if [ $retval = 1 ]; then + echo "Cancel pressed." + rm ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + exit 1 + fi + fi + + if [ "$1" = "nothing" ]; then + echo "CONFIGURE_ARGS+= --enable-multibyte" \ + >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + else + echo "CONFIGURE_ARGS+= --enable-multibyte=$1" \ + >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + fi +fi +echo + +if [ "${TCL}" ]; then + echo "# TCL" >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + if [ "${BATCH}" ]; then + echo WITH_TCL=8.3 >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + else + dialog --title "TCL version" \ + --inputbox "Please enter TCL version. Default is 8.3." -1 -1 "8.3" \ + 2> /tmp/checklist.tmp.$$ + retval=$? + if [ -s /tmp/checklist.tmp.$$ ]; then + set `cat /tmp/checklist.tmp.$$` + fi + rm -f /tmp/checklist.tmp.$$ + case $retval in + 0) if [ -z "$*" ]; then + echo "Nothing selected" + fi + ;; + 1) echo "Cancel pressed." + rm -f ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + exit 1 + ;; + esac + echo WITH_TCL=\"$1\" >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + fi + cat <<-EOF >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + CONFIGURE_ARGS+= --with-tcl --with-tclconfig="\${TCLCONFIG}" + TCLV=\${WITH_TCL:S/.//} + TCL_INCDIR= \${LOCALBASE}/include/tcl\${WITH_TCL} + MAKE_ENV= TCL_INCDIR=\${TCL_INCDIR} + LIB_DEPENDS= tcl\${TCLV}.1:\${PORTSDIR}/lang/tcl\${TCLV} + TCLCONFIG= '\${LOCALBASE}/lib/tcl\${WITH_TCL}' + .if defined(WITH_TK) + TK_INCDIR= \${LOCALBASE}/include/tk\${WITH_TCL} + CONFIGURE_ENV+= WISH=\${LOCALBASE}/bin/wish\${WITH_TCL} + LIB_DEPENDS+= tk\${TCLV}.1:\${PORTSDIR}/x11-toolkits/tk\${TCLV} + TCLCONFIG+= '\${LOCALBASE}/lib/tk\${WITH_TCL}' + TCL_PLIST= pkg-plist.tcl + .else + TCL_PLIST= pkg-plist.notk + CONFIGURE_ARGS+= --without-tk + .endif + + EOF +fi + +if [ "${KRB5}" ]; then + if [ "${BATCH}" ]; then + # never gets here, but what the heck... + echo KRB5_HOME=\${LOCALBASE} >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + else + dialog --inputbox "Please enter the KRB5_HOME path" -1 -1 "${KRB_HOME:-${LOCALBASE}}" \ + 2> /tmp/checklist.tmp.$$ + retval=$? + if [ -s /tmp/checklist.tmp.$$ ]; then + set `cat /tmp/checklist.tmp.$$` + fi + rm -f /tmp/checklist.tmp.$$ + case $retval in + 0) if [ -z "$*" ]; then + echo "No input" + fi + ;; + 1) echo "Cancel pressed." + rm -f ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + exit 1 + ;; + esac + echo KRB5_HOME=\"$1\" >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + fi + cat <<-EOF >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + .if defined(KRB5_HOME) && exists(\${KRB5_HOME}) + CONFIGURE_KRB= --with-krb5=\${KRB5_HOME} \ + --with-krb-keytab=FILE:\${PREFIX}/pgsql/etc/keytab + .endif + + EOF +fi diff --git a/databases/postgresql82-server/Makefile b/databases/postgresql82-server/Makefile index 5f64023c8cf5..08e0329a0795 100644 --- a/databases/postgresql82-server/Makefile +++ b/databases/postgresql82-server/Makefile @@ -6,7 +6,7 @@ # PORTNAME= postgresql -PORTVERSION= 7.0.2 +PORTVERSION= 7.0.3 CATEGORIES= databases MASTER_SITES= ftp://ftp.postgresql.org/pub/%SUBDIR%/ \ ftp://ftp.de.postgresql.org/%SUBDIR%/ \ @@ -22,59 +22,12 @@ DIST_SUBDIR= postgresql MAINTAINER= girgen@partitur.se +BUILD_DEPENDS= autoconf:${PORTSDIR}/devel/autoconf + Y2K= http://www.postgresql.org/y2k.html INSTALLS_SHLIB= YES LDCONFIG_DIRS= %%PREFIX%%/pgsql/lib -BUILD_DEPENDS= autoconf:${PORTSDIR}/devel/autoconf - -.if defined(KRB5_HOME) && exists(${KRB5_HOME}) -CONFIGURE_KRB= --with-krb5=${KRB5_HOME} \ - --with-krb-keytab=FILE:${PREFIX}/pgsql/etc/keytab -.endif - -# if you want to use the tcl/tk frontend pgaccess, then you need to build -# postgresql with tcl support by typing: make -DWITH_TCL -.if defined(WITH_TCL) -TCL_INCDIR= ${LOCALBASE}/include/tcl8.3 -TK_INCDIR= ${LOCALBASE}/include/tk8.3 -MAKE_ENV= TCL_INCDIR=${TCL_INCDIR} -CONFIGURE_ENV= WISH=${LOCALBASE}/bin/wish8.3 -LIB_DEPENDS= tcl83.1:${PORTSDIR}/lang/tcl83 \ - tk83.1:${PORTSDIR}/x11-toolkits/tk83 -CONFIGURE_TCL= --with-tcl --with-tclconfig="${LOCALBASE}/lib/tcl8.3 ${LOCALBASE}/lib/tk8.3" -.endif - -# if you want to disable the multibyte support, type: -# make -DWITHOUT_MULTIBYTE -# -# if you want to set the default encoding for the multibyte support, type: -# make DEFAULT_ENCODING=<encoding> -# where <encoding> is one of these: -# SQL_ASCII LATIN1 LATIN2 LATIN3 LATIN4 LATIN5 -# EUC_JP EUC_CN EUC_KR EUC_TW KOI8 -# UNICODE MULE_INTERNAL WIN ALT -.if defined(WITHOUT_MULTIBYTE) -CONFIGURE_MULTIBYTE= # none -.elif defined(DEFAULT_ENCODING) -CONFIGURE_MULTIBYTE= --enable-multibyte="${DEFAULT_ENCODING}" -.else -CONFIGURE_MULTIBYTE= --enable-multibyte -.endif -.if defined(WITH_PERL) -CONFIGURE_PERL= --with-perl -.endif -.if defined(WITH_ODBC) -CONFIGURE_ODBC= --with-odbc -.endif - -# if you want jdbc, type make -DWITH_JDBC -# Honors JAVA_HOME if you have it set, and don't want the dependency. -.if defined(WITH_JDBC) -JAVA_HOME?= ${LOCALBASE}/jdk1.1.8 -BUILD_DEPENDS= ${JAVA_HOME}/bin/javac:${PORTSDIR}/java/jdk -SCRIPTS_ENV+= JAVA_HOME=${JAVA_HOME} -.endif WRKSRC= ${WRKDIR}/${DISTNAME}/src DOCDIR= ${WRKDIR}/${DISTNAME}/doc @@ -86,11 +39,6 @@ CONFIGURE_ARGS= --prefix=${PREFIX}/pgsql \ --enable-locale \ --with-template=`uname -s | ${TR} '[A-Z]' '[a-z]'` \ --with-includes="${PREFIX}/include ${TCL_INCDIR} ${TK_INCDIR}" \ - ${CONFIGURE_KRB} \ - ${CONFIGURE_TCL} \ - ${CONFIGURE_MULTIBYTE} \ - ${CONFIGURE_PERL} \ - ${CONFIGURE_ODBC} \ --with-libraries=${PREFIX}/lib MAN1= createdb.1 createlang.1 createuser.1 dropdb.1 droplang.1 \ @@ -117,50 +65,21 @@ MANL= abort.l alter_group.l alter_table.l alter_user.l \ MANPREFIX= ${PREFIX}/pgsql -pre-fetch: - @${ECHO_MSG} "To install and run postgresql you need to compile kernel with:" - @${ECHO_MSG} " options \"SYSVSHM, SYSVSEM, SYSVMSG\"" -.if !defined(WITH_TCL) - @${ECHO_MSG} "To build the \"PostgreSQL to Tcl interface library\", libpgtcl, type:" - @${ECHO_MSG} " make -DWITH_TCL" -.else - @${ECHO_MSG} "Building PostgreSQL with \"libpgtcl\"." -.endif -.if !defined(WITHOUT_MULTIBYTE) - @${ECHO_MSG} "To disable multibyte support, type:" - @${ECHO_MSG} " make -DWITHOUT_MULTIBYTE" -.if !defined(DEFAULT_ENCODING) - @${ECHO_MSG} "To set the default encoding for the multibyte support, type:" - @${ECHO_MSG} " make DEFAULT_ENCODING=<encoding>" - @${ECHO_MSG} "where <encoding> is one of these:" - @${ECHO_MSG} " SQL_ASCII LATIN1 LATIN2 LATIN3 LATIN4 LATIN5" - @${ECHO_MSG} " EUC_JP EUC_CN EUC_KR EUC_TW KOI8" - @${ECHO_MSG} " UNICODE MULE_INTERNAL WIN ALT" -.else - @${ECHO_MSG} "The default encoding is '${DEFAULT_ENCODING}'." -.endif -.else - @${ECHO_MSG} "Building PostgreSQL without multibyte support." -.endif -.if !defined(WITH_JDBC) - @${ECHO_MSG} "To build Java (JDBC) support, type:" - @${ECHO_MSG} " make -DWITH_JDBC" -.else - @${ECHO_MSG} "Building PostgreSQL with \"postgresql.jar\"." -.endif -.if !defined(WITH_PERL) - @${ECHO_MSG} "To build Perl interface and pl/Perl interpreter:" - @${ECHO_MSG} " make -DWITH_PERL" -.else - @${ECHO_MSG} "Building PostgreSQL with \"pl/Perl\"." -.endif -.if !defined(WITH_ODBC) - @${ECHO_MSG} "To build the ODBC driver package:" - @${ECHO_MSG} " make -DWITH_ODBC" -.else - @${ECHO_MSG} "Building PostgreSQL with ODBC Drivers." +SCRIPTS_ENV= WRKDIRPREFIX="${WRKDIRPREFIX}" \ + WRKDIR="${WRKDIR}" \ + FILESDIR="${FILESDIR}" \ + TOUCH="${TOUCH}" \ + MKDIR="${MKDIR}" \ + NO_OPENSSL="${NO_OPENSSL}" \ + DISTNAME="${DISTNAME}" + +.if exists(${WRKDIRPREFIX}${.CURDIR}/Makefile.inc) +.include "${WRKDIRPREFIX}${.CURDIR}/Makefile.inc" .endif +pre-extract: + @ ${SETENV} ${SCRIPTS_ENV} ${SH} ${SCRIPTDIR}/configure.postgresql + post-patch: @ ${MV} ${WRKSRC}/template/freebsd ${WRKSRC}/template/freebsd.orig @ ${SED} -e 's#CFLAGS:-O2 -m486 -pipe#CFLAGS:${CFLAGS}#' \ @@ -180,16 +99,8 @@ pre-configure: post-build: .if defined(WITH_JDBC) - @ cd ${WRKSRC}/interfaces/jdbc && ${GMAKE} -.if !defined(NOPORTDOCS) - @ cd ${WRKSRC}/interfaces/jdbc && ${GMAKE} examples -.endif + @ ${GMAKE} -C ${WRKSRC}/interfaces/jdbc jdbc${JAVAVERSION} .endif - @ ${ECHO} "------------------------------------------------------------" - @ ${ECHO} "Dump existing databases, before installing new db version !!" - @ ${ECHO} "Detailed instructions, see" - @ ${ECHO} "${WRKDIR}/${DISTNAME}/INSTALL" - @ ${ECHO} "------------------------------------------------------------" pre-install: .if defined(PACKAGE_BUILDING) @@ -197,53 +108,54 @@ pre-install: .endif @ ${MKDIR} ${PREFIX}/pgsql @ ${SETENV} ${MAKE_ENV} perl ${SCRIPTDIR}/createuser +.if !defined(BATCH) + @ ${SED} -e "s#%%WRKDIR%%#${WRKDIR}#; s#%%DISTNAME%%#${DISTNAME}#" \ + < ${FILESDIR}/pre-install-notes | more -e +.endif post-install: .if defined(NOPORTDOCS) - @ ( cd ${DOCDIR}; ${GMAKE} man ) + @ ${GMAKE} -C ${DOCDIR} man .else - @ ( cd ${DOCDIR}; ${GMAKE} install ) + @ ${GMAKE} -C ${DOCDIR} install + ${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/FAQ* ${PREFIX}/share/doc/pgsql + ${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/README* ${PREFIX}/share/doc/pgsql + ${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/TODO ${PREFIX}/share/doc/pgsql +# ${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/*ps.gz ${PREFIX}/share/doc/pgsql + @ ${CAT} ${PKGDIR}/pkg-plist.doc >> ${TMPPLIST} .endif @ if [ ! -f ${PREFIX}/pgsql/.profile ]; then \ - ${ECHO} "PATH=${PATH}:${PREFIX}/pgsql/bin" \ + ${SED} 's|%%PREFIX%%|${PREFIX}|g' \ + < ${FILESDIR}/dot.profile.in \ > ${PREFIX}/pgsql/.profile; \ - ${ECHO} "MANPATH=${MANPATH}:${PREFIX}/pgsql/man" \ - >> ${PREFIX}/pgsql/.profile; \ - ${ECHO} "PGLIB=${PREFIX}/pgsql/lib" \ - >> ${PREFIX}/pgsql/.profile; \ - ${ECHO} "# note: PGDATA overwrites the -D startup option" \ - >> ${PREFIX}/pgsql/.profile; \ - ${ECHO} "PGDATA=${PREFIX}/pgsql/data" \ - >> ${PREFIX}/pgsql/.profile; \ - ${ECHO} "DISPLAY=:0" \ - >> ${PREFIX}/pgsql/.profile; \ - ${ECHO} "export PATH MANPATH PGLIB PGDATA DISPLAY" \ - >> ${PREFIX}/pgsql/.profile; \ - ${ECHO} "# if you want to make regression tests use this TZ" \ - >> ${PREFIX}/pgsql/.profile; \ - ${ECHO} "#TZ=PST8PDT" \ - >> ${PREFIX}/pgsql/.profile; \ - ${ECHO} "#export TZ" \ - >> ${PREFIX}/pgsql/.profile; \ fi @ ${CHOWN} -R pgsql:pgsql ${PREFIX}/pgsql @ ${CHOWN} root:pgsql ${PREFIX}/pgsql/lib @ ${ECHO} 'Initializing PostgreSQL Databases - this may take a few minutes...' @ ${SETENV} OBJFORMAT=${PORTOBJFORMAT} ${LDCONFIG} -m ${PREFIX}/pgsql/lib - @ su -l pgsql -c 'PATH=${PREFIX}/pgsql/bin:${PATH} LD_LIBRARY_PATH=${PREFIX}/pgsql/lib ${PREFIX}/pgsql/bin/initdb --pglib=${PREFIX}/pgsql/lib --pgdata=${PREFIX}/pgsql/data' +# '-' so we don't fail to create packagelist at this stage, +# when we already have everything installed on top of previous version + -@ su -l pgsql -c 'PATH=${PREFIX}/pgsql/bin:${PATH} ${PREFIX}/pgsql/bin/initdb --pglib=${PREFIX}/pgsql/lib --pgdata=${PREFIX}/pgsql/data' @ ${SED} -e "s=!!PREFIX!!=${PREFIX}=g" < ${FILESDIR}/pgsql.sh.tmpl \ > ${PREFIX}/etc/rc.d/pgsql.sh @ ${CHMOD} 554 ${PREFIX}/etc/rc.d/pgsql.sh @ ${CHOWN} root.pgsql ${PREFIX}/etc/rc.d/pgsql.sh - @ ${INSTALL_DATA} ${FILESDIR}/post-install-notes ${PREFIX}/pgsql + @ ${SED} -e 's#%%PREFIX%%#${PREFIX}#' < ${FILESDIR}/post-install-notes \ + > ${PREFIX}/pgsql/post-install-notes .if defined(WITHOUT_MULTIBYTE) @${CP} ${TMPPLIST} ${TMPPLIST}.nomulti @${GREP} -v pgsql/bin/pg_encoding ${TMPPLIST}.nomulti > ${TMPPLIST} .endif .if defined(WITH_TCL) @${CP} ${TMPPLIST} ${TMPPLIST}.notcl - @${CAT} ${PKGDIR}/pkg-plist.tcl ${TMPPLIST}.notcl > ${TMPPLIST} + @${CAT} ${PKGDIR}/${TCL_PLIST} ${TMPPLIST}.notcl > ${TMPPLIST} @${RM} ${TMPPLIST}.notcl +# Preparing a loadable TCL-package (pkgIndex.tcl) +# XXX This directory and the single file are not registered in +# XXX the PLIST, because of different PREFIX. + @${MKDIR} ${LOCALBASE}/lib/tcl${WITH_TCL}/Pgtcl1.3 + @${SED} 's|%%PREFIX%%|${PREFIX}|' < ${FILESDIR}/pkgIndex.tcl.in \ + > ${LOCALBASE}/lib/tcl${WITH_TCL}/Pgtcl1.3/pkgIndex.tcl .endif .if defined(WITH_ODBC) @${CP} ${TMPPLIST} ${TMPPLIST}.noodbc @@ -272,19 +184,10 @@ post-install: @ ${ECHO_MSG} "---------------------------------------------------------" @ ${ECHO_MSG} "Putting jdbc examples into ${PREFIX}/share/examples/pgsql" @ ${ECHO_MSG} "---------------------------------------------------------" - @ ${CAT} ${PKGDIR}/pkg-plist.doc >> ${TMPPLIST} -.endif .endif -.if !defined(NOPORTDOCS) - ${MKDIR} ${PREFIX}/share/doc/pgsql - @ ${GMAKE} -C ${WRKDIR}/${DISTNAME}/doc install - ${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/FAQ* ${PREFIX}/share/doc/pgsql - ${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/README* ${PREFIX}/share/doc/pgsql - ${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/TODO ${PREFIX}/share/doc/pgsql -# ${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/*ps.gz ${PREFIX}/share/doc/pgsql .endif .if !defined(BATCH) - @ more -e ${FILESDIR}/post-install-notes + @ more -e ${PREFIX}/pgsql/post-install-notes .endif .if !defined(DEBUG_FLAGS) .for file in ecpg pg_dump pg_id pg_passwd pg_version postgres psql @@ -292,4 +195,7 @@ post-install: .endfor .endif +post-clean: + @ ${RM} -f ${WRKDIRPREFIX}${.CURDIR}/Makefile.inc + .include <bsd.port.mk> diff --git a/databases/postgresql82-server/distinfo b/databases/postgresql82-server/distinfo index 309ea1e11614..fc87b8117bdc 100644 --- a/databases/postgresql82-server/distinfo +++ b/databases/postgresql82-server/distinfo @@ -1,4 +1,3 @@ -MD5 (postgresql/postgresql-7.0.2.base.tar.gz) = 871d23b85d9a3599a7ed75dfc7da7ba7 -MD5 (postgresql/postgresql-7.0.2.support.tar.gz) = c21180a6485d85785c8e69f0cbff05dd -MD5 (postgresql/postgresql-7.0.2.docs.tar.gz) = efac1f87463f252e54d72b256885b883 -MD5 (postgresql/postgresql-7.0.2.test.tar.gz) = 3443b3d83194c396f20aee2adc6f93bf +MD5 (postgresql/postgresql-7.0.3.base.tar.gz) = 0eeda8217b5b11e5a9351fc424808426 +MD5 (postgresql/postgresql-7.0.3.support.tar.gz) = b930f71068d776ef45402fcbebfa58cf +MD5 (postgresql/postgresql-7.0.3.docs.tar.gz) = 3d3fc76073f6d77febefc83f887fc87d diff --git a/databases/postgresql82-server/files/dot.profile.in b/databases/postgresql82-server/files/dot.profile.in new file mode 100644 index 000000000000..bd7ec45043be --- /dev/null +++ b/databases/postgresql82-server/files/dot.profile.in @@ -0,0 +1,16 @@ +PATH=${PATH}:%%PREFIX%%/pgsql/bin +PGLIB=%%PREFIX%%/pgsql/lib + +# note: PGDATA overwrites the -D startup option +PGDATA=%%PREFIX%%/pgsql/data + +export PATH MANPATH PGLIB PGDATA + +#You might want to set some locale stuff here +#PGDATESTYLE=ISO +#LC_ALL=sv_SE.ISO_88591-1 +#export PGDATESTYLE LC_ALL + +# if you want to make regression tests use this TZ +#TZ=PST8PDT +#export TZ diff --git a/databases/postgresql82-server/files/patch-au b/databases/postgresql82-server/files/patch-au new file mode 100644 index 000000000000..340521b49482 --- /dev/null +++ b/databases/postgresql82-server/files/patch-au @@ -0,0 +1,58 @@ +--- configure.in.orig Sun Nov 5 05:03:47 2000 ++++ configure.in Mon Dec 4 02:36:15 2000 +@@ -299,13 +299,28 @@ + [ --with-tcl build Tcl interfaces and pgtclsh ], + [ + case "$withval" in +- y | ye | yes) USE_TCL=true; USE_TK=true; AC_MSG_RESULT(enabled) ;; ++ y | ye | yes) USE_TCL=true; AC_MSG_RESULT(enabled) ;; + *) USE_TCL=; USE_TK=; AC_MSG_RESULT(disabled) ;; + esac + ], + [ USE_TCL=; USE_TK=; AC_MSG_RESULT(disabled) ] + ) + ++dnl We include tk support with tcl unless user says --without-tk ++if test USE_TCL = true ++then ++AC_MSG_CHECKING(setting USE_TK) ++AC_ARG_WITH( ++ tk, ++ [ --without-tk build Tcl *without* Tk ], ++ [ ++ case "$withval" in ++ y | ye | yes) USE_TK=true; USE_TK=true; AC_MSG_RESULT(enabled) ;; ++ *) USE_TK=n; AC_MSG_RESULT(disabled) ;; ++ esac ++ ] ++) ++fi + export USE_TCL + export USE_TK + +@@ -482,7 +497,7 @@ + #endif + ], + ELF_SYS=true, +-[if test "X$elf" = "Xyes" ++[if test "X$PORTOBJFORMAT" = "Xyes" + then + ELF_SYS=true + else +@@ -1248,10 +1263,15 @@ + else + AC_MSG_RESULT($TCL_CONFIG_SH) + AC_SUBST(TCL_CONFIG_SH) ++ . ${TCL_CONFIG_SH} ++ AC_SUBST(TCL_LIB_SPEC) + fi + fi + +-USE_TK=$USE_TCL # If TCL is disabled, disable TK ++USE_TK=${USE_TK:=$USE_TCL} # If TCL is disabled, disable TK ++ # otherwise -- enable unless explicitly ++ # disabled ++ + + dnl Check for Tk configuration script tkConfig.sh + if test "$USE_TK" = true diff --git a/databases/postgresql82-server/files/patch-av b/databases/postgresql82-server/files/patch-av new file mode 100644 index 000000000000..49b35f9e8dc1 --- /dev/null +++ b/databases/postgresql82-server/files/patch-av @@ -0,0 +1,17 @@ +--- interfaces/libpq/fe-connect.c Sun May 21 17:19:53 2000 ++++ interfaces/libpq/fe-connect.c Fri Sep 15 13:53:52 2000 +@@ -801 +801 @@ +- sprintf(conn->errorMessage, ++ printfPQExpBuffer(&conn->errorMessage, +@@ -809 +809 @@ +- sprintf(conn->errorMessage, "PQconnectDB() -- couldn't read postmaster response: errno=%d\n%s\n", ++ printfPQExpBuffer(&conn->errorMessage, "PQconnectDB() -- couldn't read postmaster response: errno=%d\n%s\n", +@@ -822 +822 @@ +- sprintf(conn->errorMessage, ++ printfPQExpBuffer(&conn->errorMessage, +@@ -832 +832 @@ +- sprintf(conn->errorMessage, ++ printfPQExpBuffer(&conn->errorMessage, +@@ -850 +850 @@ +- strcpy(conn->errorMessage, ++ printfPQExpBuffer(&conn->errorMessage, diff --git a/databases/postgresql82-server/files/patch-ba b/databases/postgresql82-server/files/patch-ba index a3b679b882c5..586d725c536a 100644 --- a/databases/postgresql82-server/files/patch-ba +++ b/databases/postgresql82-server/files/patch-ba @@ -1,5 +1,5 @@ ---- interfaces/jdbc/Makefile.orig Tue Mar 14 16:55:17 2000 -+++ interfaces/jdbc/Makefile Sun Apr 16 21:16:43 2000 +--- interfaces/jdbc/Makefile.orig Sun Nov 5 05:03:53 2000 ++++ interfaces/jdbc/Makefile Fri Dec 8 03:16:17 2000 @@ -10,10 +10,10 @@ FIND = find @@ -15,11 +15,3 @@ RM = rm -f TOUCH = touch -@@ -40,6 +40,7 @@ - @echo To compile, type: - @echo " $(MAKE) jdbc2" - @echo ------------------------------------------------------------ -+ $(MAKE) jdbc1 - - msg: - @echo ------------------------------------------------------------ diff --git a/databases/postgresql82-server/files/patch-be b/databases/postgresql82-server/files/patch-be new file mode 100644 index 000000000000..2f8c3c55566f --- /dev/null +++ b/databases/postgresql82-server/files/patch-be @@ -0,0 +1,9 @@ +This patches let you disable Tk even if you have it installed and +makes sure the TCL-library is added as a dependency for libpgtcl. +--- interfaces/libpgtcl/Makefile.in Tue Mar 7 20:58:36 2000 ++++ interfaces/libpgtcl/Makefile.in Wed Sep 20 08:57:28 2000 +@@ -29,3 +29,3 @@ + +-SHLIB_LINK+= $(LIBPQ) ++SHLIB_LINK+= $(LIBPQ) @TCL_LIB_SPEC@ + diff --git a/databases/postgresql82-server/files/pgsql.sh.tmpl b/databases/postgresql82-server/files/pgsql.sh.tmpl index e1673b4850c2..753e0b8aaf80 100644 --- a/databases/postgresql82-server/files/pgsql.sh.tmpl +++ b/databases/postgresql82-server/files/pgsql.sh.tmpl @@ -17,13 +17,13 @@ start) stop) [ -x !!PREFIX!!/pgsql/bin/pg_ctl ] && { - su -l pgsql -c 'exec !!PREFIX!!/pgsql/bin/pg_ctl -w -m fast stop' + exec su -l pgsql -c 'exec !!PREFIX!!/pgsql/bin/pg_ctl -w -m fast stop' } ;; status) [ -x !!PREFIX!!/pgsql/bin/pg_ctl ] && { - su -l pgsql -c 'exec !!PREFIX!!/pgsql/bin/pg_ctl status' + exec su -l pgsql -c 'exec !!PREFIX!!/pgsql/bin/pg_ctl status' } ;; diff --git a/databases/postgresql82-server/files/pkgIndex.tcl.in b/databases/postgresql82-server/files/pkgIndex.tcl.in new file mode 100644 index 000000000000..bd8329b15c69 --- /dev/null +++ b/databases/postgresql82-server/files/pkgIndex.tcl.in @@ -0,0 +1,4 @@ +# Package-index file for Pgtcl-package. Enables you to load PostgreSQL +# interface functions right into you TCL-interpreter as simply as +# package require Pgtcl +package ifneeded Pgtcl 1.3 "load %%PREFIX%%/lib/libpgtcl.so" diff --git a/databases/postgresql82-server/files/post-install-notes b/databases/postgresql82-server/files/post-install-notes index 289a7651109a..4c69908b2676 100644 --- a/databases/postgresql82-server/files/post-install-notes +++ b/databases/postgresql82-server/files/post-install-notes @@ -8,9 +8,12 @@ You may wish to subscribe to the PostgreSQL user-support mailing list. Send an e-mail to pgsql-questions-request@postgresql.org with the text "subscribe" in the message body. -If you built PostgreSQL with TCL support, you can install the port -"pgaccess" to get a TCL/TK based database frontend for database -operations. +If you built PostgreSQL with TCL/TK support, you can use the pgaccess +utility to get a TCL/TK based database frontend for database +operations. You do NOT need to install the pgaccess port separately. + +If you built in the TCL support, you can load the Pg package into your +TCL scripts as easily as ``package require Pgtcl''. To start PostgreSQL, run the startup script: -$PREFIX/etc/rc.d/pgsql.sh start +%%PREFIX%%/etc/rc.d/pgsql.sh start diff --git a/databases/postgresql82-server/files/pre-install-notes b/databases/postgresql82-server/files/pre-install-notes new file mode 100644 index 000000000000..72388933bd6d --- /dev/null +++ b/databases/postgresql82-server/files/pre-install-notes @@ -0,0 +1,9 @@ +# ---------------------------------------------------------------- +# UPGRADE NOTE! Depending on which version you are upgrading from, +# you may have to dump/restore existing databases +# as part of the update. +# This is *NOT* done by this port! +# For detailed instructions, see +# %%WRKDIR%%/%%DISTNAME%%/INSTALL +# after extraction. +# -------------------------------------------------------------- diff --git a/databases/postgresql82-server/pkg-plist.jdbc b/databases/postgresql82-server/pkg-plist.jdbc index bef5d75506b4..e751caa65063 100644 --- a/databases/postgresql82-server/pkg-plist.jdbc +++ b/databases/postgresql82-server/pkg-plist.jdbc @@ -10,4 +10,5 @@ share/examples/pgsql/jdbc/README_6.3 @dirrm share/examples/pgsql/jdbc @dirrm share/examples/pgsql share/java/classes/postgresql.jar +@unexec rmdir %D/share/java/classes 2>/dev/null || true @unexec rmdir %D/share/java 2>/dev/null || true diff --git a/databases/postgresql82-server/pkg-plist.notk b/databases/postgresql82-server/pkg-plist.notk new file mode 100644 index 000000000000..9f5d9e04af48 --- /dev/null +++ b/databases/postgresql82-server/pkg-plist.notk @@ -0,0 +1,6 @@ +pgsql/bin/pgtclsh +pgsql/include/libpgtcl.h +pgsql/lib/libpgtcl.a +pgsql/lib/libpgtcl.so +pgsql/lib/libpgtcl.so.2 +pgsql/lib/pltcl.so diff --git a/databases/postgresql82-server/scripts/configure.postgresql b/databases/postgresql82-server/scripts/configure.postgresql new file mode 100644 index 000000000000..5efe32a766f4 --- /dev/null +++ b/databases/postgresql82-server/scripts/configure.postgresql @@ -0,0 +1,267 @@ +#!/bin/sh +# -*- tab-width: 4; -*- +# ex:ts=4 +# +# $FreeBSD$ +# +if [ -f ${WRKDIRPREFIX}${CURDIR}/Makefile.inc ]; then + exit +fi + +if [ ! "${BATCH}" ]; then + dialog --title "Backup your data NOW" \ + --msgbox "`sed -e \"s#%%WRKDIR%%#${WRKDIR}#; s#%%DISTNAME%%#${DISTNAME}#\" < ${FILESDIR}/pre-install-notes`" \ + -1 -1 +fi + +#SSL=${NO_OPENSSL:+OFF} +#SSL=${NOSSL:-ON} + +if [ "${BATCH}" ]; then + set \"MultiByte\" +else + /usr/bin/dialog --title "configuration options" --clear \ + --checklist "\n\ +Please select desired options:" -1 -1 8 \ +JDBC "Java DataBase Connectivity" OFF \ +MultiByte "Multibyte for Multilingualism" ON \ +ODBC "Open Database Connectivity" OFF \ +Perl "Perl" OFF \ +TCL "Tcl" ON \ +TCLTK "Tcl/Tk" ON \ +SSL "Secure Socket Layer (requires certificate)" OFF \ +KRB5 "Kerberos 5" OFF \ +2> /tmp/checklist.tmp.$$ + + retval=$? + + if [ -s /tmp/checklist.tmp.$$ ]; then + set `cat /tmp/checklist.tmp.$$` + fi + rm -f /tmp/checklist.tmp.$$ + + case $retval in + 0) if [ -z "$*" ]; then + echo "Nothing selected" + fi + ;; + 1) echo "Cancel pressed." + exit 1 + ;; + esac +fi + +${MKDIR} -p ${WRKDIRPREFIX}${CURDIR} +exec > ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + +while [ "$1" ]; do + case $1 in + \"JDBC\") + # use JAVA_HOME if set correctly + echo "# JDBC" + if [ "${JAVA_HOME}" -a -x ${JAVA_HOME}/bin/javac ]; then + echo JAVA_HOME=${JAVA_HOME} + if [ "$(${JAVA_HOME}/bin/java -version 2>&1 | egrep \"1.1)" ]; then + JAVAVERSION=1 + echo BUILD_DEPENDS+= ${JAVA_HOME}/bin/javac:\${PORTSDIR}/java/jdk + else + JAVAVERSION=2 + echo BUILD_DEPENDS+= ${JAVA_HOME}/bin/javac:\${PORTSDIR}/java/jdk12-beta + fi + else + JAVAVERSION=1 + echo BUILD_DEPENDS+= \${LOCALBASE}/jdk1.1.8/bin/javac:\${PORTSDIR}/java/jdk + echo JAVA_HOME=\${LOCALBASE}/jdk1.1.8 + fi + cat <<-EOF + JAVAVERSION=${JAVAVERSION} + WITH_JDBC=YES + SCRIPTS_ENV+= JAVA_HOME=\${JAVA_HOME} + + EOF + ;; + \"MultiByte\") + MULTIBYTE=1 + ;; + \"ODBC\") + cat <<-EOF + # ODBC + WITH_ODBC=YES + CONFIGURE_ARGS+= --with-odbc + + EOF + ;; + \"Perl\") + cat <<-EOF + # PERL + WITH_PERL=YES + CONFIGURE_ARGS+= --with-perl + + EOF + ;; + \"TCL\") + TCL=1 + ;; + \"TCLTK\") + echo "#TCLTK" + echo WITH_TK=YES + echo + TCL=1 + ;; + \"SSL\") + cat <<-EOF + # SSL + USE_OPENSSL= yes + CFLAGS+= -DUSE_SSL + WITH_SSL= yes + CONFIGURE_ENV+= LDFLAGS="-L\${OPENSSLLIB} -lssl -lcrypto" + + EOF + ;; + \"KRB5\") + KRB5=1 + ;; + \"nothing\"|true) + ;; + *) + echo "Invalid option(s): $*" > /dev/stderr + rm -f ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + exit 1 + ;; + esac + shift +done + +exec > /dev/stderr + +# if multibyte, determine charset +echo "# Multibyte" + +if [ ! "${MULTIBYTE}" ]; then + echo "WITHOUT_MULTIBYTE=YES" >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc +else + if [ "${BATCH}" ]; then + set \"nothing\" + else + /usr/bin/dialog --title "configuration options" --clear \ + --radiolist "\n\ +Please select desired options:" -1 -1 16 \ +nothing "Default Encoding" ON \ +SQL_ASCII "SQL_ASCII" OFF \ +LATIN1 "LATIN1" OFF \ +LATIN2 "LATIN2" OFF \ +LATIN3 "LATIN3" OFF \ +LATIN4 "LATIN4" OFF \ +LATIN5 "LATIN5" OFF \ +EUC_JP "EUC_JP" OFF \ +EUC_CN "EUC_CN" OFF \ +EUC_KR "EUC_KR" OFF \ +EUC_TW "EUC_TW" OFF \ +KOI8 "KOI8" OFF \ +UNICODE "UNICODE" OFF \ +MULE_INTERNAL "MULE_INTERNAL" OFF \ +WIN "WIN" OFF \ +ALT "ALT" OFF \ +2> /tmp/checklist.tmp.$$ + + retval=$? + + if [ -s /tmp/checklist.tmp.$$ ]; then + set `cat /tmp/checklist.tmp.$$` + fi + rm -f /tmp/checklist.tmp.$$ + if [ $retval = 1 ]; then + echo "Cancel pressed." + rm ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + exit 1 + fi + fi + + if [ "$1" = "nothing" ]; then + echo "CONFIGURE_ARGS+= --enable-multibyte" \ + >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + else + echo "CONFIGURE_ARGS+= --enable-multibyte=$1" \ + >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + fi +fi +echo + +if [ "${TCL}" ]; then + echo "# TCL" >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + if [ "${BATCH}" ]; then + echo WITH_TCL=8.3 >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + else + dialog --title "TCL version" \ + --inputbox "Please enter TCL version. Default is 8.3." -1 -1 "8.3" \ + 2> /tmp/checklist.tmp.$$ + retval=$? + if [ -s /tmp/checklist.tmp.$$ ]; then + set `cat /tmp/checklist.tmp.$$` + fi + rm -f /tmp/checklist.tmp.$$ + case $retval in + 0) if [ -z "$*" ]; then + echo "Nothing selected" + fi + ;; + 1) echo "Cancel pressed." + rm -f ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + exit 1 + ;; + esac + echo WITH_TCL=\"$1\" >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + fi + cat <<-EOF >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + CONFIGURE_ARGS+= --with-tcl --with-tclconfig="\${TCLCONFIG}" + TCLV=\${WITH_TCL:S/.//} + TCL_INCDIR= \${LOCALBASE}/include/tcl\${WITH_TCL} + MAKE_ENV= TCL_INCDIR=\${TCL_INCDIR} + LIB_DEPENDS= tcl\${TCLV}.1:\${PORTSDIR}/lang/tcl\${TCLV} + TCLCONFIG= '\${LOCALBASE}/lib/tcl\${WITH_TCL}' + .if defined(WITH_TK) + TK_INCDIR= \${LOCALBASE}/include/tk\${WITH_TCL} + CONFIGURE_ENV+= WISH=\${LOCALBASE}/bin/wish\${WITH_TCL} + LIB_DEPENDS+= tk\${TCLV}.1:\${PORTSDIR}/x11-toolkits/tk\${TCLV} + TCLCONFIG+= '\${LOCALBASE}/lib/tk\${WITH_TCL}' + TCL_PLIST= pkg-plist.tcl + .else + TCL_PLIST= pkg-plist.notk + CONFIGURE_ARGS+= --without-tk + .endif + + EOF +fi + +if [ "${KRB5}" ]; then + if [ "${BATCH}" ]; then + # never gets here, but what the heck... + echo KRB5_HOME=\${LOCALBASE} >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + else + dialog --inputbox "Please enter the KRB5_HOME path" -1 -1 "${KRB_HOME:-${LOCALBASE}}" \ + 2> /tmp/checklist.tmp.$$ + retval=$? + if [ -s /tmp/checklist.tmp.$$ ]; then + set `cat /tmp/checklist.tmp.$$` + fi + rm -f /tmp/checklist.tmp.$$ + case $retval in + 0) if [ -z "$*" ]; then + echo "No input" + fi + ;; + 1) echo "Cancel pressed." + rm -f ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + exit 1 + ;; + esac + echo KRB5_HOME=\"$1\" >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + fi + cat <<-EOF >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + .if defined(KRB5_HOME) && exists(\${KRB5_HOME}) + CONFIGURE_KRB= --with-krb5=\${KRB5_HOME} \ + --with-krb-keytab=FILE:\${PREFIX}/pgsql/etc/keytab + .endif + + EOF +fi diff --git a/databases/postgresql83-server/Makefile b/databases/postgresql83-server/Makefile index 5f64023c8cf5..08e0329a0795 100644 --- a/databases/postgresql83-server/Makefile +++ b/databases/postgresql83-server/Makefile @@ -6,7 +6,7 @@ # PORTNAME= postgresql -PORTVERSION= 7.0.2 +PORTVERSION= 7.0.3 CATEGORIES= databases MASTER_SITES= ftp://ftp.postgresql.org/pub/%SUBDIR%/ \ ftp://ftp.de.postgresql.org/%SUBDIR%/ \ @@ -22,59 +22,12 @@ DIST_SUBDIR= postgresql MAINTAINER= girgen@partitur.se +BUILD_DEPENDS= autoconf:${PORTSDIR}/devel/autoconf + Y2K= http://www.postgresql.org/y2k.html INSTALLS_SHLIB= YES LDCONFIG_DIRS= %%PREFIX%%/pgsql/lib -BUILD_DEPENDS= autoconf:${PORTSDIR}/devel/autoconf - -.if defined(KRB5_HOME) && exists(${KRB5_HOME}) -CONFIGURE_KRB= --with-krb5=${KRB5_HOME} \ - --with-krb-keytab=FILE:${PREFIX}/pgsql/etc/keytab -.endif - -# if you want to use the tcl/tk frontend pgaccess, then you need to build -# postgresql with tcl support by typing: make -DWITH_TCL -.if defined(WITH_TCL) -TCL_INCDIR= ${LOCALBASE}/include/tcl8.3 -TK_INCDIR= ${LOCALBASE}/include/tk8.3 -MAKE_ENV= TCL_INCDIR=${TCL_INCDIR} -CONFIGURE_ENV= WISH=${LOCALBASE}/bin/wish8.3 -LIB_DEPENDS= tcl83.1:${PORTSDIR}/lang/tcl83 \ - tk83.1:${PORTSDIR}/x11-toolkits/tk83 -CONFIGURE_TCL= --with-tcl --with-tclconfig="${LOCALBASE}/lib/tcl8.3 ${LOCALBASE}/lib/tk8.3" -.endif - -# if you want to disable the multibyte support, type: -# make -DWITHOUT_MULTIBYTE -# -# if you want to set the default encoding for the multibyte support, type: -# make DEFAULT_ENCODING=<encoding> -# where <encoding> is one of these: -# SQL_ASCII LATIN1 LATIN2 LATIN3 LATIN4 LATIN5 -# EUC_JP EUC_CN EUC_KR EUC_TW KOI8 -# UNICODE MULE_INTERNAL WIN ALT -.if defined(WITHOUT_MULTIBYTE) -CONFIGURE_MULTIBYTE= # none -.elif defined(DEFAULT_ENCODING) -CONFIGURE_MULTIBYTE= --enable-multibyte="${DEFAULT_ENCODING}" -.else -CONFIGURE_MULTIBYTE= --enable-multibyte -.endif -.if defined(WITH_PERL) -CONFIGURE_PERL= --with-perl -.endif -.if defined(WITH_ODBC) -CONFIGURE_ODBC= --with-odbc -.endif - -# if you want jdbc, type make -DWITH_JDBC -# Honors JAVA_HOME if you have it set, and don't want the dependency. -.if defined(WITH_JDBC) -JAVA_HOME?= ${LOCALBASE}/jdk1.1.8 -BUILD_DEPENDS= ${JAVA_HOME}/bin/javac:${PORTSDIR}/java/jdk -SCRIPTS_ENV+= JAVA_HOME=${JAVA_HOME} -.endif WRKSRC= ${WRKDIR}/${DISTNAME}/src DOCDIR= ${WRKDIR}/${DISTNAME}/doc @@ -86,11 +39,6 @@ CONFIGURE_ARGS= --prefix=${PREFIX}/pgsql \ --enable-locale \ --with-template=`uname -s | ${TR} '[A-Z]' '[a-z]'` \ --with-includes="${PREFIX}/include ${TCL_INCDIR} ${TK_INCDIR}" \ - ${CONFIGURE_KRB} \ - ${CONFIGURE_TCL} \ - ${CONFIGURE_MULTIBYTE} \ - ${CONFIGURE_PERL} \ - ${CONFIGURE_ODBC} \ --with-libraries=${PREFIX}/lib MAN1= createdb.1 createlang.1 createuser.1 dropdb.1 droplang.1 \ @@ -117,50 +65,21 @@ MANL= abort.l alter_group.l alter_table.l alter_user.l \ MANPREFIX= ${PREFIX}/pgsql -pre-fetch: - @${ECHO_MSG} "To install and run postgresql you need to compile kernel with:" - @${ECHO_MSG} " options \"SYSVSHM, SYSVSEM, SYSVMSG\"" -.if !defined(WITH_TCL) - @${ECHO_MSG} "To build the \"PostgreSQL to Tcl interface library\", libpgtcl, type:" - @${ECHO_MSG} " make -DWITH_TCL" -.else - @${ECHO_MSG} "Building PostgreSQL with \"libpgtcl\"." -.endif -.if !defined(WITHOUT_MULTIBYTE) - @${ECHO_MSG} "To disable multibyte support, type:" - @${ECHO_MSG} " make -DWITHOUT_MULTIBYTE" -.if !defined(DEFAULT_ENCODING) - @${ECHO_MSG} "To set the default encoding for the multibyte support, type:" - @${ECHO_MSG} " make DEFAULT_ENCODING=<encoding>" - @${ECHO_MSG} "where <encoding> is one of these:" - @${ECHO_MSG} " SQL_ASCII LATIN1 LATIN2 LATIN3 LATIN4 LATIN5" - @${ECHO_MSG} " EUC_JP EUC_CN EUC_KR EUC_TW KOI8" - @${ECHO_MSG} " UNICODE MULE_INTERNAL WIN ALT" -.else - @${ECHO_MSG} "The default encoding is '${DEFAULT_ENCODING}'." -.endif -.else - @${ECHO_MSG} "Building PostgreSQL without multibyte support." -.endif -.if !defined(WITH_JDBC) - @${ECHO_MSG} "To build Java (JDBC) support, type:" - @${ECHO_MSG} " make -DWITH_JDBC" -.else - @${ECHO_MSG} "Building PostgreSQL with \"postgresql.jar\"." -.endif -.if !defined(WITH_PERL) - @${ECHO_MSG} "To build Perl interface and pl/Perl interpreter:" - @${ECHO_MSG} " make -DWITH_PERL" -.else - @${ECHO_MSG} "Building PostgreSQL with \"pl/Perl\"." -.endif -.if !defined(WITH_ODBC) - @${ECHO_MSG} "To build the ODBC driver package:" - @${ECHO_MSG} " make -DWITH_ODBC" -.else - @${ECHO_MSG} "Building PostgreSQL with ODBC Drivers." +SCRIPTS_ENV= WRKDIRPREFIX="${WRKDIRPREFIX}" \ + WRKDIR="${WRKDIR}" \ + FILESDIR="${FILESDIR}" \ + TOUCH="${TOUCH}" \ + MKDIR="${MKDIR}" \ + NO_OPENSSL="${NO_OPENSSL}" \ + DISTNAME="${DISTNAME}" + +.if exists(${WRKDIRPREFIX}${.CURDIR}/Makefile.inc) +.include "${WRKDIRPREFIX}${.CURDIR}/Makefile.inc" .endif +pre-extract: + @ ${SETENV} ${SCRIPTS_ENV} ${SH} ${SCRIPTDIR}/configure.postgresql + post-patch: @ ${MV} ${WRKSRC}/template/freebsd ${WRKSRC}/template/freebsd.orig @ ${SED} -e 's#CFLAGS:-O2 -m486 -pipe#CFLAGS:${CFLAGS}#' \ @@ -180,16 +99,8 @@ pre-configure: post-build: .if defined(WITH_JDBC) - @ cd ${WRKSRC}/interfaces/jdbc && ${GMAKE} -.if !defined(NOPORTDOCS) - @ cd ${WRKSRC}/interfaces/jdbc && ${GMAKE} examples -.endif + @ ${GMAKE} -C ${WRKSRC}/interfaces/jdbc jdbc${JAVAVERSION} .endif - @ ${ECHO} "------------------------------------------------------------" - @ ${ECHO} "Dump existing databases, before installing new db version !!" - @ ${ECHO} "Detailed instructions, see" - @ ${ECHO} "${WRKDIR}/${DISTNAME}/INSTALL" - @ ${ECHO} "------------------------------------------------------------" pre-install: .if defined(PACKAGE_BUILDING) @@ -197,53 +108,54 @@ pre-install: .endif @ ${MKDIR} ${PREFIX}/pgsql @ ${SETENV} ${MAKE_ENV} perl ${SCRIPTDIR}/createuser +.if !defined(BATCH) + @ ${SED} -e "s#%%WRKDIR%%#${WRKDIR}#; s#%%DISTNAME%%#${DISTNAME}#" \ + < ${FILESDIR}/pre-install-notes | more -e +.endif post-install: .if defined(NOPORTDOCS) - @ ( cd ${DOCDIR}; ${GMAKE} man ) + @ ${GMAKE} -C ${DOCDIR} man .else - @ ( cd ${DOCDIR}; ${GMAKE} install ) + @ ${GMAKE} -C ${DOCDIR} install + ${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/FAQ* ${PREFIX}/share/doc/pgsql + ${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/README* ${PREFIX}/share/doc/pgsql + ${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/TODO ${PREFIX}/share/doc/pgsql +# ${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/*ps.gz ${PREFIX}/share/doc/pgsql + @ ${CAT} ${PKGDIR}/pkg-plist.doc >> ${TMPPLIST} .endif @ if [ ! -f ${PREFIX}/pgsql/.profile ]; then \ - ${ECHO} "PATH=${PATH}:${PREFIX}/pgsql/bin" \ + ${SED} 's|%%PREFIX%%|${PREFIX}|g' \ + < ${FILESDIR}/dot.profile.in \ > ${PREFIX}/pgsql/.profile; \ - ${ECHO} "MANPATH=${MANPATH}:${PREFIX}/pgsql/man" \ - >> ${PREFIX}/pgsql/.profile; \ - ${ECHO} "PGLIB=${PREFIX}/pgsql/lib" \ - >> ${PREFIX}/pgsql/.profile; \ - ${ECHO} "# note: PGDATA overwrites the -D startup option" \ - >> ${PREFIX}/pgsql/.profile; \ - ${ECHO} "PGDATA=${PREFIX}/pgsql/data" \ - >> ${PREFIX}/pgsql/.profile; \ - ${ECHO} "DISPLAY=:0" \ - >> ${PREFIX}/pgsql/.profile; \ - ${ECHO} "export PATH MANPATH PGLIB PGDATA DISPLAY" \ - >> ${PREFIX}/pgsql/.profile; \ - ${ECHO} "# if you want to make regression tests use this TZ" \ - >> ${PREFIX}/pgsql/.profile; \ - ${ECHO} "#TZ=PST8PDT" \ - >> ${PREFIX}/pgsql/.profile; \ - ${ECHO} "#export TZ" \ - >> ${PREFIX}/pgsql/.profile; \ fi @ ${CHOWN} -R pgsql:pgsql ${PREFIX}/pgsql @ ${CHOWN} root:pgsql ${PREFIX}/pgsql/lib @ ${ECHO} 'Initializing PostgreSQL Databases - this may take a few minutes...' @ ${SETENV} OBJFORMAT=${PORTOBJFORMAT} ${LDCONFIG} -m ${PREFIX}/pgsql/lib - @ su -l pgsql -c 'PATH=${PREFIX}/pgsql/bin:${PATH} LD_LIBRARY_PATH=${PREFIX}/pgsql/lib ${PREFIX}/pgsql/bin/initdb --pglib=${PREFIX}/pgsql/lib --pgdata=${PREFIX}/pgsql/data' +# '-' so we don't fail to create packagelist at this stage, +# when we already have everything installed on top of previous version + -@ su -l pgsql -c 'PATH=${PREFIX}/pgsql/bin:${PATH} ${PREFIX}/pgsql/bin/initdb --pglib=${PREFIX}/pgsql/lib --pgdata=${PREFIX}/pgsql/data' @ ${SED} -e "s=!!PREFIX!!=${PREFIX}=g" < ${FILESDIR}/pgsql.sh.tmpl \ > ${PREFIX}/etc/rc.d/pgsql.sh @ ${CHMOD} 554 ${PREFIX}/etc/rc.d/pgsql.sh @ ${CHOWN} root.pgsql ${PREFIX}/etc/rc.d/pgsql.sh - @ ${INSTALL_DATA} ${FILESDIR}/post-install-notes ${PREFIX}/pgsql + @ ${SED} -e 's#%%PREFIX%%#${PREFIX}#' < ${FILESDIR}/post-install-notes \ + > ${PREFIX}/pgsql/post-install-notes .if defined(WITHOUT_MULTIBYTE) @${CP} ${TMPPLIST} ${TMPPLIST}.nomulti @${GREP} -v pgsql/bin/pg_encoding ${TMPPLIST}.nomulti > ${TMPPLIST} .endif .if defined(WITH_TCL) @${CP} ${TMPPLIST} ${TMPPLIST}.notcl - @${CAT} ${PKGDIR}/pkg-plist.tcl ${TMPPLIST}.notcl > ${TMPPLIST} + @${CAT} ${PKGDIR}/${TCL_PLIST} ${TMPPLIST}.notcl > ${TMPPLIST} @${RM} ${TMPPLIST}.notcl +# Preparing a loadable TCL-package (pkgIndex.tcl) +# XXX This directory and the single file are not registered in +# XXX the PLIST, because of different PREFIX. + @${MKDIR} ${LOCALBASE}/lib/tcl${WITH_TCL}/Pgtcl1.3 + @${SED} 's|%%PREFIX%%|${PREFIX}|' < ${FILESDIR}/pkgIndex.tcl.in \ + > ${LOCALBASE}/lib/tcl${WITH_TCL}/Pgtcl1.3/pkgIndex.tcl .endif .if defined(WITH_ODBC) @${CP} ${TMPPLIST} ${TMPPLIST}.noodbc @@ -272,19 +184,10 @@ post-install: @ ${ECHO_MSG} "---------------------------------------------------------" @ ${ECHO_MSG} "Putting jdbc examples into ${PREFIX}/share/examples/pgsql" @ ${ECHO_MSG} "---------------------------------------------------------" - @ ${CAT} ${PKGDIR}/pkg-plist.doc >> ${TMPPLIST} -.endif .endif -.if !defined(NOPORTDOCS) - ${MKDIR} ${PREFIX}/share/doc/pgsql - @ ${GMAKE} -C ${WRKDIR}/${DISTNAME}/doc install - ${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/FAQ* ${PREFIX}/share/doc/pgsql - ${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/README* ${PREFIX}/share/doc/pgsql - ${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/TODO ${PREFIX}/share/doc/pgsql -# ${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/*ps.gz ${PREFIX}/share/doc/pgsql .endif .if !defined(BATCH) - @ more -e ${FILESDIR}/post-install-notes + @ more -e ${PREFIX}/pgsql/post-install-notes .endif .if !defined(DEBUG_FLAGS) .for file in ecpg pg_dump pg_id pg_passwd pg_version postgres psql @@ -292,4 +195,7 @@ post-install: .endfor .endif +post-clean: + @ ${RM} -f ${WRKDIRPREFIX}${.CURDIR}/Makefile.inc + .include <bsd.port.mk> diff --git a/databases/postgresql83-server/distinfo b/databases/postgresql83-server/distinfo index 309ea1e11614..fc87b8117bdc 100644 --- a/databases/postgresql83-server/distinfo +++ b/databases/postgresql83-server/distinfo @@ -1,4 +1,3 @@ -MD5 (postgresql/postgresql-7.0.2.base.tar.gz) = 871d23b85d9a3599a7ed75dfc7da7ba7 -MD5 (postgresql/postgresql-7.0.2.support.tar.gz) = c21180a6485d85785c8e69f0cbff05dd -MD5 (postgresql/postgresql-7.0.2.docs.tar.gz) = efac1f87463f252e54d72b256885b883 -MD5 (postgresql/postgresql-7.0.2.test.tar.gz) = 3443b3d83194c396f20aee2adc6f93bf +MD5 (postgresql/postgresql-7.0.3.base.tar.gz) = 0eeda8217b5b11e5a9351fc424808426 +MD5 (postgresql/postgresql-7.0.3.support.tar.gz) = b930f71068d776ef45402fcbebfa58cf +MD5 (postgresql/postgresql-7.0.3.docs.tar.gz) = 3d3fc76073f6d77febefc83f887fc87d diff --git a/databases/postgresql83-server/files/dot.profile.in b/databases/postgresql83-server/files/dot.profile.in new file mode 100644 index 000000000000..bd7ec45043be --- /dev/null +++ b/databases/postgresql83-server/files/dot.profile.in @@ -0,0 +1,16 @@ +PATH=${PATH}:%%PREFIX%%/pgsql/bin +PGLIB=%%PREFIX%%/pgsql/lib + +# note: PGDATA overwrites the -D startup option +PGDATA=%%PREFIX%%/pgsql/data + +export PATH MANPATH PGLIB PGDATA + +#You might want to set some locale stuff here +#PGDATESTYLE=ISO +#LC_ALL=sv_SE.ISO_88591-1 +#export PGDATESTYLE LC_ALL + +# if you want to make regression tests use this TZ +#TZ=PST8PDT +#export TZ diff --git a/databases/postgresql83-server/files/patch-au b/databases/postgresql83-server/files/patch-au new file mode 100644 index 000000000000..340521b49482 --- /dev/null +++ b/databases/postgresql83-server/files/patch-au @@ -0,0 +1,58 @@ +--- configure.in.orig Sun Nov 5 05:03:47 2000 ++++ configure.in Mon Dec 4 02:36:15 2000 +@@ -299,13 +299,28 @@ + [ --with-tcl build Tcl interfaces and pgtclsh ], + [ + case "$withval" in +- y | ye | yes) USE_TCL=true; USE_TK=true; AC_MSG_RESULT(enabled) ;; ++ y | ye | yes) USE_TCL=true; AC_MSG_RESULT(enabled) ;; + *) USE_TCL=; USE_TK=; AC_MSG_RESULT(disabled) ;; + esac + ], + [ USE_TCL=; USE_TK=; AC_MSG_RESULT(disabled) ] + ) + ++dnl We include tk support with tcl unless user says --without-tk ++if test USE_TCL = true ++then ++AC_MSG_CHECKING(setting USE_TK) ++AC_ARG_WITH( ++ tk, ++ [ --without-tk build Tcl *without* Tk ], ++ [ ++ case "$withval" in ++ y | ye | yes) USE_TK=true; USE_TK=true; AC_MSG_RESULT(enabled) ;; ++ *) USE_TK=n; AC_MSG_RESULT(disabled) ;; ++ esac ++ ] ++) ++fi + export USE_TCL + export USE_TK + +@@ -482,7 +497,7 @@ + #endif + ], + ELF_SYS=true, +-[if test "X$elf" = "Xyes" ++[if test "X$PORTOBJFORMAT" = "Xyes" + then + ELF_SYS=true + else +@@ -1248,10 +1263,15 @@ + else + AC_MSG_RESULT($TCL_CONFIG_SH) + AC_SUBST(TCL_CONFIG_SH) ++ . ${TCL_CONFIG_SH} ++ AC_SUBST(TCL_LIB_SPEC) + fi + fi + +-USE_TK=$USE_TCL # If TCL is disabled, disable TK ++USE_TK=${USE_TK:=$USE_TCL} # If TCL is disabled, disable TK ++ # otherwise -- enable unless explicitly ++ # disabled ++ + + dnl Check for Tk configuration script tkConfig.sh + if test "$USE_TK" = true diff --git a/databases/postgresql83-server/files/patch-av b/databases/postgresql83-server/files/patch-av new file mode 100644 index 000000000000..49b35f9e8dc1 --- /dev/null +++ b/databases/postgresql83-server/files/patch-av @@ -0,0 +1,17 @@ +--- interfaces/libpq/fe-connect.c Sun May 21 17:19:53 2000 ++++ interfaces/libpq/fe-connect.c Fri Sep 15 13:53:52 2000 +@@ -801 +801 @@ +- sprintf(conn->errorMessage, ++ printfPQExpBuffer(&conn->errorMessage, +@@ -809 +809 @@ +- sprintf(conn->errorMessage, "PQconnectDB() -- couldn't read postmaster response: errno=%d\n%s\n", ++ printfPQExpBuffer(&conn->errorMessage, "PQconnectDB() -- couldn't read postmaster response: errno=%d\n%s\n", +@@ -822 +822 @@ +- sprintf(conn->errorMessage, ++ printfPQExpBuffer(&conn->errorMessage, +@@ -832 +832 @@ +- sprintf(conn->errorMessage, ++ printfPQExpBuffer(&conn->errorMessage, +@@ -850 +850 @@ +- strcpy(conn->errorMessage, ++ printfPQExpBuffer(&conn->errorMessage, diff --git a/databases/postgresql83-server/files/patch-ba b/databases/postgresql83-server/files/patch-ba index a3b679b882c5..586d725c536a 100644 --- a/databases/postgresql83-server/files/patch-ba +++ b/databases/postgresql83-server/files/patch-ba @@ -1,5 +1,5 @@ ---- interfaces/jdbc/Makefile.orig Tue Mar 14 16:55:17 2000 -+++ interfaces/jdbc/Makefile Sun Apr 16 21:16:43 2000 +--- interfaces/jdbc/Makefile.orig Sun Nov 5 05:03:53 2000 ++++ interfaces/jdbc/Makefile Fri Dec 8 03:16:17 2000 @@ -10,10 +10,10 @@ FIND = find @@ -15,11 +15,3 @@ RM = rm -f TOUCH = touch -@@ -40,6 +40,7 @@ - @echo To compile, type: - @echo " $(MAKE) jdbc2" - @echo ------------------------------------------------------------ -+ $(MAKE) jdbc1 - - msg: - @echo ------------------------------------------------------------ diff --git a/databases/postgresql83-server/files/patch-be b/databases/postgresql83-server/files/patch-be new file mode 100644 index 000000000000..2f8c3c55566f --- /dev/null +++ b/databases/postgresql83-server/files/patch-be @@ -0,0 +1,9 @@ +This patches let you disable Tk even if you have it installed and +makes sure the TCL-library is added as a dependency for libpgtcl. +--- interfaces/libpgtcl/Makefile.in Tue Mar 7 20:58:36 2000 ++++ interfaces/libpgtcl/Makefile.in Wed Sep 20 08:57:28 2000 +@@ -29,3 +29,3 @@ + +-SHLIB_LINK+= $(LIBPQ) ++SHLIB_LINK+= $(LIBPQ) @TCL_LIB_SPEC@ + diff --git a/databases/postgresql83-server/files/pgsql.sh.tmpl b/databases/postgresql83-server/files/pgsql.sh.tmpl index e1673b4850c2..753e0b8aaf80 100644 --- a/databases/postgresql83-server/files/pgsql.sh.tmpl +++ b/databases/postgresql83-server/files/pgsql.sh.tmpl @@ -17,13 +17,13 @@ start) stop) [ -x !!PREFIX!!/pgsql/bin/pg_ctl ] && { - su -l pgsql -c 'exec !!PREFIX!!/pgsql/bin/pg_ctl -w -m fast stop' + exec su -l pgsql -c 'exec !!PREFIX!!/pgsql/bin/pg_ctl -w -m fast stop' } ;; status) [ -x !!PREFIX!!/pgsql/bin/pg_ctl ] && { - su -l pgsql -c 'exec !!PREFIX!!/pgsql/bin/pg_ctl status' + exec su -l pgsql -c 'exec !!PREFIX!!/pgsql/bin/pg_ctl status' } ;; diff --git a/databases/postgresql83-server/files/pkgIndex.tcl.in b/databases/postgresql83-server/files/pkgIndex.tcl.in new file mode 100644 index 000000000000..bd8329b15c69 --- /dev/null +++ b/databases/postgresql83-server/files/pkgIndex.tcl.in @@ -0,0 +1,4 @@ +# Package-index file for Pgtcl-package. Enables you to load PostgreSQL +# interface functions right into you TCL-interpreter as simply as +# package require Pgtcl +package ifneeded Pgtcl 1.3 "load %%PREFIX%%/lib/libpgtcl.so" diff --git a/databases/postgresql83-server/files/post-install-notes b/databases/postgresql83-server/files/post-install-notes index 289a7651109a..4c69908b2676 100644 --- a/databases/postgresql83-server/files/post-install-notes +++ b/databases/postgresql83-server/files/post-install-notes @@ -8,9 +8,12 @@ You may wish to subscribe to the PostgreSQL user-support mailing list. Send an e-mail to pgsql-questions-request@postgresql.org with the text "subscribe" in the message body. -If you built PostgreSQL with TCL support, you can install the port -"pgaccess" to get a TCL/TK based database frontend for database -operations. +If you built PostgreSQL with TCL/TK support, you can use the pgaccess +utility to get a TCL/TK based database frontend for database +operations. You do NOT need to install the pgaccess port separately. + +If you built in the TCL support, you can load the Pg package into your +TCL scripts as easily as ``package require Pgtcl''. To start PostgreSQL, run the startup script: -$PREFIX/etc/rc.d/pgsql.sh start +%%PREFIX%%/etc/rc.d/pgsql.sh start diff --git a/databases/postgresql83-server/files/pre-install-notes b/databases/postgresql83-server/files/pre-install-notes new file mode 100644 index 000000000000..72388933bd6d --- /dev/null +++ b/databases/postgresql83-server/files/pre-install-notes @@ -0,0 +1,9 @@ +# ---------------------------------------------------------------- +# UPGRADE NOTE! Depending on which version you are upgrading from, +# you may have to dump/restore existing databases +# as part of the update. +# This is *NOT* done by this port! +# For detailed instructions, see +# %%WRKDIR%%/%%DISTNAME%%/INSTALL +# after extraction. +# -------------------------------------------------------------- diff --git a/databases/postgresql83-server/pkg-plist.jdbc b/databases/postgresql83-server/pkg-plist.jdbc index bef5d75506b4..e751caa65063 100644 --- a/databases/postgresql83-server/pkg-plist.jdbc +++ b/databases/postgresql83-server/pkg-plist.jdbc @@ -10,4 +10,5 @@ share/examples/pgsql/jdbc/README_6.3 @dirrm share/examples/pgsql/jdbc @dirrm share/examples/pgsql share/java/classes/postgresql.jar +@unexec rmdir %D/share/java/classes 2>/dev/null || true @unexec rmdir %D/share/java 2>/dev/null || true diff --git a/databases/postgresql83-server/pkg-plist.notk b/databases/postgresql83-server/pkg-plist.notk new file mode 100644 index 000000000000..9f5d9e04af48 --- /dev/null +++ b/databases/postgresql83-server/pkg-plist.notk @@ -0,0 +1,6 @@ +pgsql/bin/pgtclsh +pgsql/include/libpgtcl.h +pgsql/lib/libpgtcl.a +pgsql/lib/libpgtcl.so +pgsql/lib/libpgtcl.so.2 +pgsql/lib/pltcl.so diff --git a/databases/postgresql83-server/scripts/configure.postgresql b/databases/postgresql83-server/scripts/configure.postgresql new file mode 100644 index 000000000000..5efe32a766f4 --- /dev/null +++ b/databases/postgresql83-server/scripts/configure.postgresql @@ -0,0 +1,267 @@ +#!/bin/sh +# -*- tab-width: 4; -*- +# ex:ts=4 +# +# $FreeBSD$ +# +if [ -f ${WRKDIRPREFIX}${CURDIR}/Makefile.inc ]; then + exit +fi + +if [ ! "${BATCH}" ]; then + dialog --title "Backup your data NOW" \ + --msgbox "`sed -e \"s#%%WRKDIR%%#${WRKDIR}#; s#%%DISTNAME%%#${DISTNAME}#\" < ${FILESDIR}/pre-install-notes`" \ + -1 -1 +fi + +#SSL=${NO_OPENSSL:+OFF} +#SSL=${NOSSL:-ON} + +if [ "${BATCH}" ]; then + set \"MultiByte\" +else + /usr/bin/dialog --title "configuration options" --clear \ + --checklist "\n\ +Please select desired options:" -1 -1 8 \ +JDBC "Java DataBase Connectivity" OFF \ +MultiByte "Multibyte for Multilingualism" ON \ +ODBC "Open Database Connectivity" OFF \ +Perl "Perl" OFF \ +TCL "Tcl" ON \ +TCLTK "Tcl/Tk" ON \ +SSL "Secure Socket Layer (requires certificate)" OFF \ +KRB5 "Kerberos 5" OFF \ +2> /tmp/checklist.tmp.$$ + + retval=$? + + if [ -s /tmp/checklist.tmp.$$ ]; then + set `cat /tmp/checklist.tmp.$$` + fi + rm -f /tmp/checklist.tmp.$$ + + case $retval in + 0) if [ -z "$*" ]; then + echo "Nothing selected" + fi + ;; + 1) echo "Cancel pressed." + exit 1 + ;; + esac +fi + +${MKDIR} -p ${WRKDIRPREFIX}${CURDIR} +exec > ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + +while [ "$1" ]; do + case $1 in + \"JDBC\") + # use JAVA_HOME if set correctly + echo "# JDBC" + if [ "${JAVA_HOME}" -a -x ${JAVA_HOME}/bin/javac ]; then + echo JAVA_HOME=${JAVA_HOME} + if [ "$(${JAVA_HOME}/bin/java -version 2>&1 | egrep \"1.1)" ]; then + JAVAVERSION=1 + echo BUILD_DEPENDS+= ${JAVA_HOME}/bin/javac:\${PORTSDIR}/java/jdk + else + JAVAVERSION=2 + echo BUILD_DEPENDS+= ${JAVA_HOME}/bin/javac:\${PORTSDIR}/java/jdk12-beta + fi + else + JAVAVERSION=1 + echo BUILD_DEPENDS+= \${LOCALBASE}/jdk1.1.8/bin/javac:\${PORTSDIR}/java/jdk + echo JAVA_HOME=\${LOCALBASE}/jdk1.1.8 + fi + cat <<-EOF + JAVAVERSION=${JAVAVERSION} + WITH_JDBC=YES + SCRIPTS_ENV+= JAVA_HOME=\${JAVA_HOME} + + EOF + ;; + \"MultiByte\") + MULTIBYTE=1 + ;; + \"ODBC\") + cat <<-EOF + # ODBC + WITH_ODBC=YES + CONFIGURE_ARGS+= --with-odbc + + EOF + ;; + \"Perl\") + cat <<-EOF + # PERL + WITH_PERL=YES + CONFIGURE_ARGS+= --with-perl + + EOF + ;; + \"TCL\") + TCL=1 + ;; + \"TCLTK\") + echo "#TCLTK" + echo WITH_TK=YES + echo + TCL=1 + ;; + \"SSL\") + cat <<-EOF + # SSL + USE_OPENSSL= yes + CFLAGS+= -DUSE_SSL + WITH_SSL= yes + CONFIGURE_ENV+= LDFLAGS="-L\${OPENSSLLIB} -lssl -lcrypto" + + EOF + ;; + \"KRB5\") + KRB5=1 + ;; + \"nothing\"|true) + ;; + *) + echo "Invalid option(s): $*" > /dev/stderr + rm -f ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + exit 1 + ;; + esac + shift +done + +exec > /dev/stderr + +# if multibyte, determine charset +echo "# Multibyte" + +if [ ! "${MULTIBYTE}" ]; then + echo "WITHOUT_MULTIBYTE=YES" >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc +else + if [ "${BATCH}" ]; then + set \"nothing\" + else + /usr/bin/dialog --title "configuration options" --clear \ + --radiolist "\n\ +Please select desired options:" -1 -1 16 \ +nothing "Default Encoding" ON \ +SQL_ASCII "SQL_ASCII" OFF \ +LATIN1 "LATIN1" OFF \ +LATIN2 "LATIN2" OFF \ +LATIN3 "LATIN3" OFF \ +LATIN4 "LATIN4" OFF \ +LATIN5 "LATIN5" OFF \ +EUC_JP "EUC_JP" OFF \ +EUC_CN "EUC_CN" OFF \ +EUC_KR "EUC_KR" OFF \ +EUC_TW "EUC_TW" OFF \ +KOI8 "KOI8" OFF \ +UNICODE "UNICODE" OFF \ +MULE_INTERNAL "MULE_INTERNAL" OFF \ +WIN "WIN" OFF \ +ALT "ALT" OFF \ +2> /tmp/checklist.tmp.$$ + + retval=$? + + if [ -s /tmp/checklist.tmp.$$ ]; then + set `cat /tmp/checklist.tmp.$$` + fi + rm -f /tmp/checklist.tmp.$$ + if [ $retval = 1 ]; then + echo "Cancel pressed." + rm ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + exit 1 + fi + fi + + if [ "$1" = "nothing" ]; then + echo "CONFIGURE_ARGS+= --enable-multibyte" \ + >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + else + echo "CONFIGURE_ARGS+= --enable-multibyte=$1" \ + >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + fi +fi +echo + +if [ "${TCL}" ]; then + echo "# TCL" >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + if [ "${BATCH}" ]; then + echo WITH_TCL=8.3 >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + else + dialog --title "TCL version" \ + --inputbox "Please enter TCL version. Default is 8.3." -1 -1 "8.3" \ + 2> /tmp/checklist.tmp.$$ + retval=$? + if [ -s /tmp/checklist.tmp.$$ ]; then + set `cat /tmp/checklist.tmp.$$` + fi + rm -f /tmp/checklist.tmp.$$ + case $retval in + 0) if [ -z "$*" ]; then + echo "Nothing selected" + fi + ;; + 1) echo "Cancel pressed." + rm -f ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + exit 1 + ;; + esac + echo WITH_TCL=\"$1\" >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + fi + cat <<-EOF >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + CONFIGURE_ARGS+= --with-tcl --with-tclconfig="\${TCLCONFIG}" + TCLV=\${WITH_TCL:S/.//} + TCL_INCDIR= \${LOCALBASE}/include/tcl\${WITH_TCL} + MAKE_ENV= TCL_INCDIR=\${TCL_INCDIR} + LIB_DEPENDS= tcl\${TCLV}.1:\${PORTSDIR}/lang/tcl\${TCLV} + TCLCONFIG= '\${LOCALBASE}/lib/tcl\${WITH_TCL}' + .if defined(WITH_TK) + TK_INCDIR= \${LOCALBASE}/include/tk\${WITH_TCL} + CONFIGURE_ENV+= WISH=\${LOCALBASE}/bin/wish\${WITH_TCL} + LIB_DEPENDS+= tk\${TCLV}.1:\${PORTSDIR}/x11-toolkits/tk\${TCLV} + TCLCONFIG+= '\${LOCALBASE}/lib/tk\${WITH_TCL}' + TCL_PLIST= pkg-plist.tcl + .else + TCL_PLIST= pkg-plist.notk + CONFIGURE_ARGS+= --without-tk + .endif + + EOF +fi + +if [ "${KRB5}" ]; then + if [ "${BATCH}" ]; then + # never gets here, but what the heck... + echo KRB5_HOME=\${LOCALBASE} >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + else + dialog --inputbox "Please enter the KRB5_HOME path" -1 -1 "${KRB_HOME:-${LOCALBASE}}" \ + 2> /tmp/checklist.tmp.$$ + retval=$? + if [ -s /tmp/checklist.tmp.$$ ]; then + set `cat /tmp/checklist.tmp.$$` + fi + rm -f /tmp/checklist.tmp.$$ + case $retval in + 0) if [ -z "$*" ]; then + echo "No input" + fi + ;; + 1) echo "Cancel pressed." + rm -f ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + exit 1 + ;; + esac + echo KRB5_HOME=\"$1\" >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + fi + cat <<-EOF >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + .if defined(KRB5_HOME) && exists(\${KRB5_HOME}) + CONFIGURE_KRB= --with-krb5=\${KRB5_HOME} \ + --with-krb-keytab=FILE:\${PREFIX}/pgsql/etc/keytab + .endif + + EOF +fi diff --git a/databases/postgresql84-server/Makefile b/databases/postgresql84-server/Makefile index 5f64023c8cf5..08e0329a0795 100644 --- a/databases/postgresql84-server/Makefile +++ b/databases/postgresql84-server/Makefile @@ -6,7 +6,7 @@ # PORTNAME= postgresql -PORTVERSION= 7.0.2 +PORTVERSION= 7.0.3 CATEGORIES= databases MASTER_SITES= ftp://ftp.postgresql.org/pub/%SUBDIR%/ \ ftp://ftp.de.postgresql.org/%SUBDIR%/ \ @@ -22,59 +22,12 @@ DIST_SUBDIR= postgresql MAINTAINER= girgen@partitur.se +BUILD_DEPENDS= autoconf:${PORTSDIR}/devel/autoconf + Y2K= http://www.postgresql.org/y2k.html INSTALLS_SHLIB= YES LDCONFIG_DIRS= %%PREFIX%%/pgsql/lib -BUILD_DEPENDS= autoconf:${PORTSDIR}/devel/autoconf - -.if defined(KRB5_HOME) && exists(${KRB5_HOME}) -CONFIGURE_KRB= --with-krb5=${KRB5_HOME} \ - --with-krb-keytab=FILE:${PREFIX}/pgsql/etc/keytab -.endif - -# if you want to use the tcl/tk frontend pgaccess, then you need to build -# postgresql with tcl support by typing: make -DWITH_TCL -.if defined(WITH_TCL) -TCL_INCDIR= ${LOCALBASE}/include/tcl8.3 -TK_INCDIR= ${LOCALBASE}/include/tk8.3 -MAKE_ENV= TCL_INCDIR=${TCL_INCDIR} -CONFIGURE_ENV= WISH=${LOCALBASE}/bin/wish8.3 -LIB_DEPENDS= tcl83.1:${PORTSDIR}/lang/tcl83 \ - tk83.1:${PORTSDIR}/x11-toolkits/tk83 -CONFIGURE_TCL= --with-tcl --with-tclconfig="${LOCALBASE}/lib/tcl8.3 ${LOCALBASE}/lib/tk8.3" -.endif - -# if you want to disable the multibyte support, type: -# make -DWITHOUT_MULTIBYTE -# -# if you want to set the default encoding for the multibyte support, type: -# make DEFAULT_ENCODING=<encoding> -# where <encoding> is one of these: -# SQL_ASCII LATIN1 LATIN2 LATIN3 LATIN4 LATIN5 -# EUC_JP EUC_CN EUC_KR EUC_TW KOI8 -# UNICODE MULE_INTERNAL WIN ALT -.if defined(WITHOUT_MULTIBYTE) -CONFIGURE_MULTIBYTE= # none -.elif defined(DEFAULT_ENCODING) -CONFIGURE_MULTIBYTE= --enable-multibyte="${DEFAULT_ENCODING}" -.else -CONFIGURE_MULTIBYTE= --enable-multibyte -.endif -.if defined(WITH_PERL) -CONFIGURE_PERL= --with-perl -.endif -.if defined(WITH_ODBC) -CONFIGURE_ODBC= --with-odbc -.endif - -# if you want jdbc, type make -DWITH_JDBC -# Honors JAVA_HOME if you have it set, and don't want the dependency. -.if defined(WITH_JDBC) -JAVA_HOME?= ${LOCALBASE}/jdk1.1.8 -BUILD_DEPENDS= ${JAVA_HOME}/bin/javac:${PORTSDIR}/java/jdk -SCRIPTS_ENV+= JAVA_HOME=${JAVA_HOME} -.endif WRKSRC= ${WRKDIR}/${DISTNAME}/src DOCDIR= ${WRKDIR}/${DISTNAME}/doc @@ -86,11 +39,6 @@ CONFIGURE_ARGS= --prefix=${PREFIX}/pgsql \ --enable-locale \ --with-template=`uname -s | ${TR} '[A-Z]' '[a-z]'` \ --with-includes="${PREFIX}/include ${TCL_INCDIR} ${TK_INCDIR}" \ - ${CONFIGURE_KRB} \ - ${CONFIGURE_TCL} \ - ${CONFIGURE_MULTIBYTE} \ - ${CONFIGURE_PERL} \ - ${CONFIGURE_ODBC} \ --with-libraries=${PREFIX}/lib MAN1= createdb.1 createlang.1 createuser.1 dropdb.1 droplang.1 \ @@ -117,50 +65,21 @@ MANL= abort.l alter_group.l alter_table.l alter_user.l \ MANPREFIX= ${PREFIX}/pgsql -pre-fetch: - @${ECHO_MSG} "To install and run postgresql you need to compile kernel with:" - @${ECHO_MSG} " options \"SYSVSHM, SYSVSEM, SYSVMSG\"" -.if !defined(WITH_TCL) - @${ECHO_MSG} "To build the \"PostgreSQL to Tcl interface library\", libpgtcl, type:" - @${ECHO_MSG} " make -DWITH_TCL" -.else - @${ECHO_MSG} "Building PostgreSQL with \"libpgtcl\"." -.endif -.if !defined(WITHOUT_MULTIBYTE) - @${ECHO_MSG} "To disable multibyte support, type:" - @${ECHO_MSG} " make -DWITHOUT_MULTIBYTE" -.if !defined(DEFAULT_ENCODING) - @${ECHO_MSG} "To set the default encoding for the multibyte support, type:" - @${ECHO_MSG} " make DEFAULT_ENCODING=<encoding>" - @${ECHO_MSG} "where <encoding> is one of these:" - @${ECHO_MSG} " SQL_ASCII LATIN1 LATIN2 LATIN3 LATIN4 LATIN5" - @${ECHO_MSG} " EUC_JP EUC_CN EUC_KR EUC_TW KOI8" - @${ECHO_MSG} " UNICODE MULE_INTERNAL WIN ALT" -.else - @${ECHO_MSG} "The default encoding is '${DEFAULT_ENCODING}'." -.endif -.else - @${ECHO_MSG} "Building PostgreSQL without multibyte support." -.endif -.if !defined(WITH_JDBC) - @${ECHO_MSG} "To build Java (JDBC) support, type:" - @${ECHO_MSG} " make -DWITH_JDBC" -.else - @${ECHO_MSG} "Building PostgreSQL with \"postgresql.jar\"." -.endif -.if !defined(WITH_PERL) - @${ECHO_MSG} "To build Perl interface and pl/Perl interpreter:" - @${ECHO_MSG} " make -DWITH_PERL" -.else - @${ECHO_MSG} "Building PostgreSQL with \"pl/Perl\"." -.endif -.if !defined(WITH_ODBC) - @${ECHO_MSG} "To build the ODBC driver package:" - @${ECHO_MSG} " make -DWITH_ODBC" -.else - @${ECHO_MSG} "Building PostgreSQL with ODBC Drivers." +SCRIPTS_ENV= WRKDIRPREFIX="${WRKDIRPREFIX}" \ + WRKDIR="${WRKDIR}" \ + FILESDIR="${FILESDIR}" \ + TOUCH="${TOUCH}" \ + MKDIR="${MKDIR}" \ + NO_OPENSSL="${NO_OPENSSL}" \ + DISTNAME="${DISTNAME}" + +.if exists(${WRKDIRPREFIX}${.CURDIR}/Makefile.inc) +.include "${WRKDIRPREFIX}${.CURDIR}/Makefile.inc" .endif +pre-extract: + @ ${SETENV} ${SCRIPTS_ENV} ${SH} ${SCRIPTDIR}/configure.postgresql + post-patch: @ ${MV} ${WRKSRC}/template/freebsd ${WRKSRC}/template/freebsd.orig @ ${SED} -e 's#CFLAGS:-O2 -m486 -pipe#CFLAGS:${CFLAGS}#' \ @@ -180,16 +99,8 @@ pre-configure: post-build: .if defined(WITH_JDBC) - @ cd ${WRKSRC}/interfaces/jdbc && ${GMAKE} -.if !defined(NOPORTDOCS) - @ cd ${WRKSRC}/interfaces/jdbc && ${GMAKE} examples -.endif + @ ${GMAKE} -C ${WRKSRC}/interfaces/jdbc jdbc${JAVAVERSION} .endif - @ ${ECHO} "------------------------------------------------------------" - @ ${ECHO} "Dump existing databases, before installing new db version !!" - @ ${ECHO} "Detailed instructions, see" - @ ${ECHO} "${WRKDIR}/${DISTNAME}/INSTALL" - @ ${ECHO} "------------------------------------------------------------" pre-install: .if defined(PACKAGE_BUILDING) @@ -197,53 +108,54 @@ pre-install: .endif @ ${MKDIR} ${PREFIX}/pgsql @ ${SETENV} ${MAKE_ENV} perl ${SCRIPTDIR}/createuser +.if !defined(BATCH) + @ ${SED} -e "s#%%WRKDIR%%#${WRKDIR}#; s#%%DISTNAME%%#${DISTNAME}#" \ + < ${FILESDIR}/pre-install-notes | more -e +.endif post-install: .if defined(NOPORTDOCS) - @ ( cd ${DOCDIR}; ${GMAKE} man ) + @ ${GMAKE} -C ${DOCDIR} man .else - @ ( cd ${DOCDIR}; ${GMAKE} install ) + @ ${GMAKE} -C ${DOCDIR} install + ${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/FAQ* ${PREFIX}/share/doc/pgsql + ${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/README* ${PREFIX}/share/doc/pgsql + ${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/TODO ${PREFIX}/share/doc/pgsql +# ${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/*ps.gz ${PREFIX}/share/doc/pgsql + @ ${CAT} ${PKGDIR}/pkg-plist.doc >> ${TMPPLIST} .endif @ if [ ! -f ${PREFIX}/pgsql/.profile ]; then \ - ${ECHO} "PATH=${PATH}:${PREFIX}/pgsql/bin" \ + ${SED} 's|%%PREFIX%%|${PREFIX}|g' \ + < ${FILESDIR}/dot.profile.in \ > ${PREFIX}/pgsql/.profile; \ - ${ECHO} "MANPATH=${MANPATH}:${PREFIX}/pgsql/man" \ - >> ${PREFIX}/pgsql/.profile; \ - ${ECHO} "PGLIB=${PREFIX}/pgsql/lib" \ - >> ${PREFIX}/pgsql/.profile; \ - ${ECHO} "# note: PGDATA overwrites the -D startup option" \ - >> ${PREFIX}/pgsql/.profile; \ - ${ECHO} "PGDATA=${PREFIX}/pgsql/data" \ - >> ${PREFIX}/pgsql/.profile; \ - ${ECHO} "DISPLAY=:0" \ - >> ${PREFIX}/pgsql/.profile; \ - ${ECHO} "export PATH MANPATH PGLIB PGDATA DISPLAY" \ - >> ${PREFIX}/pgsql/.profile; \ - ${ECHO} "# if you want to make regression tests use this TZ" \ - >> ${PREFIX}/pgsql/.profile; \ - ${ECHO} "#TZ=PST8PDT" \ - >> ${PREFIX}/pgsql/.profile; \ - ${ECHO} "#export TZ" \ - >> ${PREFIX}/pgsql/.profile; \ fi @ ${CHOWN} -R pgsql:pgsql ${PREFIX}/pgsql @ ${CHOWN} root:pgsql ${PREFIX}/pgsql/lib @ ${ECHO} 'Initializing PostgreSQL Databases - this may take a few minutes...' @ ${SETENV} OBJFORMAT=${PORTOBJFORMAT} ${LDCONFIG} -m ${PREFIX}/pgsql/lib - @ su -l pgsql -c 'PATH=${PREFIX}/pgsql/bin:${PATH} LD_LIBRARY_PATH=${PREFIX}/pgsql/lib ${PREFIX}/pgsql/bin/initdb --pglib=${PREFIX}/pgsql/lib --pgdata=${PREFIX}/pgsql/data' +# '-' so we don't fail to create packagelist at this stage, +# when we already have everything installed on top of previous version + -@ su -l pgsql -c 'PATH=${PREFIX}/pgsql/bin:${PATH} ${PREFIX}/pgsql/bin/initdb --pglib=${PREFIX}/pgsql/lib --pgdata=${PREFIX}/pgsql/data' @ ${SED} -e "s=!!PREFIX!!=${PREFIX}=g" < ${FILESDIR}/pgsql.sh.tmpl \ > ${PREFIX}/etc/rc.d/pgsql.sh @ ${CHMOD} 554 ${PREFIX}/etc/rc.d/pgsql.sh @ ${CHOWN} root.pgsql ${PREFIX}/etc/rc.d/pgsql.sh - @ ${INSTALL_DATA} ${FILESDIR}/post-install-notes ${PREFIX}/pgsql + @ ${SED} -e 's#%%PREFIX%%#${PREFIX}#' < ${FILESDIR}/post-install-notes \ + > ${PREFIX}/pgsql/post-install-notes .if defined(WITHOUT_MULTIBYTE) @${CP} ${TMPPLIST} ${TMPPLIST}.nomulti @${GREP} -v pgsql/bin/pg_encoding ${TMPPLIST}.nomulti > ${TMPPLIST} .endif .if defined(WITH_TCL) @${CP} ${TMPPLIST} ${TMPPLIST}.notcl - @${CAT} ${PKGDIR}/pkg-plist.tcl ${TMPPLIST}.notcl > ${TMPPLIST} + @${CAT} ${PKGDIR}/${TCL_PLIST} ${TMPPLIST}.notcl > ${TMPPLIST} @${RM} ${TMPPLIST}.notcl +# Preparing a loadable TCL-package (pkgIndex.tcl) +# XXX This directory and the single file are not registered in +# XXX the PLIST, because of different PREFIX. + @${MKDIR} ${LOCALBASE}/lib/tcl${WITH_TCL}/Pgtcl1.3 + @${SED} 's|%%PREFIX%%|${PREFIX}|' < ${FILESDIR}/pkgIndex.tcl.in \ + > ${LOCALBASE}/lib/tcl${WITH_TCL}/Pgtcl1.3/pkgIndex.tcl .endif .if defined(WITH_ODBC) @${CP} ${TMPPLIST} ${TMPPLIST}.noodbc @@ -272,19 +184,10 @@ post-install: @ ${ECHO_MSG} "---------------------------------------------------------" @ ${ECHO_MSG} "Putting jdbc examples into ${PREFIX}/share/examples/pgsql" @ ${ECHO_MSG} "---------------------------------------------------------" - @ ${CAT} ${PKGDIR}/pkg-plist.doc >> ${TMPPLIST} -.endif .endif -.if !defined(NOPORTDOCS) - ${MKDIR} ${PREFIX}/share/doc/pgsql - @ ${GMAKE} -C ${WRKDIR}/${DISTNAME}/doc install - ${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/FAQ* ${PREFIX}/share/doc/pgsql - ${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/README* ${PREFIX}/share/doc/pgsql - ${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/TODO ${PREFIX}/share/doc/pgsql -# ${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/*ps.gz ${PREFIX}/share/doc/pgsql .endif .if !defined(BATCH) - @ more -e ${FILESDIR}/post-install-notes + @ more -e ${PREFIX}/pgsql/post-install-notes .endif .if !defined(DEBUG_FLAGS) .for file in ecpg pg_dump pg_id pg_passwd pg_version postgres psql @@ -292,4 +195,7 @@ post-install: .endfor .endif +post-clean: + @ ${RM} -f ${WRKDIRPREFIX}${.CURDIR}/Makefile.inc + .include <bsd.port.mk> diff --git a/databases/postgresql84-server/distinfo b/databases/postgresql84-server/distinfo index 309ea1e11614..fc87b8117bdc 100644 --- a/databases/postgresql84-server/distinfo +++ b/databases/postgresql84-server/distinfo @@ -1,4 +1,3 @@ -MD5 (postgresql/postgresql-7.0.2.base.tar.gz) = 871d23b85d9a3599a7ed75dfc7da7ba7 -MD5 (postgresql/postgresql-7.0.2.support.tar.gz) = c21180a6485d85785c8e69f0cbff05dd -MD5 (postgresql/postgresql-7.0.2.docs.tar.gz) = efac1f87463f252e54d72b256885b883 -MD5 (postgresql/postgresql-7.0.2.test.tar.gz) = 3443b3d83194c396f20aee2adc6f93bf +MD5 (postgresql/postgresql-7.0.3.base.tar.gz) = 0eeda8217b5b11e5a9351fc424808426 +MD5 (postgresql/postgresql-7.0.3.support.tar.gz) = b930f71068d776ef45402fcbebfa58cf +MD5 (postgresql/postgresql-7.0.3.docs.tar.gz) = 3d3fc76073f6d77febefc83f887fc87d diff --git a/databases/postgresql84-server/files/dot.profile.in b/databases/postgresql84-server/files/dot.profile.in new file mode 100644 index 000000000000..bd7ec45043be --- /dev/null +++ b/databases/postgresql84-server/files/dot.profile.in @@ -0,0 +1,16 @@ +PATH=${PATH}:%%PREFIX%%/pgsql/bin +PGLIB=%%PREFIX%%/pgsql/lib + +# note: PGDATA overwrites the -D startup option +PGDATA=%%PREFIX%%/pgsql/data + +export PATH MANPATH PGLIB PGDATA + +#You might want to set some locale stuff here +#PGDATESTYLE=ISO +#LC_ALL=sv_SE.ISO_88591-1 +#export PGDATESTYLE LC_ALL + +# if you want to make regression tests use this TZ +#TZ=PST8PDT +#export TZ diff --git a/databases/postgresql84-server/files/patch-au b/databases/postgresql84-server/files/patch-au new file mode 100644 index 000000000000..340521b49482 --- /dev/null +++ b/databases/postgresql84-server/files/patch-au @@ -0,0 +1,58 @@ +--- configure.in.orig Sun Nov 5 05:03:47 2000 ++++ configure.in Mon Dec 4 02:36:15 2000 +@@ -299,13 +299,28 @@ + [ --with-tcl build Tcl interfaces and pgtclsh ], + [ + case "$withval" in +- y | ye | yes) USE_TCL=true; USE_TK=true; AC_MSG_RESULT(enabled) ;; ++ y | ye | yes) USE_TCL=true; AC_MSG_RESULT(enabled) ;; + *) USE_TCL=; USE_TK=; AC_MSG_RESULT(disabled) ;; + esac + ], + [ USE_TCL=; USE_TK=; AC_MSG_RESULT(disabled) ] + ) + ++dnl We include tk support with tcl unless user says --without-tk ++if test USE_TCL = true ++then ++AC_MSG_CHECKING(setting USE_TK) ++AC_ARG_WITH( ++ tk, ++ [ --without-tk build Tcl *without* Tk ], ++ [ ++ case "$withval" in ++ y | ye | yes) USE_TK=true; USE_TK=true; AC_MSG_RESULT(enabled) ;; ++ *) USE_TK=n; AC_MSG_RESULT(disabled) ;; ++ esac ++ ] ++) ++fi + export USE_TCL + export USE_TK + +@@ -482,7 +497,7 @@ + #endif + ], + ELF_SYS=true, +-[if test "X$elf" = "Xyes" ++[if test "X$PORTOBJFORMAT" = "Xyes" + then + ELF_SYS=true + else +@@ -1248,10 +1263,15 @@ + else + AC_MSG_RESULT($TCL_CONFIG_SH) + AC_SUBST(TCL_CONFIG_SH) ++ . ${TCL_CONFIG_SH} ++ AC_SUBST(TCL_LIB_SPEC) + fi + fi + +-USE_TK=$USE_TCL # If TCL is disabled, disable TK ++USE_TK=${USE_TK:=$USE_TCL} # If TCL is disabled, disable TK ++ # otherwise -- enable unless explicitly ++ # disabled ++ + + dnl Check for Tk configuration script tkConfig.sh + if test "$USE_TK" = true diff --git a/databases/postgresql84-server/files/patch-av b/databases/postgresql84-server/files/patch-av new file mode 100644 index 000000000000..49b35f9e8dc1 --- /dev/null +++ b/databases/postgresql84-server/files/patch-av @@ -0,0 +1,17 @@ +--- interfaces/libpq/fe-connect.c Sun May 21 17:19:53 2000 ++++ interfaces/libpq/fe-connect.c Fri Sep 15 13:53:52 2000 +@@ -801 +801 @@ +- sprintf(conn->errorMessage, ++ printfPQExpBuffer(&conn->errorMessage, +@@ -809 +809 @@ +- sprintf(conn->errorMessage, "PQconnectDB() -- couldn't read postmaster response: errno=%d\n%s\n", ++ printfPQExpBuffer(&conn->errorMessage, "PQconnectDB() -- couldn't read postmaster response: errno=%d\n%s\n", +@@ -822 +822 @@ +- sprintf(conn->errorMessage, ++ printfPQExpBuffer(&conn->errorMessage, +@@ -832 +832 @@ +- sprintf(conn->errorMessage, ++ printfPQExpBuffer(&conn->errorMessage, +@@ -850 +850 @@ +- strcpy(conn->errorMessage, ++ printfPQExpBuffer(&conn->errorMessage, diff --git a/databases/postgresql84-server/files/patch-ba b/databases/postgresql84-server/files/patch-ba index a3b679b882c5..586d725c536a 100644 --- a/databases/postgresql84-server/files/patch-ba +++ b/databases/postgresql84-server/files/patch-ba @@ -1,5 +1,5 @@ ---- interfaces/jdbc/Makefile.orig Tue Mar 14 16:55:17 2000 -+++ interfaces/jdbc/Makefile Sun Apr 16 21:16:43 2000 +--- interfaces/jdbc/Makefile.orig Sun Nov 5 05:03:53 2000 ++++ interfaces/jdbc/Makefile Fri Dec 8 03:16:17 2000 @@ -10,10 +10,10 @@ FIND = find @@ -15,11 +15,3 @@ RM = rm -f TOUCH = touch -@@ -40,6 +40,7 @@ - @echo To compile, type: - @echo " $(MAKE) jdbc2" - @echo ------------------------------------------------------------ -+ $(MAKE) jdbc1 - - msg: - @echo ------------------------------------------------------------ diff --git a/databases/postgresql84-server/files/patch-be b/databases/postgresql84-server/files/patch-be new file mode 100644 index 000000000000..2f8c3c55566f --- /dev/null +++ b/databases/postgresql84-server/files/patch-be @@ -0,0 +1,9 @@ +This patches let you disable Tk even if you have it installed and +makes sure the TCL-library is added as a dependency for libpgtcl. +--- interfaces/libpgtcl/Makefile.in Tue Mar 7 20:58:36 2000 ++++ interfaces/libpgtcl/Makefile.in Wed Sep 20 08:57:28 2000 +@@ -29,3 +29,3 @@ + +-SHLIB_LINK+= $(LIBPQ) ++SHLIB_LINK+= $(LIBPQ) @TCL_LIB_SPEC@ + diff --git a/databases/postgresql84-server/files/pgsql.sh.tmpl b/databases/postgresql84-server/files/pgsql.sh.tmpl index e1673b4850c2..753e0b8aaf80 100644 --- a/databases/postgresql84-server/files/pgsql.sh.tmpl +++ b/databases/postgresql84-server/files/pgsql.sh.tmpl @@ -17,13 +17,13 @@ start) stop) [ -x !!PREFIX!!/pgsql/bin/pg_ctl ] && { - su -l pgsql -c 'exec !!PREFIX!!/pgsql/bin/pg_ctl -w -m fast stop' + exec su -l pgsql -c 'exec !!PREFIX!!/pgsql/bin/pg_ctl -w -m fast stop' } ;; status) [ -x !!PREFIX!!/pgsql/bin/pg_ctl ] && { - su -l pgsql -c 'exec !!PREFIX!!/pgsql/bin/pg_ctl status' + exec su -l pgsql -c 'exec !!PREFIX!!/pgsql/bin/pg_ctl status' } ;; diff --git a/databases/postgresql84-server/files/pkgIndex.tcl.in b/databases/postgresql84-server/files/pkgIndex.tcl.in new file mode 100644 index 000000000000..bd8329b15c69 --- /dev/null +++ b/databases/postgresql84-server/files/pkgIndex.tcl.in @@ -0,0 +1,4 @@ +# Package-index file for Pgtcl-package. Enables you to load PostgreSQL +# interface functions right into you TCL-interpreter as simply as +# package require Pgtcl +package ifneeded Pgtcl 1.3 "load %%PREFIX%%/lib/libpgtcl.so" diff --git a/databases/postgresql84-server/files/post-install-notes b/databases/postgresql84-server/files/post-install-notes index 289a7651109a..4c69908b2676 100644 --- a/databases/postgresql84-server/files/post-install-notes +++ b/databases/postgresql84-server/files/post-install-notes @@ -8,9 +8,12 @@ You may wish to subscribe to the PostgreSQL user-support mailing list. Send an e-mail to pgsql-questions-request@postgresql.org with the text "subscribe" in the message body. -If you built PostgreSQL with TCL support, you can install the port -"pgaccess" to get a TCL/TK based database frontend for database -operations. +If you built PostgreSQL with TCL/TK support, you can use the pgaccess +utility to get a TCL/TK based database frontend for database +operations. You do NOT need to install the pgaccess port separately. + +If you built in the TCL support, you can load the Pg package into your +TCL scripts as easily as ``package require Pgtcl''. To start PostgreSQL, run the startup script: -$PREFIX/etc/rc.d/pgsql.sh start +%%PREFIX%%/etc/rc.d/pgsql.sh start diff --git a/databases/postgresql84-server/files/pre-install-notes b/databases/postgresql84-server/files/pre-install-notes new file mode 100644 index 000000000000..72388933bd6d --- /dev/null +++ b/databases/postgresql84-server/files/pre-install-notes @@ -0,0 +1,9 @@ +# ---------------------------------------------------------------- +# UPGRADE NOTE! Depending on which version you are upgrading from, +# you may have to dump/restore existing databases +# as part of the update. +# This is *NOT* done by this port! +# For detailed instructions, see +# %%WRKDIR%%/%%DISTNAME%%/INSTALL +# after extraction. +# -------------------------------------------------------------- diff --git a/databases/postgresql84-server/pkg-plist.jdbc b/databases/postgresql84-server/pkg-plist.jdbc index bef5d75506b4..e751caa65063 100644 --- a/databases/postgresql84-server/pkg-plist.jdbc +++ b/databases/postgresql84-server/pkg-plist.jdbc @@ -10,4 +10,5 @@ share/examples/pgsql/jdbc/README_6.3 @dirrm share/examples/pgsql/jdbc @dirrm share/examples/pgsql share/java/classes/postgresql.jar +@unexec rmdir %D/share/java/classes 2>/dev/null || true @unexec rmdir %D/share/java 2>/dev/null || true diff --git a/databases/postgresql84-server/pkg-plist.notk b/databases/postgresql84-server/pkg-plist.notk new file mode 100644 index 000000000000..9f5d9e04af48 --- /dev/null +++ b/databases/postgresql84-server/pkg-plist.notk @@ -0,0 +1,6 @@ +pgsql/bin/pgtclsh +pgsql/include/libpgtcl.h +pgsql/lib/libpgtcl.a +pgsql/lib/libpgtcl.so +pgsql/lib/libpgtcl.so.2 +pgsql/lib/pltcl.so diff --git a/databases/postgresql84-server/scripts/configure.postgresql b/databases/postgresql84-server/scripts/configure.postgresql new file mode 100644 index 000000000000..5efe32a766f4 --- /dev/null +++ b/databases/postgresql84-server/scripts/configure.postgresql @@ -0,0 +1,267 @@ +#!/bin/sh +# -*- tab-width: 4; -*- +# ex:ts=4 +# +# $FreeBSD$ +# +if [ -f ${WRKDIRPREFIX}${CURDIR}/Makefile.inc ]; then + exit +fi + +if [ ! "${BATCH}" ]; then + dialog --title "Backup your data NOW" \ + --msgbox "`sed -e \"s#%%WRKDIR%%#${WRKDIR}#; s#%%DISTNAME%%#${DISTNAME}#\" < ${FILESDIR}/pre-install-notes`" \ + -1 -1 +fi + +#SSL=${NO_OPENSSL:+OFF} +#SSL=${NOSSL:-ON} + +if [ "${BATCH}" ]; then + set \"MultiByte\" +else + /usr/bin/dialog --title "configuration options" --clear \ + --checklist "\n\ +Please select desired options:" -1 -1 8 \ +JDBC "Java DataBase Connectivity" OFF \ +MultiByte "Multibyte for Multilingualism" ON \ +ODBC "Open Database Connectivity" OFF \ +Perl "Perl" OFF \ +TCL "Tcl" ON \ +TCLTK "Tcl/Tk" ON \ +SSL "Secure Socket Layer (requires certificate)" OFF \ +KRB5 "Kerberos 5" OFF \ +2> /tmp/checklist.tmp.$$ + + retval=$? + + if [ -s /tmp/checklist.tmp.$$ ]; then + set `cat /tmp/checklist.tmp.$$` + fi + rm -f /tmp/checklist.tmp.$$ + + case $retval in + 0) if [ -z "$*" ]; then + echo "Nothing selected" + fi + ;; + 1) echo "Cancel pressed." + exit 1 + ;; + esac +fi + +${MKDIR} -p ${WRKDIRPREFIX}${CURDIR} +exec > ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + +while [ "$1" ]; do + case $1 in + \"JDBC\") + # use JAVA_HOME if set correctly + echo "# JDBC" + if [ "${JAVA_HOME}" -a -x ${JAVA_HOME}/bin/javac ]; then + echo JAVA_HOME=${JAVA_HOME} + if [ "$(${JAVA_HOME}/bin/java -version 2>&1 | egrep \"1.1)" ]; then + JAVAVERSION=1 + echo BUILD_DEPENDS+= ${JAVA_HOME}/bin/javac:\${PORTSDIR}/java/jdk + else + JAVAVERSION=2 + echo BUILD_DEPENDS+= ${JAVA_HOME}/bin/javac:\${PORTSDIR}/java/jdk12-beta + fi + else + JAVAVERSION=1 + echo BUILD_DEPENDS+= \${LOCALBASE}/jdk1.1.8/bin/javac:\${PORTSDIR}/java/jdk + echo JAVA_HOME=\${LOCALBASE}/jdk1.1.8 + fi + cat <<-EOF + JAVAVERSION=${JAVAVERSION} + WITH_JDBC=YES + SCRIPTS_ENV+= JAVA_HOME=\${JAVA_HOME} + + EOF + ;; + \"MultiByte\") + MULTIBYTE=1 + ;; + \"ODBC\") + cat <<-EOF + # ODBC + WITH_ODBC=YES + CONFIGURE_ARGS+= --with-odbc + + EOF + ;; + \"Perl\") + cat <<-EOF + # PERL + WITH_PERL=YES + CONFIGURE_ARGS+= --with-perl + + EOF + ;; + \"TCL\") + TCL=1 + ;; + \"TCLTK\") + echo "#TCLTK" + echo WITH_TK=YES + echo + TCL=1 + ;; + \"SSL\") + cat <<-EOF + # SSL + USE_OPENSSL= yes + CFLAGS+= -DUSE_SSL + WITH_SSL= yes + CONFIGURE_ENV+= LDFLAGS="-L\${OPENSSLLIB} -lssl -lcrypto" + + EOF + ;; + \"KRB5\") + KRB5=1 + ;; + \"nothing\"|true) + ;; + *) + echo "Invalid option(s): $*" > /dev/stderr + rm -f ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + exit 1 + ;; + esac + shift +done + +exec > /dev/stderr + +# if multibyte, determine charset +echo "# Multibyte" + +if [ ! "${MULTIBYTE}" ]; then + echo "WITHOUT_MULTIBYTE=YES" >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc +else + if [ "${BATCH}" ]; then + set \"nothing\" + else + /usr/bin/dialog --title "configuration options" --clear \ + --radiolist "\n\ +Please select desired options:" -1 -1 16 \ +nothing "Default Encoding" ON \ +SQL_ASCII "SQL_ASCII" OFF \ +LATIN1 "LATIN1" OFF \ +LATIN2 "LATIN2" OFF \ +LATIN3 "LATIN3" OFF \ +LATIN4 "LATIN4" OFF \ +LATIN5 "LATIN5" OFF \ +EUC_JP "EUC_JP" OFF \ +EUC_CN "EUC_CN" OFF \ +EUC_KR "EUC_KR" OFF \ +EUC_TW "EUC_TW" OFF \ +KOI8 "KOI8" OFF \ +UNICODE "UNICODE" OFF \ +MULE_INTERNAL "MULE_INTERNAL" OFF \ +WIN "WIN" OFF \ +ALT "ALT" OFF \ +2> /tmp/checklist.tmp.$$ + + retval=$? + + if [ -s /tmp/checklist.tmp.$$ ]; then + set `cat /tmp/checklist.tmp.$$` + fi + rm -f /tmp/checklist.tmp.$$ + if [ $retval = 1 ]; then + echo "Cancel pressed." + rm ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + exit 1 + fi + fi + + if [ "$1" = "nothing" ]; then + echo "CONFIGURE_ARGS+= --enable-multibyte" \ + >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + else + echo "CONFIGURE_ARGS+= --enable-multibyte=$1" \ + >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + fi +fi +echo + +if [ "${TCL}" ]; then + echo "# TCL" >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + if [ "${BATCH}" ]; then + echo WITH_TCL=8.3 >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + else + dialog --title "TCL version" \ + --inputbox "Please enter TCL version. Default is 8.3." -1 -1 "8.3" \ + 2> /tmp/checklist.tmp.$$ + retval=$? + if [ -s /tmp/checklist.tmp.$$ ]; then + set `cat /tmp/checklist.tmp.$$` + fi + rm -f /tmp/checklist.tmp.$$ + case $retval in + 0) if [ -z "$*" ]; then + echo "Nothing selected" + fi + ;; + 1) echo "Cancel pressed." + rm -f ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + exit 1 + ;; + esac + echo WITH_TCL=\"$1\" >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + fi + cat <<-EOF >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + CONFIGURE_ARGS+= --with-tcl --with-tclconfig="\${TCLCONFIG}" + TCLV=\${WITH_TCL:S/.//} + TCL_INCDIR= \${LOCALBASE}/include/tcl\${WITH_TCL} + MAKE_ENV= TCL_INCDIR=\${TCL_INCDIR} + LIB_DEPENDS= tcl\${TCLV}.1:\${PORTSDIR}/lang/tcl\${TCLV} + TCLCONFIG= '\${LOCALBASE}/lib/tcl\${WITH_TCL}' + .if defined(WITH_TK) + TK_INCDIR= \${LOCALBASE}/include/tk\${WITH_TCL} + CONFIGURE_ENV+= WISH=\${LOCALBASE}/bin/wish\${WITH_TCL} + LIB_DEPENDS+= tk\${TCLV}.1:\${PORTSDIR}/x11-toolkits/tk\${TCLV} + TCLCONFIG+= '\${LOCALBASE}/lib/tk\${WITH_TCL}' + TCL_PLIST= pkg-plist.tcl + .else + TCL_PLIST= pkg-plist.notk + CONFIGURE_ARGS+= --without-tk + .endif + + EOF +fi + +if [ "${KRB5}" ]; then + if [ "${BATCH}" ]; then + # never gets here, but what the heck... + echo KRB5_HOME=\${LOCALBASE} >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + else + dialog --inputbox "Please enter the KRB5_HOME path" -1 -1 "${KRB_HOME:-${LOCALBASE}}" \ + 2> /tmp/checklist.tmp.$$ + retval=$? + if [ -s /tmp/checklist.tmp.$$ ]; then + set `cat /tmp/checklist.tmp.$$` + fi + rm -f /tmp/checklist.tmp.$$ + case $retval in + 0) if [ -z "$*" ]; then + echo "No input" + fi + ;; + 1) echo "Cancel pressed." + rm -f ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + exit 1 + ;; + esac + echo KRB5_HOME=\"$1\" >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + fi + cat <<-EOF >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + .if defined(KRB5_HOME) && exists(\${KRB5_HOME}) + CONFIGURE_KRB= --with-krb5=\${KRB5_HOME} \ + --with-krb-keytab=FILE:\${PREFIX}/pgsql/etc/keytab + .endif + + EOF +fi diff --git a/databases/postgresql90-server/Makefile b/databases/postgresql90-server/Makefile index 5f64023c8cf5..08e0329a0795 100644 --- a/databases/postgresql90-server/Makefile +++ b/databases/postgresql90-server/Makefile @@ -6,7 +6,7 @@ # PORTNAME= postgresql -PORTVERSION= 7.0.2 +PORTVERSION= 7.0.3 CATEGORIES= databases MASTER_SITES= ftp://ftp.postgresql.org/pub/%SUBDIR%/ \ ftp://ftp.de.postgresql.org/%SUBDIR%/ \ @@ -22,59 +22,12 @@ DIST_SUBDIR= postgresql MAINTAINER= girgen@partitur.se +BUILD_DEPENDS= autoconf:${PORTSDIR}/devel/autoconf + Y2K= http://www.postgresql.org/y2k.html INSTALLS_SHLIB= YES LDCONFIG_DIRS= %%PREFIX%%/pgsql/lib -BUILD_DEPENDS= autoconf:${PORTSDIR}/devel/autoconf - -.if defined(KRB5_HOME) && exists(${KRB5_HOME}) -CONFIGURE_KRB= --with-krb5=${KRB5_HOME} \ - --with-krb-keytab=FILE:${PREFIX}/pgsql/etc/keytab -.endif - -# if you want to use the tcl/tk frontend pgaccess, then you need to build -# postgresql with tcl support by typing: make -DWITH_TCL -.if defined(WITH_TCL) -TCL_INCDIR= ${LOCALBASE}/include/tcl8.3 -TK_INCDIR= ${LOCALBASE}/include/tk8.3 -MAKE_ENV= TCL_INCDIR=${TCL_INCDIR} -CONFIGURE_ENV= WISH=${LOCALBASE}/bin/wish8.3 -LIB_DEPENDS= tcl83.1:${PORTSDIR}/lang/tcl83 \ - tk83.1:${PORTSDIR}/x11-toolkits/tk83 -CONFIGURE_TCL= --with-tcl --with-tclconfig="${LOCALBASE}/lib/tcl8.3 ${LOCALBASE}/lib/tk8.3" -.endif - -# if you want to disable the multibyte support, type: -# make -DWITHOUT_MULTIBYTE -# -# if you want to set the default encoding for the multibyte support, type: -# make DEFAULT_ENCODING=<encoding> -# where <encoding> is one of these: -# SQL_ASCII LATIN1 LATIN2 LATIN3 LATIN4 LATIN5 -# EUC_JP EUC_CN EUC_KR EUC_TW KOI8 -# UNICODE MULE_INTERNAL WIN ALT -.if defined(WITHOUT_MULTIBYTE) -CONFIGURE_MULTIBYTE= # none -.elif defined(DEFAULT_ENCODING) -CONFIGURE_MULTIBYTE= --enable-multibyte="${DEFAULT_ENCODING}" -.else -CONFIGURE_MULTIBYTE= --enable-multibyte -.endif -.if defined(WITH_PERL) -CONFIGURE_PERL= --with-perl -.endif -.if defined(WITH_ODBC) -CONFIGURE_ODBC= --with-odbc -.endif - -# if you want jdbc, type make -DWITH_JDBC -# Honors JAVA_HOME if you have it set, and don't want the dependency. -.if defined(WITH_JDBC) -JAVA_HOME?= ${LOCALBASE}/jdk1.1.8 -BUILD_DEPENDS= ${JAVA_HOME}/bin/javac:${PORTSDIR}/java/jdk -SCRIPTS_ENV+= JAVA_HOME=${JAVA_HOME} -.endif WRKSRC= ${WRKDIR}/${DISTNAME}/src DOCDIR= ${WRKDIR}/${DISTNAME}/doc @@ -86,11 +39,6 @@ CONFIGURE_ARGS= --prefix=${PREFIX}/pgsql \ --enable-locale \ --with-template=`uname -s | ${TR} '[A-Z]' '[a-z]'` \ --with-includes="${PREFIX}/include ${TCL_INCDIR} ${TK_INCDIR}" \ - ${CONFIGURE_KRB} \ - ${CONFIGURE_TCL} \ - ${CONFIGURE_MULTIBYTE} \ - ${CONFIGURE_PERL} \ - ${CONFIGURE_ODBC} \ --with-libraries=${PREFIX}/lib MAN1= createdb.1 createlang.1 createuser.1 dropdb.1 droplang.1 \ @@ -117,50 +65,21 @@ MANL= abort.l alter_group.l alter_table.l alter_user.l \ MANPREFIX= ${PREFIX}/pgsql -pre-fetch: - @${ECHO_MSG} "To install and run postgresql you need to compile kernel with:" - @${ECHO_MSG} " options \"SYSVSHM, SYSVSEM, SYSVMSG\"" -.if !defined(WITH_TCL) - @${ECHO_MSG} "To build the \"PostgreSQL to Tcl interface library\", libpgtcl, type:" - @${ECHO_MSG} " make -DWITH_TCL" -.else - @${ECHO_MSG} "Building PostgreSQL with \"libpgtcl\"." -.endif -.if !defined(WITHOUT_MULTIBYTE) - @${ECHO_MSG} "To disable multibyte support, type:" - @${ECHO_MSG} " make -DWITHOUT_MULTIBYTE" -.if !defined(DEFAULT_ENCODING) - @${ECHO_MSG} "To set the default encoding for the multibyte support, type:" - @${ECHO_MSG} " make DEFAULT_ENCODING=<encoding>" - @${ECHO_MSG} "where <encoding> is one of these:" - @${ECHO_MSG} " SQL_ASCII LATIN1 LATIN2 LATIN3 LATIN4 LATIN5" - @${ECHO_MSG} " EUC_JP EUC_CN EUC_KR EUC_TW KOI8" - @${ECHO_MSG} " UNICODE MULE_INTERNAL WIN ALT" -.else - @${ECHO_MSG} "The default encoding is '${DEFAULT_ENCODING}'." -.endif -.else - @${ECHO_MSG} "Building PostgreSQL without multibyte support." -.endif -.if !defined(WITH_JDBC) - @${ECHO_MSG} "To build Java (JDBC) support, type:" - @${ECHO_MSG} " make -DWITH_JDBC" -.else - @${ECHO_MSG} "Building PostgreSQL with \"postgresql.jar\"." -.endif -.if !defined(WITH_PERL) - @${ECHO_MSG} "To build Perl interface and pl/Perl interpreter:" - @${ECHO_MSG} " make -DWITH_PERL" -.else - @${ECHO_MSG} "Building PostgreSQL with \"pl/Perl\"." -.endif -.if !defined(WITH_ODBC) - @${ECHO_MSG} "To build the ODBC driver package:" - @${ECHO_MSG} " make -DWITH_ODBC" -.else - @${ECHO_MSG} "Building PostgreSQL with ODBC Drivers." +SCRIPTS_ENV= WRKDIRPREFIX="${WRKDIRPREFIX}" \ + WRKDIR="${WRKDIR}" \ + FILESDIR="${FILESDIR}" \ + TOUCH="${TOUCH}" \ + MKDIR="${MKDIR}" \ + NO_OPENSSL="${NO_OPENSSL}" \ + DISTNAME="${DISTNAME}" + +.if exists(${WRKDIRPREFIX}${.CURDIR}/Makefile.inc) +.include "${WRKDIRPREFIX}${.CURDIR}/Makefile.inc" .endif +pre-extract: + @ ${SETENV} ${SCRIPTS_ENV} ${SH} ${SCRIPTDIR}/configure.postgresql + post-patch: @ ${MV} ${WRKSRC}/template/freebsd ${WRKSRC}/template/freebsd.orig @ ${SED} -e 's#CFLAGS:-O2 -m486 -pipe#CFLAGS:${CFLAGS}#' \ @@ -180,16 +99,8 @@ pre-configure: post-build: .if defined(WITH_JDBC) - @ cd ${WRKSRC}/interfaces/jdbc && ${GMAKE} -.if !defined(NOPORTDOCS) - @ cd ${WRKSRC}/interfaces/jdbc && ${GMAKE} examples -.endif + @ ${GMAKE} -C ${WRKSRC}/interfaces/jdbc jdbc${JAVAVERSION} .endif - @ ${ECHO} "------------------------------------------------------------" - @ ${ECHO} "Dump existing databases, before installing new db version !!" - @ ${ECHO} "Detailed instructions, see" - @ ${ECHO} "${WRKDIR}/${DISTNAME}/INSTALL" - @ ${ECHO} "------------------------------------------------------------" pre-install: .if defined(PACKAGE_BUILDING) @@ -197,53 +108,54 @@ pre-install: .endif @ ${MKDIR} ${PREFIX}/pgsql @ ${SETENV} ${MAKE_ENV} perl ${SCRIPTDIR}/createuser +.if !defined(BATCH) + @ ${SED} -e "s#%%WRKDIR%%#${WRKDIR}#; s#%%DISTNAME%%#${DISTNAME}#" \ + < ${FILESDIR}/pre-install-notes | more -e +.endif post-install: .if defined(NOPORTDOCS) - @ ( cd ${DOCDIR}; ${GMAKE} man ) + @ ${GMAKE} -C ${DOCDIR} man .else - @ ( cd ${DOCDIR}; ${GMAKE} install ) + @ ${GMAKE} -C ${DOCDIR} install + ${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/FAQ* ${PREFIX}/share/doc/pgsql + ${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/README* ${PREFIX}/share/doc/pgsql + ${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/TODO ${PREFIX}/share/doc/pgsql +# ${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/*ps.gz ${PREFIX}/share/doc/pgsql + @ ${CAT} ${PKGDIR}/pkg-plist.doc >> ${TMPPLIST} .endif @ if [ ! -f ${PREFIX}/pgsql/.profile ]; then \ - ${ECHO} "PATH=${PATH}:${PREFIX}/pgsql/bin" \ + ${SED} 's|%%PREFIX%%|${PREFIX}|g' \ + < ${FILESDIR}/dot.profile.in \ > ${PREFIX}/pgsql/.profile; \ - ${ECHO} "MANPATH=${MANPATH}:${PREFIX}/pgsql/man" \ - >> ${PREFIX}/pgsql/.profile; \ - ${ECHO} "PGLIB=${PREFIX}/pgsql/lib" \ - >> ${PREFIX}/pgsql/.profile; \ - ${ECHO} "# note: PGDATA overwrites the -D startup option" \ - >> ${PREFIX}/pgsql/.profile; \ - ${ECHO} "PGDATA=${PREFIX}/pgsql/data" \ - >> ${PREFIX}/pgsql/.profile; \ - ${ECHO} "DISPLAY=:0" \ - >> ${PREFIX}/pgsql/.profile; \ - ${ECHO} "export PATH MANPATH PGLIB PGDATA DISPLAY" \ - >> ${PREFIX}/pgsql/.profile; \ - ${ECHO} "# if you want to make regression tests use this TZ" \ - >> ${PREFIX}/pgsql/.profile; \ - ${ECHO} "#TZ=PST8PDT" \ - >> ${PREFIX}/pgsql/.profile; \ - ${ECHO} "#export TZ" \ - >> ${PREFIX}/pgsql/.profile; \ fi @ ${CHOWN} -R pgsql:pgsql ${PREFIX}/pgsql @ ${CHOWN} root:pgsql ${PREFIX}/pgsql/lib @ ${ECHO} 'Initializing PostgreSQL Databases - this may take a few minutes...' @ ${SETENV} OBJFORMAT=${PORTOBJFORMAT} ${LDCONFIG} -m ${PREFIX}/pgsql/lib - @ su -l pgsql -c 'PATH=${PREFIX}/pgsql/bin:${PATH} LD_LIBRARY_PATH=${PREFIX}/pgsql/lib ${PREFIX}/pgsql/bin/initdb --pglib=${PREFIX}/pgsql/lib --pgdata=${PREFIX}/pgsql/data' +# '-' so we don't fail to create packagelist at this stage, +# when we already have everything installed on top of previous version + -@ su -l pgsql -c 'PATH=${PREFIX}/pgsql/bin:${PATH} ${PREFIX}/pgsql/bin/initdb --pglib=${PREFIX}/pgsql/lib --pgdata=${PREFIX}/pgsql/data' @ ${SED} -e "s=!!PREFIX!!=${PREFIX}=g" < ${FILESDIR}/pgsql.sh.tmpl \ > ${PREFIX}/etc/rc.d/pgsql.sh @ ${CHMOD} 554 ${PREFIX}/etc/rc.d/pgsql.sh @ ${CHOWN} root.pgsql ${PREFIX}/etc/rc.d/pgsql.sh - @ ${INSTALL_DATA} ${FILESDIR}/post-install-notes ${PREFIX}/pgsql + @ ${SED} -e 's#%%PREFIX%%#${PREFIX}#' < ${FILESDIR}/post-install-notes \ + > ${PREFIX}/pgsql/post-install-notes .if defined(WITHOUT_MULTIBYTE) @${CP} ${TMPPLIST} ${TMPPLIST}.nomulti @${GREP} -v pgsql/bin/pg_encoding ${TMPPLIST}.nomulti > ${TMPPLIST} .endif .if defined(WITH_TCL) @${CP} ${TMPPLIST} ${TMPPLIST}.notcl - @${CAT} ${PKGDIR}/pkg-plist.tcl ${TMPPLIST}.notcl > ${TMPPLIST} + @${CAT} ${PKGDIR}/${TCL_PLIST} ${TMPPLIST}.notcl > ${TMPPLIST} @${RM} ${TMPPLIST}.notcl +# Preparing a loadable TCL-package (pkgIndex.tcl) +# XXX This directory and the single file are not registered in +# XXX the PLIST, because of different PREFIX. + @${MKDIR} ${LOCALBASE}/lib/tcl${WITH_TCL}/Pgtcl1.3 + @${SED} 's|%%PREFIX%%|${PREFIX}|' < ${FILESDIR}/pkgIndex.tcl.in \ + > ${LOCALBASE}/lib/tcl${WITH_TCL}/Pgtcl1.3/pkgIndex.tcl .endif .if defined(WITH_ODBC) @${CP} ${TMPPLIST} ${TMPPLIST}.noodbc @@ -272,19 +184,10 @@ post-install: @ ${ECHO_MSG} "---------------------------------------------------------" @ ${ECHO_MSG} "Putting jdbc examples into ${PREFIX}/share/examples/pgsql" @ ${ECHO_MSG} "---------------------------------------------------------" - @ ${CAT} ${PKGDIR}/pkg-plist.doc >> ${TMPPLIST} -.endif .endif -.if !defined(NOPORTDOCS) - ${MKDIR} ${PREFIX}/share/doc/pgsql - @ ${GMAKE} -C ${WRKDIR}/${DISTNAME}/doc install - ${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/FAQ* ${PREFIX}/share/doc/pgsql - ${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/README* ${PREFIX}/share/doc/pgsql - ${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/TODO ${PREFIX}/share/doc/pgsql -# ${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/*ps.gz ${PREFIX}/share/doc/pgsql .endif .if !defined(BATCH) - @ more -e ${FILESDIR}/post-install-notes + @ more -e ${PREFIX}/pgsql/post-install-notes .endif .if !defined(DEBUG_FLAGS) .for file in ecpg pg_dump pg_id pg_passwd pg_version postgres psql @@ -292,4 +195,7 @@ post-install: .endfor .endif +post-clean: + @ ${RM} -f ${WRKDIRPREFIX}${.CURDIR}/Makefile.inc + .include <bsd.port.mk> diff --git a/databases/postgresql90-server/distinfo b/databases/postgresql90-server/distinfo index 309ea1e11614..fc87b8117bdc 100644 --- a/databases/postgresql90-server/distinfo +++ b/databases/postgresql90-server/distinfo @@ -1,4 +1,3 @@ -MD5 (postgresql/postgresql-7.0.2.base.tar.gz) = 871d23b85d9a3599a7ed75dfc7da7ba7 -MD5 (postgresql/postgresql-7.0.2.support.tar.gz) = c21180a6485d85785c8e69f0cbff05dd -MD5 (postgresql/postgresql-7.0.2.docs.tar.gz) = efac1f87463f252e54d72b256885b883 -MD5 (postgresql/postgresql-7.0.2.test.tar.gz) = 3443b3d83194c396f20aee2adc6f93bf +MD5 (postgresql/postgresql-7.0.3.base.tar.gz) = 0eeda8217b5b11e5a9351fc424808426 +MD5 (postgresql/postgresql-7.0.3.support.tar.gz) = b930f71068d776ef45402fcbebfa58cf +MD5 (postgresql/postgresql-7.0.3.docs.tar.gz) = 3d3fc76073f6d77febefc83f887fc87d diff --git a/databases/postgresql90-server/files/dot.profile.in b/databases/postgresql90-server/files/dot.profile.in new file mode 100644 index 000000000000..bd7ec45043be --- /dev/null +++ b/databases/postgresql90-server/files/dot.profile.in @@ -0,0 +1,16 @@ +PATH=${PATH}:%%PREFIX%%/pgsql/bin +PGLIB=%%PREFIX%%/pgsql/lib + +# note: PGDATA overwrites the -D startup option +PGDATA=%%PREFIX%%/pgsql/data + +export PATH MANPATH PGLIB PGDATA + +#You might want to set some locale stuff here +#PGDATESTYLE=ISO +#LC_ALL=sv_SE.ISO_88591-1 +#export PGDATESTYLE LC_ALL + +# if you want to make regression tests use this TZ +#TZ=PST8PDT +#export TZ diff --git a/databases/postgresql90-server/files/patch-au b/databases/postgresql90-server/files/patch-au new file mode 100644 index 000000000000..340521b49482 --- /dev/null +++ b/databases/postgresql90-server/files/patch-au @@ -0,0 +1,58 @@ +--- configure.in.orig Sun Nov 5 05:03:47 2000 ++++ configure.in Mon Dec 4 02:36:15 2000 +@@ -299,13 +299,28 @@ + [ --with-tcl build Tcl interfaces and pgtclsh ], + [ + case "$withval" in +- y | ye | yes) USE_TCL=true; USE_TK=true; AC_MSG_RESULT(enabled) ;; ++ y | ye | yes) USE_TCL=true; AC_MSG_RESULT(enabled) ;; + *) USE_TCL=; USE_TK=; AC_MSG_RESULT(disabled) ;; + esac + ], + [ USE_TCL=; USE_TK=; AC_MSG_RESULT(disabled) ] + ) + ++dnl We include tk support with tcl unless user says --without-tk ++if test USE_TCL = true ++then ++AC_MSG_CHECKING(setting USE_TK) ++AC_ARG_WITH( ++ tk, ++ [ --without-tk build Tcl *without* Tk ], ++ [ ++ case "$withval" in ++ y | ye | yes) USE_TK=true; USE_TK=true; AC_MSG_RESULT(enabled) ;; ++ *) USE_TK=n; AC_MSG_RESULT(disabled) ;; ++ esac ++ ] ++) ++fi + export USE_TCL + export USE_TK + +@@ -482,7 +497,7 @@ + #endif + ], + ELF_SYS=true, +-[if test "X$elf" = "Xyes" ++[if test "X$PORTOBJFORMAT" = "Xyes" + then + ELF_SYS=true + else +@@ -1248,10 +1263,15 @@ + else + AC_MSG_RESULT($TCL_CONFIG_SH) + AC_SUBST(TCL_CONFIG_SH) ++ . ${TCL_CONFIG_SH} ++ AC_SUBST(TCL_LIB_SPEC) + fi + fi + +-USE_TK=$USE_TCL # If TCL is disabled, disable TK ++USE_TK=${USE_TK:=$USE_TCL} # If TCL is disabled, disable TK ++ # otherwise -- enable unless explicitly ++ # disabled ++ + + dnl Check for Tk configuration script tkConfig.sh + if test "$USE_TK" = true diff --git a/databases/postgresql90-server/files/patch-av b/databases/postgresql90-server/files/patch-av new file mode 100644 index 000000000000..49b35f9e8dc1 --- /dev/null +++ b/databases/postgresql90-server/files/patch-av @@ -0,0 +1,17 @@ +--- interfaces/libpq/fe-connect.c Sun May 21 17:19:53 2000 ++++ interfaces/libpq/fe-connect.c Fri Sep 15 13:53:52 2000 +@@ -801 +801 @@ +- sprintf(conn->errorMessage, ++ printfPQExpBuffer(&conn->errorMessage, +@@ -809 +809 @@ +- sprintf(conn->errorMessage, "PQconnectDB() -- couldn't read postmaster response: errno=%d\n%s\n", ++ printfPQExpBuffer(&conn->errorMessage, "PQconnectDB() -- couldn't read postmaster response: errno=%d\n%s\n", +@@ -822 +822 @@ +- sprintf(conn->errorMessage, ++ printfPQExpBuffer(&conn->errorMessage, +@@ -832 +832 @@ +- sprintf(conn->errorMessage, ++ printfPQExpBuffer(&conn->errorMessage, +@@ -850 +850 @@ +- strcpy(conn->errorMessage, ++ printfPQExpBuffer(&conn->errorMessage, diff --git a/databases/postgresql90-server/files/patch-ba b/databases/postgresql90-server/files/patch-ba index a3b679b882c5..586d725c536a 100644 --- a/databases/postgresql90-server/files/patch-ba +++ b/databases/postgresql90-server/files/patch-ba @@ -1,5 +1,5 @@ ---- interfaces/jdbc/Makefile.orig Tue Mar 14 16:55:17 2000 -+++ interfaces/jdbc/Makefile Sun Apr 16 21:16:43 2000 +--- interfaces/jdbc/Makefile.orig Sun Nov 5 05:03:53 2000 ++++ interfaces/jdbc/Makefile Fri Dec 8 03:16:17 2000 @@ -10,10 +10,10 @@ FIND = find @@ -15,11 +15,3 @@ RM = rm -f TOUCH = touch -@@ -40,6 +40,7 @@ - @echo To compile, type: - @echo " $(MAKE) jdbc2" - @echo ------------------------------------------------------------ -+ $(MAKE) jdbc1 - - msg: - @echo ------------------------------------------------------------ diff --git a/databases/postgresql90-server/files/patch-be b/databases/postgresql90-server/files/patch-be new file mode 100644 index 000000000000..2f8c3c55566f --- /dev/null +++ b/databases/postgresql90-server/files/patch-be @@ -0,0 +1,9 @@ +This patches let you disable Tk even if you have it installed and +makes sure the TCL-library is added as a dependency for libpgtcl. +--- interfaces/libpgtcl/Makefile.in Tue Mar 7 20:58:36 2000 ++++ interfaces/libpgtcl/Makefile.in Wed Sep 20 08:57:28 2000 +@@ -29,3 +29,3 @@ + +-SHLIB_LINK+= $(LIBPQ) ++SHLIB_LINK+= $(LIBPQ) @TCL_LIB_SPEC@ + diff --git a/databases/postgresql90-server/files/pgsql.sh.tmpl b/databases/postgresql90-server/files/pgsql.sh.tmpl index e1673b4850c2..753e0b8aaf80 100644 --- a/databases/postgresql90-server/files/pgsql.sh.tmpl +++ b/databases/postgresql90-server/files/pgsql.sh.tmpl @@ -17,13 +17,13 @@ start) stop) [ -x !!PREFIX!!/pgsql/bin/pg_ctl ] && { - su -l pgsql -c 'exec !!PREFIX!!/pgsql/bin/pg_ctl -w -m fast stop' + exec su -l pgsql -c 'exec !!PREFIX!!/pgsql/bin/pg_ctl -w -m fast stop' } ;; status) [ -x !!PREFIX!!/pgsql/bin/pg_ctl ] && { - su -l pgsql -c 'exec !!PREFIX!!/pgsql/bin/pg_ctl status' + exec su -l pgsql -c 'exec !!PREFIX!!/pgsql/bin/pg_ctl status' } ;; diff --git a/databases/postgresql90-server/files/pkgIndex.tcl.in b/databases/postgresql90-server/files/pkgIndex.tcl.in new file mode 100644 index 000000000000..bd8329b15c69 --- /dev/null +++ b/databases/postgresql90-server/files/pkgIndex.tcl.in @@ -0,0 +1,4 @@ +# Package-index file for Pgtcl-package. Enables you to load PostgreSQL +# interface functions right into you TCL-interpreter as simply as +# package require Pgtcl +package ifneeded Pgtcl 1.3 "load %%PREFIX%%/lib/libpgtcl.so" diff --git a/databases/postgresql90-server/files/post-install-notes b/databases/postgresql90-server/files/post-install-notes index 289a7651109a..4c69908b2676 100644 --- a/databases/postgresql90-server/files/post-install-notes +++ b/databases/postgresql90-server/files/post-install-notes @@ -8,9 +8,12 @@ You may wish to subscribe to the PostgreSQL user-support mailing list. Send an e-mail to pgsql-questions-request@postgresql.org with the text "subscribe" in the message body. -If you built PostgreSQL with TCL support, you can install the port -"pgaccess" to get a TCL/TK based database frontend for database -operations. +If you built PostgreSQL with TCL/TK support, you can use the pgaccess +utility to get a TCL/TK based database frontend for database +operations. You do NOT need to install the pgaccess port separately. + +If you built in the TCL support, you can load the Pg package into your +TCL scripts as easily as ``package require Pgtcl''. To start PostgreSQL, run the startup script: -$PREFIX/etc/rc.d/pgsql.sh start +%%PREFIX%%/etc/rc.d/pgsql.sh start diff --git a/databases/postgresql90-server/files/pre-install-notes b/databases/postgresql90-server/files/pre-install-notes new file mode 100644 index 000000000000..72388933bd6d --- /dev/null +++ b/databases/postgresql90-server/files/pre-install-notes @@ -0,0 +1,9 @@ +# ---------------------------------------------------------------- +# UPGRADE NOTE! Depending on which version you are upgrading from, +# you may have to dump/restore existing databases +# as part of the update. +# This is *NOT* done by this port! +# For detailed instructions, see +# %%WRKDIR%%/%%DISTNAME%%/INSTALL +# after extraction. +# -------------------------------------------------------------- diff --git a/databases/postgresql90-server/pkg-plist.jdbc b/databases/postgresql90-server/pkg-plist.jdbc index bef5d75506b4..e751caa65063 100644 --- a/databases/postgresql90-server/pkg-plist.jdbc +++ b/databases/postgresql90-server/pkg-plist.jdbc @@ -10,4 +10,5 @@ share/examples/pgsql/jdbc/README_6.3 @dirrm share/examples/pgsql/jdbc @dirrm share/examples/pgsql share/java/classes/postgresql.jar +@unexec rmdir %D/share/java/classes 2>/dev/null || true @unexec rmdir %D/share/java 2>/dev/null || true diff --git a/databases/postgresql90-server/pkg-plist.notk b/databases/postgresql90-server/pkg-plist.notk new file mode 100644 index 000000000000..9f5d9e04af48 --- /dev/null +++ b/databases/postgresql90-server/pkg-plist.notk @@ -0,0 +1,6 @@ +pgsql/bin/pgtclsh +pgsql/include/libpgtcl.h +pgsql/lib/libpgtcl.a +pgsql/lib/libpgtcl.so +pgsql/lib/libpgtcl.so.2 +pgsql/lib/pltcl.so diff --git a/databases/postgresql90-server/scripts/configure.postgresql b/databases/postgresql90-server/scripts/configure.postgresql new file mode 100644 index 000000000000..5efe32a766f4 --- /dev/null +++ b/databases/postgresql90-server/scripts/configure.postgresql @@ -0,0 +1,267 @@ +#!/bin/sh +# -*- tab-width: 4; -*- +# ex:ts=4 +# +# $FreeBSD$ +# +if [ -f ${WRKDIRPREFIX}${CURDIR}/Makefile.inc ]; then + exit +fi + +if [ ! "${BATCH}" ]; then + dialog --title "Backup your data NOW" \ + --msgbox "`sed -e \"s#%%WRKDIR%%#${WRKDIR}#; s#%%DISTNAME%%#${DISTNAME}#\" < ${FILESDIR}/pre-install-notes`" \ + -1 -1 +fi + +#SSL=${NO_OPENSSL:+OFF} +#SSL=${NOSSL:-ON} + +if [ "${BATCH}" ]; then + set \"MultiByte\" +else + /usr/bin/dialog --title "configuration options" --clear \ + --checklist "\n\ +Please select desired options:" -1 -1 8 \ +JDBC "Java DataBase Connectivity" OFF \ +MultiByte "Multibyte for Multilingualism" ON \ +ODBC "Open Database Connectivity" OFF \ +Perl "Perl" OFF \ +TCL "Tcl" ON \ +TCLTK "Tcl/Tk" ON \ +SSL "Secure Socket Layer (requires certificate)" OFF \ +KRB5 "Kerberos 5" OFF \ +2> /tmp/checklist.tmp.$$ + + retval=$? + + if [ -s /tmp/checklist.tmp.$$ ]; then + set `cat /tmp/checklist.tmp.$$` + fi + rm -f /tmp/checklist.tmp.$$ + + case $retval in + 0) if [ -z "$*" ]; then + echo "Nothing selected" + fi + ;; + 1) echo "Cancel pressed." + exit 1 + ;; + esac +fi + +${MKDIR} -p ${WRKDIRPREFIX}${CURDIR} +exec > ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + +while [ "$1" ]; do + case $1 in + \"JDBC\") + # use JAVA_HOME if set correctly + echo "# JDBC" + if [ "${JAVA_HOME}" -a -x ${JAVA_HOME}/bin/javac ]; then + echo JAVA_HOME=${JAVA_HOME} + if [ "$(${JAVA_HOME}/bin/java -version 2>&1 | egrep \"1.1)" ]; then + JAVAVERSION=1 + echo BUILD_DEPENDS+= ${JAVA_HOME}/bin/javac:\${PORTSDIR}/java/jdk + else + JAVAVERSION=2 + echo BUILD_DEPENDS+= ${JAVA_HOME}/bin/javac:\${PORTSDIR}/java/jdk12-beta + fi + else + JAVAVERSION=1 + echo BUILD_DEPENDS+= \${LOCALBASE}/jdk1.1.8/bin/javac:\${PORTSDIR}/java/jdk + echo JAVA_HOME=\${LOCALBASE}/jdk1.1.8 + fi + cat <<-EOF + JAVAVERSION=${JAVAVERSION} + WITH_JDBC=YES + SCRIPTS_ENV+= JAVA_HOME=\${JAVA_HOME} + + EOF + ;; + \"MultiByte\") + MULTIBYTE=1 + ;; + \"ODBC\") + cat <<-EOF + # ODBC + WITH_ODBC=YES + CONFIGURE_ARGS+= --with-odbc + + EOF + ;; + \"Perl\") + cat <<-EOF + # PERL + WITH_PERL=YES + CONFIGURE_ARGS+= --with-perl + + EOF + ;; + \"TCL\") + TCL=1 + ;; + \"TCLTK\") + echo "#TCLTK" + echo WITH_TK=YES + echo + TCL=1 + ;; + \"SSL\") + cat <<-EOF + # SSL + USE_OPENSSL= yes + CFLAGS+= -DUSE_SSL + WITH_SSL= yes + CONFIGURE_ENV+= LDFLAGS="-L\${OPENSSLLIB} -lssl -lcrypto" + + EOF + ;; + \"KRB5\") + KRB5=1 + ;; + \"nothing\"|true) + ;; + *) + echo "Invalid option(s): $*" > /dev/stderr + rm -f ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + exit 1 + ;; + esac + shift +done + +exec > /dev/stderr + +# if multibyte, determine charset +echo "# Multibyte" + +if [ ! "${MULTIBYTE}" ]; then + echo "WITHOUT_MULTIBYTE=YES" >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc +else + if [ "${BATCH}" ]; then + set \"nothing\" + else + /usr/bin/dialog --title "configuration options" --clear \ + --radiolist "\n\ +Please select desired options:" -1 -1 16 \ +nothing "Default Encoding" ON \ +SQL_ASCII "SQL_ASCII" OFF \ +LATIN1 "LATIN1" OFF \ +LATIN2 "LATIN2" OFF \ +LATIN3 "LATIN3" OFF \ +LATIN4 "LATIN4" OFF \ +LATIN5 "LATIN5" OFF \ +EUC_JP "EUC_JP" OFF \ +EUC_CN "EUC_CN" OFF \ +EUC_KR "EUC_KR" OFF \ +EUC_TW "EUC_TW" OFF \ +KOI8 "KOI8" OFF \ +UNICODE "UNICODE" OFF \ +MULE_INTERNAL "MULE_INTERNAL" OFF \ +WIN "WIN" OFF \ +ALT "ALT" OFF \ +2> /tmp/checklist.tmp.$$ + + retval=$? + + if [ -s /tmp/checklist.tmp.$$ ]; then + set `cat /tmp/checklist.tmp.$$` + fi + rm -f /tmp/checklist.tmp.$$ + if [ $retval = 1 ]; then + echo "Cancel pressed." + rm ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + exit 1 + fi + fi + + if [ "$1" = "nothing" ]; then + echo "CONFIGURE_ARGS+= --enable-multibyte" \ + >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + else + echo "CONFIGURE_ARGS+= --enable-multibyte=$1" \ + >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + fi +fi +echo + +if [ "${TCL}" ]; then + echo "# TCL" >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + if [ "${BATCH}" ]; then + echo WITH_TCL=8.3 >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + else + dialog --title "TCL version" \ + --inputbox "Please enter TCL version. Default is 8.3." -1 -1 "8.3" \ + 2> /tmp/checklist.tmp.$$ + retval=$? + if [ -s /tmp/checklist.tmp.$$ ]; then + set `cat /tmp/checklist.tmp.$$` + fi + rm -f /tmp/checklist.tmp.$$ + case $retval in + 0) if [ -z "$*" ]; then + echo "Nothing selected" + fi + ;; + 1) echo "Cancel pressed." + rm -f ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + exit 1 + ;; + esac + echo WITH_TCL=\"$1\" >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + fi + cat <<-EOF >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + CONFIGURE_ARGS+= --with-tcl --with-tclconfig="\${TCLCONFIG}" + TCLV=\${WITH_TCL:S/.//} + TCL_INCDIR= \${LOCALBASE}/include/tcl\${WITH_TCL} + MAKE_ENV= TCL_INCDIR=\${TCL_INCDIR} + LIB_DEPENDS= tcl\${TCLV}.1:\${PORTSDIR}/lang/tcl\${TCLV} + TCLCONFIG= '\${LOCALBASE}/lib/tcl\${WITH_TCL}' + .if defined(WITH_TK) + TK_INCDIR= \${LOCALBASE}/include/tk\${WITH_TCL} + CONFIGURE_ENV+= WISH=\${LOCALBASE}/bin/wish\${WITH_TCL} + LIB_DEPENDS+= tk\${TCLV}.1:\${PORTSDIR}/x11-toolkits/tk\${TCLV} + TCLCONFIG+= '\${LOCALBASE}/lib/tk\${WITH_TCL}' + TCL_PLIST= pkg-plist.tcl + .else + TCL_PLIST= pkg-plist.notk + CONFIGURE_ARGS+= --without-tk + .endif + + EOF +fi + +if [ "${KRB5}" ]; then + if [ "${BATCH}" ]; then + # never gets here, but what the heck... + echo KRB5_HOME=\${LOCALBASE} >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + else + dialog --inputbox "Please enter the KRB5_HOME path" -1 -1 "${KRB_HOME:-${LOCALBASE}}" \ + 2> /tmp/checklist.tmp.$$ + retval=$? + if [ -s /tmp/checklist.tmp.$$ ]; then + set `cat /tmp/checklist.tmp.$$` + fi + rm -f /tmp/checklist.tmp.$$ + case $retval in + 0) if [ -z "$*" ]; then + echo "No input" + fi + ;; + 1) echo "Cancel pressed." + rm -f ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + exit 1 + ;; + esac + echo KRB5_HOME=\"$1\" >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + fi + cat <<-EOF >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + .if defined(KRB5_HOME) && exists(\${KRB5_HOME}) + CONFIGURE_KRB= --with-krb5=\${KRB5_HOME} \ + --with-krb-keytab=FILE:\${PREFIX}/pgsql/etc/keytab + .endif + + EOF +fi diff --git a/databases/postgresql91-server/Makefile b/databases/postgresql91-server/Makefile index 5f64023c8cf5..08e0329a0795 100644 --- a/databases/postgresql91-server/Makefile +++ b/databases/postgresql91-server/Makefile @@ -6,7 +6,7 @@ # PORTNAME= postgresql -PORTVERSION= 7.0.2 +PORTVERSION= 7.0.3 CATEGORIES= databases MASTER_SITES= ftp://ftp.postgresql.org/pub/%SUBDIR%/ \ ftp://ftp.de.postgresql.org/%SUBDIR%/ \ @@ -22,59 +22,12 @@ DIST_SUBDIR= postgresql MAINTAINER= girgen@partitur.se +BUILD_DEPENDS= autoconf:${PORTSDIR}/devel/autoconf + Y2K= http://www.postgresql.org/y2k.html INSTALLS_SHLIB= YES LDCONFIG_DIRS= %%PREFIX%%/pgsql/lib -BUILD_DEPENDS= autoconf:${PORTSDIR}/devel/autoconf - -.if defined(KRB5_HOME) && exists(${KRB5_HOME}) -CONFIGURE_KRB= --with-krb5=${KRB5_HOME} \ - --with-krb-keytab=FILE:${PREFIX}/pgsql/etc/keytab -.endif - -# if you want to use the tcl/tk frontend pgaccess, then you need to build -# postgresql with tcl support by typing: make -DWITH_TCL -.if defined(WITH_TCL) -TCL_INCDIR= ${LOCALBASE}/include/tcl8.3 -TK_INCDIR= ${LOCALBASE}/include/tk8.3 -MAKE_ENV= TCL_INCDIR=${TCL_INCDIR} -CONFIGURE_ENV= WISH=${LOCALBASE}/bin/wish8.3 -LIB_DEPENDS= tcl83.1:${PORTSDIR}/lang/tcl83 \ - tk83.1:${PORTSDIR}/x11-toolkits/tk83 -CONFIGURE_TCL= --with-tcl --with-tclconfig="${LOCALBASE}/lib/tcl8.3 ${LOCALBASE}/lib/tk8.3" -.endif - -# if you want to disable the multibyte support, type: -# make -DWITHOUT_MULTIBYTE -# -# if you want to set the default encoding for the multibyte support, type: -# make DEFAULT_ENCODING=<encoding> -# where <encoding> is one of these: -# SQL_ASCII LATIN1 LATIN2 LATIN3 LATIN4 LATIN5 -# EUC_JP EUC_CN EUC_KR EUC_TW KOI8 -# UNICODE MULE_INTERNAL WIN ALT -.if defined(WITHOUT_MULTIBYTE) -CONFIGURE_MULTIBYTE= # none -.elif defined(DEFAULT_ENCODING) -CONFIGURE_MULTIBYTE= --enable-multibyte="${DEFAULT_ENCODING}" -.else -CONFIGURE_MULTIBYTE= --enable-multibyte -.endif -.if defined(WITH_PERL) -CONFIGURE_PERL= --with-perl -.endif -.if defined(WITH_ODBC) -CONFIGURE_ODBC= --with-odbc -.endif - -# if you want jdbc, type make -DWITH_JDBC -# Honors JAVA_HOME if you have it set, and don't want the dependency. -.if defined(WITH_JDBC) -JAVA_HOME?= ${LOCALBASE}/jdk1.1.8 -BUILD_DEPENDS= ${JAVA_HOME}/bin/javac:${PORTSDIR}/java/jdk -SCRIPTS_ENV+= JAVA_HOME=${JAVA_HOME} -.endif WRKSRC= ${WRKDIR}/${DISTNAME}/src DOCDIR= ${WRKDIR}/${DISTNAME}/doc @@ -86,11 +39,6 @@ CONFIGURE_ARGS= --prefix=${PREFIX}/pgsql \ --enable-locale \ --with-template=`uname -s | ${TR} '[A-Z]' '[a-z]'` \ --with-includes="${PREFIX}/include ${TCL_INCDIR} ${TK_INCDIR}" \ - ${CONFIGURE_KRB} \ - ${CONFIGURE_TCL} \ - ${CONFIGURE_MULTIBYTE} \ - ${CONFIGURE_PERL} \ - ${CONFIGURE_ODBC} \ --with-libraries=${PREFIX}/lib MAN1= createdb.1 createlang.1 createuser.1 dropdb.1 droplang.1 \ @@ -117,50 +65,21 @@ MANL= abort.l alter_group.l alter_table.l alter_user.l \ MANPREFIX= ${PREFIX}/pgsql -pre-fetch: - @${ECHO_MSG} "To install and run postgresql you need to compile kernel with:" - @${ECHO_MSG} " options \"SYSVSHM, SYSVSEM, SYSVMSG\"" -.if !defined(WITH_TCL) - @${ECHO_MSG} "To build the \"PostgreSQL to Tcl interface library\", libpgtcl, type:" - @${ECHO_MSG} " make -DWITH_TCL" -.else - @${ECHO_MSG} "Building PostgreSQL with \"libpgtcl\"." -.endif -.if !defined(WITHOUT_MULTIBYTE) - @${ECHO_MSG} "To disable multibyte support, type:" - @${ECHO_MSG} " make -DWITHOUT_MULTIBYTE" -.if !defined(DEFAULT_ENCODING) - @${ECHO_MSG} "To set the default encoding for the multibyte support, type:" - @${ECHO_MSG} " make DEFAULT_ENCODING=<encoding>" - @${ECHO_MSG} "where <encoding> is one of these:" - @${ECHO_MSG} " SQL_ASCII LATIN1 LATIN2 LATIN3 LATIN4 LATIN5" - @${ECHO_MSG} " EUC_JP EUC_CN EUC_KR EUC_TW KOI8" - @${ECHO_MSG} " UNICODE MULE_INTERNAL WIN ALT" -.else - @${ECHO_MSG} "The default encoding is '${DEFAULT_ENCODING}'." -.endif -.else - @${ECHO_MSG} "Building PostgreSQL without multibyte support." -.endif -.if !defined(WITH_JDBC) - @${ECHO_MSG} "To build Java (JDBC) support, type:" - @${ECHO_MSG} " make -DWITH_JDBC" -.else - @${ECHO_MSG} "Building PostgreSQL with \"postgresql.jar\"." -.endif -.if !defined(WITH_PERL) - @${ECHO_MSG} "To build Perl interface and pl/Perl interpreter:" - @${ECHO_MSG} " make -DWITH_PERL" -.else - @${ECHO_MSG} "Building PostgreSQL with \"pl/Perl\"." -.endif -.if !defined(WITH_ODBC) - @${ECHO_MSG} "To build the ODBC driver package:" - @${ECHO_MSG} " make -DWITH_ODBC" -.else - @${ECHO_MSG} "Building PostgreSQL with ODBC Drivers." +SCRIPTS_ENV= WRKDIRPREFIX="${WRKDIRPREFIX}" \ + WRKDIR="${WRKDIR}" \ + FILESDIR="${FILESDIR}" \ + TOUCH="${TOUCH}" \ + MKDIR="${MKDIR}" \ + NO_OPENSSL="${NO_OPENSSL}" \ + DISTNAME="${DISTNAME}" + +.if exists(${WRKDIRPREFIX}${.CURDIR}/Makefile.inc) +.include "${WRKDIRPREFIX}${.CURDIR}/Makefile.inc" .endif +pre-extract: + @ ${SETENV} ${SCRIPTS_ENV} ${SH} ${SCRIPTDIR}/configure.postgresql + post-patch: @ ${MV} ${WRKSRC}/template/freebsd ${WRKSRC}/template/freebsd.orig @ ${SED} -e 's#CFLAGS:-O2 -m486 -pipe#CFLAGS:${CFLAGS}#' \ @@ -180,16 +99,8 @@ pre-configure: post-build: .if defined(WITH_JDBC) - @ cd ${WRKSRC}/interfaces/jdbc && ${GMAKE} -.if !defined(NOPORTDOCS) - @ cd ${WRKSRC}/interfaces/jdbc && ${GMAKE} examples -.endif + @ ${GMAKE} -C ${WRKSRC}/interfaces/jdbc jdbc${JAVAVERSION} .endif - @ ${ECHO} "------------------------------------------------------------" - @ ${ECHO} "Dump existing databases, before installing new db version !!" - @ ${ECHO} "Detailed instructions, see" - @ ${ECHO} "${WRKDIR}/${DISTNAME}/INSTALL" - @ ${ECHO} "------------------------------------------------------------" pre-install: .if defined(PACKAGE_BUILDING) @@ -197,53 +108,54 @@ pre-install: .endif @ ${MKDIR} ${PREFIX}/pgsql @ ${SETENV} ${MAKE_ENV} perl ${SCRIPTDIR}/createuser +.if !defined(BATCH) + @ ${SED} -e "s#%%WRKDIR%%#${WRKDIR}#; s#%%DISTNAME%%#${DISTNAME}#" \ + < ${FILESDIR}/pre-install-notes | more -e +.endif post-install: .if defined(NOPORTDOCS) - @ ( cd ${DOCDIR}; ${GMAKE} man ) + @ ${GMAKE} -C ${DOCDIR} man .else - @ ( cd ${DOCDIR}; ${GMAKE} install ) + @ ${GMAKE} -C ${DOCDIR} install + ${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/FAQ* ${PREFIX}/share/doc/pgsql + ${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/README* ${PREFIX}/share/doc/pgsql + ${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/TODO ${PREFIX}/share/doc/pgsql +# ${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/*ps.gz ${PREFIX}/share/doc/pgsql + @ ${CAT} ${PKGDIR}/pkg-plist.doc >> ${TMPPLIST} .endif @ if [ ! -f ${PREFIX}/pgsql/.profile ]; then \ - ${ECHO} "PATH=${PATH}:${PREFIX}/pgsql/bin" \ + ${SED} 's|%%PREFIX%%|${PREFIX}|g' \ + < ${FILESDIR}/dot.profile.in \ > ${PREFIX}/pgsql/.profile; \ - ${ECHO} "MANPATH=${MANPATH}:${PREFIX}/pgsql/man" \ - >> ${PREFIX}/pgsql/.profile; \ - ${ECHO} "PGLIB=${PREFIX}/pgsql/lib" \ - >> ${PREFIX}/pgsql/.profile; \ - ${ECHO} "# note: PGDATA overwrites the -D startup option" \ - >> ${PREFIX}/pgsql/.profile; \ - ${ECHO} "PGDATA=${PREFIX}/pgsql/data" \ - >> ${PREFIX}/pgsql/.profile; \ - ${ECHO} "DISPLAY=:0" \ - >> ${PREFIX}/pgsql/.profile; \ - ${ECHO} "export PATH MANPATH PGLIB PGDATA DISPLAY" \ - >> ${PREFIX}/pgsql/.profile; \ - ${ECHO} "# if you want to make regression tests use this TZ" \ - >> ${PREFIX}/pgsql/.profile; \ - ${ECHO} "#TZ=PST8PDT" \ - >> ${PREFIX}/pgsql/.profile; \ - ${ECHO} "#export TZ" \ - >> ${PREFIX}/pgsql/.profile; \ fi @ ${CHOWN} -R pgsql:pgsql ${PREFIX}/pgsql @ ${CHOWN} root:pgsql ${PREFIX}/pgsql/lib @ ${ECHO} 'Initializing PostgreSQL Databases - this may take a few minutes...' @ ${SETENV} OBJFORMAT=${PORTOBJFORMAT} ${LDCONFIG} -m ${PREFIX}/pgsql/lib - @ su -l pgsql -c 'PATH=${PREFIX}/pgsql/bin:${PATH} LD_LIBRARY_PATH=${PREFIX}/pgsql/lib ${PREFIX}/pgsql/bin/initdb --pglib=${PREFIX}/pgsql/lib --pgdata=${PREFIX}/pgsql/data' +# '-' so we don't fail to create packagelist at this stage, +# when we already have everything installed on top of previous version + -@ su -l pgsql -c 'PATH=${PREFIX}/pgsql/bin:${PATH} ${PREFIX}/pgsql/bin/initdb --pglib=${PREFIX}/pgsql/lib --pgdata=${PREFIX}/pgsql/data' @ ${SED} -e "s=!!PREFIX!!=${PREFIX}=g" < ${FILESDIR}/pgsql.sh.tmpl \ > ${PREFIX}/etc/rc.d/pgsql.sh @ ${CHMOD} 554 ${PREFIX}/etc/rc.d/pgsql.sh @ ${CHOWN} root.pgsql ${PREFIX}/etc/rc.d/pgsql.sh - @ ${INSTALL_DATA} ${FILESDIR}/post-install-notes ${PREFIX}/pgsql + @ ${SED} -e 's#%%PREFIX%%#${PREFIX}#' < ${FILESDIR}/post-install-notes \ + > ${PREFIX}/pgsql/post-install-notes .if defined(WITHOUT_MULTIBYTE) @${CP} ${TMPPLIST} ${TMPPLIST}.nomulti @${GREP} -v pgsql/bin/pg_encoding ${TMPPLIST}.nomulti > ${TMPPLIST} .endif .if defined(WITH_TCL) @${CP} ${TMPPLIST} ${TMPPLIST}.notcl - @${CAT} ${PKGDIR}/pkg-plist.tcl ${TMPPLIST}.notcl > ${TMPPLIST} + @${CAT} ${PKGDIR}/${TCL_PLIST} ${TMPPLIST}.notcl > ${TMPPLIST} @${RM} ${TMPPLIST}.notcl +# Preparing a loadable TCL-package (pkgIndex.tcl) +# XXX This directory and the single file are not registered in +# XXX the PLIST, because of different PREFIX. + @${MKDIR} ${LOCALBASE}/lib/tcl${WITH_TCL}/Pgtcl1.3 + @${SED} 's|%%PREFIX%%|${PREFIX}|' < ${FILESDIR}/pkgIndex.tcl.in \ + > ${LOCALBASE}/lib/tcl${WITH_TCL}/Pgtcl1.3/pkgIndex.tcl .endif .if defined(WITH_ODBC) @${CP} ${TMPPLIST} ${TMPPLIST}.noodbc @@ -272,19 +184,10 @@ post-install: @ ${ECHO_MSG} "---------------------------------------------------------" @ ${ECHO_MSG} "Putting jdbc examples into ${PREFIX}/share/examples/pgsql" @ ${ECHO_MSG} "---------------------------------------------------------" - @ ${CAT} ${PKGDIR}/pkg-plist.doc >> ${TMPPLIST} -.endif .endif -.if !defined(NOPORTDOCS) - ${MKDIR} ${PREFIX}/share/doc/pgsql - @ ${GMAKE} -C ${WRKDIR}/${DISTNAME}/doc install - ${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/FAQ* ${PREFIX}/share/doc/pgsql - ${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/README* ${PREFIX}/share/doc/pgsql - ${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/TODO ${PREFIX}/share/doc/pgsql -# ${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/*ps.gz ${PREFIX}/share/doc/pgsql .endif .if !defined(BATCH) - @ more -e ${FILESDIR}/post-install-notes + @ more -e ${PREFIX}/pgsql/post-install-notes .endif .if !defined(DEBUG_FLAGS) .for file in ecpg pg_dump pg_id pg_passwd pg_version postgres psql @@ -292,4 +195,7 @@ post-install: .endfor .endif +post-clean: + @ ${RM} -f ${WRKDIRPREFIX}${.CURDIR}/Makefile.inc + .include <bsd.port.mk> diff --git a/databases/postgresql91-server/distinfo b/databases/postgresql91-server/distinfo index 309ea1e11614..fc87b8117bdc 100644 --- a/databases/postgresql91-server/distinfo +++ b/databases/postgresql91-server/distinfo @@ -1,4 +1,3 @@ -MD5 (postgresql/postgresql-7.0.2.base.tar.gz) = 871d23b85d9a3599a7ed75dfc7da7ba7 -MD5 (postgresql/postgresql-7.0.2.support.tar.gz) = c21180a6485d85785c8e69f0cbff05dd -MD5 (postgresql/postgresql-7.0.2.docs.tar.gz) = efac1f87463f252e54d72b256885b883 -MD5 (postgresql/postgresql-7.0.2.test.tar.gz) = 3443b3d83194c396f20aee2adc6f93bf +MD5 (postgresql/postgresql-7.0.3.base.tar.gz) = 0eeda8217b5b11e5a9351fc424808426 +MD5 (postgresql/postgresql-7.0.3.support.tar.gz) = b930f71068d776ef45402fcbebfa58cf +MD5 (postgresql/postgresql-7.0.3.docs.tar.gz) = 3d3fc76073f6d77febefc83f887fc87d diff --git a/databases/postgresql91-server/files/dot.profile.in b/databases/postgresql91-server/files/dot.profile.in new file mode 100644 index 000000000000..bd7ec45043be --- /dev/null +++ b/databases/postgresql91-server/files/dot.profile.in @@ -0,0 +1,16 @@ +PATH=${PATH}:%%PREFIX%%/pgsql/bin +PGLIB=%%PREFIX%%/pgsql/lib + +# note: PGDATA overwrites the -D startup option +PGDATA=%%PREFIX%%/pgsql/data + +export PATH MANPATH PGLIB PGDATA + +#You might want to set some locale stuff here +#PGDATESTYLE=ISO +#LC_ALL=sv_SE.ISO_88591-1 +#export PGDATESTYLE LC_ALL + +# if you want to make regression tests use this TZ +#TZ=PST8PDT +#export TZ diff --git a/databases/postgresql91-server/files/patch-au b/databases/postgresql91-server/files/patch-au new file mode 100644 index 000000000000..340521b49482 --- /dev/null +++ b/databases/postgresql91-server/files/patch-au @@ -0,0 +1,58 @@ +--- configure.in.orig Sun Nov 5 05:03:47 2000 ++++ configure.in Mon Dec 4 02:36:15 2000 +@@ -299,13 +299,28 @@ + [ --with-tcl build Tcl interfaces and pgtclsh ], + [ + case "$withval" in +- y | ye | yes) USE_TCL=true; USE_TK=true; AC_MSG_RESULT(enabled) ;; ++ y | ye | yes) USE_TCL=true; AC_MSG_RESULT(enabled) ;; + *) USE_TCL=; USE_TK=; AC_MSG_RESULT(disabled) ;; + esac + ], + [ USE_TCL=; USE_TK=; AC_MSG_RESULT(disabled) ] + ) + ++dnl We include tk support with tcl unless user says --without-tk ++if test USE_TCL = true ++then ++AC_MSG_CHECKING(setting USE_TK) ++AC_ARG_WITH( ++ tk, ++ [ --without-tk build Tcl *without* Tk ], ++ [ ++ case "$withval" in ++ y | ye | yes) USE_TK=true; USE_TK=true; AC_MSG_RESULT(enabled) ;; ++ *) USE_TK=n; AC_MSG_RESULT(disabled) ;; ++ esac ++ ] ++) ++fi + export USE_TCL + export USE_TK + +@@ -482,7 +497,7 @@ + #endif + ], + ELF_SYS=true, +-[if test "X$elf" = "Xyes" ++[if test "X$PORTOBJFORMAT" = "Xyes" + then + ELF_SYS=true + else +@@ -1248,10 +1263,15 @@ + else + AC_MSG_RESULT($TCL_CONFIG_SH) + AC_SUBST(TCL_CONFIG_SH) ++ . ${TCL_CONFIG_SH} ++ AC_SUBST(TCL_LIB_SPEC) + fi + fi + +-USE_TK=$USE_TCL # If TCL is disabled, disable TK ++USE_TK=${USE_TK:=$USE_TCL} # If TCL is disabled, disable TK ++ # otherwise -- enable unless explicitly ++ # disabled ++ + + dnl Check for Tk configuration script tkConfig.sh + if test "$USE_TK" = true diff --git a/databases/postgresql91-server/files/patch-av b/databases/postgresql91-server/files/patch-av new file mode 100644 index 000000000000..49b35f9e8dc1 --- /dev/null +++ b/databases/postgresql91-server/files/patch-av @@ -0,0 +1,17 @@ +--- interfaces/libpq/fe-connect.c Sun May 21 17:19:53 2000 ++++ interfaces/libpq/fe-connect.c Fri Sep 15 13:53:52 2000 +@@ -801 +801 @@ +- sprintf(conn->errorMessage, ++ printfPQExpBuffer(&conn->errorMessage, +@@ -809 +809 @@ +- sprintf(conn->errorMessage, "PQconnectDB() -- couldn't read postmaster response: errno=%d\n%s\n", ++ printfPQExpBuffer(&conn->errorMessage, "PQconnectDB() -- couldn't read postmaster response: errno=%d\n%s\n", +@@ -822 +822 @@ +- sprintf(conn->errorMessage, ++ printfPQExpBuffer(&conn->errorMessage, +@@ -832 +832 @@ +- sprintf(conn->errorMessage, ++ printfPQExpBuffer(&conn->errorMessage, +@@ -850 +850 @@ +- strcpy(conn->errorMessage, ++ printfPQExpBuffer(&conn->errorMessage, diff --git a/databases/postgresql91-server/files/patch-ba b/databases/postgresql91-server/files/patch-ba index a3b679b882c5..586d725c536a 100644 --- a/databases/postgresql91-server/files/patch-ba +++ b/databases/postgresql91-server/files/patch-ba @@ -1,5 +1,5 @@ ---- interfaces/jdbc/Makefile.orig Tue Mar 14 16:55:17 2000 -+++ interfaces/jdbc/Makefile Sun Apr 16 21:16:43 2000 +--- interfaces/jdbc/Makefile.orig Sun Nov 5 05:03:53 2000 ++++ interfaces/jdbc/Makefile Fri Dec 8 03:16:17 2000 @@ -10,10 +10,10 @@ FIND = find @@ -15,11 +15,3 @@ RM = rm -f TOUCH = touch -@@ -40,6 +40,7 @@ - @echo To compile, type: - @echo " $(MAKE) jdbc2" - @echo ------------------------------------------------------------ -+ $(MAKE) jdbc1 - - msg: - @echo ------------------------------------------------------------ diff --git a/databases/postgresql91-server/files/patch-be b/databases/postgresql91-server/files/patch-be new file mode 100644 index 000000000000..2f8c3c55566f --- /dev/null +++ b/databases/postgresql91-server/files/patch-be @@ -0,0 +1,9 @@ +This patches let you disable Tk even if you have it installed and +makes sure the TCL-library is added as a dependency for libpgtcl. +--- interfaces/libpgtcl/Makefile.in Tue Mar 7 20:58:36 2000 ++++ interfaces/libpgtcl/Makefile.in Wed Sep 20 08:57:28 2000 +@@ -29,3 +29,3 @@ + +-SHLIB_LINK+= $(LIBPQ) ++SHLIB_LINK+= $(LIBPQ) @TCL_LIB_SPEC@ + diff --git a/databases/postgresql91-server/files/pgsql.sh.tmpl b/databases/postgresql91-server/files/pgsql.sh.tmpl index e1673b4850c2..753e0b8aaf80 100644 --- a/databases/postgresql91-server/files/pgsql.sh.tmpl +++ b/databases/postgresql91-server/files/pgsql.sh.tmpl @@ -17,13 +17,13 @@ start) stop) [ -x !!PREFIX!!/pgsql/bin/pg_ctl ] && { - su -l pgsql -c 'exec !!PREFIX!!/pgsql/bin/pg_ctl -w -m fast stop' + exec su -l pgsql -c 'exec !!PREFIX!!/pgsql/bin/pg_ctl -w -m fast stop' } ;; status) [ -x !!PREFIX!!/pgsql/bin/pg_ctl ] && { - su -l pgsql -c 'exec !!PREFIX!!/pgsql/bin/pg_ctl status' + exec su -l pgsql -c 'exec !!PREFIX!!/pgsql/bin/pg_ctl status' } ;; diff --git a/databases/postgresql91-server/files/pkgIndex.tcl.in b/databases/postgresql91-server/files/pkgIndex.tcl.in new file mode 100644 index 000000000000..bd8329b15c69 --- /dev/null +++ b/databases/postgresql91-server/files/pkgIndex.tcl.in @@ -0,0 +1,4 @@ +# Package-index file for Pgtcl-package. Enables you to load PostgreSQL +# interface functions right into you TCL-interpreter as simply as +# package require Pgtcl +package ifneeded Pgtcl 1.3 "load %%PREFIX%%/lib/libpgtcl.so" diff --git a/databases/postgresql91-server/files/post-install-notes b/databases/postgresql91-server/files/post-install-notes index 289a7651109a..4c69908b2676 100644 --- a/databases/postgresql91-server/files/post-install-notes +++ b/databases/postgresql91-server/files/post-install-notes @@ -8,9 +8,12 @@ You may wish to subscribe to the PostgreSQL user-support mailing list. Send an e-mail to pgsql-questions-request@postgresql.org with the text "subscribe" in the message body. -If you built PostgreSQL with TCL support, you can install the port -"pgaccess" to get a TCL/TK based database frontend for database -operations. +If you built PostgreSQL with TCL/TK support, you can use the pgaccess +utility to get a TCL/TK based database frontend for database +operations. You do NOT need to install the pgaccess port separately. + +If you built in the TCL support, you can load the Pg package into your +TCL scripts as easily as ``package require Pgtcl''. To start PostgreSQL, run the startup script: -$PREFIX/etc/rc.d/pgsql.sh start +%%PREFIX%%/etc/rc.d/pgsql.sh start diff --git a/databases/postgresql91-server/files/pre-install-notes b/databases/postgresql91-server/files/pre-install-notes new file mode 100644 index 000000000000..72388933bd6d --- /dev/null +++ b/databases/postgresql91-server/files/pre-install-notes @@ -0,0 +1,9 @@ +# ---------------------------------------------------------------- +# UPGRADE NOTE! Depending on which version you are upgrading from, +# you may have to dump/restore existing databases +# as part of the update. +# This is *NOT* done by this port! +# For detailed instructions, see +# %%WRKDIR%%/%%DISTNAME%%/INSTALL +# after extraction. +# -------------------------------------------------------------- diff --git a/databases/postgresql91-server/pkg-plist.jdbc b/databases/postgresql91-server/pkg-plist.jdbc index bef5d75506b4..e751caa65063 100644 --- a/databases/postgresql91-server/pkg-plist.jdbc +++ b/databases/postgresql91-server/pkg-plist.jdbc @@ -10,4 +10,5 @@ share/examples/pgsql/jdbc/README_6.3 @dirrm share/examples/pgsql/jdbc @dirrm share/examples/pgsql share/java/classes/postgresql.jar +@unexec rmdir %D/share/java/classes 2>/dev/null || true @unexec rmdir %D/share/java 2>/dev/null || true diff --git a/databases/postgresql91-server/pkg-plist.notk b/databases/postgresql91-server/pkg-plist.notk new file mode 100644 index 000000000000..9f5d9e04af48 --- /dev/null +++ b/databases/postgresql91-server/pkg-plist.notk @@ -0,0 +1,6 @@ +pgsql/bin/pgtclsh +pgsql/include/libpgtcl.h +pgsql/lib/libpgtcl.a +pgsql/lib/libpgtcl.so +pgsql/lib/libpgtcl.so.2 +pgsql/lib/pltcl.so diff --git a/databases/postgresql91-server/scripts/configure.postgresql b/databases/postgresql91-server/scripts/configure.postgresql new file mode 100644 index 000000000000..5efe32a766f4 --- /dev/null +++ b/databases/postgresql91-server/scripts/configure.postgresql @@ -0,0 +1,267 @@ +#!/bin/sh +# -*- tab-width: 4; -*- +# ex:ts=4 +# +# $FreeBSD$ +# +if [ -f ${WRKDIRPREFIX}${CURDIR}/Makefile.inc ]; then + exit +fi + +if [ ! "${BATCH}" ]; then + dialog --title "Backup your data NOW" \ + --msgbox "`sed -e \"s#%%WRKDIR%%#${WRKDIR}#; s#%%DISTNAME%%#${DISTNAME}#\" < ${FILESDIR}/pre-install-notes`" \ + -1 -1 +fi + +#SSL=${NO_OPENSSL:+OFF} +#SSL=${NOSSL:-ON} + +if [ "${BATCH}" ]; then + set \"MultiByte\" +else + /usr/bin/dialog --title "configuration options" --clear \ + --checklist "\n\ +Please select desired options:" -1 -1 8 \ +JDBC "Java DataBase Connectivity" OFF \ +MultiByte "Multibyte for Multilingualism" ON \ +ODBC "Open Database Connectivity" OFF \ +Perl "Perl" OFF \ +TCL "Tcl" ON \ +TCLTK "Tcl/Tk" ON \ +SSL "Secure Socket Layer (requires certificate)" OFF \ +KRB5 "Kerberos 5" OFF \ +2> /tmp/checklist.tmp.$$ + + retval=$? + + if [ -s /tmp/checklist.tmp.$$ ]; then + set `cat /tmp/checklist.tmp.$$` + fi + rm -f /tmp/checklist.tmp.$$ + + case $retval in + 0) if [ -z "$*" ]; then + echo "Nothing selected" + fi + ;; + 1) echo "Cancel pressed." + exit 1 + ;; + esac +fi + +${MKDIR} -p ${WRKDIRPREFIX}${CURDIR} +exec > ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + +while [ "$1" ]; do + case $1 in + \"JDBC\") + # use JAVA_HOME if set correctly + echo "# JDBC" + if [ "${JAVA_HOME}" -a -x ${JAVA_HOME}/bin/javac ]; then + echo JAVA_HOME=${JAVA_HOME} + if [ "$(${JAVA_HOME}/bin/java -version 2>&1 | egrep \"1.1)" ]; then + JAVAVERSION=1 + echo BUILD_DEPENDS+= ${JAVA_HOME}/bin/javac:\${PORTSDIR}/java/jdk + else + JAVAVERSION=2 + echo BUILD_DEPENDS+= ${JAVA_HOME}/bin/javac:\${PORTSDIR}/java/jdk12-beta + fi + else + JAVAVERSION=1 + echo BUILD_DEPENDS+= \${LOCALBASE}/jdk1.1.8/bin/javac:\${PORTSDIR}/java/jdk + echo JAVA_HOME=\${LOCALBASE}/jdk1.1.8 + fi + cat <<-EOF + JAVAVERSION=${JAVAVERSION} + WITH_JDBC=YES + SCRIPTS_ENV+= JAVA_HOME=\${JAVA_HOME} + + EOF + ;; + \"MultiByte\") + MULTIBYTE=1 + ;; + \"ODBC\") + cat <<-EOF + # ODBC + WITH_ODBC=YES + CONFIGURE_ARGS+= --with-odbc + + EOF + ;; + \"Perl\") + cat <<-EOF + # PERL + WITH_PERL=YES + CONFIGURE_ARGS+= --with-perl + + EOF + ;; + \"TCL\") + TCL=1 + ;; + \"TCLTK\") + echo "#TCLTK" + echo WITH_TK=YES + echo + TCL=1 + ;; + \"SSL\") + cat <<-EOF + # SSL + USE_OPENSSL= yes + CFLAGS+= -DUSE_SSL + WITH_SSL= yes + CONFIGURE_ENV+= LDFLAGS="-L\${OPENSSLLIB} -lssl -lcrypto" + + EOF + ;; + \"KRB5\") + KRB5=1 + ;; + \"nothing\"|true) + ;; + *) + echo "Invalid option(s): $*" > /dev/stderr + rm -f ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + exit 1 + ;; + esac + shift +done + +exec > /dev/stderr + +# if multibyte, determine charset +echo "# Multibyte" + +if [ ! "${MULTIBYTE}" ]; then + echo "WITHOUT_MULTIBYTE=YES" >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc +else + if [ "${BATCH}" ]; then + set \"nothing\" + else + /usr/bin/dialog --title "configuration options" --clear \ + --radiolist "\n\ +Please select desired options:" -1 -1 16 \ +nothing "Default Encoding" ON \ +SQL_ASCII "SQL_ASCII" OFF \ +LATIN1 "LATIN1" OFF \ +LATIN2 "LATIN2" OFF \ +LATIN3 "LATIN3" OFF \ +LATIN4 "LATIN4" OFF \ +LATIN5 "LATIN5" OFF \ +EUC_JP "EUC_JP" OFF \ +EUC_CN "EUC_CN" OFF \ +EUC_KR "EUC_KR" OFF \ +EUC_TW "EUC_TW" OFF \ +KOI8 "KOI8" OFF \ +UNICODE "UNICODE" OFF \ +MULE_INTERNAL "MULE_INTERNAL" OFF \ +WIN "WIN" OFF \ +ALT "ALT" OFF \ +2> /tmp/checklist.tmp.$$ + + retval=$? + + if [ -s /tmp/checklist.tmp.$$ ]; then + set `cat /tmp/checklist.tmp.$$` + fi + rm -f /tmp/checklist.tmp.$$ + if [ $retval = 1 ]; then + echo "Cancel pressed." + rm ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + exit 1 + fi + fi + + if [ "$1" = "nothing" ]; then + echo "CONFIGURE_ARGS+= --enable-multibyte" \ + >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + else + echo "CONFIGURE_ARGS+= --enable-multibyte=$1" \ + >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + fi +fi +echo + +if [ "${TCL}" ]; then + echo "# TCL" >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + if [ "${BATCH}" ]; then + echo WITH_TCL=8.3 >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + else + dialog --title "TCL version" \ + --inputbox "Please enter TCL version. Default is 8.3." -1 -1 "8.3" \ + 2> /tmp/checklist.tmp.$$ + retval=$? + if [ -s /tmp/checklist.tmp.$$ ]; then + set `cat /tmp/checklist.tmp.$$` + fi + rm -f /tmp/checklist.tmp.$$ + case $retval in + 0) if [ -z "$*" ]; then + echo "Nothing selected" + fi + ;; + 1) echo "Cancel pressed." + rm -f ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + exit 1 + ;; + esac + echo WITH_TCL=\"$1\" >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + fi + cat <<-EOF >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + CONFIGURE_ARGS+= --with-tcl --with-tclconfig="\${TCLCONFIG}" + TCLV=\${WITH_TCL:S/.//} + TCL_INCDIR= \${LOCALBASE}/include/tcl\${WITH_TCL} + MAKE_ENV= TCL_INCDIR=\${TCL_INCDIR} + LIB_DEPENDS= tcl\${TCLV}.1:\${PORTSDIR}/lang/tcl\${TCLV} + TCLCONFIG= '\${LOCALBASE}/lib/tcl\${WITH_TCL}' + .if defined(WITH_TK) + TK_INCDIR= \${LOCALBASE}/include/tk\${WITH_TCL} + CONFIGURE_ENV+= WISH=\${LOCALBASE}/bin/wish\${WITH_TCL} + LIB_DEPENDS+= tk\${TCLV}.1:\${PORTSDIR}/x11-toolkits/tk\${TCLV} + TCLCONFIG+= '\${LOCALBASE}/lib/tk\${WITH_TCL}' + TCL_PLIST= pkg-plist.tcl + .else + TCL_PLIST= pkg-plist.notk + CONFIGURE_ARGS+= --without-tk + .endif + + EOF +fi + +if [ "${KRB5}" ]; then + if [ "${BATCH}" ]; then + # never gets here, but what the heck... + echo KRB5_HOME=\${LOCALBASE} >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + else + dialog --inputbox "Please enter the KRB5_HOME path" -1 -1 "${KRB_HOME:-${LOCALBASE}}" \ + 2> /tmp/checklist.tmp.$$ + retval=$? + if [ -s /tmp/checklist.tmp.$$ ]; then + set `cat /tmp/checklist.tmp.$$` + fi + rm -f /tmp/checklist.tmp.$$ + case $retval in + 0) if [ -z "$*" ]; then + echo "No input" + fi + ;; + 1) echo "Cancel pressed." + rm -f ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + exit 1 + ;; + esac + echo KRB5_HOME=\"$1\" >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + fi + cat <<-EOF >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + .if defined(KRB5_HOME) && exists(\${KRB5_HOME}) + CONFIGURE_KRB= --with-krb5=\${KRB5_HOME} \ + --with-krb-keytab=FILE:\${PREFIX}/pgsql/etc/keytab + .endif + + EOF +fi diff --git a/databases/postgresql92-server/Makefile b/databases/postgresql92-server/Makefile index 5f64023c8cf5..08e0329a0795 100644 --- a/databases/postgresql92-server/Makefile +++ b/databases/postgresql92-server/Makefile @@ -6,7 +6,7 @@ # PORTNAME= postgresql -PORTVERSION= 7.0.2 +PORTVERSION= 7.0.3 CATEGORIES= databases MASTER_SITES= ftp://ftp.postgresql.org/pub/%SUBDIR%/ \ ftp://ftp.de.postgresql.org/%SUBDIR%/ \ @@ -22,59 +22,12 @@ DIST_SUBDIR= postgresql MAINTAINER= girgen@partitur.se +BUILD_DEPENDS= autoconf:${PORTSDIR}/devel/autoconf + Y2K= http://www.postgresql.org/y2k.html INSTALLS_SHLIB= YES LDCONFIG_DIRS= %%PREFIX%%/pgsql/lib -BUILD_DEPENDS= autoconf:${PORTSDIR}/devel/autoconf - -.if defined(KRB5_HOME) && exists(${KRB5_HOME}) -CONFIGURE_KRB= --with-krb5=${KRB5_HOME} \ - --with-krb-keytab=FILE:${PREFIX}/pgsql/etc/keytab -.endif - -# if you want to use the tcl/tk frontend pgaccess, then you need to build -# postgresql with tcl support by typing: make -DWITH_TCL -.if defined(WITH_TCL) -TCL_INCDIR= ${LOCALBASE}/include/tcl8.3 -TK_INCDIR= ${LOCALBASE}/include/tk8.3 -MAKE_ENV= TCL_INCDIR=${TCL_INCDIR} -CONFIGURE_ENV= WISH=${LOCALBASE}/bin/wish8.3 -LIB_DEPENDS= tcl83.1:${PORTSDIR}/lang/tcl83 \ - tk83.1:${PORTSDIR}/x11-toolkits/tk83 -CONFIGURE_TCL= --with-tcl --with-tclconfig="${LOCALBASE}/lib/tcl8.3 ${LOCALBASE}/lib/tk8.3" -.endif - -# if you want to disable the multibyte support, type: -# make -DWITHOUT_MULTIBYTE -# -# if you want to set the default encoding for the multibyte support, type: -# make DEFAULT_ENCODING=<encoding> -# where <encoding> is one of these: -# SQL_ASCII LATIN1 LATIN2 LATIN3 LATIN4 LATIN5 -# EUC_JP EUC_CN EUC_KR EUC_TW KOI8 -# UNICODE MULE_INTERNAL WIN ALT -.if defined(WITHOUT_MULTIBYTE) -CONFIGURE_MULTIBYTE= # none -.elif defined(DEFAULT_ENCODING) -CONFIGURE_MULTIBYTE= --enable-multibyte="${DEFAULT_ENCODING}" -.else -CONFIGURE_MULTIBYTE= --enable-multibyte -.endif -.if defined(WITH_PERL) -CONFIGURE_PERL= --with-perl -.endif -.if defined(WITH_ODBC) -CONFIGURE_ODBC= --with-odbc -.endif - -# if you want jdbc, type make -DWITH_JDBC -# Honors JAVA_HOME if you have it set, and don't want the dependency. -.if defined(WITH_JDBC) -JAVA_HOME?= ${LOCALBASE}/jdk1.1.8 -BUILD_DEPENDS= ${JAVA_HOME}/bin/javac:${PORTSDIR}/java/jdk -SCRIPTS_ENV+= JAVA_HOME=${JAVA_HOME} -.endif WRKSRC= ${WRKDIR}/${DISTNAME}/src DOCDIR= ${WRKDIR}/${DISTNAME}/doc @@ -86,11 +39,6 @@ CONFIGURE_ARGS= --prefix=${PREFIX}/pgsql \ --enable-locale \ --with-template=`uname -s | ${TR} '[A-Z]' '[a-z]'` \ --with-includes="${PREFIX}/include ${TCL_INCDIR} ${TK_INCDIR}" \ - ${CONFIGURE_KRB} \ - ${CONFIGURE_TCL} \ - ${CONFIGURE_MULTIBYTE} \ - ${CONFIGURE_PERL} \ - ${CONFIGURE_ODBC} \ --with-libraries=${PREFIX}/lib MAN1= createdb.1 createlang.1 createuser.1 dropdb.1 droplang.1 \ @@ -117,50 +65,21 @@ MANL= abort.l alter_group.l alter_table.l alter_user.l \ MANPREFIX= ${PREFIX}/pgsql -pre-fetch: - @${ECHO_MSG} "To install and run postgresql you need to compile kernel with:" - @${ECHO_MSG} " options \"SYSVSHM, SYSVSEM, SYSVMSG\"" -.if !defined(WITH_TCL) - @${ECHO_MSG} "To build the \"PostgreSQL to Tcl interface library\", libpgtcl, type:" - @${ECHO_MSG} " make -DWITH_TCL" -.else - @${ECHO_MSG} "Building PostgreSQL with \"libpgtcl\"." -.endif -.if !defined(WITHOUT_MULTIBYTE) - @${ECHO_MSG} "To disable multibyte support, type:" - @${ECHO_MSG} " make -DWITHOUT_MULTIBYTE" -.if !defined(DEFAULT_ENCODING) - @${ECHO_MSG} "To set the default encoding for the multibyte support, type:" - @${ECHO_MSG} " make DEFAULT_ENCODING=<encoding>" - @${ECHO_MSG} "where <encoding> is one of these:" - @${ECHO_MSG} " SQL_ASCII LATIN1 LATIN2 LATIN3 LATIN4 LATIN5" - @${ECHO_MSG} " EUC_JP EUC_CN EUC_KR EUC_TW KOI8" - @${ECHO_MSG} " UNICODE MULE_INTERNAL WIN ALT" -.else - @${ECHO_MSG} "The default encoding is '${DEFAULT_ENCODING}'." -.endif -.else - @${ECHO_MSG} "Building PostgreSQL without multibyte support." -.endif -.if !defined(WITH_JDBC) - @${ECHO_MSG} "To build Java (JDBC) support, type:" - @${ECHO_MSG} " make -DWITH_JDBC" -.else - @${ECHO_MSG} "Building PostgreSQL with \"postgresql.jar\"." -.endif -.if !defined(WITH_PERL) - @${ECHO_MSG} "To build Perl interface and pl/Perl interpreter:" - @${ECHO_MSG} " make -DWITH_PERL" -.else - @${ECHO_MSG} "Building PostgreSQL with \"pl/Perl\"." -.endif -.if !defined(WITH_ODBC) - @${ECHO_MSG} "To build the ODBC driver package:" - @${ECHO_MSG} " make -DWITH_ODBC" -.else - @${ECHO_MSG} "Building PostgreSQL with ODBC Drivers." +SCRIPTS_ENV= WRKDIRPREFIX="${WRKDIRPREFIX}" \ + WRKDIR="${WRKDIR}" \ + FILESDIR="${FILESDIR}" \ + TOUCH="${TOUCH}" \ + MKDIR="${MKDIR}" \ + NO_OPENSSL="${NO_OPENSSL}" \ + DISTNAME="${DISTNAME}" + +.if exists(${WRKDIRPREFIX}${.CURDIR}/Makefile.inc) +.include "${WRKDIRPREFIX}${.CURDIR}/Makefile.inc" .endif +pre-extract: + @ ${SETENV} ${SCRIPTS_ENV} ${SH} ${SCRIPTDIR}/configure.postgresql + post-patch: @ ${MV} ${WRKSRC}/template/freebsd ${WRKSRC}/template/freebsd.orig @ ${SED} -e 's#CFLAGS:-O2 -m486 -pipe#CFLAGS:${CFLAGS}#' \ @@ -180,16 +99,8 @@ pre-configure: post-build: .if defined(WITH_JDBC) - @ cd ${WRKSRC}/interfaces/jdbc && ${GMAKE} -.if !defined(NOPORTDOCS) - @ cd ${WRKSRC}/interfaces/jdbc && ${GMAKE} examples -.endif + @ ${GMAKE} -C ${WRKSRC}/interfaces/jdbc jdbc${JAVAVERSION} .endif - @ ${ECHO} "------------------------------------------------------------" - @ ${ECHO} "Dump existing databases, before installing new db version !!" - @ ${ECHO} "Detailed instructions, see" - @ ${ECHO} "${WRKDIR}/${DISTNAME}/INSTALL" - @ ${ECHO} "------------------------------------------------------------" pre-install: .if defined(PACKAGE_BUILDING) @@ -197,53 +108,54 @@ pre-install: .endif @ ${MKDIR} ${PREFIX}/pgsql @ ${SETENV} ${MAKE_ENV} perl ${SCRIPTDIR}/createuser +.if !defined(BATCH) + @ ${SED} -e "s#%%WRKDIR%%#${WRKDIR}#; s#%%DISTNAME%%#${DISTNAME}#" \ + < ${FILESDIR}/pre-install-notes | more -e +.endif post-install: .if defined(NOPORTDOCS) - @ ( cd ${DOCDIR}; ${GMAKE} man ) + @ ${GMAKE} -C ${DOCDIR} man .else - @ ( cd ${DOCDIR}; ${GMAKE} install ) + @ ${GMAKE} -C ${DOCDIR} install + ${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/FAQ* ${PREFIX}/share/doc/pgsql + ${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/README* ${PREFIX}/share/doc/pgsql + ${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/TODO ${PREFIX}/share/doc/pgsql +# ${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/*ps.gz ${PREFIX}/share/doc/pgsql + @ ${CAT} ${PKGDIR}/pkg-plist.doc >> ${TMPPLIST} .endif @ if [ ! -f ${PREFIX}/pgsql/.profile ]; then \ - ${ECHO} "PATH=${PATH}:${PREFIX}/pgsql/bin" \ + ${SED} 's|%%PREFIX%%|${PREFIX}|g' \ + < ${FILESDIR}/dot.profile.in \ > ${PREFIX}/pgsql/.profile; \ - ${ECHO} "MANPATH=${MANPATH}:${PREFIX}/pgsql/man" \ - >> ${PREFIX}/pgsql/.profile; \ - ${ECHO} "PGLIB=${PREFIX}/pgsql/lib" \ - >> ${PREFIX}/pgsql/.profile; \ - ${ECHO} "# note: PGDATA overwrites the -D startup option" \ - >> ${PREFIX}/pgsql/.profile; \ - ${ECHO} "PGDATA=${PREFIX}/pgsql/data" \ - >> ${PREFIX}/pgsql/.profile; \ - ${ECHO} "DISPLAY=:0" \ - >> ${PREFIX}/pgsql/.profile; \ - ${ECHO} "export PATH MANPATH PGLIB PGDATA DISPLAY" \ - >> ${PREFIX}/pgsql/.profile; \ - ${ECHO} "# if you want to make regression tests use this TZ" \ - >> ${PREFIX}/pgsql/.profile; \ - ${ECHO} "#TZ=PST8PDT" \ - >> ${PREFIX}/pgsql/.profile; \ - ${ECHO} "#export TZ" \ - >> ${PREFIX}/pgsql/.profile; \ fi @ ${CHOWN} -R pgsql:pgsql ${PREFIX}/pgsql @ ${CHOWN} root:pgsql ${PREFIX}/pgsql/lib @ ${ECHO} 'Initializing PostgreSQL Databases - this may take a few minutes...' @ ${SETENV} OBJFORMAT=${PORTOBJFORMAT} ${LDCONFIG} -m ${PREFIX}/pgsql/lib - @ su -l pgsql -c 'PATH=${PREFIX}/pgsql/bin:${PATH} LD_LIBRARY_PATH=${PREFIX}/pgsql/lib ${PREFIX}/pgsql/bin/initdb --pglib=${PREFIX}/pgsql/lib --pgdata=${PREFIX}/pgsql/data' +# '-' so we don't fail to create packagelist at this stage, +# when we already have everything installed on top of previous version + -@ su -l pgsql -c 'PATH=${PREFIX}/pgsql/bin:${PATH} ${PREFIX}/pgsql/bin/initdb --pglib=${PREFIX}/pgsql/lib --pgdata=${PREFIX}/pgsql/data' @ ${SED} -e "s=!!PREFIX!!=${PREFIX}=g" < ${FILESDIR}/pgsql.sh.tmpl \ > ${PREFIX}/etc/rc.d/pgsql.sh @ ${CHMOD} 554 ${PREFIX}/etc/rc.d/pgsql.sh @ ${CHOWN} root.pgsql ${PREFIX}/etc/rc.d/pgsql.sh - @ ${INSTALL_DATA} ${FILESDIR}/post-install-notes ${PREFIX}/pgsql + @ ${SED} -e 's#%%PREFIX%%#${PREFIX}#' < ${FILESDIR}/post-install-notes \ + > ${PREFIX}/pgsql/post-install-notes .if defined(WITHOUT_MULTIBYTE) @${CP} ${TMPPLIST} ${TMPPLIST}.nomulti @${GREP} -v pgsql/bin/pg_encoding ${TMPPLIST}.nomulti > ${TMPPLIST} .endif .if defined(WITH_TCL) @${CP} ${TMPPLIST} ${TMPPLIST}.notcl - @${CAT} ${PKGDIR}/pkg-plist.tcl ${TMPPLIST}.notcl > ${TMPPLIST} + @${CAT} ${PKGDIR}/${TCL_PLIST} ${TMPPLIST}.notcl > ${TMPPLIST} @${RM} ${TMPPLIST}.notcl +# Preparing a loadable TCL-package (pkgIndex.tcl) +# XXX This directory and the single file are not registered in +# XXX the PLIST, because of different PREFIX. + @${MKDIR} ${LOCALBASE}/lib/tcl${WITH_TCL}/Pgtcl1.3 + @${SED} 's|%%PREFIX%%|${PREFIX}|' < ${FILESDIR}/pkgIndex.tcl.in \ + > ${LOCALBASE}/lib/tcl${WITH_TCL}/Pgtcl1.3/pkgIndex.tcl .endif .if defined(WITH_ODBC) @${CP} ${TMPPLIST} ${TMPPLIST}.noodbc @@ -272,19 +184,10 @@ post-install: @ ${ECHO_MSG} "---------------------------------------------------------" @ ${ECHO_MSG} "Putting jdbc examples into ${PREFIX}/share/examples/pgsql" @ ${ECHO_MSG} "---------------------------------------------------------" - @ ${CAT} ${PKGDIR}/pkg-plist.doc >> ${TMPPLIST} -.endif .endif -.if !defined(NOPORTDOCS) - ${MKDIR} ${PREFIX}/share/doc/pgsql - @ ${GMAKE} -C ${WRKDIR}/${DISTNAME}/doc install - ${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/FAQ* ${PREFIX}/share/doc/pgsql - ${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/README* ${PREFIX}/share/doc/pgsql - ${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/TODO ${PREFIX}/share/doc/pgsql -# ${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/*ps.gz ${PREFIX}/share/doc/pgsql .endif .if !defined(BATCH) - @ more -e ${FILESDIR}/post-install-notes + @ more -e ${PREFIX}/pgsql/post-install-notes .endif .if !defined(DEBUG_FLAGS) .for file in ecpg pg_dump pg_id pg_passwd pg_version postgres psql @@ -292,4 +195,7 @@ post-install: .endfor .endif +post-clean: + @ ${RM} -f ${WRKDIRPREFIX}${.CURDIR}/Makefile.inc + .include <bsd.port.mk> diff --git a/databases/postgresql92-server/distinfo b/databases/postgresql92-server/distinfo index 309ea1e11614..fc87b8117bdc 100644 --- a/databases/postgresql92-server/distinfo +++ b/databases/postgresql92-server/distinfo @@ -1,4 +1,3 @@ -MD5 (postgresql/postgresql-7.0.2.base.tar.gz) = 871d23b85d9a3599a7ed75dfc7da7ba7 -MD5 (postgresql/postgresql-7.0.2.support.tar.gz) = c21180a6485d85785c8e69f0cbff05dd -MD5 (postgresql/postgresql-7.0.2.docs.tar.gz) = efac1f87463f252e54d72b256885b883 -MD5 (postgresql/postgresql-7.0.2.test.tar.gz) = 3443b3d83194c396f20aee2adc6f93bf +MD5 (postgresql/postgresql-7.0.3.base.tar.gz) = 0eeda8217b5b11e5a9351fc424808426 +MD5 (postgresql/postgresql-7.0.3.support.tar.gz) = b930f71068d776ef45402fcbebfa58cf +MD5 (postgresql/postgresql-7.0.3.docs.tar.gz) = 3d3fc76073f6d77febefc83f887fc87d diff --git a/databases/postgresql92-server/files/dot.profile.in b/databases/postgresql92-server/files/dot.profile.in new file mode 100644 index 000000000000..bd7ec45043be --- /dev/null +++ b/databases/postgresql92-server/files/dot.profile.in @@ -0,0 +1,16 @@ +PATH=${PATH}:%%PREFIX%%/pgsql/bin +PGLIB=%%PREFIX%%/pgsql/lib + +# note: PGDATA overwrites the -D startup option +PGDATA=%%PREFIX%%/pgsql/data + +export PATH MANPATH PGLIB PGDATA + +#You might want to set some locale stuff here +#PGDATESTYLE=ISO +#LC_ALL=sv_SE.ISO_88591-1 +#export PGDATESTYLE LC_ALL + +# if you want to make regression tests use this TZ +#TZ=PST8PDT +#export TZ diff --git a/databases/postgresql92-server/files/patch-au b/databases/postgresql92-server/files/patch-au new file mode 100644 index 000000000000..340521b49482 --- /dev/null +++ b/databases/postgresql92-server/files/patch-au @@ -0,0 +1,58 @@ +--- configure.in.orig Sun Nov 5 05:03:47 2000 ++++ configure.in Mon Dec 4 02:36:15 2000 +@@ -299,13 +299,28 @@ + [ --with-tcl build Tcl interfaces and pgtclsh ], + [ + case "$withval" in +- y | ye | yes) USE_TCL=true; USE_TK=true; AC_MSG_RESULT(enabled) ;; ++ y | ye | yes) USE_TCL=true; AC_MSG_RESULT(enabled) ;; + *) USE_TCL=; USE_TK=; AC_MSG_RESULT(disabled) ;; + esac + ], + [ USE_TCL=; USE_TK=; AC_MSG_RESULT(disabled) ] + ) + ++dnl We include tk support with tcl unless user says --without-tk ++if test USE_TCL = true ++then ++AC_MSG_CHECKING(setting USE_TK) ++AC_ARG_WITH( ++ tk, ++ [ --without-tk build Tcl *without* Tk ], ++ [ ++ case "$withval" in ++ y | ye | yes) USE_TK=true; USE_TK=true; AC_MSG_RESULT(enabled) ;; ++ *) USE_TK=n; AC_MSG_RESULT(disabled) ;; ++ esac ++ ] ++) ++fi + export USE_TCL + export USE_TK + +@@ -482,7 +497,7 @@ + #endif + ], + ELF_SYS=true, +-[if test "X$elf" = "Xyes" ++[if test "X$PORTOBJFORMAT" = "Xyes" + then + ELF_SYS=true + else +@@ -1248,10 +1263,15 @@ + else + AC_MSG_RESULT($TCL_CONFIG_SH) + AC_SUBST(TCL_CONFIG_SH) ++ . ${TCL_CONFIG_SH} ++ AC_SUBST(TCL_LIB_SPEC) + fi + fi + +-USE_TK=$USE_TCL # If TCL is disabled, disable TK ++USE_TK=${USE_TK:=$USE_TCL} # If TCL is disabled, disable TK ++ # otherwise -- enable unless explicitly ++ # disabled ++ + + dnl Check for Tk configuration script tkConfig.sh + if test "$USE_TK" = true diff --git a/databases/postgresql92-server/files/patch-av b/databases/postgresql92-server/files/patch-av new file mode 100644 index 000000000000..49b35f9e8dc1 --- /dev/null +++ b/databases/postgresql92-server/files/patch-av @@ -0,0 +1,17 @@ +--- interfaces/libpq/fe-connect.c Sun May 21 17:19:53 2000 ++++ interfaces/libpq/fe-connect.c Fri Sep 15 13:53:52 2000 +@@ -801 +801 @@ +- sprintf(conn->errorMessage, ++ printfPQExpBuffer(&conn->errorMessage, +@@ -809 +809 @@ +- sprintf(conn->errorMessage, "PQconnectDB() -- couldn't read postmaster response: errno=%d\n%s\n", ++ printfPQExpBuffer(&conn->errorMessage, "PQconnectDB() -- couldn't read postmaster response: errno=%d\n%s\n", +@@ -822 +822 @@ +- sprintf(conn->errorMessage, ++ printfPQExpBuffer(&conn->errorMessage, +@@ -832 +832 @@ +- sprintf(conn->errorMessage, ++ printfPQExpBuffer(&conn->errorMessage, +@@ -850 +850 @@ +- strcpy(conn->errorMessage, ++ printfPQExpBuffer(&conn->errorMessage, diff --git a/databases/postgresql92-server/files/patch-ba b/databases/postgresql92-server/files/patch-ba index a3b679b882c5..586d725c536a 100644 --- a/databases/postgresql92-server/files/patch-ba +++ b/databases/postgresql92-server/files/patch-ba @@ -1,5 +1,5 @@ ---- interfaces/jdbc/Makefile.orig Tue Mar 14 16:55:17 2000 -+++ interfaces/jdbc/Makefile Sun Apr 16 21:16:43 2000 +--- interfaces/jdbc/Makefile.orig Sun Nov 5 05:03:53 2000 ++++ interfaces/jdbc/Makefile Fri Dec 8 03:16:17 2000 @@ -10,10 +10,10 @@ FIND = find @@ -15,11 +15,3 @@ RM = rm -f TOUCH = touch -@@ -40,6 +40,7 @@ - @echo To compile, type: - @echo " $(MAKE) jdbc2" - @echo ------------------------------------------------------------ -+ $(MAKE) jdbc1 - - msg: - @echo ------------------------------------------------------------ diff --git a/databases/postgresql92-server/files/patch-be b/databases/postgresql92-server/files/patch-be new file mode 100644 index 000000000000..2f8c3c55566f --- /dev/null +++ b/databases/postgresql92-server/files/patch-be @@ -0,0 +1,9 @@ +This patches let you disable Tk even if you have it installed and +makes sure the TCL-library is added as a dependency for libpgtcl. +--- interfaces/libpgtcl/Makefile.in Tue Mar 7 20:58:36 2000 ++++ interfaces/libpgtcl/Makefile.in Wed Sep 20 08:57:28 2000 +@@ -29,3 +29,3 @@ + +-SHLIB_LINK+= $(LIBPQ) ++SHLIB_LINK+= $(LIBPQ) @TCL_LIB_SPEC@ + diff --git a/databases/postgresql92-server/files/pgsql.sh.tmpl b/databases/postgresql92-server/files/pgsql.sh.tmpl index e1673b4850c2..753e0b8aaf80 100644 --- a/databases/postgresql92-server/files/pgsql.sh.tmpl +++ b/databases/postgresql92-server/files/pgsql.sh.tmpl @@ -17,13 +17,13 @@ start) stop) [ -x !!PREFIX!!/pgsql/bin/pg_ctl ] && { - su -l pgsql -c 'exec !!PREFIX!!/pgsql/bin/pg_ctl -w -m fast stop' + exec su -l pgsql -c 'exec !!PREFIX!!/pgsql/bin/pg_ctl -w -m fast stop' } ;; status) [ -x !!PREFIX!!/pgsql/bin/pg_ctl ] && { - su -l pgsql -c 'exec !!PREFIX!!/pgsql/bin/pg_ctl status' + exec su -l pgsql -c 'exec !!PREFIX!!/pgsql/bin/pg_ctl status' } ;; diff --git a/databases/postgresql92-server/files/pkgIndex.tcl.in b/databases/postgresql92-server/files/pkgIndex.tcl.in new file mode 100644 index 000000000000..bd8329b15c69 --- /dev/null +++ b/databases/postgresql92-server/files/pkgIndex.tcl.in @@ -0,0 +1,4 @@ +# Package-index file for Pgtcl-package. Enables you to load PostgreSQL +# interface functions right into you TCL-interpreter as simply as +# package require Pgtcl +package ifneeded Pgtcl 1.3 "load %%PREFIX%%/lib/libpgtcl.so" diff --git a/databases/postgresql92-server/files/post-install-notes b/databases/postgresql92-server/files/post-install-notes index 289a7651109a..4c69908b2676 100644 --- a/databases/postgresql92-server/files/post-install-notes +++ b/databases/postgresql92-server/files/post-install-notes @@ -8,9 +8,12 @@ You may wish to subscribe to the PostgreSQL user-support mailing list. Send an e-mail to pgsql-questions-request@postgresql.org with the text "subscribe" in the message body. -If you built PostgreSQL with TCL support, you can install the port -"pgaccess" to get a TCL/TK based database frontend for database -operations. +If you built PostgreSQL with TCL/TK support, you can use the pgaccess +utility to get a TCL/TK based database frontend for database +operations. You do NOT need to install the pgaccess port separately. + +If you built in the TCL support, you can load the Pg package into your +TCL scripts as easily as ``package require Pgtcl''. To start PostgreSQL, run the startup script: -$PREFIX/etc/rc.d/pgsql.sh start +%%PREFIX%%/etc/rc.d/pgsql.sh start diff --git a/databases/postgresql92-server/files/pre-install-notes b/databases/postgresql92-server/files/pre-install-notes new file mode 100644 index 000000000000..72388933bd6d --- /dev/null +++ b/databases/postgresql92-server/files/pre-install-notes @@ -0,0 +1,9 @@ +# ---------------------------------------------------------------- +# UPGRADE NOTE! Depending on which version you are upgrading from, +# you may have to dump/restore existing databases +# as part of the update. +# This is *NOT* done by this port! +# For detailed instructions, see +# %%WRKDIR%%/%%DISTNAME%%/INSTALL +# after extraction. +# -------------------------------------------------------------- diff --git a/databases/postgresql92-server/pkg-plist.jdbc b/databases/postgresql92-server/pkg-plist.jdbc index bef5d75506b4..e751caa65063 100644 --- a/databases/postgresql92-server/pkg-plist.jdbc +++ b/databases/postgresql92-server/pkg-plist.jdbc @@ -10,4 +10,5 @@ share/examples/pgsql/jdbc/README_6.3 @dirrm share/examples/pgsql/jdbc @dirrm share/examples/pgsql share/java/classes/postgresql.jar +@unexec rmdir %D/share/java/classes 2>/dev/null || true @unexec rmdir %D/share/java 2>/dev/null || true diff --git a/databases/postgresql92-server/pkg-plist.notk b/databases/postgresql92-server/pkg-plist.notk new file mode 100644 index 000000000000..9f5d9e04af48 --- /dev/null +++ b/databases/postgresql92-server/pkg-plist.notk @@ -0,0 +1,6 @@ +pgsql/bin/pgtclsh +pgsql/include/libpgtcl.h +pgsql/lib/libpgtcl.a +pgsql/lib/libpgtcl.so +pgsql/lib/libpgtcl.so.2 +pgsql/lib/pltcl.so diff --git a/databases/postgresql92-server/scripts/configure.postgresql b/databases/postgresql92-server/scripts/configure.postgresql new file mode 100644 index 000000000000..5efe32a766f4 --- /dev/null +++ b/databases/postgresql92-server/scripts/configure.postgresql @@ -0,0 +1,267 @@ +#!/bin/sh +# -*- tab-width: 4; -*- +# ex:ts=4 +# +# $FreeBSD$ +# +if [ -f ${WRKDIRPREFIX}${CURDIR}/Makefile.inc ]; then + exit +fi + +if [ ! "${BATCH}" ]; then + dialog --title "Backup your data NOW" \ + --msgbox "`sed -e \"s#%%WRKDIR%%#${WRKDIR}#; s#%%DISTNAME%%#${DISTNAME}#\" < ${FILESDIR}/pre-install-notes`" \ + -1 -1 +fi + +#SSL=${NO_OPENSSL:+OFF} +#SSL=${NOSSL:-ON} + +if [ "${BATCH}" ]; then + set \"MultiByte\" +else + /usr/bin/dialog --title "configuration options" --clear \ + --checklist "\n\ +Please select desired options:" -1 -1 8 \ +JDBC "Java DataBase Connectivity" OFF \ +MultiByte "Multibyte for Multilingualism" ON \ +ODBC "Open Database Connectivity" OFF \ +Perl "Perl" OFF \ +TCL "Tcl" ON \ +TCLTK "Tcl/Tk" ON \ +SSL "Secure Socket Layer (requires certificate)" OFF \ +KRB5 "Kerberos 5" OFF \ +2> /tmp/checklist.tmp.$$ + + retval=$? + + if [ -s /tmp/checklist.tmp.$$ ]; then + set `cat /tmp/checklist.tmp.$$` + fi + rm -f /tmp/checklist.tmp.$$ + + case $retval in + 0) if [ -z "$*" ]; then + echo "Nothing selected" + fi + ;; + 1) echo "Cancel pressed." + exit 1 + ;; + esac +fi + +${MKDIR} -p ${WRKDIRPREFIX}${CURDIR} +exec > ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + +while [ "$1" ]; do + case $1 in + \"JDBC\") + # use JAVA_HOME if set correctly + echo "# JDBC" + if [ "${JAVA_HOME}" -a -x ${JAVA_HOME}/bin/javac ]; then + echo JAVA_HOME=${JAVA_HOME} + if [ "$(${JAVA_HOME}/bin/java -version 2>&1 | egrep \"1.1)" ]; then + JAVAVERSION=1 + echo BUILD_DEPENDS+= ${JAVA_HOME}/bin/javac:\${PORTSDIR}/java/jdk + else + JAVAVERSION=2 + echo BUILD_DEPENDS+= ${JAVA_HOME}/bin/javac:\${PORTSDIR}/java/jdk12-beta + fi + else + JAVAVERSION=1 + echo BUILD_DEPENDS+= \${LOCALBASE}/jdk1.1.8/bin/javac:\${PORTSDIR}/java/jdk + echo JAVA_HOME=\${LOCALBASE}/jdk1.1.8 + fi + cat <<-EOF + JAVAVERSION=${JAVAVERSION} + WITH_JDBC=YES + SCRIPTS_ENV+= JAVA_HOME=\${JAVA_HOME} + + EOF + ;; + \"MultiByte\") + MULTIBYTE=1 + ;; + \"ODBC\") + cat <<-EOF + # ODBC + WITH_ODBC=YES + CONFIGURE_ARGS+= --with-odbc + + EOF + ;; + \"Perl\") + cat <<-EOF + # PERL + WITH_PERL=YES + CONFIGURE_ARGS+= --with-perl + + EOF + ;; + \"TCL\") + TCL=1 + ;; + \"TCLTK\") + echo "#TCLTK" + echo WITH_TK=YES + echo + TCL=1 + ;; + \"SSL\") + cat <<-EOF + # SSL + USE_OPENSSL= yes + CFLAGS+= -DUSE_SSL + WITH_SSL= yes + CONFIGURE_ENV+= LDFLAGS="-L\${OPENSSLLIB} -lssl -lcrypto" + + EOF + ;; + \"KRB5\") + KRB5=1 + ;; + \"nothing\"|true) + ;; + *) + echo "Invalid option(s): $*" > /dev/stderr + rm -f ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + exit 1 + ;; + esac + shift +done + +exec > /dev/stderr + +# if multibyte, determine charset +echo "# Multibyte" + +if [ ! "${MULTIBYTE}" ]; then + echo "WITHOUT_MULTIBYTE=YES" >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc +else + if [ "${BATCH}" ]; then + set \"nothing\" + else + /usr/bin/dialog --title "configuration options" --clear \ + --radiolist "\n\ +Please select desired options:" -1 -1 16 \ +nothing "Default Encoding" ON \ +SQL_ASCII "SQL_ASCII" OFF \ +LATIN1 "LATIN1" OFF \ +LATIN2 "LATIN2" OFF \ +LATIN3 "LATIN3" OFF \ +LATIN4 "LATIN4" OFF \ +LATIN5 "LATIN5" OFF \ +EUC_JP "EUC_JP" OFF \ +EUC_CN "EUC_CN" OFF \ +EUC_KR "EUC_KR" OFF \ +EUC_TW "EUC_TW" OFF \ +KOI8 "KOI8" OFF \ +UNICODE "UNICODE" OFF \ +MULE_INTERNAL "MULE_INTERNAL" OFF \ +WIN "WIN" OFF \ +ALT "ALT" OFF \ +2> /tmp/checklist.tmp.$$ + + retval=$? + + if [ -s /tmp/checklist.tmp.$$ ]; then + set `cat /tmp/checklist.tmp.$$` + fi + rm -f /tmp/checklist.tmp.$$ + if [ $retval = 1 ]; then + echo "Cancel pressed." + rm ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + exit 1 + fi + fi + + if [ "$1" = "nothing" ]; then + echo "CONFIGURE_ARGS+= --enable-multibyte" \ + >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + else + echo "CONFIGURE_ARGS+= --enable-multibyte=$1" \ + >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + fi +fi +echo + +if [ "${TCL}" ]; then + echo "# TCL" >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + if [ "${BATCH}" ]; then + echo WITH_TCL=8.3 >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + else + dialog --title "TCL version" \ + --inputbox "Please enter TCL version. Default is 8.3." -1 -1 "8.3" \ + 2> /tmp/checklist.tmp.$$ + retval=$? + if [ -s /tmp/checklist.tmp.$$ ]; then + set `cat /tmp/checklist.tmp.$$` + fi + rm -f /tmp/checklist.tmp.$$ + case $retval in + 0) if [ -z "$*" ]; then + echo "Nothing selected" + fi + ;; + 1) echo "Cancel pressed." + rm -f ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + exit 1 + ;; + esac + echo WITH_TCL=\"$1\" >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + fi + cat <<-EOF >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + CONFIGURE_ARGS+= --with-tcl --with-tclconfig="\${TCLCONFIG}" + TCLV=\${WITH_TCL:S/.//} + TCL_INCDIR= \${LOCALBASE}/include/tcl\${WITH_TCL} + MAKE_ENV= TCL_INCDIR=\${TCL_INCDIR} + LIB_DEPENDS= tcl\${TCLV}.1:\${PORTSDIR}/lang/tcl\${TCLV} + TCLCONFIG= '\${LOCALBASE}/lib/tcl\${WITH_TCL}' + .if defined(WITH_TK) + TK_INCDIR= \${LOCALBASE}/include/tk\${WITH_TCL} + CONFIGURE_ENV+= WISH=\${LOCALBASE}/bin/wish\${WITH_TCL} + LIB_DEPENDS+= tk\${TCLV}.1:\${PORTSDIR}/x11-toolkits/tk\${TCLV} + TCLCONFIG+= '\${LOCALBASE}/lib/tk\${WITH_TCL}' + TCL_PLIST= pkg-plist.tcl + .else + TCL_PLIST= pkg-plist.notk + CONFIGURE_ARGS+= --without-tk + .endif + + EOF +fi + +if [ "${KRB5}" ]; then + if [ "${BATCH}" ]; then + # never gets here, but what the heck... + echo KRB5_HOME=\${LOCALBASE} >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + else + dialog --inputbox "Please enter the KRB5_HOME path" -1 -1 "${KRB_HOME:-${LOCALBASE}}" \ + 2> /tmp/checklist.tmp.$$ + retval=$? + if [ -s /tmp/checklist.tmp.$$ ]; then + set `cat /tmp/checklist.tmp.$$` + fi + rm -f /tmp/checklist.tmp.$$ + case $retval in + 0) if [ -z "$*" ]; then + echo "No input" + fi + ;; + 1) echo "Cancel pressed." + rm -f ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + exit 1 + ;; + esac + echo KRB5_HOME=\"$1\" >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + fi + cat <<-EOF >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + .if defined(KRB5_HOME) && exists(\${KRB5_HOME}) + CONFIGURE_KRB= --with-krb5=\${KRB5_HOME} \ + --with-krb-keytab=FILE:\${PREFIX}/pgsql/etc/keytab + .endif + + EOF +fi |