summaryrefslogtreecommitdiff
path: root/x11/modeline
diff options
context:
space:
mode:
authoragc <agc>2000-11-28 16:34:11 +0000
committeragc <agc>2000-11-28 16:34:11 +0000
commit7671a3dc5e14c6cb78a19850ed66cf4ebdf8f364 (patch)
treec6de24b5fd0b6f031540650891aba1218250d841 /x11/modeline
parent43cc88965062f68549266d5ec752b81070eeacb0 (diff)
downloadpkgsrc-7671a3dc5e14c6cb78a19850ed66cf4ebdf8f364.tar.gz
Initial import of modeline into the NetBSD packages collection.
A small but useful utility to calculate the XFree86 ModeLines for the XF86Config file, given a screen resolution and a vertical frequency (in Hertz).
Diffstat (limited to 'x11/modeline')
-rw-r--r--x11/modeline/Makefile24
-rw-r--r--x11/modeline/files/md53
-rw-r--r--x11/modeline/files/patch-sum3
-rw-r--r--x11/modeline/patches/patch-aa37
-rw-r--r--x11/modeline/pkg/COMMENT1
-rw-r--r--x11/modeline/pkg/DESCR3
-rw-r--r--x11/modeline/pkg/PLIST2
7 files changed, 73 insertions, 0 deletions
diff --git a/x11/modeline/Makefile b/x11/modeline/Makefile
new file mode 100644
index 00000000000..de3113c7ad9
--- /dev/null
+++ b/x11/modeline/Makefile
@@ -0,0 +1,24 @@
+# $NetBSD: Makefile,v 1.1.1.1 2000/11/28 16:34:11 agc Exp $
+
+DISTNAME= modeline_vfr.c
+PKGNAME= modeline-20001121
+CATEGORIES= x11
+MASTER_SITES= http://www.dkfz-heidelberg.de/spec/linux/modeline/
+EXTRACT_SUFX= # empty
+
+MAINTAINER= packages@netbsd.org
+HOMEPAGE= http://www.dkfz-heidelberg.de/spec/linux/modeline/
+
+WRKSRC= ${WRKDIR}/modeline
+
+do-extract:
+ ${MKDIR} ${WRKSRC}
+ ${CP} ${DISTDIR}/${DISTNAME} ${WRKSRC}
+
+do-build:
+ cd ${WRKSRC}; ${CC} ${CPPFLAGS} ${DISTNAME} -o ${DISTNAME:S/.c//}
+
+do-install:
+ ${BSD_INSTALL_PROGRAM} ${WRKSRC}/${DISTNAME:S/.c//} ${PREFIX}/bin
+
+.include "../../mk/bsd.pkg.mk"
diff --git a/x11/modeline/files/md5 b/x11/modeline/files/md5
new file mode 100644
index 00000000000..78c0092549f
--- /dev/null
+++ b/x11/modeline/files/md5
@@ -0,0 +1,3 @@
+$NetBSD: md5,v 1.1.1.1 2000/11/28 16:34:11 agc Exp $
+
+MD5 (modeline_vfr.c) = 60c2073216e56ad71a3f671933cf0ded
diff --git a/x11/modeline/files/patch-sum b/x11/modeline/files/patch-sum
new file mode 100644
index 00000000000..c1f0e9e42b8
--- /dev/null
+++ b/x11/modeline/files/patch-sum
@@ -0,0 +1,3 @@
+$NetBSD: patch-sum,v 1.1.1.1 2000/11/28 16:34:11 agc Exp $
+
+MD5 (patch-aa) = 1dd72bdea2a93b0ee9b3b398434ce1c5
diff --git a/x11/modeline/patches/patch-aa b/x11/modeline/patches/patch-aa
new file mode 100644
index 00000000000..0c090b5d205
--- /dev/null
+++ b/x11/modeline/patches/patch-aa
@@ -0,0 +1,37 @@
+$NetBSD: patch-aa,v 1.1.1.1 2000/11/28 16:34:11 agc Exp $
+
+Check that the proper arguments are given.
+
+--- modeline_vfr.c 2000/11/28 16:11:46 1.1
++++ modeline_vfr.c 2000/11/28 16:13:41
+@@ -6,7 +6,7 @@
+ *
+ * Use on your own risk.
+ *
+-* Input: Resolution and Vertical Frequence
++* Input: Resolution and Vertical Frequency
+ * Output: Modeline
+ *
+ * Example use:
+@@ -44,6 +44,12 @@
+ float step =10;
+ float s_rr;
+
++ if (argc != 4) {
++ (void) fprintf(stderr, "Usage: %s <horizontal resolution> <vertical resolution> <vertical freq in Hertz>\n", *argv);
++ (void) fprintf(stderr, "e.g. %s 640 480 75\n", *argv);
++ exit(1);
++ }
++
+ sscanf(argv[1],"%f",&hr);
+ sscanf(argv[2],"%f",&vr);
+ sscanf(argv[3],"%f",&s_rr);
+@@ -88,7 +94,7 @@
+ printf(" Vertical Resolution: %4.0f \n",vr);
+ printf(" Vertical Refresh Rate: %4.2f Hz \n",rr);
+ printf(" Horizontal Refresh Rate: %4.2f KHz \n",hsf);
+- printf(" Dot Clock Frequence: %4.2f MHz \n",dcf);
++ printf(" Dot Clock Frequency: %4.2f MHz \n",dcf);
+ printf("\n");
+ printf(" # V-freq: %4.2f Hz // h-freq: %4.2f KHz\n Modeline \"%dx%d\" %4.2f %4d %4d %4d %4d %4d %4d %4d %4d \n",rr,hsf,(int)(hr),(int)(vr),(dcf),(int)(hr),(int)(hfront),(int)(hsync),(int)(hfl),(int)(vr),(int)(vfront),(int)(vsync),(int)(vfl));
+
diff --git a/x11/modeline/pkg/COMMENT b/x11/modeline/pkg/COMMENT
new file mode 100644
index 00000000000..579ed10da1d
--- /dev/null
+++ b/x11/modeline/pkg/COMMENT
@@ -0,0 +1 @@
+calculates XF86 Modelines to configure your monitor for X11R6
diff --git a/x11/modeline/pkg/DESCR b/x11/modeline/pkg/DESCR
new file mode 100644
index 00000000000..b32b1bce1ff
--- /dev/null
+++ b/x11/modeline/pkg/DESCR
@@ -0,0 +1,3 @@
+This handy little tool will calculate an XFree86 Modeline for your
+XF86Config file, given the desired screen resolution and the vertical
+frequency of your monitor.
diff --git a/x11/modeline/pkg/PLIST b/x11/modeline/pkg/PLIST
new file mode 100644
index 00000000000..245ff2fcbb3
--- /dev/null
+++ b/x11/modeline/pkg/PLIST
@@ -0,0 +1,2 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2000/11/28 16:34:11 agc Exp $
+bin/modeline_vfr