aboutsummaryrefslogtreecommitdiff
path: root/sysutils/atitvout
diff options
context:
space:
mode:
authorSimon Barner <barner@FreeBSD.org>2006-02-01 17:00:31 +0000
committerSimon Barner <barner@FreeBSD.org>2006-02-01 17:00:31 +0000
commitbe92838110ef589e0932ab540b52a0780420c09b (patch)
treeddfff9ea00ce18b14aa618d56589cc133ac2413c /sysutils/atitvout
parent69767f61f8f3748d23c0d5f0ecfa108723e542bf (diff)
This utility program may be used for configuring the TV Out connector
of ATI Rage Mobility P/M graphics boards under FreeBSD on x86. Supports switching the used TV standard from NTSC to PAL. WWW: http://0pointer.de/lennart/projects/atitvout/ PR: ports/92647 Submitted by: Anish Mistry <amistry@am-productions.biz>
Notes
Notes: svn path=/head/; revision=155013
Diffstat (limited to 'sysutils/atitvout')
-rw-r--r--sysutils/atitvout/Makefile24
-rw-r--r--sysutils/atitvout/distinfo3
-rw-r--r--sysutils/atitvout/files/patch-Makefile.bsd25
-rw-r--r--sysutils/atitvout/files/patch-atitvout.c52
-rw-r--r--sysutils/atitvout/files/patch-test.sh8
-rw-r--r--sysutils/atitvout/pkg-descr5
6 files changed, 117 insertions, 0 deletions
diff --git a/sysutils/atitvout/Makefile b/sysutils/atitvout/Makefile
new file mode 100644
index 000000000000..94488c83086d
--- /dev/null
+++ b/sysutils/atitvout/Makefile
@@ -0,0 +1,24 @@
+# New ports collection makefile for: atitvout
+# Date created: 2006-01-31
+# Whom: Anish Mistry <amistry@am-productions.biz>
+#
+# $FreeBSD$
+#
+
+PORTNAME= atitvout
+PORTVERSION= 0.4
+CATEGORIES= sysutils
+MASTER_SITES= http://0pointer.de/lennart/projects/atitvout/ \
+ http://am-productions.biz/docs/
+
+MAINTAINER= amistry@am-productions.biz
+COMMENT= Toggle TV Out on Mach64 graphics cards
+
+LIB_DEPENDS= lrmi:${PORTSDIR}/devel/lrmi
+
+WRKSRC= ${WRKDIR}/atitvout
+MAKEFILE= Makefile.bsd
+
+PLIST_FILES+= sbin/atitvout
+
+.include <bsd.port.mk>
diff --git a/sysutils/atitvout/distinfo b/sysutils/atitvout/distinfo
new file mode 100644
index 000000000000..85860f590e88
--- /dev/null
+++ b/sysutils/atitvout/distinfo
@@ -0,0 +1,3 @@
+MD5 (atitvout-0.4.tar.gz) = f2915a435844aadcd4d8f9f62411283b
+SHA256 (atitvout-0.4.tar.gz) = 0c4021f44cd74f59e6a13b177d09be8eef4be4375b98a0967d8b5990126c0487
+SIZE (atitvout-0.4.tar.gz) = 27163
diff --git a/sysutils/atitvout/files/patch-Makefile.bsd b/sysutils/atitvout/files/patch-Makefile.bsd
new file mode 100644
index 000000000000..974ecb066ac2
--- /dev/null
+++ b/sysutils/atitvout/files/patch-Makefile.bsd
@@ -0,0 +1,25 @@
+--- Makefile.bsd.orig Tue Jan 31 12:52:42 2006
++++ Makefile.bsd Tue Jan 31 14:18:23 2006
+@@ -0,0 +1,22 @@
++VERSION= 0.4-bsd2
++PREFIX?= /usr/local
++CFLAGS+= -DVERSION=\"${VERSION}\" ${INC}
++LIBS+= -L${LOCALBASE}/lib -llrmi
++OS!= uname -s
++.if ${OS}=="NetBSD" || ${OS}=="OpenBSD"
++LIBS+= -li386
++.endif
++OBJS+= atitvout.o ati.o vbeinfo.o vbecall.o mach64.o radeon.o
++INC+= -I${LOCALBASE}/include/lrmi
++PROG= atitvout
++
++all: ${PROG}
++
++${PROG}: ${OBJS}
++ ${CC} ${LDFLAGS} ${OBJS} -o ${PROG} ${LIBS}
++
++install:
++ install -g wheel -o root -m 555 ${PROG} ${PREFIX}/sbin
++
++clean:
++ rm -rf ${OBJS} ${PROG}
diff --git a/sysutils/atitvout/files/patch-atitvout.c b/sysutils/atitvout/files/patch-atitvout.c
new file mode 100644
index 000000000000..7c9b809f7cce
--- /dev/null
+++ b/sysutils/atitvout/files/patch-atitvout.c
@@ -0,0 +1,52 @@
+--- atitvout.c Tue Sep 17 02:37:08 2002
++++ ./atitvout.c Sun Sep 12 00:42:56 2004
+@@ -17,10 +17,14 @@
+ */
+
+ #include <stdio.h>
+-#include <sys/io.h>
+ #include <string.h>
+ #include <assert.h>
+
++#if defined(__linux__)
++#include <sys/io.h>
++#elif defined(__NetBSD__) || defined(__FreeBSD__)
++#include <machine/sysarch.h>
++#endif
+
+ #include <lrmi.h>
+ #include <vbe.h>
+@@ -92,14 +96,24 @@
+ char **c = argv+1;
+ char oem[256];
+ int vh, vl;
++#if defined(__NetBSD__)
++ unsigned long iomap[32];
++#endif
+
+ if (argc <= 1) {
+ help(argv[0]);
+ return 0;
+ }
+
++#if defined(__linux__)
+ ioperm(0, 1024, 1);
+ iopl(3);
++#elif defined(__NetBSD__)
++ memset(&iomap[0], 0xff, sizeof(iomap));
++ i386_set_ioperm(iomap);
++#elif defined(__FreeBSD__)
++ i386_set_ioperm(0, 0x10000, 1);
++#endif
+
+ if (!LRMI_init()) {
+ fprintf(stderr, "Could not initialise LRMI.\n");
+@@ -118,6 +132,8 @@
+ } else {
+ if (strncmp(oem, "ATI MACH64", 10) == 0)
+ radeon = 0;
++ else if (strcmp(oem, "ATI MOBILITY RADEON 9000") == 0)
++ radeon = 0;
+ else if (strncmp(oem, "ATI RAGE128", 11) == 0)
+ radeon = 1;
+ /* Note: Also it's possible to have here 'RG6' for first radeons */
diff --git a/sysutils/atitvout/files/patch-test.sh b/sysutils/atitvout/files/patch-test.sh
new file mode 100644
index 000000000000..6064299f60b8
--- /dev/null
+++ b/sysutils/atitvout/files/patch-test.sh
@@ -0,0 +1,8 @@
+--- test.sh Mon Jan 7 22:05:20 2002
++++ ./test.sh Sun Sep 12 00:42:56 2004
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/bin/sh
+
+ testit () {
+ echo "TEST: Running 'atitvout $FLAG $1' ..."
diff --git a/sysutils/atitvout/pkg-descr b/sysutils/atitvout/pkg-descr
new file mode 100644
index 000000000000..9ef0a4986212
--- /dev/null
+++ b/sysutils/atitvout/pkg-descr
@@ -0,0 +1,5 @@
+This utility program may be used for configuring the TV Out connector
+of ATI Rage Mobility P/M graphics boards under FreeBSD on x86. Supports
+switching the used TV standard from NTSC to PAL.
+
+WWW: http://0pointer.de/lennart/projects/atitvout/