blob: 3a4896dd4e93fc78c056205a7b9faf018f589400 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
|
#!/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" \
--yesno "As always, backup your data before
upgrading. If the upgrade leads to a higher
minor revision (e.g. 7.1.x -> 7.2, a dump
and restore of all databases is
required. This is *NOT* done by the port!
Select 'Yes' to continue the installation." -1 -1
if [ $? -eq 1 ] ; then exit 1; fi
fi
if [ "${BATCH}" ]; then
set \"MultiByte\" \"KRB5\"
else
/usr/bin/dialog --title "configuration options" --clear \
--checklist "\n\
Please select desired options:" -1 -1 3 \
MultiByte "Multibyte for Multilingualism" ON \
KRB5 "Kerberos 5 (only if it exists)" ON \
CLIENT "PostgreSQL client only, no server" 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} ${WRKDIRPREFIX}${CURDIR}
exec > ${WRKDIRPREFIX}${CURDIR}/Makefile.inc
while [ "$1" ]; do
case $1 in
\"MultiByte\")
MULTIBYTE=1
;;
\"KRB5\")
KRB5=1
;;
\"CLIENT\")
CLIENT=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 default charset
echo "# Multibyte" >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc
if [ ! "${MULTIBYTE}" ]; then
echo "WITHOUT_MULTIBYTE=YES" >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc
else
if [ "${BATCH}" ]; then
set "SQL_ASCII"
else
/usr/bin/dialog --title "Default encoding system" --clear \
--radiolist "\n\
Please select the default encoding:" -1 -1 16 \
SQL_ASCII "SQL_ASCII - ASCII" ON \
EUC_JP "Japanese EUC" OFF \
EUC_CN "Chinese EUC" OFF \
EUC_KR "Korean EUC" OFF \
EUC_TW "Taiwan EUC" OFF \
UNICODE "Unicode (UTF-8)" OFF \
MULE_INTERNAL "Mule internal code" OFF \
LATIN1 "ISO 8859-1" OFF \
LATIN2 "ISO 8859-2" OFF \
LATIN3 "ISO 8859-3" OFF \
LATIN4 "ISO 8859-4" OFF \
LATIN5 "ISO 8859-9" OFF \
LATIN6 "ISO 8859-10" OFF \
LATIN7 "ISO 8859-13" OFF \
LATIN8 "ISO 8859-14" OFF \
LATIN9 "ISO 8859-15" OFF \
LATIN10 "ISO 8859-16" OFF \
ISO-8859-5 "ECMA-113 Latin/Cyrillic" OFF \
ISO-8859-6 "ECMA-114 Latin/Arabic" OFF \
ISO-8859-7 "ECMA-118 Latin/Greek" OFF \
ISO-8859-8 "ECMA-121 Latin/Hebrew" OFF \
KOI8 "KOI8-R(U)" OFF \
WIN "Windows CP1251" OFF \
ALT "Windows CP866" 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
echo "MULTIBYTE_ENCODING=$1" \
>> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc
fi
if [ "${KRB5}" ]; then
if [ -r "/usr/bin/krb5-config" ]; then
echo " ########################################################################"
echo " ### PostgreSQL does not build with Hiemdal kerberos. Edit ###"
echo " ### /etc/make.conf and turn the knob MAKE_KERBEROS5 off and make ###"
echo " ### world (or remove all traces of Hiemdal from your system by: ###"
echo " ### rm -f /usr/bin/krb5-config /usr/lib/libkrb5.* /usr/include/krb5* ###"
echo " ########################################################################"
KRB5=""
else
KRB5CONF="`which krb5-config`"
if [ "$KRB5CONF" ]; then
cat <<-EOF >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc
.if exists($KRB5CONF)
LIB_DEPENDS+= krb5.3:${PORTSDIR}/security/krb5
CONFIGURE_ARGS+= --with-krb5="`${KRB5CONF} --prefix krb5`"
CFLAGS+= "'`${KRB5CONF} --cflags krb5`'"
LDFLAGS+= "'`${KRB5CONF} --libs krb5`'"
.endif
EOF
else
echo " ########################################################"
echo " ### Unable to find krb5-config in your path. ###"
echo " ### Please correct and build PostgreSQL again if you ###"
echo " ### want PostgreSQL to be compiled with kerberos ###"
echo " ### support (ports/security/krb5). ###"
echo " ########################################################"
fi
fi
fi
if [ ${CLIENT} ]; then
echo "WITHOUT_SERVER=yes" >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc
fi
|