Undelete sysutils/wmcube providing live distfile sources.

Requested by:	Nick Kostirya
This commit is contained in:
Eugene Grosbein 2021-01-01 05:34:18 +00:00
parent 7bdcd427ec
commit 206e918dc6
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=559805
9 changed files with 200 additions and 1 deletions

1
MOVED
View File

@ -14849,7 +14849,6 @@ sysutils/vstrip||2020-05-05|Has expired: Broken for more than 6 months
sysutils/watchdog||2020-05-05|Has expired: Broken for more than 6 months
sysutils/wmbsdbatt||2020-05-05|Has expired: Broken for more than 6 months
sysutils/wmcpuload||2020-05-05|Has expired: Broken for more than 6 months
sysutils/wmcube||2020-05-05|Has expired: Broken for more than 6 months
sysutils/wtail||2020-05-05|Has expired: Broken for more than 6 months
textproc/csv2latex||2020-05-05|Has expired: Broken for more than 6 months
textproc/da-hyphen||2020-05-05|Has expired: Broken for more than 6 months

View File

@ -1477,6 +1477,7 @@
SUBDIR += wimlib
SUBDIR += wmapmload
SUBDIR += wmbluecpu
SUBDIR += wmcube
SUBDIR += wmdiskmon
SUBDIR += wmflame
SUBDIR += wmmemfree

42
sysutils/wmcube/Makefile Normal file
View File

@ -0,0 +1,42 @@
# Created by: Patrick Li <pat@databits.net>
# $FreeBSD$
PORTNAME= wmcube
PORTVERSION= 0.98
PORTREVISION= 4
CATEGORIES= sysutils windowmaker
MASTER_SITES= http://www.tucows.com/download/linux/files/x11/dock/ \
http://distfiles.macports.org/wmcube/ \
http://ftp.twaren.net/BSD/OpenBSD/distfiles/
MAINTAINER= garga@FreeBSD.org
COMMENT= Window Maker dockapp that displays cpu load and a realtime 3D object
LICENSE= GPLv2
USES= xorg
USE_XORG= xpm
OPTIONS_DEFINE= DOCS
WRKSRC= ${WRKDIR}/${PORTNAME}/${PORTNAME}
MAKEFILE= Makefile.FREEBSD
PORTDOCS= CHANGES README TODO
SUB_FILES= pkg-message
USE_CSTD= gnu89
MAKE_JOBS_UNSAFE= yes
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/wmcube ${STAGEDIR}${PREFIX}/bin
.for file in *.wmc
@${ECHO} "===> Installing extra 3d objects in ${STAGEDIR}${PREFIX}/share/${PORTNAME}"
@${MKDIR} ${STAGEDIR}${DATADIR}
${INSTALL_DATA} ${WRKDIR}/${PORTNAME}/3dObjects/${file} ${STAGEDIR}${DATADIR}
.endfor
@${ECHO} "===> Installing README in ${STAGEDIR}${PREFIX}/share/doc/${PORTNAME}"
@${ECHO} "===> Please Read pkg-descr and README for usage information"
@${MKDIR} ${STAGEDIR}${DOCSDIR}
.for f in ${PORTDOCS}
${INSTALL_DATA} ${WRKSRC}/../${f} ${STAGEDIR}${DOCSDIR}
.endfor
.include <bsd.port.mk>

2
sysutils/wmcube/distinfo Normal file
View File

@ -0,0 +1,2 @@
SHA256 (wmcube-0.98.tar.gz) = 53c2b3abee52b875dbf3d1a867ac1b92a05c88f220b8e29d8253dd152c9010a4
SIZE (wmcube-0.98.tar.gz) = 38310

View File

@ -0,0 +1,30 @@
--- Makefile.FREEBSD.orig Thu Aug 16 14:22:12 2001
+++ Makefile.FREEBSD Thu Aug 16 14:21:42 2001
@@ -1,15 +1,13 @@
-CC = gcc
OS = -DFREEBSD
-LIBDIR = -L/usr/X11R6/lib
-LIBDIR = -L/usr/X11R6/lib
-INCDIR = -I/usr/X11R6/include
+LIBDIR = -L${LOCALBASE}/lib -L${LOCALBASE}/lib
+INCDIR = -I${LOCALBASE}/include
# Edit OSLIBS as appropriate to include OS specific libraries.
OSLIBS = -lkvm
LIBS = -lXpm -lXext -lX11 -lm $(OSLIBS)
-CFLAGS = -Wall -O2 $(OS)
+CFLAGS += -Wall $(OS)
OBJS = wmcube.o \
../wmgeneral/wmgeneral.o \
@@ -20,7 +18,7 @@
$(CC) $(CFLAGS) $(INCDIR) -c $< -o $*.o
wmcube: $(OBJS)
- $(CC) -o wmcube $(OBJS) -lXext $(LIBDIR) $(LIBS)
+ $(CC) -o wmcube $(OBJS) $(LIBDIR) $(LIBS)
all:: wmcube

View File

