View | Details | Raw Unified | Return to bug 21784
Collapse All | Expand All

(-)Makefile (-77 / +100 lines)
Lines 29-40 Link Here
29
29
30
# SSL support will be compiled in, unless NO_OPENSSL is defined, which
31
# may be overturned by requesting WITH_SSL explicitly
32
.if !defined(NO_OPENSSL) || defined(WITH_SSL)
33
USE_OPENSSL=    yes
34
CFLAGS+=	-DUSE_SSL
35
WITH_SSL=	yes
36
CONFIGURE_ENV+=	LDFLAGS="-L${OPENSSLLIB} -lssl -lcrypto"
37
.endif
38
30
# if you want to use the tcl/tk frontend pgaccess, then you need to build
39
# if you want to use the tcl/tk frontend pgaccess, then you need to build
31
# postgresql with tcl support by typing: make -DWITH_TCL
40
# postgresql with tcl support by typing: make WITH_TCL=<TCL.VERSION>
32
.if defined(WITH_TCL)
41
.if defined(WITH_TCL)
33
TCL_INCDIR=	${LOCALBASE}/include/tcl8.3
42
CONFIGURE_TCL=	--with-tcl --with-tclconfig="${TCLCONFIG}"
34
TK_INCDIR=	${LOCALBASE}/include/tk8.3
43
.if ${WITH_TCL}==1
44
WITH_TCL=8.3
45
.endif
46
TCLV=${WITH_TCL:S//}
47
TCL_INCDIR=	${LOCALBASE}/include/tcl${WITH_TCL}
35
MAKE_ENV=	TCL_INCDIR=${TCL_INCDIR}
48
MAKE_ENV=	TCL_INCDIR=${TCL_INCDIR}
36
CONFIGURE_ENV=	WISH=${LOCALBASE}/bin/wish8.3
49
LIB_DEPENDS=	tcl${TCLV}.1:${PORTSDIR}/lang/tcl${TCLV}
37
LIB_DEPENDS=	tcl83.1:${PORTSDIR}/lang/tcl83 \
50
TCLCONFIG=	'${LOCALBASE}/lib/tcl${WITH_TCL}'
38
		tk83.1:${PORTSDIR}/x11-toolkits/tk83
51
.if !defined(WITHOUT_TK)
39
CONFIGURE_TCL=	--with-tcl --with-tclconfig="${LOCALBASE}/lib/tcl8.3 ${LOCALBASE}/lib/tk8.3"
52
TK_INCDIR=	${LOCALBASE}/include/tk${WITH_TCL}
53
CONFIGURE_ENV+=	WISH=${LOCALBASE}/bin/wish${WITH_TCL}
54
LIB_DEPENDS+=	tk${TCLV}.1:${PORTSDIR}/x11-toolkits/tk${TCLV}
55
TCLCONFIG+=	'${LOCALBASE}/lib/tk${WITH_TCL}'
56
TCL_PLIST=	PLIST.tcl
57
.else
58
TCL_PLIST=	PLIST.tclnotk
59
CONFIGURE_TCL+=	--without-tk
60
.endif
40
.endif
61
.endif
Lines 80-81 Link Here
80
		--enable-locale \
101
		--enable-locale \
102
		--enable-recode \
81
		--with-template=`uname -s | ${TR} '[A-Z]' '[a-z]'` \
103
		--with-template=`uname -s | ${TR} '[A-Z]' '[a-z]'` \
Lines 113-155 Link Here
113
pre-fetch:
135
pre-fetch:
114
	@${ECHO_MSG} "To install and run postgresql you need to compile kernel with:"
136
	# To install and run postgresql you need to compile kernel with:
115
	@${ECHO_MSG} "    options    \"SYSVSHM, SYSVSEM, SYSVMSG\""
137
	#     options    "SYSVSHM, SYSVSEM, SYSVMSG"
116
.if !defined(WITH_TCL)
138
.if !defined(WITH_TCL)
117
	@${ECHO_MSG} "To build the \"PostgreSQL to Tcl interface library\", libpgtcl, type:"
139
	# To build the "PostgreSQL to Tcl interface library", libpgtcl, type:
118
	@${ECHO_MSG} "    make -DWITH_TCL"
140
	#     make WITH_TCL=<TCL.VERSION> (like WITH_TCL=8.3)
141
	# To disable build of TK-support (mainly -- pgaccess), add:
142
	#     -DWITHOUT_TK
143
.else
144
	# Building PostgreSQL with libpgtcl.
145
.if !defined(WITHOUT_TK)
146
	# To disable build of TK-support (mainly -- pgaccess), add:
147
	#     -DWITHOUT_TK
148
.endif
149
.endif
150
.if defined(WITH_SSL)
151
	# Building PostgreSQL with SSL support
119
.else
152
.else
120
	@${ECHO_MSG} "Building PostgreSQL with \"libpgtcl\"."
153
	# Although NO_OPENSSL is defined somewhere, you can force the port
154
	# to try by adding -DWITH_SSL to the make's command line
121
.endif
155
.endif
122
.if !defined(WITHOUT_MULTIBYTE)
156
.if !defined(WITHOUT_MULTIBYTE)
123
	@${ECHO_MSG} "To disable multibyte support, type:"
157
	# To disable multibyte support, type:
124
	@${ECHO_MSG} "    make -DWITHOUT_MULTIBYTE"
158
	#     make -DWITHOUT_MULTIBYTE
125
.if !defined(DEFAULT_ENCODING)
159
.if !defined(DEFAULT_ENCODING)
126
	@${ECHO_MSG} "To set the default encoding for the multibyte support, type:"
160
	# To set the default encoding for the multibyte support, type:
127
	@${ECHO_MSG} "    make DEFAULT_ENCODING=<encoding>"
161
	#     make DEFAULT_ENCODING=<encoding>
128
	@${ECHO_MSG} "where <encoding> is one of these:"
162
	# where <encoding> is one of these:
129
	@${ECHO_MSG} "    SQL_ASCII   LATIN1      LATIN2      LATIN3      LATIN4      LATIN5"
163
	#     SQL_ASCII   LATIN1      LATIN2      LATIN3      LATIN4      LATIN5
130
	@${ECHO_MSG} "    EUC_JP      EUC_CN      EUC_KR      EUC_TW      KOI8"
164
	#     EUC_JP      EUC_CN      EUC_KR      EUC_TW      KOI8
131
	@${ECHO_MSG} "    UNICODE     MULE_INTERNAL           WIN         ALT"
165
	#     UNICODE     MULE_INTERNAL           WIN         ALT
132
.else
166
.else
133
	@${ECHO_MSG} "The default encoding is '${DEFAULT_ENCODING}'."
167
	# The default encoding is '${DEFAULT_ENCODING}'.
134
.endif
168
.endif
135
.else
169
.else
136
	@${ECHO_MSG} "Building PostgreSQL without multibyte support."
170
	# Building PostgreSQL without multibyte support.
137
.endif
171
.endif
138
.if !defined(WITH_JDBC)
172
.if !defined(WITH_JDBC)
139
	@${ECHO_MSG} "To build Java (JDBC) support, type:"
173
	# To build Java (JDBC) support, type:
140
	@${ECHO_MSG} "    make -DWITH_JDBC"
174
	#     make -DWITH_JDBC
141
.else
175
.else
142
	@${ECHO_MSG} "Building PostgreSQL with \"postgresql.jar\"."
176
	# Building PostgreSQL with "postgresql.jar".
143
.endif
177
.endif
144
.if !defined(WITH_PERL)
178
.if !defined(WITH_PERL)
145
	@${ECHO_MSG} "To build Perl interface and pl/Perl interpreter:"
179
	# To build Perl interface and pl/Perl interpreter:"
146
	@${ECHO_MSG} "    make -DWITH_PERL"
180
	#     make -DWITH_PERL"
147
.else
181
.else
148
	@${ECHO_MSG} "Building PostgreSQL with \"pl/Perl\"."
182
	# Building PostgreSQL with "pl/Perl".
149
.endif
183
.endif
150
.if !defined(WITH_ODBC)
184
.if !defined(WITH_ODBC)
151
	@${ECHO_MSG} "To build the ODBC driver package:"
185
	# To build the ODBC driver package:
152
	@${ECHO_MSG} "    make -DWITH_ODBC"
186
	#    make -DWITH_ODBC
153
.else
187
.else
154
	@${ECHO_MSG} "Building PostgreSQL with ODBC Drivers."
188
	# Building PostgreSQL with ODBC Drivers.
155
.endif
189
.endif
Lines 168-179 Link Here
168
.if defined(WITH_JDBC)
202
.if defined(WITH_JDBC)
169
	@ cd ${WRKSRC}/interfaces/jdbc && ${GMAKE}
203
	@ ${GMAKE} -C ${WRKSRC}/interfaces/jdbc
170
.if !defined(NOPORTDOCS)
204
.if !defined(NOPORTDOCS)
171
	@ cd ${WRKSRC}/interfaces/jdbc && ${GMAKE} examples
205
	@ ${GMAKE} -C ${WRKSRC}/interfaces/jdbc examples
172
.endif
206
.endif
173
.endif
207
.endif
174
	@ ${ECHO} "------------------------------------------------------------"
208
	# ------------------------------------------------------------
175
	@ ${ECHO} "Dump existing databases, before installing new db version !!"
209
	# Dump existing databases, before installing new db version !!
176
	@ ${ECHO} "Detailed instructions, see"
210
	# Detailed instructions, see"
177
	@ ${ECHO} "${WRKDIR}/${DISTNAME}/INSTALL"
211
	# ${WRKDIR}/${DISTNAME}/INSTALL"
178
	@ ${ECHO} "------------------------------------------------------------"
212
	# ------------------------------------------------------------
179
213
Lines 188-214 Link Here
188
.if defined(NOPORTDOCS)
222
.if defined(NOPORTDOCS)
189
	@ ( cd ${DOCDIR}; ${GMAKE} man )
223
	@ ${GMAKE} -C ${DOCDIR} man
190
.else
224
.else
191
	@ ( cd ${DOCDIR}; ${GMAKE} install )
225
	@ ${GMAKE} -C ${DOCDIR} install
192
.endif
226
.endif
193
	@ if [ ! -f ${PREFIX}/pgsql/.profile ]; then \
227
	@ if [ ! -f ${PREFIX}/pgsql/.profile ]; then \
194
		${ECHO} "PATH=${PATH}:${PREFIX}/pgsql/bin" \
228
		${SED} 's|%%PREFIX%%|${PREFIX}|g' \
229
			< ${FILESDIR}/dot.profile.in \
195
			> ${PREFIX}/pgsql/.profile; \
230
			> ${PREFIX}/pgsql/.profile; \
196
		${ECHO} "MANPATH=${MANPATH}:${PREFIX}/pgsql/man" \
197
			>> ${PREFIX}/pgsql/.profile; \
198
		${ECHO} "PGLIB=${PREFIX}/pgsql/lib" \
199
			>> ${PREFIX}/pgsql/.profile; \
200
		${ECHO} "# note: PGDATA overwrites the -D startup option" \
201
			>> ${PREFIX}/pgsql/.profile; \
202
		${ECHO} "PGDATA=${PREFIX}/pgsql/data" \
203
			>> ${PREFIX}/pgsql/.profile; \
204
		${ECHO} "DISPLAY=:0" \
205
			>> ${PREFIX}/pgsql/.profile; \
206
		${ECHO} "export PATH MANPATH PGLIB PGDATA DISPLAY" \
207
			>> ${PREFIX}/pgsql/.profile; \
208
		${ECHO} "# if you want to make regression tests use this TZ" \
209
			>> ${PREFIX}/pgsql/.profile; \
210
		${ECHO} "#TZ=PST8PDT" \
211
			>> ${PREFIX}/pgsql/.profile; \
212
		${ECHO} "#export TZ" \
213
			>> ${PREFIX}/pgsql/.profile; \
214
	fi
231
	fi
Lines 216-218 Link Here
216
	@ ${CHOWN} root:pgsql ${PREFIX}/pgsql/lib
233
	@ ${CHOWN} root:pgsql ${PREFIX}/pgsql/lib
217
	@ ${ECHO} 'Initializing PostgreSQL Databases - this may take a few minutes...'
234
	# Initializing PostgreSQL Databases - this may take a few minutes...
218
	@ ${SETENV} OBJFORMAT=${PORTOBJFORMAT} ${LDCONFIG} -m ${PREFIX}/pgsql/lib
235
	@ ${SETENV} OBJFORMAT=${PORTOBJFORMAT} ${LDCONFIG} -m ${PREFIX}/pgsql/lib
Lines 230-238 Link Here
230
	@${CP} ${TMPPLIST} ${TMPPLIST}.notcl
247
	@${CP} ${TMPPLIST} ${TMPPLIST}.notcl
231
	@${CAT} ${PKGDIR}/PLIST.tcl ${TMPPLIST}.notcl > ${TMPPLIST}
248
	@${CAT} ${PKGDIR}/${TCL_PLIST} ${TMPPLIST}.notcl > ${TMPPLIST}
232
	@${RM} ${TMPPLIST}.notcl
249
	@${RM} ${TMPPLIST}.notcl
233
.endif
250
	# Preparing a loadable TCL-package (pkgIndex.tcl)
234
.if defined(WITH_ODBC)
251
	# XXX This directory and the single file are not registered in
235
	@${CP} ${TMPPLIST} ${TMPPLIST}.noodbc
252
	# XXX the PLIST, because of different PREFIX.
236
	@${CAT} ${PKGDIR}/PLIST.odbc ${TMPPLIST}.noodbc > ${TMPPLIST}
253
	@${MKDIR} -p ${LOCALBASE}/lib/tcl${WITH_TCL}/Pgtcl1.3
237
	@${RM} ${TMPPLIST}.noodbc
254
	@${SED} 's|%%PREFIX%%|${PREFIX}|' < ${FILESDIR}/pkgIndex.tcl.in \
255
		> ${LOCALBASE}/lib/tcl${WITH_TCL}/Pgtcl1.3/pkgIndex.tcl
238
.endif
256
.endif
Lines 242-251 Link Here
242
			  ${PREFIX}/share/java/classes/postgresql.jar
260
			  ${PREFIX}/share/java/classes/postgresql.jar
243
	@ ${ECHO_MSG} "---------------------------------------------------------"
261
	# ---------------------------------------------------------"
244
	@ ${ECHO_MSG} "Putting postgresql.jar in"
262
	# Putting postgresql.jar in"
245
	@ ${ECHO_MSG} "${PREFIX}/share/java/classes/postgresql.jar"
263
	# ${PREFIX}/share/java/classes/postgresql.jar"
246
	@ ${ECHO_MSG} "Add this to your CLASSPATH!"
264
	# Add this to your CLASSPATH!"
247
	@ ${ECHO_MSG} "ALSO NOTE: path inside jar file modified from 6.5.x:"
265
	# ALSO NOTE: path inside jar file modified from 6.5.x:"
248
	@ ${ECHO_MSG} "  'postgresql.*' -> 'org.postgresql.*'!"
266
.endif
249
	@ ${ECHO_MSG} "You will need to modify you applications' props files."
267
.if defined(WITH_ODBC)
250
	@ ${ECHO_MSG} "---------------------------------------------------------"
268
	@${CP} ${TMPPLIST} ${TMPPLIST}.noodbc
269
	@${CAT} ${PKGDIR}/PLIST.odbc ${TMPPLIST}.noodbc > ${TMPPLIST}
270
	@${RM} ${TMPPLIST}.noodbc
271
	#   'postgresql.*' -> 'org.postgresql.*'!"
272
	# You will need to modify you applications' props files."
273
	# ---------------------------------------------------------"
251
	@ ${CAT} ${PKGDIR}/PLIST.jdbc >> ${TMPPLIST}
274
	@ ${CAT} ${PKGDIR}/PLIST.jdbc >> ${TMPPLIST}
Lines 257-261 Link Here
257
			  ${PREFIX}/share/examples/pgsql/jdbc
280
			  ${PREFIX}/share/examples/pgsql/jdbc
258
	@ ${ECHO_MSG} "---------------------------------------------------------"
281
	# ---------------------------------------------------------"
259
	@ ${ECHO_MSG} "Putting jdbc examples into ${PREFIX}/share/examples/pgsql"
282
	# Putting jdbc examples into ${PREFIX}/share/examples/pgsql"
260
	@ ${ECHO_MSG} "---------------------------------------------------------"
283
	# ---------------------------------------------------------"
261
	@ ${CAT} ${PKGDIR}/PLIST.doc >> ${TMPPLIST}
284
	@ ${CAT} ${PKGDIR}/PLIST.doc >> ${TMPPLIST}
(-)files/dot.profile.in (+15 lines)
Line 0 Link Here
1
PATH=${PATH}:%%PREFIX%%/pgsql/bin
2
MANPATH=${MANPATH}:%%PREFIX%%/pgsql/man
3
PGLIB=%%PREFIX%%/pgsql/lib
4
5
# note: PGDATA overwrites the -D startup option
6
PGDATA=%%PREFIX%%/pgsql/data
7
8
# not sure if you need this:
9
DISPLAY=:0
10
11
export PATH MANPATH PGLIB PGDATA # DISPLAY
12
13
# if you want to make regression tests use this TZ
14
#TZ=PST8PDT
15
#export TZ
(-)files/pgsql.sh.tmpl (-2 / +2 lines)
Lines 19-21 Link Here
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
    }
