ports/52296: [patch] ports/net/bittorrent: add UI-selection option
jabrown at caida.org
jabrown at caida.org
Thu May 15 20:00:29 UTC 2003
>Number: 52296
>Category: ports
>Synopsis: Improve bittorrent port to not require X
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Thu May 15 13:00:27 PDT 2003
>Closed-Date:
>Last-Modified:
>Originator: Jeff Brown
>Release: FreeBSD 4.6.2-RELEASE i386
>Organization:
Me, myself, and I
>Environment:
Nothing remarkable, just a 4.6.2-R system
>Description:
The bittorrent port as-is requires many libraries and X to install;
however, BitTorrent itself ships with both curses and dumb-terminal front
ends. This patch allows one of those other front-ends to be selected.
(Note: e-mail to MAINTAINER -- winter at freebsd.org -- bounced with "unknown
user".)
>How-To-Repeat:
Patch, build with "make WITH_GUI=curses", run without wxWindows and be
happy.
>Fix:
Apply this patch:
diff -urN bittorrent.orig/Makefile bittorrent/Makefile
--- bittorrent.orig/Makefile Thu May 15 12:17:34 2003
+++ bittorrent/Makefile Thu May 15 12:06:34 2003
@@ -13,13 +13,27 @@
MAINTAINER= winter at freebsd.org
COMMENT= "Peer to Peer file sharing/mirroring."
-RUN_DEPENDS= ${PYTHON_SITELIBDIR}/wxPython/wxc.so:${PORTSDIR}/x11-toolkits/py-wxPython
-
USE_PYTHON= yes
MAN1= BitTorrent.1
MLINKS= BitTorrent.1 bittorrent.1
+WITH_UI?= gui
+.if $(WITH_UI)=="gui"
+RUN_DEPENDS+= ${PYTHON_SITELIBDIR}/wxPython/wxc.so:${PORTSDIR}/x11-toolkits/py-wxPython
+.elif $(WITH_UI)!="curses" && $(WITH_UI)!="headless"
+BROKEN= "WITH_UI must be one of: gui curses headless"
+.endif
+
+pre-everything::
+ @${ECHO_MSG} "-- N O T E --"
+ @${ECHO_MSG} ""
+ @${ECHO_MSG} "You can change WITH_UI to select a user interface;"
+ @${ECHO_MSG} "supported values are: gui curses headless"
+ @${ECHO_MSG} ""
+ @${ECHO_MSG} "For example, to use the curses UI instead of the default:"
+ @${ECHO_MSG} " make WITH_UI=curses"
+
do-build:
@${PYTHON_CMD} ${PYTHON_LIBDIR}/compileall.py ${WRKSRC}
@${PYTHON_CMD} -O ${PYTHON_LIBDIR}/compileall.py ${WRKSRC}
@@ -30,7 +44,7 @@
--exclude "*.orig" --exclude osx -c -f - .) \
| (cd ${PREFIX}/share/BitTorrent && ${TAR} --unlink -x -f -)
@printf "#!/bin/sh\n${PYTHON_CMD} \
- ${PREFIX}/share/BitTorrent/btdownloadgui.py \044*\n" \
+ ${PREFIX}/share/BitTorrent/btdownload${WITH_UI}.py \044*\n" \
> ${WRKDIR}/BitTorrent.sh
@${INSTALL_SCRIPT} ${WRKDIR}/BitTorrent.sh ${PREFIX}/bin/BitTorrent
@${INSTALL_MAN} ${FILESDIR}/BitTorrent.1 ${PREFIX}/man/man1/BitTorrent.1
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list