1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-31 10:46:16 +00:00

Convert to OPTIONS and UNBREAK

PR:		ports/92810 (based on)
Reworked by:	vd
Submitted by:	"Ion-Mihai "IOnut" Tetcu" <itetcu@people.tecnik93.com>
Approved by:	portmgr (clement), maintainer timeout
This commit is contained in:
Vasil Dimov 2006-02-27 12:13:11 +00:00
parent 50c4dcfc5c
commit d0d8911e63
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=156853
3 changed files with 41 additions and 97 deletions

View File

@ -16,19 +16,18 @@ COMMENT= A utility used to retrieve very large files over the Internet
BUILD_DEPENDS= libwww-config:${PORTSDIR}/www/libwww \
${LOCALBASE}/bin/wget:${PORTSDIR}/ftp/wget
BROKEN= Needs to be converted to use OPTIONS instead of home-grown configure script
MAN1= jigdo-file.1 jigdo-lite.1 jigdo-mirror.1
USE_BZIP2= yes
USE_SUBMAKE= yes
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --without-libdb --disable-nls --without-gui
USE_GMAKE= yes
CONFIGURE_ENV+= "CPPFLAGS=-I${LOCALBASE}/include -I${LOCALBASE}/include/db3" \
LIBS=-L${LOCALBASE}/lib
SCRIPTS_ENV= WRKDIRPREFIX="${WRKDIRPREFIX}" \
TOUCH="${TOUCH}" \
MKDIR="${MKDIR}" \
OPTIONS= GUI "Build the gtk2 gui" off \
DB3 "Build with BDB3 support" on \
NLS "Native Language Support" on
.include <bsd.port.pre.mk>
@ -36,17 +35,34 @@ SCRIPTS_ENV= WRKDIRPREFIX="${WRKDIRPREFIX}" \
NOT_FOR_ARCHS+= alpha
.endif
pre-fetch:
@${SETENV} ${SCRIPTS_ENV} ${SH} ${SCRIPTDIR}/configure.jigdo
.if defined(WITH_GUI)
CONFIGURE_ARGS+= --with-gui
LIB_DEPENDS+= gtk-x11-2.0:\${PORTSDIR}/x11-toolkits/gtk20
MAN1+= jigdo.1
PLIST_SUB+= SUB_GUI=""
.else
CONFIGURE_ARGS+= --without-gui
PLIST_SUB+= SUB_GUI="@comment "
.endif
.if exists(${WRKDIRPREFIX}${.CURDIR}/Makefile.inc)
.include "${WRKDIRPREFIX}${.CURDIR}/Makefile.inc"
.if defined(WITH_DB3)
CONFIGURE_ARGS+= --with-libdb=-ldb3
#CONFIGURE_ENV+= LDFLAGS=-ldb3
USE_BDB= 3
.else
CONFIGURE_ARGS+= --without-libdb
.endif
.if defined(WITH_NLS)
USE_GETTEXT= yes
CONFIGURE_ARGS+= --enable-nls
PLIST_SUB+= NLS=""
.else
CONFIGURE_ARGS+= --disable-nls
PLIST_SUB+= NLS="@comment"
.endif
post-install:
@${STRIP_CMD} ${PREFIX}/bin/jigdo-file
post-clean:
@${RM} -f ${WRKDIRPREFIX}${.CURDIR}/Makefile.inc
.include <bsd.port.post.mk>

View File

@ -2,14 +2,15 @@ bin/jigdo-file
bin/jigdo-lite
bin/jigdo-mirror
%%SUB_GUI%%bin/jigdo
share/jigdo/debian-mirrors.jigdo
%%SUB_GUI%%share/jigdo/COPYING
%%SUB_GUI%%share/jigdo/pixmaps/close.png
%%SUB_GUI%%share/jigdo/pixmaps/jigdo-logo.png
%%SUB_GUI%%share/jigdo/pixmaps/pause.png
%%SUB_GUI%%share/jigdo/pixmaps/progress-green.png
%%SUB_GUI%%share/jigdo/pixmaps/restart.png
%%SUB_GUI%%share/jigdo/pixmaps/start.png
%%SUB_GUI%%share/jigdo/pixmaps/stop.png
%%SUB_GUI%%@dirrm share/jigdo/pixmaps
@dirrm share/jigdo
%%DATADIR%%/debian-mirrors.jigdo
%%SUB_GUI%%%%DATADIR%%/COPYING
%%SUB_GUI%%%%DATADIR%%/pixmaps/close.png
%%SUB_GUI%%%%DATADIR%%/pixmaps/jigdo-logo.png
%%SUB_GUI%%%%DATADIR%%/pixmaps/pause.png
%%SUB_GUI%%%%DATADIR%%/pixmaps/progress-green.png
%%SUB_GUI%%%%DATADIR%%/pixmaps/restart.png
%%SUB_GUI%%%%DATADIR%%/pixmaps/start.png
%%SUB_GUI%%%%DATADIR%%/pixmaps/stop.png
%%SUB_GUI%%@dirrm %%DATADIR%%/pixmaps
%%NLS%%share/locale/de/LC_MESSAGES/jigdo.mo
@dirrm %%DATADIR%%

View File

@ -1,73 +0,0 @@
#!/bin/sh
# $FreeBSD$
if [ -f ${WRKDIRPREFIX}${CURDIR}/Makefile.inc ]; then
exit
fi
tempfile=`mktemp -t checklist`
if [ "${BATCH}" = "yes" ]; then
set \"DB3\"
else
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 "LIB_DEPENDS+= gtk-x11-2.0:\${PORTSDIR}/x11-toolkits/gtk20"
echo "MAN1+= jigdo.1"
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=${LOCALBASE}/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}\""