76 lines
1.7 KiB
Bash
76 lines
1.7 KiB
Bash
#!/bin/sh
|
|
#
|
|
|
|
if [ -f ${WRKDIRPREFIX}${CURDIR}/Makefile.inc ]; then
|
|
exit
|
|
fi
|
|
|
|
tempfile=`mktemp -t checklist`
|
|
if [ "${BATCH}" = "yes" ]; then
|
|
set \"GigaBase\"
|
|
else
|
|
/usr/bin/dialog --title "OOPS configuration options" --clear \
|
|
--checklist "\n\
|
|
Please select desired options:\n\
|
|
(please select ONLY ONE DB storages)" -1 -1 16 \
|
|
GigaBase "GigaBase storage" OFF \
|
|
DB4 "Berkeley DB v4 storage" OFF \
|
|
MySQL "MySQL auth support" OFF \
|
|
PgSQL "PostgreSQL auth support" OFF \
|
|
PCRE "PCRE support" OFF \
|
|
2> $tempfile
|
|
|
|
retval=$?
|
|
|
|
if [ -s $tempfile ]; then
|
|
set `cat $tempfile`
|
|
fi
|
|
rm -f $tempfile
|
|
|
|
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
|
|
|
|
echo "PREFIX= ${PREFIX}"
|
|
|
|
while [ "$1" ]; do
|
|
case $1 in
|
|
\"GigaBase\")
|
|
echo "LIB_DEPENDS+= gigabase_r.2:\${PORTSDIR}/databases/gigabase"
|
|
echo "CONFIGURE_ARGS+= --without-DB"
|
|
;;
|
|
\"DB4\")
|
|
echo "LIB_DEPENDS+= db4.0:\${PORTSDIR}/databases/db4"
|
|
echo "CONFIGURE_ARGS+= --without-GB"
|
|
;;
|
|
\"MySQL\")
|
|
echo "LIB_DEPENDS+= mysqlclient.10:\${PORTSDIR}/databases/mysql323-client"
|
|
echo "CONFIGURE_ARGS+= --with-MYSQL=\${PREFIX}"
|
|
;;
|
|
\"PgSQL\")
|
|
echo "POSTGRESQL_PORT?= databases/postgresql7"
|
|
echo "LIB_DEPENDS+= pq.3:\${PORTSDIR}/\${POSTGRESQL_PORT}"
|
|
echo "CONFIGURE_ARGS+= --with-PGSQL=\${PREFIX}/pgsql"
|
|
;;
|
|
\"PCRE\")
|
|
echo "LIB_DEPENDS+= pcre.0:\${PORTSDIR}/devel/pcre"
|
|
echo "CONFIGURE_ARGS+= --with-regexp=pcre"
|
|
;;
|
|
*)
|
|
echo "Invalid option(s): $*" > /dev/stderr
|
|
rm -f ${WRKDIRPREFIX}${CURDIR}/Makefile.inc
|
|
exit 1
|
|
;;
|
|
esac
|
|
shift
|
|
done
|