View | Details | Raw Unified | Return to bug 23371 | Differences between
and this patch

Collapse All | Expand All

(-)Makefile (-140 / +46 lines)
Lines 6-12 Link Here
6
#
6
#
7
7
8
PORTNAME=	postgresql
8
PORTNAME=	postgresql
9
PORTVERSION=	7.0.2
9
PORTVERSION=	7.0.3
10
CATEGORIES=	databases
10
CATEGORIES=	databases
11
MASTER_SITES=	ftp://ftp.postgresql.org/pub/%SUBDIR%/ \
11
MASTER_SITES=	ftp://ftp.postgresql.org/pub/%SUBDIR%/ \
12
		ftp://ftp.de.postgresql.org/%SUBDIR%/ \
12
		ftp://ftp.de.postgresql.org/%SUBDIR%/ \
Lines 22-81 Link Here
22
22
23
MAINTAINER=	ports@FreeBSD.org
23
MAINTAINER=	ports@FreeBSD.org
24
24
25
BUILD_DEPENDS=	autoconf:${PORTSDIR}/devel/autoconf
26
25
Y2K=		http://www.postgresql.org/y2k.html
27
Y2K=		http://www.postgresql.org/y2k.html
26
28
27
INSTALLS_SHLIB=	YES
29
INSTALLS_SHLIB=	YES
28
LDCONFIG_DIRS=	%%PREFIX%%/pgsql/lib
30
LDCONFIG_DIRS=	%%PREFIX%%/pgsql/lib
29
BUILD_DEPENDS=	autoconf:${PORTSDIR}/devel/autoconf
30
31
31
.if defined(KRB5_HOME) && exists(${KRB5_HOME})
32
CONFIGURE_KRB=	--with-krb5=${KRB5_HOME} \
33
		--with-krb-keytab=FILE:${PREFIX}/pgsql/etc/keytab
34
.endif
35
36
# if you want to use the tcl/tk frontend pgaccess, then you need to build
37
# postgresql with tcl support by typing: make -DWITH_TCL
38
.if defined(WITH_TCL)
39
TCL_INCDIR=	${LOCALBASE}/include/tcl8.3
40
TK_INCDIR=	${LOCALBASE}/include/tk8.3
41
MAKE_ENV=	TCL_INCDIR=${TCL_INCDIR}
42
CONFIGURE_ENV=	WISH=${LOCALBASE}/bin/wish8.3
43
LIB_DEPENDS=	tcl83.1:${PORTSDIR}/lang/tcl83 \
44
		tk83.1:${PORTSDIR}/x11-toolkits/tk83
45
CONFIGURE_TCL=	--with-tcl --with-tclconfig="${LOCALBASE}/lib/tcl8.3 ${LOCALBASE}/lib/tk8.3"
46
.endif
47
48
# if you want to disable the multibyte support, type:
49
#   make -DWITHOUT_MULTIBYTE
50
#
51
# if you want to set the default encoding for the multibyte support, type:
52
#   make DEFAULT_ENCODING=<encoding>
53
# where <encoding> is one of these:
54
#   SQL_ASCII   LATIN1      LATIN2      LATIN3      LATIN4      LATIN5
55
#   EUC_JP      EUC_CN      EUC_KR      EUC_TW      KOI8
56
#   UNICODE     MULE_INTERNAL           WIN         ALT
57
.if defined(WITHOUT_MULTIBYTE)
58
CONFIGURE_MULTIBYTE=	# none
59
.elif defined(DEFAULT_ENCODING)
60
CONFIGURE_MULTIBYTE=	--enable-multibyte="${DEFAULT_ENCODING}"
61
.else
62
CONFIGURE_MULTIBYTE=	--enable-multibyte
63
.endif
64
.if defined(WITH_PERL)
65
CONFIGURE_PERL=		--with-perl
66
.endif
67
.if defined(WITH_ODBC)
68
CONFIGURE_ODBC=		--with-odbc
69
.endif
70
71
# if you want jdbc, type make -DWITH_JDBC
72
# Honors JAVA_HOME if you have it set, and don't want the dependency.
73
.if defined(WITH_JDBC)
74
JAVA_HOME?=	${LOCALBASE}/jdk1.1.8
75
BUILD_DEPENDS=	${JAVA_HOME}/bin/javac:${PORTSDIR}/java/jdk
76
SCRIPTS_ENV+=	JAVA_HOME=${JAVA_HOME}
77
.endif
78
79
WRKSRC=		${WRKDIR}/${DISTNAME}/src
32
WRKSRC=		${WRKDIR}/${DISTNAME}/src
80
DOCDIR=		${WRKDIR}/${DISTNAME}/doc
33
DOCDIR=		${WRKDIR}/${DISTNAME}/doc
81
34
Lines 86-96 Link Here
86
		--enable-locale \
39
		--enable-locale \
87
		--with-template=`uname -s | ${TR} '[A-Z]' '[a-z]'` \
40
		--with-template=`uname -s | ${TR} '[A-Z]' '[a-z]'` \
88
		--with-includes="${PREFIX}/include ${TCL_INCDIR} ${TK_INCDIR}" \
41
		--with-includes="${PREFIX}/include ${TCL_INCDIR} ${TK_INCDIR}" \
89
		${CONFIGURE_KRB} \
90
		${CONFIGURE_TCL} \
91
		${CONFIGURE_MULTIBYTE} \
92
		${CONFIGURE_PERL} \