Lines 25-27 Link Here
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
    }
(-)files/pkgIndex.tcl.in (+4 lines)
Line 0 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/post-install-notes (-3 / +6 lines)
Lines 10-14 Link Here
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
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''.
14
17
(-)patches/patch-ss (+17 lines)
Line 0 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,
(-)patches/patch-st (+45 lines)
Line 0 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
 
10
--- configure	Wed Sep 20 08:53:57 2000
11
+++ configure	Wed Sep 20 09:01:00 2000
12
@@ -948,2 +948,17 @@
13
 
14
+if test USE_TCL = true
15
+then
16
+	echo $ac_n "checking setting USE_TK""... $ac_c" 1>&6
17
+	echo "configure:952: checking setting USE_TK" >&5
18
+	# Check whether --with-tk or --without-tk was given.
19
+	if test "${with_tk+set}" = set; then
20
+	  withval="$with_tk"
21
+	  
22
+		case "$withval" in
23
+		y | ye | yes)		USE_TK=true; echo "$ac_t""enabled" 1>&6 ;;
24
+		*)			USE_TK=n; echo "$ac_t""disabled" 1>&6 ;;
25
+		esac
26
+	fi
27
+fi
28
+
29
 
30
@@ -7090,3 +7105,3 @@
31
 		echo "$ac_t""$TCL_CONFIG_SH" 1>&6
32
-		
33
+		. ${TCL_CONFIG_SH}
34
 	fi
35
@@ -7094,3 +7118,5 @@
36
 
37
-USE_TK=$USE_TCL		# If TCL is disabled, disable TK
38
+USE_TK=${USE_TK:=$USE_TCL}		# If TCL is disabled, disable TK,
39
+					# otherwise -- enable unless explicitly
40
+					# disabled
41
 
42
@@ -8359,2 +8385,3 @@
43
 s%@expanded_libdir@%$expanded_libdir%g
44
+s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g
45
 
(-)pkg/PLIST.tclnotk (+6 lines)
Line 0 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

Return to bug 21784