ports/110577: [PATCH] misc/sonytv - Update to TCL/TK 8.4, remove interactive script

Martin Tournoij carpetsmoker at xs4all.nl
Tue Mar 20 12:00:12 UTC 2007


>Number:         110577
>Category:       ports
>Synopsis:       [PATCH] misc/sonytv - Update to TCL/TK 8.4, remove interactive script
>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:   Tue Mar 20 12:00:11 GMT 2007
>Closed-Date:
>Last-Modified:
>Originator:     Martin Tournoij
>Release:        FreeBSD 6.2-RELEASE-p1 i386
>Organization:
>Environment:
FreeBSD glitch.carpetsmoker.net 6.2-RELEASE-p1 FreeBSD 6.2-RELEASE-p1 #0: Thu Feb 15 20:56:16 CET 2007 carpetsmoker at glitch.carpetsmoker.net:/usr/obj/nfs/tinderbox/jails/6.2/src/sys/GENERICri386

>Description:

- Update to TCL/TK 8.4
- Remove configure script and use an environment variable to set device instead
- Change the colors, since they are unreadable

>How-To-Repeat:

>Fix:

--- patch-sonytv begins here ---
diff --exclude CVS -urN /ports/misc/sonytv/Makefile ./Makefile
--- /ports/misc/sonytv/Makefile	Tue Dec 30 16:05:05 2003
+++ ./Makefile	Tue Mar 20 10:40:45 2007
@@ -7,29 +7,42 @@
 
 PORTNAME=	sonytv
 PORTVERSION=	1.0
-CATEGORIES=	misc tk83
+PORTREVISION=	1
+CATEGORIES=	misc tk84
 MASTER_SITES=	http://tools.ana.com/demos/
 
 MAINTAINER=	ports at FreeBSD.org
 COMMENT=	Sony-compatible TV remote
 
-RUN_DEPENDS=	wish8.3:${PORTSDIR}/x11-toolkits/tk83
-
-USE_X_PREFIX=	yes
-
+USE_TK=		yes
 NO_BUILD=	yes
 
-IS_INTERACTIVE=	yes
-NO_PACKAGE=	Hardcoded IR device name
-
 SCRIPTS_ENV=	CP="${CP}" RM="${RM}" SED="${SED}"
 
+PLIST_FILES=	bin/sonytv bin/sonytv+
 MAN1=		sonytv.1
 MLINKS=		sonytv.1 sonytv+.1
 
+post-patch:
+	# Replace colors because they are unreadable
+	@${REINPLACE_CMD} -e 's|8.3|${TK_VER}|; \
+		s|/usr/X11R6|${X11BASE}|; \
+		s|{/dev/cuaa2}|$$env(SONYTV)|; \
+		s|33cc33|ffffff|; \
+		s|-foreground gray80 -activeforeground white| \
+		-foreground black -activeforeground black|;' \
+			${WRKSRC}/sonytv ${WRKSRC}/sonytv+
 do-install:
 	${INSTALL_SCRIPT} ${WRKSRC}/sonytv ${PREFIX}/bin
 	${INSTALL_SCRIPT} ${WRKSRC}/sonytv+ ${PREFIX}/bin
 	${INSTALL_MAN} ${WRKSRC}/sonytv.1 ${MANPREFIX}/man/man1
+
+post-install:
+	@${ECHO_CMD} ""
+	@${ECHO_CMD} "Set your SONYTV environment variable to the serial device your"
+	@${ECHO_CMD} "remote is connected to, for example:"
+	@${ECHO_CMD} "setenv SONYTV /dev/cuad0 (csh shells)"
+	@${ECHO_CMD} "export SONYTV=/dev/cuad0 (Korn/Bourne shells)"
+	@${ECHO_CMD} ""
 
 .include <bsd.port.mk>
diff --exclude CVS -urN /ports/misc/sonytv/pkg-plist ./pkg-plist
--- /ports/misc/sonytv/pkg-plist	Tue Dec 30 16:05:05 2003
+++ ./pkg-plist	Thu Jan  1 01:00:00 1970
@@ -1,2 +0,0 @@
-bin/sonytv
-bin/sonytv+
diff --exclude CVS -urN /ports/misc/sonytv/scripts/configure ./scripts/configure
--- /ports/misc/sonytv/scripts/configure	Tue Dec 30 16:05:05 2003
+++ ./scripts/configure	Thu Jan  1 01:00:00 1970
@@ -1,22 +0,0 @@
-#!/bin/sh
-cd ${WRKSRC:?Uh-oh.}||exit 1
-umask 022
-/usr/bin/dialog \
---title "Where's your IR device?" \
---radiolist "Select a serial port:" 12 48 4 \
-/dev/cuaa0 "" off \
-/dev/cuaa1 "e.g. Toshiba Libretto" off \
-/dev/cuaa2 "e.g. Sony VAIO F-series" on \
-/dev/cuaa3 "" off \
-2>.portstmp.$$
-case $? in
-0) read device <.portstmp.$$
-  for f in sonytv sonytv+
-  do
-    ${SED} -e "/set device {/s;{.*};{${device}};" $f >.portstmp.$$
-    /usr/bin/cmp -s .portstmp.$$ $f||${CP} .portstmp.$$ $f
-  done
-  ${RM} -f .portstmp.$$ ;;
-*) ${RM} -f .portstmp.$$
-  exit 1 ;;
-esac
--- patch-sonytv ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:
 



More information about the freebsd-ports-bugs mailing list