93
		${CONFIGURE_ODBC} \
94
		--with-libraries=${PREFIX}/lib
42
		--with-libraries=${PREFIX}/lib
95
43
96
MAN1=		createdb.1 createlang.1 createuser.1 dropdb.1 droplang.1 \
44
MAN1=		createdb.1 createlang.1 createuser.1 dropdb.1 droplang.1 \
Lines 117-166 Link Here
117
65
118
MANPREFIX=	${PREFIX}/pgsql
66
MANPREFIX=	${PREFIX}/pgsql
119
67
120
pre-fetch:
68
SCRIPTS_ENV=	WRKDIRPREFIX="${WRKDIRPREFIX}" \
121
	@${ECHO_MSG} "To install and run postgresql you need to compile kernel with:"
69
		WRKDIR="${WRKDIR}" \
122
	@${ECHO_MSG} "    options    \"SYSVSHM, SYSVSEM, SYSVMSG\""
70
		FILESDIR="${FILESDIR}" \
123
.if !defined(WITH_TCL)
71
		TOUCH="${TOUCH}" \
124
	@${ECHO_MSG} "To build the \"PostgreSQL to Tcl interface library\", libpgtcl, type:"
72
		MKDIR="${MKDIR}" \
125
	@${ECHO_MSG} "    make -DWITH_TCL"
73
		NO_OPENSSL="${NO_OPENSSL}" \
126
.else
74
		DISTNAME="${DISTNAME}"
127
	@${ECHO_MSG} "Building PostgreSQL with \"libpgtcl\"."
75
128
.endif
76
.if exists(${WRKDIRPREFIX}${.CURDIR}/Makefile.inc)
129
.if !defined(WITHOUT_MULTIBYTE)
77
.include "${WRKDIRPREFIX}${.CURDIR}/Makefile.inc"
130
	@${ECHO_MSG} "To disable multibyte support, type:"
131
	@${ECHO_MSG} "    make -DWITHOUT_MULTIBYTE"
132
.if !defined(DEFAULT_ENCODING)
133
	@${ECHO_MSG} "To set the default encoding for the multibyte support, type:"
134
	@${ECHO_MSG} "    make DEFAULT_ENCODING=<encoding>"
135
	@${ECHO_MSG} "where <encoding> is one of these:"
136
	@${ECHO_MSG} "    SQL_ASCII   LATIN1      LATIN2      LATIN3      LATIN4      LATIN5"
137
	@${ECHO_MSG} "    EUC_JP      EUC_CN      EUC_KR      EUC_TW      KOI8"
138
	@${ECHO_MSG} "    UNICODE     MULE_INTERNAL           WIN         ALT"
139
.else
140
	@${ECHO_MSG} "The default encoding is '${DEFAULT_ENCODING}'."
141
.endif
142
.else
143
	@${ECHO_MSG} "Building PostgreSQL without multibyte support."
144
.endif
145
.if !defined(WITH_JDBC)
146
	@${ECHO_MSG} "To build Java (JDBC) support, type:"
147
	@${ECHO_MSG} "    make -DWITH_JDBC"
148
.else
149
	@${ECHO_MSG} "Building PostgreSQL with \"postgresql.jar\"."
150
.endif
151
.if !defined(WITH_PERL)
152
	@${ECHO_MSG} "To build Perl interface and pl/Perl interpreter:"
153
	@${ECHO_MSG} "    make -DWITH_PERL"
154
.else
155
	@${ECHO_MSG} "Building PostgreSQL with \"pl/Perl\"."
156
.endif
157
.if !defined(WITH_ODBC)
158
	@${ECHO_MSG} "To build the ODBC driver package:"
159
	@${ECHO_MSG} "    make -DWITH_ODBC"
160
.else
161
	@${ECHO_MSG} "Building PostgreSQL with ODBC Drivers."
162
.endif
78
.endif
163
79
80
pre-extract:
81
	@ ${SETENV} ${SCRIPTS_ENV} ${SH} ${SCRIPTDIR}/configure.postgresql
82
164
post-patch:
83
post-patch:
165
	@ ${MV} ${WRKSRC}/template/freebsd ${WRKSRC}/template/freebsd.orig
84
	@ ${MV} ${WRKSRC}/template/freebsd ${WRKSRC}/template/freebsd.orig
166
	@ ${SED} -e 's#CFLAGS:-O2 -m486 -pipe#CFLAGS:${CFLAGS}#' \
85
	@ ${SED} -e 's#CFLAGS:-O2 -m486 -pipe#CFLAGS:${CFLAGS}#' \
Lines 180-195 Link Here
180
99
181
post-build:
100
post-build:
182
.if defined(WITH_JDBC)
101
.if defined(WITH_JDBC)
183
	@ cd ${WRKSRC}/interfaces/jdbc && ${GMAKE}
102
	@ ${GMAKE} -C ${WRKSRC}/interfaces/jdbc jdbc${JAVAVERSION}
184
.if !defined(NOPORTDOCS)
185
	@ cd ${WRKSRC}/interfaces/jdbc && ${GMAKE} examples
186
.endif
187
.endif
103
.endif
188
	@ ${ECHO} "------------------------------------------------------------"
189
	@ ${ECHO} "Dump existing databases, before installing new db version !!"
190
	@ ${ECHO} "Detailed instructions, see"
191
	@ ${ECHO} "${WRKDIR}/${DISTNAME}/INSTALL"
