Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 31 Jan 2006 18:20:04 -0500
From:      "Anish Mistry" <amistry@am-productions.biz>
To:        "FreeBSD gnats submit" <FreeBSD-gnats-submit@FreeBSD.org>
Subject:   ports/92647: New Port: Atitvout
Message-ID:  <1138749604.19911@bigguy.am-productions.biz>
Resent-Message-ID: <200601312320.k0VNK5da096878@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         92647
>Category:       ports
>Synopsis:       New Port: Atitvout
>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 Jan 31 23:20:02 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Anish Mistry
>Release:        FreeBSD 6.0-STABLE i386
>Organization:
AM Productions 
>Environment:


System: FreeBSD 6.0-STABLE #0: Tue Jan 31 10:24:32 EST 2006
    root@:/usr/obj/usr/src/sys/BIGGUY



>Description:


Allow tv output switching from the command line.  Requires new port: lrmi


>How-To-Repeat:





>Fix:


--- atitvout.shar begins here ---
# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	atitvout
#	atitvout/Makefile
#	atitvout/distinfo
#	atitvout/pkg-descr
#	atitvout/pkg-plist
#	atitvout/files
#	atitvout/files/patch-atitvout.c
#	atitvout/files/patch-Makefile.bsd
#	atitvout/files/patch-test.sh
#
echo c - atitvout
mkdir -p atitvout > /dev/null 2>&1
echo x - atitvout/Makefile
sed 's/^X//' >atitvout/Makefile << 'END-of-atitvout/Makefile'
X# New ports collection makefile for:	atitvout
X# Date created:		2006-01-31
X# Whom:			Anish Mistry <amistry@am-productions.biz>
X#
X# $FreeBSD$
X#
X
XPORTNAME=	atitvout
XPORTVERSION=	0.4
XCATEGORIES=	sysutils
XMASTER_SITES=	http://0pointer.de/lennart/projects/atitvout/ \
X		http://am-productions.biz/docs/
X
XMAINTAINER=	amistry@am-productions.biz
XCOMMENT=	Toggle TV Out on Mach64 graphics cards
X
XLIB_DEPENDS=	lrmi:${PORTSDIR}/devel/lrmi
X
XWRKSRC=		${WRKDIR}/atitvout
XMAKEFILE=	Makefile.bsd
XCFLAGS+=	-I${LOCALBASE}/include/lrmi
X
X.include <bsd.port.mk>
END-of-atitvout/Makefile
echo x - atitvout/distinfo
sed 's/^X//' >atitvout/distinfo << 'END-of-atitvout/distinfo'
XMD5 (atitvout-0.4.tar.gz) = f2915a435844aadcd4d8f9f62411283b
XSHA256 (atitvout-0.4.tar.gz) = 0c4021f44cd74f59e6a13b177d09be8eef4be4375b98a0967d8b5990126c0487
XSIZE (atitvout-0.4.tar.gz) = 27163
END-of-atitvout/distinfo
echo x - atitvout/pkg-descr
sed 's/^X//' >atitvout/pkg-descr << 'END-of-atitvout/pkg-descr'
XThis utility program may be used for configuring the TV Out connector
Xof ATI Rage Mobility P/M graphics boards under FreeBSD on x86. Supports
Xswitching the used TV standard from NTSC to PAL.
X 
XWWW: http://0pointer.de/lennart/projects/atitvout/
END-of-atitvout/pkg-descr
echo x - atitvout/pkg-plist
sed 's/^X//' >atitvout/pkg-plist << 'END-of-atitvout/pkg-plist'
Xbin/avitvout
END-of-atitvout/pkg-plist
echo c - atitvout/files
mkdir -p atitvout/files > /dev/null 2>&1
echo x - atitvout/files/patch-atitvout.c
sed 's/^X//' >atitvout/files/patch-atitvout.c << 'END-of-atitvout/files/patch-atitvout.c'
X--- atitvout.c	Tue Sep 17 02:37:08 2002
X+++ ./atitvout.c	Sun Sep 12 00:42:56 2004
X@@ -17,10 +17,14 @@
X  */
X 
X #include <stdio.h>
X-#include <sys/io.h>
X #include <string.h>
X #include <assert.h>
X 
X+#if defined(__linux__)
X+#include <sys/io.h>
X+#elif defined(__NetBSD__) || defined(__FreeBSD__)
X+#include <machine/sysarch.h>
X+#endif
X 
X #include <lrmi.h>
X #include <vbe.h>
X@@ -92,14 +96,24 @@
X     char **c = argv+1;
X     char oem[256];
X     int vh, vl;
X+#if defined(__NetBSD__)
X+    unsigned long iomap[32];
X+#endif
X 
X     if (argc <= 1) {
X         help(argv[0]);
X         return 0;
X     }
X     
X+#if defined(__linux__)
X     ioperm(0, 1024, 1);
X     iopl(3);
X+#elif defined(__NetBSD__)
X+	memset(&iomap[0], 0xff, sizeof(iomap));
X+	i386_set_ioperm(iomap);
X+#elif defined(__FreeBSD__)
X+	i386_set_ioperm(0, 0x10000, 1);
X+#endif
X 
X     if (!LRMI_init()) {
X         fprintf(stderr, "Could not initialise LRMI.\n");
X@@ -118,6 +132,8 @@
X     } else {
X         if (strncmp(oem, "ATI MACH64", 10) == 0)
X             radeon = 0;
X+		else if (strcmp(oem, "ATI MOBILITY RADEON 9000") == 0)
X+			radeon = 0;
X         else if (strncmp(oem, "ATI RAGE128", 11) == 0)
X             radeon = 1;
X         /* Note: Also it's possible to have here 'RG6' for first radeons */
END-of-atitvout/files/patch-atitvout.c
echo x - atitvout/files/patch-Makefile.bsd
sed 's/^X//' >atitvout/files/patch-Makefile.bsd << 'END-of-atitvout/files/patch-Makefile.bsd'
X--- Makefile.bsd.orig	Tue Jan 31 12:52:42 2006
X+++ Makefile.bsd	Tue Jan 31 14:18:23 2006
X@@ -0,0 +1,22 @@
X+VERSION=	0.4-bsd2
X+PREFIX?=	/usr/local
X+CFLAGS+=	-DVERSION=\"${VERSION}\" ${INC}
X+LIBS+=	-L${PREFIX}/lib -llrmi
X+OS!=	uname -s
X+.if ${OS}=="NetBSD" || ${OS}=="OpenBSD"
X+LIBS+=	-li386
X+.endif
X+OBJS+=	atitvout.o ati.o vbeinfo.o vbecall.o mach64.o radeon.o
X+INC+=	-I${PREFIX}/include
X+PROG=	atitvout
X+
X+all: ${PROG}
X+
X+${PROG}: ${OBJS}
X+	${CC} ${LDFLAGS} ${OBJS} -o ${PROG} ${LIBS}
X+
X+install:
X+	install -g wheel -o root -m 555 ${PROG} /usr/local/sbin
X+
X+clean:
X+	rm -rf ${OBJS} ${PROG}
END-of-atitvout/files/patch-Makefile.bsd
echo x - atitvout/files/patch-test.sh
sed 's/^X//' >atitvout/files/patch-test.sh << 'END-of-atitvout/files/patch-test.sh'
X--- test.sh	Mon Jan  7 22:05:20 2002
X+++ ./test.sh	Sun Sep 12 00:42:56 2004
X@@ -1,4 +1,4 @@
X-#!/bin/bash
X+#!/bin/sh
X 
X testit () {
X 	echo "TEST: Running 'atitvout $FLAG $1' ..."
END-of-atitvout/files/patch-test.sh
exit

--- atitvout.shar ends here ---



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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1138749604.19911>