diff options
author | garga <garga@FreeBSD.org> | 2008-04-11 19:44:14 +0800 |
---|---|---|
committer | garga <garga@FreeBSD.org> | 2008-04-11 19:44:14 +0800 |
commit | 828d79834c45b50bbe1847c258f1248f96a674bb (patch) | |
tree | dc69361809de31309409127b8d366b6e8fd6170a | |
parent | 928710fbab798f2f30155234d51ab15a27eb89ca (diff) | |
download | freebsd-ports-graphics-828d79834c45b50bbe1847c258f1248f96a674bb.tar.gz freebsd-ports-graphics-828d79834c45b50bbe1847c258f1248f96a674bb.tar.zst freebsd-ports-graphics-828d79834c45b50bbe1847c258f1248f96a674bb.zip |
- Fix run on 8-CURRENT and 7-STABLE [1]
- Bump PORTREVISION
- Remove bad MASTER_SITE
- Use PORTDOCS facility and respect NOPORTDOCS
- Move pkg-message to files/pkg-message.in
- Pacify portlint changing var name s/file/f/
- Remove old signature from pkg-descr
- Take maintainership
PR: ports/120142 (patch based on) [1]
-rw-r--r-- | sysutils/wmcube/Makefile | 26 | ||||
-rw-r--r-- | sysutils/wmcube/files/patch-wmcube.c | 47 | ||||
-rw-r--r-- | sysutils/wmcube/files/pkg-message.in (renamed from sysutils/wmcube/pkg-message) | 0 | ||||
-rw-r--r-- | sysutils/wmcube/pkg-descr | 2 | ||||
-rw-r--r-- | sysutils/wmcube/pkg-plist | 4 |
5 files changed, 54 insertions, 25 deletions
diff --git a/sysutils/wmcube/Makefile b/sysutils/wmcube/Makefile index 25829a7e2d7..723193262e9 100644 --- a/sysutils/wmcube/Makefile +++ b/sysutils/wmcube/Makefile @@ -7,20 +7,21 @@ PORTNAME= wmcube PORTVERSION= 0.98 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= sysutils windowmaker MASTER_SITES= ${MASTER_SITE_TUCOWS} \ http://dockapps.org/download.php/id/222/ \ - http://mirror2.unixfreunde.de/ \ http://freebsd.unixfreunde.de/sources/ MASTER_SITE_SUBDIR= x11/dock -MAINTAINER= ports@FreeBSD.org +MAINTAINER= garga@FreeBSD.org COMMENT= Window Maker dockapp that displays cpu load and a realtime 3d object WRKSRC= ${WRKDIR}/${PORTNAME}/${PORTNAME} USE_XORG= xpm MAKEFILE= Makefile.FREEBSD +PORTDOCS= CHANGES README TODO +SUB_FILES= pkg-message do-install: @${INSTALL_PROGRAM} ${WRKSRC}/wmcube ${PREFIX}/bin @@ -30,20 +31,17 @@ do-install: post-install: .for file in *.wmc @${ECHO} "===> Installing extra 3d objects in ${PREFIX}/share/${PORTNAME}" - @${INSTALL} -d -o ${SHAREOWN} -g ${SHAREGRP} -m 555 \ - ${PREFIX}/share/${PORTNAME} - @${INSTALL_DATA} ${WRKDIR}/${PORTNAME}/3dObjects/${file} \ - ${PREFIX}/share/${PORTNAME} + @${INSTALL} -d -o ${SHAREOWN} -g ${SHAREGRP} -m 555 ${DATADIR} + @${INSTALL_DATA} ${WRKDIR}/${PORTNAME}/3dObjects/${file} ${DATADIR} .endfor .ifndef(NOPORTDOCS) @${ECHO} "===> Installing README in ${PREFIX}/share/doc/${PORTNAME}" @${ECHO} "===> Please Read pkg-descr and README for usage information" - @${INSTALL} -d -o ${SHAREOWN} -g ${SHAREGRP} -m 555 \ - ${PREFIX}/share/doc/${PORTNAME} -.for file in CHANGES README TODO - @${INSTALL_DATA} ${WRKSRC}/../${file} ${PREFIX}/share/doc/${PORTNAME} -.endfor -.endif # !NOPORTDOCS - @${SED} -e "s|%%PREFIX%%|${PREFIX}|" ${PKGMESSAGE} + @${INSTALL} -d -o ${SHAREOWN} -g ${SHAREGRP} -m 555 ${DOCSDIR} +. for f in ${PORTDOCS} + @${INSTALL_DATA} ${WRKSRC}/../${f} ${DOCSDIR} +. endfor +.endif + @${CAT} ${PKGMESSAGE} .include <bsd.port.mk> diff --git a/sysutils/wmcube/files/patch-wmcube.c b/sysutils/wmcube/files/patch-wmcube.c index 6f77d7f7361..b12d941b245 100644 --- a/sysutils/wmcube/files/patch-wmcube.c +++ b/sysutils/wmcube/files/patch-wmcube.c @@ -1,6 +1,14 @@ ---- wmcube.c.orig Mon Oct 23 22:11:47 2000 -+++ wmcube.c Tue May 15 16:17:02 2001 -@@ -913,7 +926,7 @@ int loadobj(char *filename) { +--- wmcube.c.orig 2000-10-23 18:11:47.000000000 -0200 ++++ wmcube.c 2008-04-11 08:23:35.000000000 -0300 +@@ -125,6 +125,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 +914,7 @@ exit(0); } @@ -9,7 +17,7 @@ if (strcmp(tmp,"WMCUBE_COORDINATES") != 0) { printf("\nError in objectfile: it must start with WMCUBE_COORDINATES\n\n"); -@@ -921,7 +934,7 @@ int loadobj(char *filename) { +@@ -921,7 +922,7 @@ exit(0); } @@ -18,7 +26,7 @@ counter = atoi(tmp); while ((strcmp(tmp,"WMCUBE_LINES") != 0) && (strcmp(tmp,"WMCUBE_PLANES") != 0)) { -@@ -938,7 +951,7 @@ int loadobj(char *filename) { +@@ -938,7 +939,7 @@ fclose(fp); exit(0); } @@ -27,3 +35,32 @@ if (feof(fp)) { printf("\nError in objectfile: you must have a section WMCUBE_LINES or WMCUBE_PLANES\n\n"); +@@ -1224,9 +1225,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 +1255,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)) + { diff --git a/sysutils/wmcube/pkg-message b/sysutils/wmcube/files/pkg-message.in index 785ca4fb3a4..785ca4fb3a4 100644 --- a/sysutils/wmcube/pkg-message +++ b/sysutils/wmcube/files/pkg-message.in diff --git a/sysutils/wmcube/pkg-descr b/sysutils/wmcube/pkg-descr index 972443ab932..bd4e18a6f6d 100644 --- a/sysutils/wmcube/pkg-descr +++ b/sysutils/wmcube/pkg-descr @@ -4,5 +4,3 @@ faster/slower. You can zoom in and out by clicking on the dockapp. WWW: http://dockapps.org/file.php/id/162 Author: Robert Kling <robkli-8@student.luth.se> - -- Patrick Li <pat@FreeBSD.org> diff --git a/sysutils/wmcube/pkg-plist b/sysutils/wmcube/pkg-plist index 798bf0149f0..25f7e14f9be 100644 --- a/sysutils/wmcube/pkg-plist +++ b/sysutils/wmcube/pkg-plist @@ -1,7 +1,4 @@ bin/wmcube -%%PORTDOCS%%%%DOCSDIR%%/CHANGES -%%PORTDOCS%%%%DOCSDIR%%/README -%%PORTDOCS%%%%DOCSDIR%%/TODO %%DATADIR%%/2planes-solid.wmc %%DATADIR%%/4d.wmc %%DATADIR%%/8star-small.wmc @@ -37,4 +34,3 @@ bin/wmcube %%DATADIR%%/starcube.wmc %%DATADIR%%/wmlogo.wmc @dirrm %%DATADIR%% -%%PORTDOCS%%@dirrm %%DOCSDIR%% |