192
	@ ${ECHO} "------------------------------------------------------------"
193
104
194
pre-install:
105
pre-install:
195
.if defined(PACKAGE_BUILDING)
106
.if defined(PACKAGE_BUILDING)
Lines 197-249 Link Here
197
.endif
108
.endif
198
	@ ${MKDIR} ${PREFIX}/pgsql
109
	@ ${MKDIR} ${PREFIX}/pgsql
199
	@ ${SETENV} ${MAKE_ENV} perl ${SCRIPTDIR}/createuser
110
	@ ${SETENV} ${MAKE_ENV} perl ${SCRIPTDIR}/createuser
111
.if !defined(BATCH)
112
	@ ${SED} -e "s#%%WRKDIR%%#${WRKDIR}#; s#%%DISTNAME%%#${DISTNAME}#" \
113
	< ${FILESDIR}/pre-install-notes | more -e
114
.endif
200
115
201
post-install:
116
post-install:
202
.if defined(NOPORTDOCS)
117
.if defined(NOPORTDOCS)
203
	@ ( cd ${DOCDIR}; ${GMAKE} man )
118
	@ ${GMAKE} -C ${DOCDIR} man
204
.else
119
.else
205
	@ ( cd ${DOCDIR}; ${GMAKE} install )
120
	@ ${GMAKE} -C ${DOCDIR} install
