summaryrefslogtreecommitdiff
path: root/net-p2p/jigdo/scripts/configure.jigdo
diff options
context:
space:
mode:
Diffstat (limited to 'net-p2p/jigdo/scripts/configure.jigdo')
-rw-r--r--net-p2p/jigdo/scripts/configure.jigdo72
1 files changed, 72 insertions, 0 deletions
diff --git a/net-p2p/jigdo/scripts/configure.jigdo b/net-p2p/jigdo/scripts/configure.jigdo
new file mode 100644
index 000000000000..c198af9e58f1
--- /dev/null
+++ b/net-p2p/jigdo/scripts/configure.jigdo
@@ -0,0 +1,72 @@
+#!/bin/sh
+# $FreeBSD$
+
+if [ -f ${WRKDIRPREFIX}${CURDIR}/Makefile.inc ]; then
+ exit
+fi
+
+tempfile=`mktemp -t checklist`
+
+if [ "${BATCH}" = "yes" ]; then
+ set \"DB3\"
+else
+ /usr/bin/dialog --title "Jigsaw Download configuration options" \
+ --clear --checklist "\n\
+Please select desired options:" -1 -1 16 \
+GUI "Graphical User Interface (experimental)" OFF \
+DB3 "Berkeley DB3 (used for jigdo-file's cache)" ON \
+NLS "Native Language Support (no language files yet)" 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}"
+
+SUB_GUI="@comment "
+
+while [ "$1" ]; do
+ case $1 in
+ \"GUI\")
+ echo "CONFIGURE_ARGS+= --with-gui"
+ echo "BUILD_DEPENDS+= gtk12-config:\${PORTSDIR}/x11-toolkits/gtk12"
+ SUB_GUI=""
+ ;;
+ \"DB3\")
+ echo "CONFIGURE_ARGS+= --with-libdb=-ldb3"
+ echo "CONFIGURE_ENV+= \
+ CPPFLAGS=\"-I\${LOCALBASE}/include/db3\" \
+ LIBS=\"-L\${LOCALBASE}/lib\" LDFLAGS=\"-ldb3\""
+ echo "LIB_DEPENDS= db3:\${PORTSDIR}/databases/db3"
+ ;;
+ \"NLS\")
+ echo "CONFIGURE_ARGS+= --enable-nls=/usr/local/include"
+ ;;
+ *)
+ echo "Invalid option(s): $*" > /dev/stderr
+ rm -f ${WRKDIRPREFIX}${CURDIR}/Makefile.inc
+ exit 1
+ ;;
+ esac
+ shift
+done
+
+echo "PLIST_SUB+= SUB_GUI=\"${SUB_GUI}\""