(no commit message)
authorChris White <chriswhite@gentoo.org>
Wed, 30 Nov 2005 09:56:01 +0000 (09:56 +0000)
committerChris White <chriswhite@gentoo.org>
Wed, 30 Nov 2005 09:56:01 +0000 (09:56 +0000)
sys-apps/gmemusage/Manifest [new file with mode: 0644]
sys-apps/gmemusage/files/digest-gmemusage-0.2 [new file with mode: 0644]
sys-apps/gmemusage/files/gmemusage-0.2-gentoo.patch [new file with mode: 0644]
sys-apps/gmemusage/gmemusage-0.2-old.ebuild [new file with mode: 0644]
sys-apps/gmemusage/gmemusage-0.2.ebuild [new file with mode: 0644]

diff --git a/sys-apps/gmemusage/Manifest b/sys-apps/gmemusage/Manifest
new file mode 100644 (file)
index 0000000..24c2b84
--- /dev/null
@@ -0,0 +1,3 @@
+MD5 0ca7007f9ef35e838cad5da804adc32f gmemusage-0.2.ebuild 1203
+MD5 22ec727a0ec4602874a94a0a15095858 files/digest-gmemusage-0.2 68
+MD5 37794dad03f7d6f57d8371956d248021 files/gmemusage-0.2-gentoo.patch 3064
diff --git a/sys-apps/gmemusage/files/digest-gmemusage-0.2 b/sys-apps/gmemusage/files/digest-gmemusage-0.2
new file mode 100644 (file)
index 0000000..a17e320
--- /dev/null
@@ -0,0 +1 @@
+MD5 98fccb8a1730830685e52e1f73ae1c34 gmemusage-0.2-082599.tgz 30129
diff --git a/sys-apps/gmemusage/files/gmemusage-0.2-gentoo.patch b/sys-apps/gmemusage/files/gmemusage-0.2-gentoo.patch
new file mode 100644 (file)
index 0000000..4fef1ff
--- /dev/null
@@ -0,0 +1,105 @@
+diff -ur gmemusage-0.2/gmemusage.h gmemusage-0.2-patched/gmemusage.h
+--- gmemusage-0.2/gmemusage.h  1999-08-25 21:23:52.000000000 -0600
++++ gmemusage-0.2-patched/gmemusage.h  2005-09-16 02:43:19.000000000 -0600
+@@ -30,8 +30,8 @@
+ void list (void);
+ void drawstring (int x, int y, char *str);
+ void drawstringfixed (int x, int y, char *str);
+-void drawstringright (int x, int y, char *str, float width);
+-void drawstringcenter (int x, int y, char *str, float width);
++void drawstringright (int x, int y, const char *str, float width);
++void drawstringcenter (int x, int y, const char *str, float width);
+ void refresh (int );
+ void display (void);
+ void mouseClick (int button, int state, int x, int y);
+diff -ur gmemusage-0.2/util.c gmemusage-0.2-patched/util.c
+--- gmemusage-0.2/util.c       1999-08-25 21:23:52.000000000 -0600
++++ gmemusage-0.2-patched/util.c       2005-09-16 02:43:55.000000000 -0600
+@@ -26,11 +26,15 @@
+  */
+ 
+ #include <GL/glut.h>
++#include <string.h>
+ 
+ #include "TexFont.h"
+ 
+ #include "enum.h"
+ #include "extern.h"
++#include <string.h>
++#include <stdlib.h>
++
+ 
+ /*--------------------------------------------------------*/
+ void drawstring (int x, int y, char *str)
+@@ -89,17 +93,18 @@
+ }
+ 
+ /*--------------------------------------------------------*/
+-void drawstringright (int x, int y, char *str, float width)
++void drawstringright (int x, int y, const char *str, float width)
+ {
+       int             len, i;
+ 
+ 
+       len = strlen(str);
++      char *str_ = strdup(str);
+ 
+       switch(g_drawText)
+       {
+               case BitmapText:
+-                      glRasterPos2f(x+(width-glutBitmapLength(GLUT_BITMAP_HELVETICA_12, str)), y);
++                      glRasterPos2f(x+(width-glutBitmapLength(GLUT_BITMAP_HELVETICA_12, (const unsigned char*)str)), y);
+                       for (i=0; i<len; i++)
+                               glutBitmapCharacter(GLUT_BITMAP_HELVETICA_12, str[i]);
+                       break;
+@@ -107,28 +112,31 @@
+                       glEnable(GL_TEXTURE_2D);
+                       glPushMatrix();
+                               glTranslatef((float)x, (float)y, 0);
+-                              txfRenderStringRightJustify(helv_txf, str, len, width);
++                              txfRenderStringRightJustify(helv_txf, str_, len, width);
+                       glPopMatrix();
+                       glDisable(GL_TEXTURE_2D);
+                       break;
+               default:
+                       break;
+       }
++
++      free(str_);
+ }
+ 
+ 
+ /*--------------------------------------------------------*/
+-void drawstringcenter (int x, int y, char *str, float width)
++void drawstringcenter (int x, int y, const char *str, float width)
+ {
+       int             len, i;
+ 
+ 
+       len = strlen(str);
++      char *str_ = strdup(str);
+       
+       switch(g_drawText)
+       {
+               case BitmapText:
+-                      glRasterPos2f(x+(width-glutBitmapLength(GLUT_BITMAP_HELVETICA_12, str))/2, y);
++                      glRasterPos2f(x+(width-glutBitmapLength(GLUT_BITMAP_HELVETICA_12, (const unsigned char*)str))/2, y);
+                       for (i=0; i<len; i++)
+                               glutBitmapCharacter(GLUT_BITMAP_HELVETICA_12, str[i]);
+                       break;
+@@ -136,12 +144,14 @@
+                       glEnable(GL_TEXTURE_2D);
+                       glPushMatrix();
+                               glTranslatef(x, y, 0);
+-                              txfRenderStringCenterJustify(helv_txf, str, len, width);
++                              txfRenderStringCenterJustify(helv_txf, str_, len, width);
+                       glPopMatrix();
+                       glDisable(GL_TEXTURE_2D);
+                       break;
+               default:
+                       break;
+       }
++
++      free(str_);
+ }
+
diff --git a/sys-apps/gmemusage/gmemusage-0.2-old.ebuild b/sys-apps/gmemusage/gmemusage-0.2-old.ebuild
new file mode 100644 (file)
index 0000000..3c6a477
--- /dev/null
@@ -0,0 +1,38 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/gmemusage/gmemusage-0.2-old.ebuild,v 1.1.1.1 2005/11/30 09:56:01 chriswhite Exp $
+
+#  I need to get md5s from the author.
+#      I have personally audited this code for malicious crap and will 
+#      state that there is nothing obvious.  RiverRat        (small program)
+
+DESCRIPTION="gmemusage is based on the very useful SGI IRIX utility of the same name."
+HOMEPAGE="http://www.reptilelabour.com/software/gmemusage/index.htm"
+SRC_URI="http://www.reptilelabour.com/software/files/${PN}/${P}-082599.tgz"
+
+inherit eutils
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~x86"
+
+DEPEND="${RDEPEND}"
+
+RDEPEND="virtual/x11
+       virtual/opengl"
+
+IUSE=""
+
+src_unpack() {
+       unpack ${A}
+       epatch ${FILESDIR}/${P}-gentoo.patch || die "patch failed"
+}
+
+src_compile() {
+       emake || die "make failed"
+}
+
+src_install() {
+       dobin gmemusage
+       dodoc README COPYING
+}
diff --git a/sys-apps/gmemusage/gmemusage-0.2.ebuild b/sys-apps/gmemusage/gmemusage-0.2.ebuild
new file mode 100644 (file)
index 0000000..fb8a655
--- /dev/null
@@ -0,0 +1,47 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/gmemusage/gmemusage-0.2.ebuild,v 1.1.1.1 2005/11/30 09:56:01 chriswhite Exp $
+
+#  I need to get md5s from the author.
+#      I have personally audited this code for malicious crap and will 
+#      state that there is nothing obvious.  RiverRat        (small program)
+
+DESCRIPTION="gmemusage is based on the very useful SGI IRIX utility of the same name."
+HOMEPAGE="http://www.reptilelabour.com/software/gmemusage/index.htm"
+SRC_URI="http://www.reptilelabour.com/software/files/${PN}/${P}-082599.tgz"
+
+inherit eutils
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~x86"
+
+DEPEND="${RDEPEND}"
+
+RDEPEND="media-libs/glut
+               virtual/x11
+               virtual/opengl"
+
+IUSE=""
+
+src_unpack() {
+       unpack ${A}
+       cd "${S}"
+       epatch ${FILESDIR}/${P}-gentoo.patch || die "patch failed"
+
+       # custom cflags...
+       # multi-lib fix...
+       sed -i \
+               -e "s:^CFLAGS.*:CFLAGS = ${CFLAGS} -DLINUX:g" \
+               -e "s:^LIBS    =  -L/usr/X11R6/lib:LIBS = -L/usr/X11R6/$(get_libdir):g" \
+               Makefile || die "sed-ing failed"
+}
+
+src_compile() {
+       emake || die "make failed"
+}
+
+src_install() {
+       dobin gmemusage
+       dodoc README
+}