121
	${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/FAQ* ${PREFIX}/share/doc/pgsql
122
	${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/README* ${PREFIX}/share/doc/pgsql
123
	${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/TODO ${PREFIX}/share/doc/pgsql
124
#	${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/*ps.gz ${PREFIX}/share/doc/pgsql
125
	@ ${CAT} ${PKGDIR}/pkg-plist.doc >> ${TMPPLIST}
206
.endif
126
.endif
207
	@ if [ ! -f ${PREFIX}/pgsql/.profile ]; then \
127
	@ if [ ! -f ${PREFIX}/pgsql/.profile ]; then \
208
		${ECHO} "PATH=${PATH}:${PREFIX}/pgsql/bin" \
128
		${SED} 's|%%PREFIX%%|${PREFIX}|g' \
129
			< ${FILESDIR}/dot.profile.in \
209
			> ${PREFIX}/pgsql/.profile; \
130
			> ${PREFIX}/pgsql/.profile; \
210
		${ECHO} "MANPATH=${MANPATH}:${PREFIX}/pgsql/man" \
211
			>> ${PREFIX}/pgsql/.profile; \
212
		${ECHO} "PGLIB=${PREFIX}/pgsql/lib" \
213
			>> ${PREFIX}/pgsql/.profile; \
214
		${ECHO} "# note: PGDATA overwrites the -D startup option" \
215
			>> ${PREFIX}/pgsql/.profile; \
216
		${ECHO} "PGDATA=${PREFIX}/pgsql/data" \
217
			>> ${PREFIX}/pgsql/.profile; \
218
		${ECHO} "DISPLAY=:0" \
219
			>> ${PREFIX}/pgsql/.profile; \
220
		${ECHO} "export PATH MANPATH PGLIB PGDATA DISPLAY" \
221
			>> ${PREFIX}/pgsql/.profile; \
222
		${ECHO} "# if you want to make regression tests use this TZ" \
223
			>> ${PREFIX}/pgsql/.profile; \
224
		${ECHO} "#TZ=PST8PDT" \
225
			>> ${PREFIX}/pgsql/.profile; \
226
		${ECHO} "#export TZ" \
227
			>> ${PREFIX}/pgsql/.profile; \
228
	fi
131
	fi
229
	@ ${CHOWN} -R pgsql:pgsql ${PREFIX}/pgsql
132
	@ ${CHOWN} -R pgsql:pgsql ${PREFIX}/pgsql
230
	@ ${CHOWN} root:pgsql ${PREFIX}/pgsql/lib
133
	@ ${CHOWN} root:pgsql ${PREFIX}/pgsql/lib
231
	@ ${ECHO} 'Initializing PostgreSQL Databases - this may take a few minutes...'
134
	@ ${ECHO} 'Initializing PostgreSQL Databases - this may take a few minutes...'
232
	@ ${SETENV} OBJFORMAT=${PORTOBJFORMAT} ${LDCONFIG} -m ${PREFIX}/pgsql/lib
135
	@ ${SETENV} OBJFORMAT=${PORTOBJFORMAT} ${LDCONFIG} -m ${PREFIX}/pgsql/lib
233
	@ 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'
136
# '-' so we don't fail to create packagelist at this stage,
137
# when we already have everything installed on top of previous version
138
	-@ su -l pgsql -c 'PATH=${PREFIX}/pgsql/bin:${PATH} ${PREFIX}/pgsql/bin/initdb --pglib=${PREFIX}/pgsql/lib --pgdata=${PREFIX}/pgsql/data'
234
	@ ${SED} -e "s=!!PREFIX!!=${PREFIX}=g" < ${FILESDIR}/pgsql.sh.tmpl \
139
	@ ${SED} -e "s=!!PREFIX!!=${PREFIX}=g" < ${FILESDIR}/pgsql.sh.tmpl \
235
		> ${PREFIX}/etc/rc.d/pgsql.sh
140
		> ${PREFIX}/etc/rc.d/pgsql.sh
236
	@ ${CHMOD} 554 ${PREFIX}/etc/rc.d/pgsql.sh
141
	@ ${CHMOD} 554 ${PREFIX}/etc/rc.d/pgsql.sh
237
	@ ${CHOWN} root.pgsql ${PREFIX}/etc/rc.d/pgsql.sh
142
	@ ${CHOWN} root.pgsql ${PREFIX}/etc/rc.d/pgsql.sh
238
	@ ${INSTALL_DATA} ${FILESDIR}/post-install-notes ${PREFIX}/pgsql
143
	@ ${SED} -e 's#%%PREFIX%%#${PREFIX}#' < ${FILESDIR}/post-install-notes \
144
		> ${PREFIX}/pgsql/post-install-notes
239
.if defined(WITHOUT_MULTIBYTE)
145
.if defined(WITHOUT_MULTIBYTE)
240
	@${CP} ${TMPPLIST} ${TMPPLIST}.nomulti
146
	@${CP} ${TMPPLIST} ${TMPPLIST}.nomulti
241
	@${GREP} -v pgsql/bin/pg_encoding ${TMPPLIST}.nomulti > ${TMPPLIST}
147
	@${GREP} -v pgsql/bin/pg_encoding ${TMPPLIST}.nomulti > ${TMPPLIST}
242
.endif
148
.endif
243
.if defined(WITH_TCL)
149
.if defined(WITH_TCL)
244
	@${CP} ${TMPPLIST} ${TMPPLIST}.notcl
150
	@${CP} ${TMPPLIST} ${TMPPLIST}.notcl
245
	@${CAT} ${PKGDIR}/pkg-plist.tcl ${TMPPLIST}.notcl > ${TMPPLIST}
151
	@${CAT} ${PKGDIR}/${TCL_PLIST} ${TMPPLIST}.notcl > ${TMPPLIST}
246
	@${RM} ${TMPPLIST}.notcl
152
	@${RM} ${TMPPLIST}.notcl
153
# Preparing a loadable TCL-package (pkgIndex.tcl)
154
# XXX This directory and the single file are not registered in
155
# XXX the PLIST, because of different PREFIX.
156
	@${MKDIR} ${LOCALBASE}/lib/tcl${WITH_TCL}/Pgtcl1.3
157
	@${SED} 's|%%PREFIX%%|${PREFIX}|' < ${FILESDIR}/pkgIndex.tcl.in \
158
		> ${LOCALBASE}/lib/tcl${WITH_TCL}/Pgtcl1.3/pkgIndex.tcl
247
.endif
159
.endif
248
.if defined(WITH_ODBC)
160
.if defined(WITH_ODBC)
249
	@${CP} ${TMPPLIST} ${TMPPLIST}.noodbc
161
	@${CP} ${TMPPLIST} ${TMPPLIST}.noodbc
Lines 272-295 Link Here
272
	@ ${ECHO_MSG} "---------------------------------------------------------"
184
	@ ${ECHO_MSG} "---------------------------------------------------------"
273
	@ ${ECHO_MSG} "Putting jdbc examples into ${PREFIX}/share/examples/pgsql"
185
	@ ${ECHO_MSG} "Putting jdbc examples into ${PREFIX}/share/examples/pgsql"
274
	@ ${ECHO_MSG} "---------------------------------------------------------"
186
	@ ${ECHO_MSG} "---------------------------------------------------------"
275
	@ ${CAT} ${PKGDIR}/pkg-plist.doc >> ${TMPPLIST}
276
.endif
277
.endif
187
.endif
278
.if !defined(NOPORTDOCS)
279
	${MKDIR} ${PREFIX}/share/doc/pgsql
280
	@ ${GMAKE} -C ${WRKDIR}/${DISTNAME}/doc install
281
	${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/FAQ* ${PREFIX}/share/doc/pgsql
282
	${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/README* ${PREFIX}/share/doc/pgsql
283
	${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/TODO ${PREFIX}/share/doc/pgsql
284
#	${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/doc/*ps.gz ${PREFIX}/share/doc/pgsql
285
.endif
188
.endif
286
.if !defined(BATCH)
189
.if !defined(BATCH)
287
	@ more -e ${FILESDIR}/post-install-notes
190
	@ more -e ${PREFIX}/pgsql/post-install-notes
288
.endif
191
.endif
289
.if !defined(DEBUG_FLAGS)
192
.if !defined(DEBUG_FLAGS)
290
.for file in ecpg pg_dump pg_id pg_passwd pg_version postgres psql
193
.for file in ecpg pg_dump pg_id pg_passwd pg_version postgres psql
291
	@ strip ${PREFIX}/pgsql/bin/${file}
194
	@ strip ${PREFIX}/pgsql/bin/${file}
292
.endfor
195
.endfor
293
.endif
196
.endif
197
198
post-clean:
199
	@ ${RM} -f ${WRKDIRPREFIX}${.CURDIR}/Makefile.inc
294
200
295
.include <bsd.port.mk>
201
.include <bsd.port.mk>
(-)distinfo (-4 / +3 lines)
Lines 1-4 Link Here
1
MD5 (postgresql/postgresql-7.0.2.base.tar.gz) = 871d23b85d9a3599a7ed75dfc7da7ba7
1
MD5 (postgresql/postgresql-7.0.3.base.tar.gz) = 0eeda8217b5b11e5a9351fc424808426
2
MD5 (postgresql/postgresql-7.0.2.support.tar.gz) = c21180a6485d85785c8e69f0cbff05dd
2
MD5 (postgresql/postgresql-7.0.3.support.tar.gz) = b930f71068d776ef45402fcbebfa58cf
3
MD5 (postgresql/postgresql-7.0.2.docs.tar.gz) = efac1f87463f252e54d72b256885b883
3
MD5 (postgresql/postgresql-7.0.3.docs.tar.gz) = 3d3fc76073f6d77febefc83f887fc87d
4
MD5 (postgresql/postgresql-7.0.2.test.tar.gz) = 3443b3d83194c396f20aee2adc6f93bf
(-)pkg-plist.jdbc (+1 lines)
Lines 10-13 Link Here
10
@dirrm share/examples/pgsql/jdbc
10
@dirrm share/examples/pgsql/jdbc
11
@dirrm share/examples/pgsql
11
@dirrm share/examples/pgsql
12
share/java/classes/postgresql.jar
12
share/java/classes/postgresql.jar
13
@unexec rmdir %D/share/java/classes 2>/dev/null || true
13
@unexec rmdir %D/share/java 2>/dev/null || true
14
@unexec rmdir %D/share/java 2>/dev/null || true
(-)files/patch-ba (-10 / +2 lines)
Lines 1-5 Link Here
1
--- interfaces/jdbc/Makefile.orig	Tue Mar 14 16:55:17 2000
1
--- interfaces/jdbc/Makefile.orig	Sun Nov  5 05:03:53 2000
2
+++ interfaces/jdbc/Makefile	Sun Apr 16 21:16:43 2000
2
+++ interfaces/jdbc/Makefile	Fri Dec  8 03:16:17 2000
3
@@ -10,10 +10,10 @@
3
@@ -10,10 +10,10 @@
4
 
4
 
5
 FIND		= find
5
 FIND		= find
Lines 15-25 Link Here
15
 RM		= rm -f
15
 RM		= rm -f
16
 TOUCH		= touch
16
 TOUCH		= touch
17
 
17
 
18
@@ -40,6 +40,7 @@
19
 	@echo To compile, type:
20
 	@echo "  $(MAKE) jdbc2"
21
 	@echo ------------------------------------------------------------
22
+	$(MAKE) jdbc1
23
 
24
 msg:	
25
 	@echo ------------------------------------------------------------
(-)files/pgsql.sh.tmpl (-2 / +2 lines)
Lines 17-29 Link Here
17
17
18
stop)
18
stop)
19
    [ -x !!PREFIX!!/pgsql/bin/pg_ctl ] && {
19
    [ -x !!PREFIX!!/pgsql/bin/pg_ctl ] && {
20
	su -l pgsql -c 'exec !!PREFIX!!/pgsql/bin/pg_ctl -w -m fast stop'
20
	exec su -l pgsql -c 'exec !!PREFIX!!/pgsql/bin/pg_ctl -w -m fast stop'
21
    }
21
    }
22
    ;;
22
    ;;
23
23
24
status)
24
status)
25
    [ -x !!PREFIX!!/pgsql/bin/pg_ctl ] && {
25
    [ -x !!PREFIX!!/pgsql/bin/pg_ctl ] && {
26
	su -l pgsql -c 'exec !!PREFIX!!/pgsql/bin/pg_ctl status'
26
	exec su -l pgsql -c 'exec !!PREFIX!!/pgsql/bin/pg_ctl status'
27
    }
27
    }
28
    ;;
28
    ;;
29
29
(-)files/post-install-notes (-4 / +7 lines)
Lines 8-16 Link Here
8
Send an e-mail to pgsql-questions-request@postgresql.org with the
8
Send an e-mail to pgsql-questions-request@postgresql.org with the
9
text "subscribe" in the message body.
9
text "subscribe" in the message body.
10
10
11
If you built PostgreSQL with TCL support, you can install the port
11
If you built PostgreSQL with TCL/TK support, you can use the pgaccess
12
"pgaccess" to get a TCL/TK based database frontend for database
12
utility to get a TCL/TK based database frontend for database
13
operations.
13
operations. You do NOT need to install the pgaccess port separately.
14
14
15
If you built in the TCL support, you can load the Pg package into your
16
TCL scripts as easily as ``package require Pgtcl''.
17
15
To start PostgreSQL, run the startup script:
18
To start PostgreSQL, run the startup script:
16
$PREFIX/etc/rc.d/pgsql.sh start
19
%%PREFIX%%/etc/rc.d/pgsql.sh start
(-)pkg-plist.notk (+6 lines)
Added Link Here
1
pgsql/bin/pgtclsh
2
pgsql/include/libpgtcl.h
3
pgsql/lib/libpgtcl.a
4
pgsql/lib/libpgtcl.so
5
pgsql/lib/libpgtcl.so.2
6
pgsql/lib/pltcl.so
(-)files/dot.profile.in (+16 lines)
Added Link Here
1
PATH=${PATH}:%%PREFIX%%/pgsql/bin
2
PGLIB=%%PREFIX%%/pgsql/lib
3
4
# note: PGDATA overwrites the -D startup option
5
PGDATA=%%PREFIX%%/pgsql/data
6
7
export PATH MANPATH PGLIB PGDATA
8
9
#You might want to set some locale stuff here
10
#PGDATESTYLE=ISO
11
#LC_ALL=sv_SE.ISO_88591-1
12
#export PGDATESTYLE LC_ALL
13
14
# if you want to make regression tests use this TZ
15
#TZ=PST8PDT
16
#export TZ
(-)files/patch-au (+58 lines)
Added Link Here
1
--- configure.in.orig	Sun Nov  5 05:03:47 2000
2
+++ configure.in	Mon Dec  4 02:36:15 2000
3
@@ -299,13 +299,28 @@
4
    [  --with-tcl              build Tcl interfaces and pgtclsh ],
5
    [
6
 	case "$withval" in
7
-	y | ye | yes)		USE_TCL=true; USE_TK=true; AC_MSG_RESULT(enabled) ;;
8
+	y | ye | yes)		USE_TCL=true; AC_MSG_RESULT(enabled) ;;
9
 	*)			USE_TCL=; USE_TK=; AC_MSG_RESULT(disabled) ;;
