summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sci-calculators/hexcalc')
-rw-r--r--sci-calculators/hexcalc/Manifest1
-rw-r--r--sci-calculators/hexcalc/files/hexcalc-keypad.diff116
-rw-r--r--sci-calculators/hexcalc/files/hexcalc-order.diff51
-rw-r--r--sci-calculators/hexcalc/hexcalc-1.11-r2.ebuild41
-rw-r--r--sci-calculators/hexcalc/metadata.xml9
5 files changed, 218 insertions, 0 deletions
diff --git a/sci-calculators/hexcalc/Manifest b/sci-calculators/hexcalc/Manifest
new file mode 100644
index 000000000000..2dada031e275
--- /dev/null
+++ b/sci-calculators/hexcalc/Manifest
@@ -0,0 +1 @@
+DIST hexcalc.tar.Z 18033 SHA256 726dae5803538cdae658e6b8b9184ec34f23af7fdfdc4412fecae040d66c5480 SHA512 f684d6d6bd6df3f7f0dd626345d8ef166b12513bb378e74f8c59c2b92970f99c665ca32585217e75d55bf0fd93b5fc5c6a5b73e8b438f4821c13219f8ac74766 WHIRLPOOL b044a468d43adf45adde1f315c79ee2f8f42f7e4f762f32045ab4a5a913c40bc2737d2eba18ea54fc9570fd9b765abb61db9b960ab763a98ada481fda187bf2d
diff --git a/sci-calculators/hexcalc/files/hexcalc-keypad.diff b/sci-calculators/hexcalc/files/hexcalc-keypad.diff
new file mode 100644
index 000000000000..1becd895c1c3
--- /dev/null
+++ b/sci-calculators/hexcalc/files/hexcalc-keypad.diff
@@ -0,0 +1,116 @@
+--- hexcalc.c 1989-11-22 22:29:06.000000000 +0100
++++ hexcalc.c.new 2006-11-27 11:38:07.000000000 +0100
+@@ -208,46 +208,73 @@
+ };
+
+ static String defaultTranslations =
+- ":<Key>(: DoKey(\"(\")\n\
+- :<Key>&: DoKey(&)\n\
+- :<Key>^: DoKey(^)\n\
+- :<Key>): DoKey(\")\")\n\
+- Ctrl<Key>c: DoKey(off)\n\
+- :<Key>H: DoKey(hex)\n\
+- :<Key>O: DoKey(oct)\n\
+- :<Key>D: DoKey(dec)\n\
+- :<Key>B: DoKey(bin)\n\
+- :<Key>R: DoKey(Rcl)\n\
+- :<Key>S: DoKey(Sto)\n\
+- :<Key>s: DoKey(16)\n\
+- :<Key>l: DoKey(32)\n\
+- :<Key>+: DoKey(+)\n\
+- :<Key>-: DoKey(-)\n\
+- :<Key>*: DoKey(*)\n\
+- :<Key>/: DoKey(/)\n\
+- :<Key>%: DoKey(%)\n\
+- :<Key>>: DoKey(>>)\n\
+- :<Key><: DoKey(<<)\n\
+- :<Key>0: DoKey(0)\n\
+- :<Key>1: DoKey(1)\n\
+- :<Key>2: DoKey(2)\n\
+- :<Key>3: DoKey(3)\n\
+- :<Key>4: DoKey(4)\n\
+- :<Key>5: DoKey(5)\n\
+- :<Key>6: DoKey(6)\n\
+- :<Key>7: DoKey(7)\n\
+- :<Key>8: DoKey(8)\n\
+- :<Key>9: DoKey(9)\n\
+- :<Key>a: DoKey(a)\n\
+- :<Key>b: DoKey(b)\n\
+- :<Key>c: DoKey(c)\n\
+- :<Key>d: DoKey(d)\n\
+- :<Key>e: DoKey(e)\n\
+- :<Key>f: DoKey(f)\n\
+- Ctrl<Key>h: Delete()\n\
+- <Key>Delete: Delete()\n\
+- :<Key>=: DoKey(=)\n\
+- :<Key>Return: DoKey(=)"
++ ":<Key>(: DoKey(\"(\")\n\
++ :<Key>&: DoKey(&)\n\
++ :<Key>^: DoKey(^)\n\
++ :<Key>): DoKey(\")\")\n\
++ Ctrl<Key>c: DoKey(off)\n\
++ :<Key>H: DoKey(hex)\n\
++ :<Key>O: DoKey(oct)\n\
++ :<Key>D: DoKey(dec)\n\
++ :<Key>B: DoKey(bin)\n\
++ :<Key>R: DoKey(Rcl)\n\
++ :<Key>S: DoKey(Sto)\n\
++ :<Key>s: DoKey(16)\n\
++ :<Key>l: DoKey(32)\n\
++ :<Key>+: DoKey(+)\n\
++ :<Key>KP_Add: DoKey(+)\n\
++ :<Key>-: DoKey(-)\n\
++ :<Key>KP_Subtract: DoKey(-)\n\
++ :<Key>*: DoKey(*)\n\
++ :<Key>KP_Multiply: DoKey(*)\n\
++ :<Key>/: DoKey(/)\n\
++ :<Key>KP_Divide: DoKey(/)\n\
++ :<Key>%: DoKey(%)\n\
++ :<Key>>: DoKey(>>)\n\
++ :<Key><: DoKey(<<)\n\
++ :<Key>0: DoKey(0)\n\
++ :<Key>KP_0: DoKey(0)\n\
++ :<Key>KP_Insert: DoKey(0)\n\
++ :<Key>1: DoKey(1)\n\
++ :<Key>KP_1: DoKey(1)\n\
++ :<Key>KP_End: DoKey(1)\n\
++ :<Key>2: DoKey(2)\n\
++ :<Key>KP_2: DoKey(2)\n\
++ :<Key>KP_Down: DoKey(2)\n\
++ :<Key>3: DoKey(3)\n\
++ :<Key>KP_3: DoKey(3)\n\
++ :<Key>KP_Next: DoKey(3)\n\
++ :<Key>4: DoKey(4)\n\
++ :<Key>KP_4: DoKey(4)\n\
++ :<Key>KP_Left: DoKey(4)\n\
++ :<Key>5: DoKey(5)\n\
++ :<Key>KP_5: DoKey(5)\n\
++ :<Key>KP_Begin: DoKey(5)\n\
++ :<Key>6: DoKey(6)\n\
++ :<Key>KP_6: DoKey(6)\n\
++ :<Key>KP_Right: DoKey(6)\n\
++ :<Key>7: DoKey(7)\n\
++ :<Key>KP_7: DoKey(7)\n\
++ :<Key>KP_Home: DoKey(7)\n\
++ :<Key>8: DoKey(8)\n\
++ :<Key>KP_8: DoKey(8)\n\
++ :<Key>KP_Up: DoKey(8)\n\
++ :<Key>9: DoKey(9)\n\
++ :<Key>KP_9: DoKey(9)\n\
++ :<Key>KP_Prior: DoKey(9)\n\
++ :<Key>a: DoKey(a)\n\
++ :<Key>b: DoKey(b)\n\
++ :<Key>c: DoKey(c)\n\
++ :<Key>d: DoKey(d)\n\
++ :<Key>e: DoKey(e)\n\
++ :<Key>f: DoKey(f)\n\
++ Ctrl<Key>h: Delete()\n\
++ <Key>Delete: Delete()\n\
++ <Key>KP_Delete: Delete()\n\
++ <Key>KP_Decimal: Delete()\n\
++ :<Key>=: DoKey(=)\n\
++ :<Key>KP_Enter: DoKey(=)\n\
++ :<Key>Return: DoKey(=)"
+ ;
+
+
diff --git a/sci-calculators/hexcalc/files/hexcalc-order.diff b/sci-calculators/hexcalc/files/hexcalc-order.diff
new file mode 100644
index 000000000000..cdc4a93fedce
--- /dev/null
+++ b/sci-calculators/hexcalc/files/hexcalc-order.diff
@@ -0,0 +1,51 @@
+--- a/hexcalc.c 1989-11-22 16:29:06.000000000 -0500
++++ b/hexcalc.c 2006-07-18 17:36:40.000000000 -0400
+@@ -37,6 +37,7 @@
+ #endif
+
+ #include <stdio.h>
++#include <stdlib.h>
+ #include <ctype.h>
+ #include <X11/IntrinsicP.h>
+ #include <X11/StringDefs.h>
+@@ -509,14 +508,16 @@
+
+ switch(topOp) {
+ case '+' :
+- ac = PopArg() + PopArg();
++ temp = PopArg();
++ ac = PopArg() + temp;
+ break;
+ case '-' :
+ temp = PopArg();
+ ac = PopArg() - temp;
+ break;
+ case '*' :
+- ac = PopArg() * PopArg();
++ temp = PopArg();
++ ac = temp * PopArg();
+ break;
+ case '/' :
+ temp = PopArg();
+@@ -528,15 +529,18 @@
+ break;
+
+ case '|' :
+- ac = PopArg() | PopArg();
++ temp = PopArg();
++ ac = temp | PopArg();
+ break;
+
+ case '&' :
+- ac = PopArg() & PopArg();
++ temp = PopArg();
++ ac = temp & PopArg();
+ break;
+
+ case '^' :
+- ac = PopArg() ^ PopArg();
++ temp = PopArg();
++ ac = temp ^ PopArg();
+ break;
+
+ case '<' :
diff --git a/sci-calculators/hexcalc/hexcalc-1.11-r2.ebuild b/sci-calculators/hexcalc/hexcalc-1.11-r2.ebuild
new file mode 100644
index 000000000000..5702a0f062bb
--- /dev/null
+++ b/sci-calculators/hexcalc/hexcalc-1.11-r2.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="A simple hex calculator for X"
+HOMEPAGE="ftp://ftp.x.org/R5contrib/"
+SRC_URI="ftp://ftp.x.org/R5contrib/${PN}.tar.Z"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc x86 ~amd64-linux ~x86-linux"
+IUSE=""
+
+RDEPEND="x11-libs/libXaw"
+DEPEND="${RDEPEND}
+ x11-misc/imake
+ app-text/rman"
+
+S=${WORKDIR}/${PN}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-*
+}
+
+src_compile() {
+ xmkmf || die
+ emake \
+ CC="$(tc-getCC)" \
+ CFLAGS="${CFLAGS}" \
+ CCLINK="$(tc-getCC)" \
+ LDOPTIONS="${LDFLAGS}"
+}
+
+src_install() {
+ dobin ${PN}
+ newman ${PN}.{man,1}
+}
diff --git a/sci-calculators/hexcalc/metadata.xml b/sci-calculators/hexcalc/metadata.xml
new file mode 100644
index 000000000000..e5e99f310994
--- /dev/null
+++ b/sci-calculators/hexcalc/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>sci</herd>
+<longdescription>
+ hexcalc is a mutli-radix calculator that offers the standard C
+ integer operations.
+</longdescription>
+</pkgmetadata>