1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-22 00:35:15 +00:00

- Install plasma_saver.ko under /boot/modules and remove pkg-message.

- Execute kldxref when we install or deinstall the package.
- Fix a compiler warning and remove custom CWARNFLAGS.
- Replace NOMAN with NO_MAN.
- Add LICENSE.
This commit is contained in:
Jung-uk Kim 2012-04-19 22:09:36 +00:00
parent e01c1892b3
commit 15ab37afe5
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=295130
5 changed files with 36 additions and 15 deletions

View File

@ -7,7 +7,7 @@
PORTNAME= plasma
PORTVERSION= 0.1
PORTREVISION= 3
PORTREVISION= 4
CATEGORIES= graphics kld
MASTER_SITES= SF/futurebsd/futurebsd/${PORTNAME}
PKGNAMESUFFIX= -kmod
@ -15,18 +15,16 @@ PKGNAMESUFFIX= -kmod
MAINTAINER= ports@FreeBSD.org
COMMENT= A plasma-effect screensaver kernel module
LICENSE= BSD
.include <bsd.port.pre.mk>
.if !exists(${SRC_BASE}/sys/dev/syscons/syscons.h)
IGNORE= requires kernel source (in ${SRC_BASE}) to build
.endif
PLIST_FILES= lib/plasma_saver.ko
SUB_FILES= pkg-message
do-install:
${INSTALL_KLD} ${WRKSRC}/plasma_saver.ko ${PREFIX}/lib
post-install:
@${CAT} ${PKGMESSAGE}
KMODDIR= /boot/modules
PLIST_SUB+= KMODDIR=${KMODDIR:C,^/,,}
MAKE_ARGS= KMODDIR=${KMODDIR}
.include <bsd.port.post.mk>

View File

@ -0,0 +1,12 @@
--- Makefile.orig 2001-01-24 11:57:49.000000000 -0500
+++ Makefile 2012-04-19 17:54:27.000000000 -0400
@@ -3,8 +3,6 @@
KMOD= plasma_saver
SRCS= plasma_saver.c
-NOMAN=
-CFLAGS+= -I${.CURDIR}/.. -I.
-CWARNFLAGS= -Wall
+NO_MAN=
.include <bsd.kmod.mk>

View File

@ -1,5 +1,5 @@
--- plasma_saver.c.orig 2001-01-24 12:03:23.000000000 -0500
+++ plasma_saver.c 2012-04-18 17:51:10.000000000 -0400
+++ plasma_saver.c 2012-04-19 17:56:10.000000000 -0400
@@ -52,7 +52,7 @@
#define SCR_W 320
#define SCR_H 200
@ -58,7 +58,17 @@
log(LOG_NOTICE, "plasma_saver: the console does not support M_VGA_CG320\n");
return(ENODEV);
}
@@ -123,14 +134,15 @@
@@ -115,7 +126,8 @@
return(0);
}
-void draw_plasma(u_char *buffer)
+static void
+draw_plasma(u_char *buffer)
{
short i,j;
anglebak[0] = angle[0];
@@ -123,14 +135,15 @@
anglebak[2] = angle[2];
for (i=0; i<PLAS_S; i++)
{
@ -82,7 +92,7 @@
}
for(i=0; i<PLAS_S; i++)
{
@@ -144,11 +156,11 @@
@@ -144,11 +157,11 @@
buffer[((i+45)*SCR_W) + (j+96)] = 128 +
ybuffer[i] + xbuffer[j];
}
@ -99,7 +109,7 @@
}
static int
@@ -156,8 +168,13 @@
@@ -156,8 +169,13 @@
{
if(blank) {
if(blanked <= 0) {

View File

@ -1,3 +0,0 @@
The plasma_saver.ko module has been installed to %%PREFIX%%/lib. You
may wish to add this to your kern.module_path sysctl string or copy it
to another location.

View File

@ -0,0 +1,4 @@
@cwd /
%%KMODDIR%%/plasma_saver.ko
@exec /usr/sbin/kldxref /%%KMODDIR%%
@unexec /usr/sbin/kldxref /%%KMODDIR%%