10
 	esac
11
    ],
12
    [ USE_TCL=; USE_TK=; AC_MSG_RESULT(disabled) ]
13
 )
14
 
15
+dnl We include tk support with tcl unless user says --without-tk
16
+if test USE_TCL = true
17
+then
18
+AC_MSG_CHECKING(setting USE_TK)
19
+AC_ARG_WITH(
20
+   tk,
21
+   [  --without-tk              build Tcl *without* Tk ],
22
+   [
23
+	case "$withval" in
24
+	y | ye | yes)		USE_TK=true; USE_TK=true; AC_MSG_RESULT(enabled) ;;
25
+	*)			USE_TK=n; AC_MSG_RESULT(disabled) ;;
26
+	esac
27
+   ]
28
+)
29
+fi
30
 export USE_TCL
31
 export USE_TK
32
 
33
@@ -482,7 +497,7 @@
34
 #endif
35
 ],
36
 	ELF_SYS=true,
37
-[if test "X$elf" = "Xyes"
38
+[if test "X$PORTOBJFORMAT" = "Xyes"
39
 then
40
 	ELF_SYS=true
41
 else
42
@@ -1248,10 +1263,15 @@
43
 	else
44
 		AC_MSG_RESULT($TCL_CONFIG_SH)
45
 		AC_SUBST(TCL_CONFIG_SH)
46
+		. ${TCL_CONFIG_SH}
47
+		AC_SUBST(TCL_LIB_SPEC)
48
 	fi
49
 fi
50
 
51
-USE_TK=$USE_TCL		# If TCL is disabled, disable TK
52
+USE_TK=${USE_TK:=$USE_TCL}	# If TCL is disabled, disable TK
53
+				# otherwise -- enable unless explicitly
54
+				# disabled
55
+
56
 
57
 dnl Check for Tk configuration script tkConfig.sh
58
 if test "$USE_TK" = true
(-)files/patch-av (+17 lines)
Added Link Here
1
--- interfaces/libpq/fe-connect.c	Sun May 21 17:19:53 2000
2
+++ interfaces/libpq/fe-connect.c	Fri Sep 15 13:53:52 2000
3
@@ -801 +801 @@
4
-			sprintf(conn->errorMessage,
5
+			printfPQExpBuffer(&conn->errorMessage,
6
@@ -809 +809 @@
7
-			sprintf(conn->errorMessage, "PQconnectDB() -- couldn't read postmaster response: errno=%d\n%s\n",
8
+			printfPQExpBuffer(&conn->errorMessage, "PQconnectDB() -- couldn't read postmaster response: errno=%d\n%s\n",
9
@@ -822 +822 @@
10
-					sprintf(conn->errorMessage,
11
+					printfPQExpBuffer(&conn->errorMessage,
12
@@ -832 +832 @@
13
-				sprintf(conn->errorMessage,
14
+				printfPQExpBuffer(&conn->errorMessage,
15
@@ -850 +850 @@
16
-			strcpy(conn->errorMessage,
17
+			printfPQExpBuffer(&conn->errorMessage,
(-)files/patch-be (+9 lines)
Added Link Here
1
This patches let you disable Tk even if you have it installed and
2
makes sure the TCL-library is added as a dependency for libpgtcl.
3
--- interfaces/libpgtcl/Makefile.in	Tue Mar  7 20:58:36 2000
4
+++ interfaces/libpgtcl/Makefile.in	Wed Sep 20 08:57:28 2000
5
@@ -29,3 +29,3 @@
6
 
7
-SHLIB_LINK+= $(LIBPQ)
8
+SHLIB_LINK+= $(LIBPQ) @TCL_LIB_SPEC@
9
 
(-)files/pkgIndex.tcl.in (+4 lines)
Added Link Here
1
# Package-index file for Pgtcl-package. Enables you to load PostgreSQL
2
# interface functions right into you TCL-interpreter as simply as
3
#	package require Pgtcl
4
package ifneeded Pgtcl 1.3 "load %%PREFIX%%/lib/libpgtcl.so"
(-)files/pre-install-notes (+9 lines)
Added Link Here
1
# ----------------------------------------------------------------
2
# UPGRADE NOTE! Depending on which version you are upgrading from,
3
# you may have to dump/restore existing databases
4
# as part of the update.
5
# This is *NOT* done by this port!
6
# For detailed instructions, see
7
# %%WRKDIR%%/%%DISTNAME%%/INSTALL
8
# after extraction.
9
# --------------------------------------------------------------
(-)scripts/configure.postgresql (+267 lines)
Added Link Here
1
#!/bin/sh
2
# -*- tab-width: 4; -*-
3
# ex:ts=4
4
#
5
# $FreeBSD$
6
#
7
if [ -f ${WRKDIRPREFIX}${CURDIR}/Makefile.inc ]; then
8
	exit
9
fi
10
11
if [ ! "${BATCH}" ]; then
12
	dialog --title "Backup your data NOW" \
13
	--msgbox "`sed -e \"s#%%WRKDIR%%#${WRKDIR}#; s#%%DISTNAME%%#${DISTNAME}#\" < ${FILESDIR}/pre-install-notes`" \
14
	-1 -1
15
fi
16
17
#SSL=${NO_OPENSSL:+OFF}
18
#SSL=${NOSSL:-ON}
19
20
if [ "${BATCH}" ]; then
21
	set \"MultiByte\"
22
else
23
	/usr/bin/dialog --title "configuration options" --clear \
24
					--checklist "\n\
25
Please select desired options:" -1 -1 8 \
26
JDBC       "Java DataBase Connectivity" OFF \
27
MultiByte  "Multibyte for Multilingualism" ON \
28
ODBC       "Open Database Connectivity" OFF \
29
Perl       "Perl" OFF \
30
TCL        "Tcl" ON \
31
TCLTK      "Tcl/Tk" ON \
32
SSL        "Secure Socket Layer (requires certificate)" ${SSL} \
33
KRB5       "Kerberos 5" OFF \
34
2> /tmp/checklist.tmp.$$
35
36
	retval=$?
37
38
	if [ -s /tmp/checklist.tmp.$$ ]; then
39
		set `cat /tmp/checklist.tmp.$$`
40
	fi
41
	rm -f /tmp/checklist.tmp.$$
42
43
	case $retval in
44
		0)	if [ -z "$*" ]; then
45
				echo "Nothing selected"
46
			fi
47
			;;
48
		1)	echo "Cancel pressed."
49
			exit 1
50
			;;
51
	esac
52
fi
53
54
${MKDIR} -p ${WRKDIRPREFIX}${CURDIR}
55
exec > ${WRKDIRPREFIX}${CURDIR}/Makefile.inc
56
57
while [ "$1" ]; do
58
	case $1 in
59
		\"JDBC\")
60
			# use JAVA_HOME if set correctly
61
			echo "# JDBC"
62
			if [ "${JAVA_HOME}" -a -x ${JAVA_HOME}/bin/javac ]; then
63
				echo JAVA_HOME=${JAVA_HOME}
64
				if [ "$(${JAVA_HOME}/bin/java -version 2>&1 | egrep \"1.1)" ]; then
65
				    JAVAVERSION=1
66
					echo BUILD_DEPENDS+=    ${JAVA_HOME}/bin/javac:\${PORTSDIR}/java/jdk
67
				else
68
					JAVAVERSION=2
69
					echo BUILD_DEPENDS+=    ${JAVA_HOME}/bin/javac:\${PORTSDIR}/java/jdk12-beta
70
				fi
71
			else
72
				JAVAVERSION=1
73
				echo BUILD_DEPENDS+=    \${LOCALBASE}/jdk1.1.8/bin/javac:\${PORTSDIR}/java/jdk
74
				echo JAVA_HOME=\${LOCALBASE}/jdk1.1.8
75
			fi
76
			cat <<-EOF
77
				JAVAVERSION=${JAVAVERSION}
78
				WITH_JDBC=YES
79
				SCRIPTS_ENV+=     JAVA_HOME=\${JAVA_HOME}
80
81
			EOF
82
			;;
83
		\"MultiByte\")
84
			MULTIBYTE=1
85
			;;
86
		\"ODBC\")
87
			cat <<-EOF
88
				# ODBC
89
				WITH_ODBC=YES
90
				CONFIGURE_ARGS+=  --with-odbc
91
92
			EOF
93
			;;
94
		\"Perl\")
95
			cat <<-EOF
96
				# PERL
97
				WITH_PERL=YES
98
				CONFIGURE_ARGS+=  --with-perl
99
100
			EOF
101
			;;
102
		\"TCL\")
103
			TCL=1
104
			;;
105
		\"TCLTK\")
106
			echo "#TCLTK"
107
			echo WITH_TK=YES
108
			echo
109
			TCL=1
110
			;;
111
		\"SSL\")
112
			cat <<-EOF
113
				# SSL
114
				USE_OPENSSL=    yes
115
				CFLAGS+=	-DUSE_SSL
116
				WITH_SSL=	yes
117
				CONFIGURE_ENV+=	LDFLAGS="-L\${OPENSSLLIB} -lssl -lcrypto"
118
119
			EOF
120
			;;
121
		\"KRB5\")
122
			KRB5=1
123
			;;
124
		\"nothing\"|true)
125
			;;
126
		*)
127
			echo "Invalid option(s): $*" > /dev/stderr
128
			rm -f ${WRKDIRPREFIX}${CURDIR}/Makefile.inc
129
			exit 1
130
			;;
131
	esac
132
    shift
133
done
134
135
exec > /dev/stderr
136
137
# if multibyte, determine charset
138
echo "# Multibyte"
139
140
if [ ! "${MULTIBYTE}" ]; then
141
	echo "WITHOUT_MULTIBYTE=YES" >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc
142
else
143
	if [ "${BATCH}" ]; then
144
		set \"nothing\"
145
	else
146
		/usr/bin/dialog --title "configuration options" --clear \
147
						--radiolist "\n\
148
Please select desired options:" -1 -1 16 \
149
nothing       "Default Encoding" ON \
150
SQL_ASCII     "SQL_ASCII" OFF \
151
LATIN1        "LATIN1" OFF \
152
LATIN2        "LATIN2" OFF \
153
LATIN3        "LATIN3" OFF \
154
LATIN4        "LATIN4" OFF \
155
LATIN5        "LATIN5" OFF \
156
EUC_JP        "EUC_JP" OFF \
157
EUC_CN        "EUC_CN" OFF \
158
EUC_KR        "EUC_KR" OFF \
159
EUC_TW        "EUC_TW" OFF \
160
KOI8          "KOI8" OFF \
161
UNICODE       "UNICODE" OFF \
162
MULE_INTERNAL "MULE_INTERNAL" OFF \
163
WIN           "WIN" OFF \
164
ALT           "ALT" OFF \
165
2> /tmp/checklist.tmp.$$
166
167
		retval=$?
168
169
		if [ -s /tmp/checklist.tmp.$$ ]; then
170
			set `cat /tmp/checklist.tmp.$$`
171
		fi
172
		rm -f /tmp/checklist.tmp.$$
173
		if [ $retval = 1 ]; then
174
			echo "Cancel pressed."
175
			rm ${WRKDIRPREFIX}${CURDIR}/Makefile.inc
176
			exit 1
177
		fi
178
	fi
179
180
    if [ "$1" = "nothing" ]; then
181
		echo "CONFIGURE_ARGS+=	--enable-multibyte" \
182
			>> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc
183
	else
184
		echo "CONFIGURE_ARGS+=	--enable-multibyte=$1" \
185
			>> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc
186
	fi
187
fi
188
echo
189
190
if [ "${TCL}" ]; then
191
	echo "# TCL" >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc
192
	if [ "${BATCH}" ]; then
193
		echo WITH_TCL=8.3  >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc
194
	else
195
		dialog --title "TCL version" \
196
			   --inputbox "Please enter TCL version. Default is 8.3." -1 -1 "8.3" \
197
			2> /tmp/checklist.tmp.$$
198
		retval=$?
199
		if [ -s /tmp/checklist.tmp.$$ ]; then
200
			set `cat /tmp/checklist.tmp.$$`
201
		fi
202
		rm -f /tmp/checklist.tmp.$$
203
		case $retval in
204
			0)	if [ -z "$*" ]; then
205
					echo "Nothing selected"
206
				fi
207
				;;
208
			1)	echo "Cancel pressed."
209
				rm -f ${WRKDIRPREFIX}${CURDIR}/Makefile.inc
210
				exit 1
211
				;;
212
		esac
213
		echo WITH_TCL=\"$1\" >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc
214
	fi
215
	cat <<-EOF >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc
216
		CONFIGURE_ARGS+= --with-tcl --with-tclconfig="\${TCLCONFIG}"
217
		TCLV=\${WITH_TCL:S/.//}
218
		TCL_INCDIR=    \${LOCALBASE}/include/tcl\${WITH_TCL}
219
		MAKE_ENV=      TCL_INCDIR=\${TCL_INCDIR}
220
		LIB_DEPENDS=   tcl\${TCLV}.1:\${PORTSDIR}/lang/tcl\${TCLV}
221
		TCLCONFIG=     '\${LOCALBASE}/lib/tcl\${WITH_TCL}'
222
		.if defined(WITH_TK)
223
		TK_INCDIR=     \${LOCALBASE}/include/tk\${WITH_TCL}
224
		CONFIGURE_ENV+=        WISH=\${LOCALBASE}/bin/wish\${WITH_TCL}
225
		LIB_DEPENDS+=  tk\${TCLV}.1:\${PORTSDIR}/x11-toolkits/tk\${TCLV}
226
		TCLCONFIG+=    '\${LOCALBASE}/lib/tk\${WITH_TCL}'
227
		TCL_PLIST=     pkg-plist.tcl
228
		.else
229
		TCL_PLIST=     pkg-plist.notk
230
		CONFIGURE_ARGS+=        --without-tk
231
		.endif
232
233
	EOF
234
fi
235
236
if [ "${KRB5}" ]; then
237
	if [ "${BATCH}" ]; then
238
		# never gets here, but what the heck...
239
		echo KRB5_HOME=\${LOCALBASE} >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc
240
	else
241
		dialog --inputbox "Please enter the KRB5_HOME path" -1 -1 "${KRB_HOME:-${LOCALBASE}}" \
242
			2> /tmp/checklist.tmp.$$
243
		retval=$?
244
		if [ -s /tmp/checklist.tmp.$$ ]; then
245
			set `cat /tmp/checklist.tmp.$$`
246
		fi
247
		rm -f /tmp/checklist.tmp.$$
248
		case $retval in
249
			0)	if [ -z "$*" ]; then
250
					echo "No input"
251
				fi
252
				;;
253
			1)	echo "Cancel pressed."
254
				rm -f ${WRKDIRPREFIX}${CURDIR}/Makefile.inc
255
				exit 1
256
				;;
257
		esac
258
		echo KRB5_HOME=\"$1\" >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc
259
	fi
260
	cat <<-EOF >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc
261
		.if defined(KRB5_HOME) && exists(\${KRB5_HOME})
262
		CONFIGURE_KRB=	--with-krb5=\${KRB5_HOME} \
263
						--with-krb-keytab=FILE:\${PREFIX}/pgsql/etc/keytab
264
		.endif
265
266
	EOF
267
fi

Return to bug 23371