mirror of
https://git.FreeBSD.org/ports.git
synced 2024-10-31 21:57:12 +00:00
129 lines
4.3 KiB
Plaintext
129 lines
4.3 KiB
Plaintext
|
#!/bin/sh
|
||
|
|
||
|
if [ -f ${WRKDIRPREFIX}${CURDIR}/Makefile.inc ]; then
|
||
|
exit
|
||
|
fi
|
||
|
|
||
|
/usr/bin/dialog --title "configuration options" --clear \
|
||
|
--checklist "\n\
|
||
|
Please select desired options:" -1 -1 11 \
|
||
|
FreeType "TrueType font rendering" OFF \
|
||
|
JPEG "support JPEG" OFF \
|
||
|
threads "threads support" ON \
|
||
|
GDBM "GNU database manager support" OFF \
|
||
|
zlib "zlib library support" ON \
|
||
|
gmp "support bignums" ON \
|
||
|
readline "support for command line editing" ON \
|
||
|
MySQL "MySQL database support" OFF \
|
||
|
PostgreSQL "PostgreSQL database support" OFF \
|
||
|
mSQL "mSQL database support" OFF \
|
||
|
2> /tmp/checklist.tmp.$$
|
||
|
#ssl "SSL support" OFF \
|
||
|
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
|
||
|
|
||
|
mkdir -p ${WRKDIRPREFIX}${CURDIR}
|
||
|
> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc
|
||
|
|
||
|
while [ "$1" ]; do
|
||
|
case $1 in
|
||
|
\"FreeType\")
|
||
|
echo "LIB_DEPENDS+= ttf.3:\${PORTSDIR}/print/freetype" >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc
|
||
|
echo "CONFIGURE_ARGS+= --with-ttflib" >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc
|
||
|
FreeType=1
|
||
|
;;
|
||
|
\"threads\")
|
||
|
threads=1
|
||
|
;;
|
||
|
\"gmp\")
|
||
|
echo "CONFIGURE_ARGS+= --with-gmp" >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc
|
||
|
gmp=1
|
||
|
;;
|
||
|
\"readline\")
|
||
|
echo "CONFIGURE_ARGS+= --with-readline" >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc
|
||
|
readline=1
|
||
|
;;
|
||
|
\"JPEG\")
|
||
|
echo "LIB_DEPENDS+= jpeg.9:${PORTSDIR}/graphics/jpeg" >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc
|
||
|
echo "CONFIGURE_ARGS+= --with-jpeg=\${PREFIX}" >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc
|
||
|
JPEG=1
|
||
|
;;
|
||
|
\"GDBM\")
|
||
|
echo "BUILD_DEPENDS= ${PREFIX}/lib/libgdbm.a:${PORTSDIR}/databases/gdbm" >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc
|
||
|
echo "CONFIGURE_ARGS+= --with-gdbm=\${PREFIX}" >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc
|
||
|
GDBM=1
|
||
|
;;
|
||
|
\"zlib\")
|
||
|
echo "CONFIGURE_ARGS+= --with-zlib" >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc
|
||
|
zlib=1
|
||
|
;;
|
||
|
\"MySQL\")
|
||
|
echo ".if !exists(\${PREFIX}/lib/mysql/libmysqlclient.a) || exists(\${PREFIX}/lib/mysql/libmysqlclient.so)" >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc
|
||
|
echo "LIB_DEPENDS+= mysqlclient.5:\${PORTSDIR}/databases/mysql322" >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc
|
||
|
echo ".else" >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc
|
||
|
echo "BUILD_DEPENDS+= \${PREFIX}/lib/mysql/libmysqlclient.a:\${PORTSDIR}/databases/mysql321" >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc
|
||
|
echo ".endif" >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc
|
||
|
echo "CONFIGURE_ARGS+= --with-mysql=\${PREFIX}" >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc
|
||
|
MySQL=1
|
||
|
;;
|
||
|
\"PostgreSQL\")
|
||
|
echo "BUILD_DEPENDS+= \${PREFIX}/pgsql/bin/psql:\${PORTSDIR}/databases/postgresql" >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc
|
||
|
echo "CONFIGURE_ARGS+= --with-pgsql=\${PREFIX}/pgsql" >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc
|
||
|
PostgresSQL=1
|
||
|
;;
|
||
|
\"mSQL\")
|
||
|
echo "BUILD_DEPENDS+= msql:\${PORTSDIR}/databases/msql" >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc
|
||
|
echo "CONFIGURE_ARGS+= --with-msql=\${PREFIX}" >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc
|
||
|
mSQL=1
|
||
|
;;
|
||
|
esac
|
||
|
shift
|
||
|
done
|
||
|
if [ -z "$FreeType" ]; then
|
||
|
echo "CONFIGURE_ARGS+= --without-ttflib" >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc
|
||
|
fi
|
||
|
if [ -z "$threads" ]; then
|
||
|
echo "CONFIGURE_ARGS+= --without-threads" >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc
|
||
|
fi
|
||
|
if [ -z "$GDBM" ]; then
|
||
|
echo "CONFIGURE_ARGS+= --without-gdbm" >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc
|
||
|
fi
|
||
|
if [ -z "$zlib" ]; then
|
||
|
echo "CONFIGURE_ARGS+= --without-zlib" >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc
|
||
|
fi
|
||
|
if [ -z "$MySQL" ]; then
|
||
|
echo "CONFIGURE_ARGS+= --without-mysql" >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc
|
||
|
fi
|
||
|
if [ -z "$PostgreSQL" ]; then
|
||
|
echo "CONFIGURE_ARGS+= --without-postgresql" >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc
|
||
|
fi
|
||
|
if [ -z "$mSQL" ]; then
|
||
|
echo "CONFIGURE_ARGS+= --without-msql" >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc
|
||
|
fi
|
||
|
if [ -z "$gmp" ]; then
|
||
|
echo "CONFIGURE_ARGS+= --without-gmp" >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc
|
||
|
fi
|
||
|
if [ -z "$JPEG" ]; then
|
||
|
echo "CONFIGURE_ARGS+= --without-jpeg" >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc
|
||
|
fi
|
||
|
if [ -z "$readline" ]; then
|
||
|
echo "CONFIGURE_ARGS+= --without-readline" >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc
|
||
|
if [ -z "$ssl" ]; then
|
||
|
echo "CONFIGURE_ARGS+= --without-ssl" >> ${WRKDIRPREFIX}${CURDIR}/Makefile.inc
|
||
|
fi
|
||
|
fi
|