summaryrefslogtreecommitdiff
path: root/sysutils/bbapm
diff options
context:
space:
mode:
authorAdam Weinberger <adamw@FreeBSD.org>2003-05-19 20:05:26 +0000
committerAdam Weinberger <adamw@FreeBSD.org>2003-05-19 20:05:26 +0000
commitaa40b2dfdf6e0f88ff363e099d49510c42f91616 (patch)
treec07dd28a6d228b8360886233e3c29ca7de6bcadb /sysutils/bbapm
parentAdd WWW. (diff)
Mark ONLY_FOR_ARCHS=i386.
Fix build on -CURRENT. Image.cc was trying to define a variable named "or." Thank you: wpaul
Notes
Notes: svn path=/head/; revision=81488
Diffstat (limited to 'sysutils/bbapm')
-rw-r--r--sysutils/bbapm/Makefile9
-rw-r--r--sysutils/bbapm/files/patch-Image.cc68
2 files changed, 69 insertions, 8 deletions
diff --git a/sysutils/bbapm/Makefile b/sysutils/bbapm/Makefile
index 96dcc3ae6b29..318e182326c1 100644
--- a/sysutils/bbapm/Makefile
+++ b/sysutils/bbapm/Makefile
@@ -17,12 +17,7 @@ PATCH_DIST_STRIP= -p1
MAINTAINER= adamw@FreeBSD.org
COMMENT= APM monitor for the Blackbox slit
-.include <bsd.port.pre.mk>
-
-.if ${OSVERSION} >= 500113
-BROKEN= "Does not compile (bad C++ code)"
-.endif
-
+ONLY_FOR_ARCHS= i386
USE_X_PREFIX= yes
USE_GNOME= gtk12
GNU_CONFIGURE= yes
@@ -35,4 +30,4 @@ do-install:
@${INSTALL_DATA} ${WRKSRC}/data/${a} ${PREFIX}/share/bbtools
.endfor
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/sysutils/bbapm/files/patch-Image.cc b/sysutils/bbapm/files/patch-Image.cc
index 23455a41ff98..5d5bcca59d64 100644
--- a/sysutils/bbapm/files/patch-Image.cc
+++ b/sysutils/bbapm/files/patch-Image.cc
@@ -1,5 +1,5 @@
--- Image.cc.orig Sun Aug 15 07:43:55 1999
-+++ Image.cc Sat Aug 4 20:52:40 2001
++++ Image.cc Mon May 19 12:56:41 2003
@@ -50,6 +50,17 @@
BImage::BImage(BImageControl *c, unsigned int w, unsigned int h) {
control = c;
@@ -18,6 +18,72 @@
width = ((signed) w > 0) ? w : 1;
height = ((signed) h > 0) ? h : 1;
+@@ -225,12 +236,12 @@
+ }
+
+ if (control->doDither()) {
+- short er, eg, eb, *or, *og, *ob, *nor, *nog, *nob, *por, *pog, *pob;
++ short er, eg, eb, *bbor, *og, *ob, *nor, *nog, *nob, *por, *pog, *pob;
+ unsigned short *ort, *ogt, *obt;
+
+- control->getDitherBuffers(width + 2, &or, &og, &ob, &nor, &nog, &nob,
++ control->getDitherBuffers(width + 2, &bbor, &og, &ob, &nor, &nog, &nob,
+ &ort, &ogt, &obt);
+- if ((! or) || (! og) || (! ob) || (! nor) || (! nog) || (! nob) ||
++ if ((! bbor) || (! og) || (! ob) || (! nor) || (! nog) || (! nob) ||
+ (! ort) || (! ogt) || (! obt)) {
+ fprintf(stderr,
+ "BImage::renderXImage: error getting dither information\n");
+@@ -240,7 +251,7 @@
+
+ x = width;
+
+- por = or;
++ por = bbor;
+ pog = og;
+ pob = ob;
+
+@@ -271,14 +282,14 @@
+ }
+
+ for (x = 0; x < width; x++) {
+- if (*(or + x) > 255) *(or + x) = 255;
+- else if (*(or + x) < 0) *(or + x) = 0;
++ if (*(bbor + x) > 255) *(bbor + x) = 255;
++ else if (*(bbor + x) < 0) *(bbor + x) = 0;
+ if (*(og + x) > 255) *(og + x) = 255;
+ else if (*(og + x) < 0) *(og + x) = 0;
+ if (*(ob + x) > 255) *(ob + x) = 255;
+ else if (*(ob + x) < 0) *(ob + x) = 0;
+
+- r = *(tr + *(or + x));
++ r = *(tr + *(bbor + x));
+ g = *(tg + *(og + x));
+ b = *(tb + *(ob + x));
+
+@@ -340,11 +351,11 @@
+ return 0;
+ }
+
+- er = *(or + x) - *(ort + *(or + x));
++ er = *(bbor + x) - *(ort + *(bbor + x));
+ eg = *(og + x) - *(ogt + *(og + x));
+ eb = *(ob + x) - *(obt + *(ob + x));
+
+- *(or + x + 1) += er;
++ *(bbor + x + 1) += er;
+ *(og + x + 1) += eg;
+ *(ob + x + 1) += eb;
+
+@@ -360,7 +371,7 @@
+ off += image->width;
+ idata = (pd += image->bytes_per_line);
+
+- por = or; or = nor; nor = por;
++ por = bbor; bbor = nor; nor = por;
+ pog = og; og = nog; nog = pog;
+ pob = ob; ob = nob; nob = pob;
+ }
@@ -843,7 +854,14 @@
window = blackbox->getRootWindow();
screen_number = blackbox->getScreenNumber();