summaryrefslogtreecommitdiff
path: root/sysutils/aperture
diff options
context:
space:
mode:
authortron <tron>2006-05-31 02:31:56 +0000
committertron <tron>2006-05-31 02:31:56 +0000
commitd5d70a1b2c66c0bd744099eba854f08eefac33ab (patch)
tree99cee520088b6392eccb739e9ff050ff3e38e6d4 /sysutils/aperture
parentbd97a382386ee957143f3de92474e3bdba57728b (diff)
downloadpkgsrc-d5d70a1b2c66c0bd744099eba854f08eefac33ab.tar.gz
Make this build and work under NetBSD 3.99.20 and newer.
Bump package revision because of this fix.
Diffstat (limited to 'sysutils/aperture')
-rw-r--r--sysutils/aperture/Makefile4
-rw-r--r--sysutils/aperture/distinfo4
-rw-r--r--sysutils/aperture/patches/patch-ad41
3 files changed, 33 insertions, 16 deletions
diff --git a/sysutils/aperture/Makefile b/sysutils/aperture/Makefile
index 6a52e776330..983c9233cee 100644
--- a/sysutils/aperture/Makefile
+++ b/sysutils/aperture/Makefile
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.35 2006/03/04 21:30:40 jlam Exp $
+# $NetBSD: Makefile,v 1.36 2006/05/31 02:31:56 tron Exp $
DISTNAME= apNetBSD
PKGNAME= aperture-2.0
-PKGREVISION= 6
+PKGREVISION= 7
CATEGORIES= sysutils x11
EXTRACT_SUFX= .shar
# Not sure why ${MASTER_SITE_LOCAL:=${PKGNAME}} doesn't work, but the
diff --git a/sysutils/aperture/distinfo b/sysutils/aperture/distinfo
index 6d43d3fc46c..93713a6c836 100644
--- a/sysutils/aperture/distinfo
+++ b/sysutils/aperture/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.12 2005/12/14 18:27:59 christos Exp $
+$NetBSD: distinfo,v 1.13 2006/05/31 02:31:56 tron Exp $
SHA1 (aperture-2.0nb5/apNetBSD.shar) = 66022d35f41df667bbc9ad86a8f2ded292e1098b
RMD160 (aperture-2.0nb5/apNetBSD.shar) = 74739d4d0a5d21d5098c3fab000ad4d622137895
@@ -6,7 +6,7 @@ Size (aperture-2.0nb5/apNetBSD.shar) = 66731 bytes
SHA1 (patch-aa) = 544d71b6524b7aaeb5deb985372599f1962af4fe
SHA1 (patch-ab) = fc3f65e9b9bc94880dc18e2091d7daccd3d480ad
SHA1 (patch-ac) = 676b2f426d6f9e725262342e0d7e9ac1c8418362
-SHA1 (patch-ad) = 3315365cfbc72efdd6868c2b32958644db9d060f
+SHA1 (patch-ad) = bb3ae5f5c5f227d7d95ee68cb06e9f05157e3c5d
SHA1 (patch-ae) = b6ae1d888db3a0cbefd7088a7acf7ca881fdc767
SHA1 (patch-af) = 475c127658ba1050154a7dcabe39482c088e2d02
SHA1 (patch-ag) = cc4d08404f5fcd4fc01b1c711984506408e930bc
diff --git a/sysutils/aperture/patches/patch-ad b/sysutils/aperture/patches/patch-ad
index f06e077a8e2..bf4f35e736d 100644
--- a/sysutils/aperture/patches/patch-ad
+++ b/sysutils/aperture/patches/patch-ad
@@ -1,8 +1,8 @@
-$NetBSD: patch-ad,v 1.8 2005/12/14 18:27:59 christos Exp $
+$NetBSD: patch-ad,v 1.9 2006/05/31 02:31:56 tron Exp $
---- module/aperture.c.orig 2005-12-14 08:34:23.000000000 -0500
-+++ module/aperture.c 2005-12-14 08:41:10.000000000 -0500
-@@ -71,6 +71,10 @@
+--- module/aperture.c.orig 2006-05-31 03:22:31.000000000 +0100
++++ module/aperture.c 2006-05-31 03:29:49.000000000 +0100
+@@ -71,6 +71,14 @@
/* open counter */
static int xf86_open_count = 0;
@@ -10,10 +10,14 @@ $NetBSD: patch-ad,v 1.8 2005/12/14 18:27:59 christos Exp $
+#define PROC
+#endif
+
++#if defined(__NetBSD_Version__) && __NetBSD_Version__ >= 399002000
++#include <sys/kauth.h>
++#endif
++
/* mem range descriptors */
struct mem_range_softc mem_range_softc;
-@@ -78,12 +82,15 @@
+@@ -78,16 +86,28 @@
* Open the device
*/
int
@@ -25,16 +29,29 @@ $NetBSD: patch-ad,v 1.8 2005/12/14 18:27:59 christos Exp $
+xf86open(dev_t dev, int oflags, int devtype,
+#ifdef PROC
+ struct proc *p)
-+{
+ {
+#else
+ struct lwp *l)
- {
++{
+ struct proc *p = l->l_proc;
+#endif
++#if !defined(__NetBSD_Version__) || __NetBSD_Version__ < 399002000
if (suser(p->p_ucred, &p->p_acflag) != 0) {
return(EPERM);
-@@ -101,11 +108,13 @@
+ }
++#else
++ int error;
++
++ error = kauth_authorize_generic(p->p_cred, KAUTH_GENERIC_ISSUSER,
++ &p->p_acflag);
++ if (error != 0)
++ return error;
++#endif
+ /* authorize only one simultaneous open() */
+ if (xf86_open_count > 0) {
+ return(EPERM);
+@@ -101,11 +121,13 @@
* Close the device
*/
int
@@ -53,7 +70,7 @@ $NetBSD: patch-ad,v 1.8 2005/12/14 18:27:59 christos Exp $
{
xf86_open_count--;
return(0);
-@@ -117,19 +126,22 @@
+@@ -117,19 +139,22 @@
* allow only section in the vga framebuffer and above main memory
* to be mapped
*/
@@ -85,7 +102,7 @@ $NetBSD: patch-ad,v 1.8 2005/12/14 18:27:59 christos Exp $
#endif /* __NetBSD_Version__ */
{
-@@ -144,19 +156,24 @@
+@@ -144,19 +169,24 @@
&& (unsigned)offset <= HOLE16M_END)
#endif
)) {
@@ -116,7 +133,7 @@ $NetBSD: patch-ad,v 1.8 2005/12/14 18:27:59 christos Exp $
{
int nd, error = 0;
struct mem_range_op *mo = (struct mem_range_op *)data;
-@@ -212,9 +229,7 @@
+@@ -212,9 +242,7 @@
* memory range attributes.
*/
int
@@ -127,7 +144,7 @@ $NetBSD: patch-ad,v 1.8 2005/12/14 18:27:59 christos Exp $
{
/* can we handle this? */
if (mem_range_softc.mr_op == NULL)
-@@ -229,9 +244,7 @@
+@@ -229,9 +257,7 @@
}
int