@ -0,0 +1,74 @@
--- wmcube.c.orig 2000-10-23 18:11:47.000000000 -0200
+++ wmcube.c 2010-01-20 13:20:56.000000000 -0200
@@ -42,7 +42,6 @@
#include <sys/ioctl.h>
#include <sys/socket.h>
-#include <utmp.h>
#include <dirent.h>
#include <X11/Xlib.h>
@@ -125,6 +124,7 @@
#ifdef FREEBSD
static kvm_t *kd;
static struct nlist nlst[] = { {"_cp_time"}, {0} };
+static int cp_time_mib[2];
#endif
int main(int argc, char **argv)
@@ -913,7 +913,7 @@
exit(0);
}
- fscanf(fp,"%s",tmp);
+ fscanf(fp,"%63s",tmp);
if (strcmp(tmp,"WMCUBE_COORDINATES") != 0) {
printf("\nError in objectfile: it must start with WMCUBE_COORDINATES\n\n");
@@ -921,7 +921,7 @@
exit(0);
}
- fscanf(fp,"%s",tmp);
+ fscanf(fp,"%63s",tmp);
counter = atoi(tmp);
while ((strcmp(tmp,"WMCUBE_LINES") != 0) && (strcmp(tmp,"WMCUBE_PLANES") != 0)) {
@@ -938,7 +938,7 @@
fclose(fp);
exit(0);
}
- fscanf(fp,"%s",tmp);
+ fscanf(fp,"%63s",tmp);
if (feof(fp)) {
printf("\nError in objectfile: you must have a section WMCUBE_LINES or WMCUBE_PLANES\n\n");
@@ -1224,9 +1224,14 @@
#include <nlist.h>
#include <fcntl.h>
#include <sys/dkstat.h>
+#include <sys/sysctl.h>
int init_calc_cpu()
{
+ size_t len = 2;
+ if (sysctlnametomib("kern.cp_time", cp_time_mib, &len) == 0)
+ return 0;
+ printf("\nWarning: unable to sysctl kern.cp_time\n\n");
if ((kd = kvm_open(NULL, NULL, NULL, O_RDONLY, "kvm_open")) == NULL)
{
@@ -1249,6 +1254,13 @@
int cpu,nice,system,idle;
unsigned long int cpu_time[CPUSTATES];
+ if (cp_time_mib[0] != 0) {
+ size_t cpu_time_len = sizeof (cpu_time);
+ if (sysctl(cp_time_mib, 2, cpu_time, &cpu_time_len, NULL, 0) < 0) {
+ printf("\nError sysctl\n\n");
+ exit(0);
+ }
+ } else
if (kvm_read(kd, nlst[0].n_value, &cpu_time, sizeof(cpu_time))
!= sizeof(cpu_time))
{

View File

@ -0,0 +1,11 @@
[
{ type: install
message: <<EOM
The extra 3d objects are located in:
%%PREFIX%%/share/wmcube
To run wmcube type:
wmcube -o %%PREFIX%%/share/wmcube &
EOM
}
]

View File

@ -0,0 +1,5 @@
wmCube is a dockapp that displays a realtime rotating 3d-object
and the current cpu-load. The cpu-load also makes the object spin
faster/slower. You can zoom in and out by clicking on the dockapp.
WWW: https://www.dockapps.net/wmcube

35
sysutils/wmcube/pkg-plist Normal file
View File

@ -0,0 +1,35 @@
@(,kmem,2755) bin/wmcube
%%DATADIR%%/2planes-solid.wmc
%%DATADIR%%/4d.wmc
%%DATADIR%%/8star-small.wmc
%%DATADIR%%/8star.wmc
%%DATADIR%%/ball-solid.wmc
%%DATADIR%%/ball.wmc
%%DATADIR%%/celtic.wmc
%%DATADIR%%/cross.wmc
%%DATADIR%%/cross2-solid.wmc
%%DATADIR%%/cross2.wmc
%%DATADIR%%/cross3-solid.wmc
%%DATADIR%%/cross3.wmc
%%DATADIR%%/cross4-solid.wmc
%%DATADIR%%/crystal.wmc
%%DATADIR%%/cube-solid.wmc
%%DATADIR%%/cube.wmc
%%DATADIR%%/diamond.wmc
%%DATADIR%%/dice-solid.wmc
%%DATADIR%%/e.wmc
%%DATADIR%%/e2.wmc
%%DATADIR%%/foo.wmc
%%DATADIR%%/gnustep.wmc
%%DATADIR%%/hyperpyramid.wmc
%%DATADIR%%/jeep.wmc
%%DATADIR%%/multicube.wmc
%%DATADIR%%/peace.wmc
%%DATADIR%%/pyramid.wmc
%%DATADIR%%/radioactive.wmc
%%DATADIR%%/shield.wmc
%%DATADIR%%/spaceshuttle.wmc
%%DATADIR%%/spiral.wmc
%%DATADIR%%/star.wmc
%%DATADIR%%/starcube.wmc
%%DATADIR%%/wmlogo.wmc