From leeym@utopia.leeym.com  Sat Jul 24 05:25:30 2004
Return-Path: <leeym@utopia.leeym.com>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 22F2A16A4CE
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 24 Jul 2004 05:25:30 +0000 (GMT)
Received: from utopia.leeym.com (utopia.leeym.com [211.21.137.52])
	by mx1.FreeBSD.org (Postfix) with ESMTP id A51A943D49
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 24 Jul 2004 05:25:29 +0000 (GMT)
	(envelope-from leeym@utopia.leeym.com)
Received: from localhost (localhost [127.0.0.1])
	by utopia.leeym.com (Postfix) with ESMTP id 4882A3EA953
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 24 Jul 2004 13:25:28 +0800 (CST)
Received: from utopia.leeym.com ([127.0.0.1])
 by localhost (utopia.leeym.com [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id 97039-09 for <FreeBSD-gnats-submit@freebsd.org>;
 Sat, 24 Jul 2004 13:25:23 +0800 (CST)
Received: by utopia.leeym.com (Postfix, from userid 1000)
	id 153E73EA946; Sat, 24 Jul 2004 13:25:22 +0800 (CST)
Message-Id: <20040724052522.153E73EA946@utopia.leeym.com>
Date: Sat, 24 Jul 2004 13:25:22 +0800 (CST)
From: Yen-Ming Lee <leeym@utopia.leeym.com>
Reply-To: Yen-Ming Lee <leeym@utopia.leeym.com>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: fix port: misc/matrix-kmod
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         69516
>Category:       ports
>Synopsis:       fix port: misc/matrix-kmod
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat Jul 24 05:30:23 GMT 2004
>Closed-Date:    Wed Aug 11 22:50:05 GMT 2004
>Last-Modified:  Wed Aug 11 22:50:05 GMT 2004
>Originator:     Yen-Ming Lee
>Release:        FreeBSD 5.2.1-RELEASE-p9 i386
>Organization:
>Environment:
System: FreeBSD utopia.leeym.com 5.2.1-RELEASE-p9 FreeBSD 5.2.1-RELEASE-p9 #143: Tue Jul 6 05:16:06 CST 2004 root@utopia.leeym.com:/usr/obj/usr/src/sys/UTOPIA i386


	
>Description:

update DESTDIR / PREFIX / pkg-plist and unbreak this port.

>How-To-Repeat:
	
>Fix:

	

--- matrix-kmod.diff begins here ---
diff -ruN --exclude CVS /usr/ports/misc/matrix-kmod/Makefile matrix-kmod/Makefile
--- /usr/ports/misc/matrix-kmod/Makefile	Mon May 19 02:01:40 2003
+++ matrix-kmod/Makefile	Sat Jul 24 13:16:47 2004
@@ -11,10 +11,10 @@
 MASTER_SITES=	http://www.belousov.com/download/
 PKGNAMESUFFIX=	-kmod
 
-MAINTAINER=     strijar@urai.ru
+MAINTAINER=	strijar@urai.ru
 COMMENT=	Screensaver for console (matrix_saver.ko) "Matrix" like
 
-MAKE_ENV=	DESTDIR="${PREFIX}/lib/matrix"
+KMODDIR=	${PREFIX}/modules
 
 .include <bsd.port.pre.mk>
 
@@ -22,11 +22,9 @@
 BROKEN=		"Need FreeBSD 4.0 or above"
 .endif
 
-.if ${OSVERSION} >= 500113
-BROKEN=         "Installation fails"
-.endif
-
-pre-install:
-	${MKDIR} ${PREFIX}/lib/matrix/modules
+do-install:
+	@${MKDIR} ${KMODDIR}
+	${INSTALL_SCRIPT} ${FILESDIR}/matrix_saver.sh ${PREFIX}/etc/rc.d
+	${INSTALL_SCRIPT} ${WRKSRC}/*.ko ${KMODDIR}
 
 .include <bsd.port.post.mk>
diff -ruN --exclude CVS /usr/ports/misc/matrix-kmod/files/matrix_saver.sh matrix-kmod/files/matrix_saver.sh
--- /usr/ports/misc/matrix-kmod/files/matrix_saver.sh	Thu Jan  1 08:00:00 1970
+++ matrix-kmod/files/matrix_saver.sh	Sat Jul 24 13:12:25 2004
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/$(basename $0)\$"); then
+	echo "$0: Cannot determine the PREFIX" >&2
+	exit 1
+fi
+
+case "$1" in
+start)
+	if [ -x ${PREFIX}/modules/matrix_saver.ko ]; then
+		echo -n ' matrix_saver'
+		kldload ${PREFIX}/modules/matrix_saver.ko
+	fi
+	;;
+stop)
+	kldunload -v -n matrix_saver && echo -n ' matrix_saver'
+	;;
+*)
+	echo "Usage: $0 {start|stop}" >&2
+	exit 1
+	;;
+esac
diff -ruN --exclude CVS /usr/ports/misc/matrix-kmod/pkg-plist matrix-kmod/pkg-plist
--- /usr/ports/misc/matrix-kmod/pkg-plist	Sun Mar 11 03:09:48 2001
+++ matrix-kmod/pkg-plist	Sat Jul 24 13:14:34 2004
@@ -1,3 +1,3 @@
-lib/matrix/modules/matrix_saver.ko
-@dirrm lib/matrix/modules
-@dirrm lib/matrix
+etc/rc.d/matrix_saver.sh
+modules/matrix_saver.ko
+@unexec rmdir -p %D/modules 2>/dev/null || true
--- matrix-kmod.diff ends here ---


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: sem 
State-Changed-When: Sat Jul 24 06:05:11 GMT 2004 
State-Changed-Why:  
Waiting for maintainer approving 

http://www.freebsd.org/cgi/query-pr.cgi?pr=69516 

From: Sergey Matveychuk <sem@FreeBSD.org>
To: freebsd-gnats-submit@FreeBSD.org, leeym@utopia.leeym.com,
	strijar@urai.ru
Cc:  
Subject: Re: ports/69516: fix port: misc/matrix-kmod
Date: Sat, 24 Jul 2004 10:04:26 +0400

 2maintainer: approve or disprove it please.
 
 -- 
 Sem.
State-Changed-From-To: feedback->closed 
State-Changed-By: pav 
State-Changed-When: Wed Aug 11 22:49:58 GMT 2004 
State-Changed-Why:  
Committed, thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=69516 
>Unformatted:
