aboutsummaryrefslogtreecommitdiff
path: root/devel/hp48xgcc
diff options
context:
space:
mode:
authorAlexey Dokuchaev <danfe@FreeBSD.org>2006-02-20 13:18:26 +0000
committerAlexey Dokuchaev <danfe@FreeBSD.org>2006-02-20 13:18:26 +0000
commitf03bedcae2bfbd4ccfccbb7e0106388bb2dbec4b (patch)
treec5712fcaf302723f2019d0d5df7e9ff55f1b7520 /devel/hp48xgcc
parent8c55ca4984af56ca4796d96a4d0bbcb68187faa4 (diff)
downloadports-f03bedcae2bfbd4ccfccbb7e0106388bb2dbec4b.tar.gz
ports-f03bedcae2bfbd4ccfccbb7e0106388bb2dbec4b.zip
Add HP48-xgcc 1.0.2, GNU C cross-compiler for HP48 calculators.
Now one step closer porting BSD on my HP48GX. ;-)
Notes
Notes: svn path=/head/; revision=156493
Diffstat (limited to 'devel/hp48xgcc')
-rw-r--r--devel/hp48xgcc/Makefile58
-rw-r--r--devel/hp48xgcc/distinfo6
-rw-r--r--devel/hp48xgcc/files/patch-Makefile82
-rw-r--r--devel/hp48xgcc/files/patch-class+LKV+AVLTree.h108
-rw-r--r--devel/hp48xgcc/files/patch-class+LKV+AllocBuf.h11
-rw-r--r--devel/hp48xgcc/files/patch-class+LKV+Bstream.cc20
-rw-r--r--devel/hp48xgcc/files/patch-class+LKV+Bstream.h42
-rw-r--r--devel/hp48xgcc/files/patch-class+LKV+List.h52
-rw-r--r--devel/hp48xgcc/files/patch-class+LKV+Str.cc97
-rw-r--r--devel/hp48xgcc/files/patch-class+LKV+Str.h47
-rw-r--r--devel/hp48xgcc/files/patch-class+LKV+assert_lkv.h20
-rw-r--r--devel/hp48xgcc/files/patch-class+LKV+ext_compare.h9
-rw-r--r--devel/hp48xgcc/files/patch-class+NibStr.cc13
-rw-r--r--devel/hp48xgcc/files/patch-class+NibStr.h10
-rw-r--r--devel/hp48xgcc/files/patch-class+SourceLine.h9
-rw-r--r--devel/hp48xgcc/files/patch-class+class.cc11
-rw-r--r--devel/hp48xgcc/files/patch-class+clld.cc29
-rw-r--r--devel/hp48xgcc/files/patch-class+clld.h10
-rw-r--r--devel/hp48xgcc/files/patch-class+object.h9
-rw-r--r--devel/hp48xgcc/pkg-descr6
-rw-r--r--devel/hp48xgcc/pkg-plist155
21 files changed, 804 insertions, 0 deletions
diff --git a/devel/hp48xgcc/Makefile b/devel/hp48xgcc/Makefile
new file mode 100644
index 000000000000..46c3df8b1a4c
--- /dev/null
+++ b/devel/hp48xgcc/Makefile
@@ -0,0 +1,58 @@
+# New ports collection makefile for: HP48-xgcc
+# Date created: 20 Feb 2006
+# Whom: Alexey Dokuchaev <danfe@FreeBSD.org>
+#
+# $FreeBSD$
+#
+
+PORTNAME= hp48xgcc
+PORTVERSION= 1.0.2
+CATEGORIES= devel
+MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:S/$/:hp/}:hp \
+ ftp://ftp.gnu.org/old-gnu/gcc/:gcc \
+MASTER_SITE_SUBDIR= ${PORTNAME}/:hp
+DISTNAME= ${PORTNAME}-${PORTVERSION}-source
+DISTFILES= ${DISTNAME}${EXTRACT_SUFX}:hp \
+ gcc-${GCC_VER}.tar.gz:gcc
+DIST_SUBDIR= ${PORTNAME}
+EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX}
+
+MAINTAINER= danfe@FreeBSD.org
+COMMENT= GNU C cross-compiler for HP48 calculators
+
+USE_GMAKE= yes
+USE_PERL5_BUILD= yes
+USE_ZIP= yes
+
+GCC_VER= 2.7.2
+GCC_DIR= ${WRKDIR}/gcc-${GCC_VER}
+PLIST_SUB+= GCC_VER=${GCC_VER}
+WRKSRC= ${WRKDIR}/saturn
+ALL_TARGET= default
+INSTALL_TARGET= build-lib
+MAKE_ARGS= GCC_SRC="${GCC_DIR}" GCC_VERSION="${GCC_VER}" \
+ CFLAGS="${CFLAGS}" CLIB="" ROOT="${PREFIX}" \
+ INSTALL_PROG="${INSTALL_PROGRAM}" \
+ INSTALL_DATA="${INSTALL_DATA}"
+
+post-extract: .SILENT
+# Extract GCC distribution separately because of USE_ZIP/.tar.gz conflict
+ cd ${WRKDIR} && ${GZIP_CMD} -dc \
+ ${_DISTDIR}/gcc-${GCC_VER}.tar.gz | ${TAR} -xf -
+# Patch GCC a bit
+ cd ${GCC_DIR} && ${PATCH} -s < ${WRKSRC}/gcc-target/patches-${GCC_VER}
+# Prepare GCC by creating proper config symlink
+ ${LN} -sf ../../saturn/gcc-target/config-saturn ${GCC_DIR}/config/saturn
+# Allow GCC to build in our environment
+ ${REINPLACE_CMD} '178d' ${GCC_DIR}/gcc.c
+# FreeBSD has vprintf() actually
+ ${CHMOD} +w ${GCC_DIR}/config/xm-freebsd.h
+ ${ECHO_CMD} '#define HAVE_VPRINTF' >> ${GCC_DIR}/config/xm-freebsd.h
+# Do not install yet another copies of GPL
+ ${REINPLACE_CMD} '/COPYING/d' ${WRKSRC}/make.pubfiles
+
+do-configure:
+ cd ${GCC_DIR} && ./configure --target=saturn-local-hp48 \
+ --prefix=${PREFIX}
+
+.include <bsd.port.mk>
diff --git a/devel/hp48xgcc/distinfo b/devel/hp48xgcc/distinfo
new file mode 100644
index 000000000000..4d4bda1edcf2
--- /dev/null
+++ b/devel/hp48xgcc/distinfo
@@ -0,0 +1,6 @@
+MD5 (hp48xgcc/hp48xgcc-1.0.2-source.zip) = 8f8e59d531cbab49c6ff95ad1fed6ebd
+SHA256 (hp48xgcc/hp48xgcc-1.0.2-source.zip) = 913dc459a0e4e51a3b1a965c6c81975b7c9cc7e2cd371a878209a22bfde8475f
+SIZE (hp48xgcc/hp48xgcc-1.0.2-source.zip) = 227800
+MD5 (hp48xgcc/gcc-2.7.2.tar.gz) = d32bb8fd2fc1d575a4f8b812ff77ec22
+SHA256 (hp48xgcc/gcc-2.7.2.tar.gz) = 7cd8bce5c3aeec59a72ecc2d3d5123864a817b14cdbd0680b1a969c3bccc5da5
+SIZE (hp48xgcc/gcc-2.7.2.tar.gz) = 7089723
diff --git a/devel/hp48xgcc/files/patch-Makefile b/devel/hp48xgcc/files/patch-Makefile
new file mode 100644
index 000000000000..42538c1cee04
--- /dev/null
+++ b/devel/hp48xgcc/files/patch-Makefile
@@ -0,0 +1,82 @@
+--- Makefile.orig Thu Nov 7 18:58:32 1996
++++ Makefile Mon Feb 20 18:49:33 2006
+@@ -34,19 +34,20 @@
+ CLASS_SRC = ./class
+ MKDIRHIER = mkdir -p
+
+-INSTLIB = $(ROOT)/usr/lib/gcc-lib/saturn-local-hp48/$(GCC_VERSION)
+-INSTBIN = $(ROOT)/usr/bin
+-INSTPUB = $(ROOT)/usr/saturn-local-hp48
++INSTLIB = $(ROOT)/lib/gcc-lib/saturn-local-hp48/$(GCC_VERSION)
++INSTBIN = $(ROOT)/bin
++INSTPUB = $(ROOT)/saturn-local-hp48
+
+ PUBDIRS := $(shell find $(shell cat make.pubfiles) -prune -type d)
+ PUBFILES := $(shell find $(shell cat make.pubfiles) -prune -type f)
+
+ default: usr-tree
+
+-build-lib: usr-tree FORCE
++build-lib: usr-tree1 FORCE
+ $(MAKE) -C lib-source install \
+ LIBDIR=$(INSTLIB) HPDIR=$(INSTPUB)/download \
+- CC="$(INSTBIN)/xgcc -B$(INSTLIB)/ -I../../include"
++ CC="$(INSTBIN)/xgcc -B$(INSTLIB)/ -I../../include" \
++ CFLAGS="" CP="$(INSTALL_DATA)"
+
+ zip: hp48xgcc-$(VERSION_TAG).zip
+
+@@ -57,17 +58,18 @@
+ elsif(!-e $$t && -e "$$t$(EXE)") { unlink "$$t$(EXE)"; } }'
+ $(MAKE) -C $(GCC_SRC) $(GCC_MAKE_ARGS) xgcc cc1 cccp
+ $(MAKE) -e -C $(CLASS_SRC)
+- $(MAKE) usr-tree1
++ $(MAKE) -e -C objdump
+
+ usr-tree1: $(INSTLIB) $(INSTBIN) public-files \
+ $(INSTBIN)/xgcc$(EXE) $(INSTLIB)/cc1$(EXE) $(INSTLIB)/specs \
+- $(INSTLIB)/ld$(EXE) $(INSTLIB)/as$(EXE) $(INSTLIB)/cpp$(EXE)
++ $(INSTLIB)/ld$(EXE) $(INSTLIB)/as$(EXE) $(INSTLIB)/cpp$(EXE) \
++ $(INSTBIN)/objdump
+
+ $(addprefix $(INSTPUB)/,$(PUBDIRS)):
+ $(INSTALL) -d $@
+
+ $(addprefix $(INSTPUB)/,$(PUBFILES)): $(INSTPUB)/%: %
+- $(INSTALL) $? $@
++ $(INSTALL_DATA) $? $@
+
+ public-files: $(addprefix $(INSTPUB)/,$(PUBDIRS)) \
+ $(addprefix $(INSTPUB)/,$(PUBFILES))
+@@ -76,22 +78,25 @@
+ cd $(ROOT) && zip -uyr $@ usr
+
+ $(INSTBIN)/xgcc$(EXE): $(GCC_SRC)/xgcc$(EXE)
+- $(INSTALL) $? $@
++ $(INSTALL_PROG) $? $@
+
+ $(INSTLIB)/cc1$(EXE): $(GCC_SRC)/cc1$(EXE)
+- $(INSTALL) $? $@
++ $(INSTALL_PROG) $? $@
+
+ $(INSTLIB)/cpp$(EXE): $(GCC_SRC)/cccp$(EXE)
+- $(INSTALL) $? $@
++ $(INSTALL_PROG) $? $@
+
+ $(INSTLIB)/ld$(EXE): $(CLASS_SRC)/clld$(EXE)
+- $(INSTALL) $? $@
++ $(INSTALL_PROG) $? $@
+
+ $(INSTLIB)/as$(EXE): $(CLASS_SRC)/class$(EXE)
+- $(INSTALL) $? $@
++ $(INSTALL_PROG) $? $@
+
+ $(INSTLIB)/specs: gcc-target/specs
+- $(INSTALL) gcc-target/specs $@
++ $(INSTALL_DATA) gcc-target/specs $@
++
++$(INSTBIN)/objdump: objdump/objdump
++ $(INSTALL_PROG) $? $@
+
+ $(INSTLIB) $(INSTBIN):
+ $(INSTALL) -d $@
diff --git a/devel/hp48xgcc/files/patch-class+LKV+AVLTree.h b/devel/hp48xgcc/files/patch-class+LKV+AVLTree.h
new file mode 100644
index 000000000000..a7b51d4799a7
--- /dev/null
+++ b/devel/hp48xgcc/files/patch-class+LKV+AVLTree.h
@@ -0,0 +1,108 @@
+--- class/LKV/AVLTree.h 3 Nov 2004 06:57:51 -0000 1.1
++++ class/LKV/AVLTree.h 3 Nov 2004 11:25:16 -0000 1.3
+@@ -26,13 +26,13 @@
+ AVLItem (void) : T()
+ #ifdef DEBUG
+ , left((AVLItem *)0), right((AVLItem *)0), balance(0)
+-#endif DEBUG
++#endif /* DEBUG */
+ { };
+
+ AVLItem (const T & val) : T(val)
+ #ifdef DEBUG
+ , left((AVLItem *)0), right((AVLItem *)0), balance(0)
+-#endif DEBUG
++#endif /* DEBUG */
+ { };
+
+ AVLItem * get_left(void) const { return left; }
+@@ -62,7 +62,7 @@
+ int repair_left (AVLItem<T> * & aktnode);
+ #ifdef AVL_DEBUG
+ int recurse_check(AVLItem<T> * aktnode, int & cnt);
+-#endif AVL_DEBUG
++#endif /* AVL_DEBUG */
+
+ public:
+
+@@ -76,7 +76,7 @@
+
+ #ifdef AVL_DEBUG
+ int check (void) const;
+-#endif AVL_DEBUG
++#endif /* AVL_DEBUG */
+
+ AVLItem<T> * find(const T & val) const;
+ AVLItem<T> * find_first(const T & val) const;
+@@ -166,7 +166,7 @@
+ return 0;
+ }
+
+-#endif AVL_DEBUG
++#endif /* AVL_DEBUG */
+
+ template <class T>
+ void AVLTree<T>::remove(AVLItem<T> * item) {
+@@ -576,7 +576,7 @@
+ #else
+ recurse_insert( aktnode->left, item,
+ ext_compare((const T *)item, (const T *)aktnode->left));
+-#endif DEBUG
++#endif /* DEBUG */
+ return 0;
+ }
+
+@@ -621,7 +621,7 @@
+ }
+ #else
+ recurse_insert( aktnode->left, item, nextcmp);
+-#endif DEBUG
++#endif /* DEBUG */
+ return 0;
+ } else {
+ // left->right will become aktnode
+@@ -684,7 +684,7 @@
+ #else
+ recurse_insert( aktnode->right, item,
+ ext_compare((const T *)item, (const T *)aktnode->right));
+-#endif DEBUG
++#endif /* DEBUG */
+ return 0;
+ }
+
+@@ -728,7 +728,7 @@
+ }
+ #else
+ recurse_insert( aktnode->right, item, nextcmp);
+-#endif DEBUG
++#endif /* DEBUG */
+ return 0;
+ } else {
+ // right->left will become aktnode
+@@ -893,9 +893,9 @@
+ return out;
+ }
+
+-#endif DEBUG
++#endif /* DEBUG */
+
+-class BOstream;
++#include "Bstream.h"
+
+ template <class T>
+ BOstream & operator<< (BOstream & out, const AVLTree<T> & val) {
+@@ -910,8 +910,6 @@
+ return out;
+ }
+
+-class BIstream;
+-
+ template <class T>
+ BIstream & operator>> (BIstream & in, AVLTree<T> & val) {
+
+@@ -928,4 +926,4 @@
+ }
+
+
+-#endif AVLTree_h
++#endif /* AVLTree_h */
diff --git a/devel/hp48xgcc/files/patch-class+LKV+AllocBuf.h b/devel/hp48xgcc/files/patch-class+LKV+AllocBuf.h
new file mode 100644
index 000000000000..cce3aeb1fce9
--- /dev/null
+++ b/devel/hp48xgcc/files/patch-class+LKV+AllocBuf.h
@@ -0,0 +1,11 @@
+--- class/LKV/AllocBuf.h 3 Nov 2004 06:57:51 -0000 1.1
++++ class/LKV/AllocBuf.h 3 Nov 2004 07:25:07 -0000 1.2
+@@ -141,6 +141,6 @@
+ #define LAZYSTATIC(CLNAME) \
+ AllocBuf CLNAME::ab_static(sizeof(CLNAME),#CLNAME);
+
+-#endif NO_LAZY_ALLOC
++#endif /* NO_LAZY_ALLOC */
+
+-#endif AllocBuf_h
++#endif /* AllocBuf_h */
diff --git a/devel/hp48xgcc/files/patch-class+LKV+Bstream.cc b/devel/hp48xgcc/files/patch-class+LKV+Bstream.cc
new file mode 100644
index 000000000000..37e111361141
--- /dev/null
+++ b/devel/hp48xgcc/files/patch-class+LKV+Bstream.cc
@@ -0,0 +1,20 @@
+--- class/LKV/Bstream.cc 3 Nov 2004 06:57:51 -0000 1.1
++++ class/LKV/Bstream.cc 3 Nov 2004 11:24:06 -0000 1.2
+@@ -17,7 +17,7 @@
+ #endif
+
+ void BOstream::ewrite(const void * p, int size) {
+- write ((const unsigned char *)p, size);
++ write ((const char *)p, size);
+ if (ostream::fail()) {
+ set_error("BOstream::operator<< ","write-error");
+ }
+@@ -34,7 +34,7 @@
+ #endif
+
+ void BIstream::eread(void * p, int size) {
+- read ((unsigned char *)p, size);
++ read ((char *)p, size);
+ if (istream::fail()) {
+ set_error("BIstream::operator>> ","read-error");
+ }
diff --git a/devel/hp48xgcc/files/patch-class+LKV+Bstream.h b/devel/hp48xgcc/files/patch-class+LKV+Bstream.h
new file mode 100644
index 000000000000..793147bde69b
--- /dev/null
+++ b/devel/hp48xgcc/files/patch-class+LKV+Bstream.h
@@ -0,0 +1,42 @@
+--- class/LKV/Bstream.h 3 Nov 2004 06:57:51 -0000 1.1
++++ class/LKV/Bstream.h 20 Feb 2006 10:55:38 -0000
+@@ -10,7 +10,7 @@
+
+
+ #ifndef OBSOLETE_LIBGXX
+-class BOstream : public ostream {
++class BOstream : public std::ostream {
+ #else
+ class BOstream : public ofstream {
+ #endif
+@@ -34,13 +34,13 @@
+ BOstream & operator<< (const void * n) { ewrite(&n, sizeof(n)); return *this; }
+
+ int mem_dump(const void * p, int size) {
+- write ((const unsigned char *)p, size);
++ write ((const char *)p, size);
+ return fail();
+ }
+ };
+
+ #ifndef OBSOLETE_LIBGXX
+-class BIstream : public istream {
++class BIstream : public std::istream {
+ #else
+ class BIstream : public ifstream {
+ #endif
+@@ -64,12 +64,12 @@
+ BIstream & operator>> (void * & n) { eread(&n, sizeof(n)); return *this; }
+
+ int mem_undump(void * p, int size) {
+- read ((unsigned char *)p, size);
++ read ((char *)p, size);
+ return fail();
+ }
+ };
+
+
+
+-#endif Bstream_h
++#endif /* Bstream_h */
+
diff --git a/devel/hp48xgcc/files/patch-class+LKV+List.h b/devel/hp48xgcc/files/patch-class+LKV+List.h
new file mode 100644
index 000000000000..5ee26600467d
--- /dev/null
+++ b/devel/hp48xgcc/files/patch-class+LKV+List.h
@@ -0,0 +1,52 @@
+--- class/LKV/List.h 3 Nov 2004 06:57:51 -0000 1.1
++++ class/LKV/List.h 20 Feb 2006 11:08:10 -0000
+@@ -12,6 +12,8 @@
+
+ #include "AllocBuf.h"
+
++#include "Bstream.h"
++
+ class ostream;
+
+ template <class T>
+@@ -35,13 +37,13 @@
+ ListItem( void ) : T()
+ #ifdef DEBUG
+ , next((ListItem *)0), prev((ListItem *)0)
+-#endif DEBUG
++#endif /* DEBUG */
+ { };
+
+ ListItem( const T & val ) : T(val)
+ #ifdef DEBUG
+ , next((ListItem *)0), prev((ListItem *)0)
+-#endif DEBUG
++#endif /* DEBUG */
+ { };
+
+ ListItem * get_next(void) const {
+@@ -59,6 +61,9 @@
+
+
+ template <class T>
++BIstream & operator>> (BIstream & in, List<T> & list);
++
++template <class T>
+ class List {
+
+ protected:
+@@ -239,7 +244,7 @@
+ return last;
+ };
+
+- friend BIstream & operator>> (BIstream & in, List<T> & list);
++ friend BIstream & operator>><> (BIstream & in, List<T> & list);
+ };
+
+ template <class T>
+@@ -306,4 +311,4 @@
+ }
+
+
+-#endif List_h
++#endif /* List_h */
diff --git a/devel/hp48xgcc/files/patch-class+LKV+Str.cc b/devel/hp48xgcc/files/patch-class+LKV+Str.cc
new file mode 100644
index 000000000000..268d35247d66
--- /dev/null
+++ b/devel/hp48xgcc/files/patch-class+LKV+Str.cc
@@ -0,0 +1,97 @@
+--- class/LKV/Str.cc 3 Nov 2004 06:57:51 -0000 1.1
++++ class/LKV/Str.cc 20 Feb 2006 11:11:54 -0000
+@@ -331,8 +331,9 @@
+ }
+ }
+
+-Str Str::next_word(void) return res {
++Str Str::next_word(void) {
+
++ Str res;
+ char c;
+ unsigned long i;
+ unsigned long j;
+@@ -379,8 +380,9 @@
+ return res;
+ }
+
+-Str Str::next_line(void) return res {
++Str Str::next_line(void) {
+
++ Str res;
+ unsigned long i = index(0x0a);
+
+ if (i == (unsigned long)~0) {
+@@ -397,15 +399,18 @@
+ }
+
+ len -= i+1;
++ return res;
+ }
+
+-Str Str::operator+(const Str & rv) const return res(len+rv.len) {
++Str Str::operator+(const Str & rv) const {
++ Str res(len+rv.len);
+ if (len) bcopy(adr, res.adr, len);
+ if (rv.len) bcopy(rv.adr, res.adr+len, rv.len);
+ return res;
+ }
+
+-Str Str::operator+(char rv) const return res(len+1) {
++Str Str::operator+(char rv) const {
++ Str res(len+1);
+ if (len) bcopy(adr, res.adr, len);
+ *(res.adr+len) = rv;
+ return res;
+@@ -481,6 +486,26 @@
+ return -1;
+ }
+
++int Str::operator<(const char * p) const {
++
++ const char * a = adr;
++ unsigned long cnt = 0;
++
++ for (;;) {
++ char c = *p++;
++ if (len == cnt) {
++ if (c == 0)
++ return 0;
++ return -1;
++ }
++ if (c == 0)
++ return 0;
++ if (c != *a)
++ return (*a < c);
++ a++; cnt++;
++ }
++}
++
+ int Str::operator<(const Str & rv) const {
+
+ unsigned long p = (rv.len < len)? rv.len : len;
+@@ -726,7 +751,9 @@
+ }
+
+
+-Str LtoStr(long num) return res(4) {
++Str LtoStr(long num) {
++
++ Str res(4);
+
+ // if (res.fail) return Str();
+
+@@ -744,10 +771,12 @@
+ return Str(lv)+rv;
+ }
+
+-Str FtoStr(double val) return res; {
++Str FtoStr(double val) {
++ Str res;
+ static char buf[40];
+ sprintf(buf,"%1.*g",DBL_DIG,val);
+ res = Str(buf);
++ return res;
+ }
+
+ void Str::implode_escape_sequences(void) {
diff --git a/devel/hp48xgcc/files/patch-class+LKV+Str.h b/devel/hp48xgcc/files/patch-class+LKV+Str.h
new file mode 100644
index 000000000000..4f7c63c6f4c1
--- /dev/null
+++ b/devel/hp48xgcc/files/patch-class+LKV+Str.h
@@ -0,0 +1,47 @@
+--- class/LKV/Str.h 3 Nov 2004 06:57:51 -0000 1.1
++++ class/LKV/Str.h 20 Feb 2006 11:18:51 -0000
+@@ -68,6 +68,15 @@
+ return !(operator>(rv));
+ };
+
++ int operator<(const char * p) const;
++ inline int operator>=(const char * p) const {
++ return !(operator<(p));
++ };
++// int operator>(const char * p) const;
++// inline int operator<=(const char * p) const {
++// return !(operator>(p));
++// };
++
+ // ====== casting ======
+
+ inline operator const char *() const {
+@@ -78,11 +87,11 @@
+ return (const unsigned char *) adr;
+ }
+
+- inline operator char *() {
++ inline operator char *() const {
+ return adr;
+ }
+
+- inline operator unsigned char *() {
++ inline operator unsigned char *() const {
+ return (unsigned char *) adr;
+ }
+
+@@ -168,6 +177,8 @@
+ Str FtoStr(double val);
+ Str LtoStr(long);
+
++#include <iostream.h>
++
+ class ostream;
+ ostream & operator<< (ostream & o, const Str & s);
+
+@@ -180,4 +191,4 @@
+ class BIstream;
+ BIstream & operator>> (BIstream & i, Str & s);
+
+-#endif Str_h
++#endif /* Str_h */
diff --git a/devel/hp48xgcc/files/patch-class+LKV+assert_lkv.h b/devel/hp48xgcc/files/patch-class+LKV+assert_lkv.h
new file mode 100644
index 000000000000..8272418b9f30
--- /dev/null
+++ b/devel/hp48xgcc/files/patch-class+LKV+assert_lkv.h
@@ -0,0 +1,20 @@
+--- class/LKV/assert_lkv.h 3 Nov 2004 06:57:51 -0000 1.1
++++ class/LKV/assert_lkv.h 3 Nov 2004 07:25:07 -0000 1.2
+@@ -5,7 +5,7 @@
+ #undef NDEBUG
+ #ifndef DEBUG
+ #define NDEBUG
+-#endif DEBUG
++#endif /* DEBUG */
+
+ #ifdef NDEBUG
+ #define assert(_EX)
+@@ -20,6 +20,6 @@
+ } \
+ }
+
+-#endif NDEBUG
++#endif /* NDEBUG */
+
+-#endif assert_lkv_h
++#endif /* assert_lkv_h */
diff --git a/devel/hp48xgcc/files/patch-class+LKV+ext_compare.h b/devel/hp48xgcc/files/patch-class+LKV+ext_compare.h
new file mode 100644
index 000000000000..a8a061fd000d
--- /dev/null
+++ b/devel/hp48xgcc/files/patch-class+LKV+ext_compare.h
@@ -0,0 +1,9 @@
+--- class/LKV/ext_compare.h 3 Nov 2004 06:57:51 -0000 1.1
++++ class/LKV/ext_compare.h 3 Nov 2004 07:25:07 -0000 1.2
+@@ -20,5 +20,5 @@
+ return res;
+ }
+
+-#endif ext_compare_h
++#endif /* ext_compare_h */
+
diff --git a/devel/hp48xgcc/files/patch-class+NibStr.cc b/devel/hp48xgcc/files/patch-class+NibStr.cc
new file mode 100644
index 000000000000..41e73d369e56
--- /dev/null
+++ b/devel/hp48xgcc/files/patch-class+NibStr.cc
@@ -0,0 +1,13 @@
+--- class/NibStr.cc 3 Nov 2004 06:57:51 -0000 1.1
++++ class/NibStr.cc 3 Nov 2004 12:49:26 -0000 1.2
+@@ -84,8 +84,8 @@
+ }
+
+
+-NibStr NibStr::operator+ (const NibStr & rv) const
+- return res(length()+rv.length()) {
++NibStr NibStr::operator+ (const NibStr & rv) const {
++ NibStr res(length()+rv.length());
+
+ if (!res.fail) {
+ bcopy ( adr, res.adr, len );
diff --git a/devel/hp48xgcc/files/patch-class+NibStr.h b/devel/hp48xgcc/files/patch-class+NibStr.h
new file mode 100644
index 000000000000..fd68c464fc44
--- /dev/null
+++ b/devel/hp48xgcc/files/patch-class+NibStr.h
@@ -0,0 +1,10 @@
+--- class/NibStr.h 3 Nov 2004 06:57:51 -0000 1.1
++++ class/NibStr.h 3 Nov 2004 07:25:35 -0000 1.2
+@@ -57,6 +57,6 @@
+
+ BIstream & operator>> (BIstream & in, NibStr & n);
+
+-#endif NibStr_h
++#endif /* NibStr_h */
+
+
diff --git a/devel/hp48xgcc/files/patch-class+SourceLine.h b/devel/hp48xgcc/files/patch-class+SourceLine.h
new file mode 100644
index 000000000000..4057693de8a9
--- /dev/null
+++ b/devel/hp48xgcc/files/patch-class+SourceLine.h
@@ -0,0 +1,9 @@
+--- class/SourceLine.h 3 Nov 2004 06:57:51 -0000 1.1
++++ class/SourceLine.h 3 Nov 2004 07:25:35 -0000 1.2
+@@ -30,5 +30,5 @@
+ };
+
+
+-#endif SourceLine_h
++#endif /* SourceLine_h */
+
diff --git a/devel/hp48xgcc/files/patch-class+class.cc b/devel/hp48xgcc/files/patch-class+class.cc
new file mode 100644
index 000000000000..e08e7b4a0c9e
--- /dev/null
+++ b/devel/hp48xgcc/files/patch-class+class.cc
@@ -0,0 +1,11 @@
+--- class/class.cc 3 Nov 2004 06:57:51 -0000 1.1
++++ class/class.cc 4 Nov 2004 10:58:04 -0000 1.2
+@@ -3310,7 +3310,7 @@
+ BOstream of;
+ of.open(obj.name, ios::out | ios::binary);
+ #else
+- ofstream of( obj.name, ios::out | ios::bin );
++ ofstream of( obj.name, ios::out | ios::binary );
+ #endif
+ if (of.fail()) {
+ cerr << "FATAL ERROR: unable to open output file '" << obj.name << "'\n";
diff --git a/devel/hp48xgcc/files/patch-class+clld.cc b/devel/hp48xgcc/files/patch-class+clld.cc
new file mode 100644
index 000000000000..fe400e0505b0
--- /dev/null
+++ b/devel/hp48xgcc/files/patch-class+clld.cc
@@ -0,0 +1,29 @@
+--- class/clld.cc 3 Nov 2004 06:57:51 -0000 1.1
++++ class/clld.cc 4 Nov 2004 10:58:04 -0000 1.2
+@@ -130,7 +130,7 @@
+ BIstream f;
+ f.open(name, ios::in | ios::binary);
+ #else
+- ifstream f(name, ios::in | ios::bin);
++ ifstream f(name, ios::in | ios::binary);
+ #endif
+ if (f.fail()) {
+ if (!library)
+@@ -332,7 +332,7 @@
+ BOstream shl_stream;
+ shl_stream.open ( shl_name, ios::out | ios::bin | ios::trunc );
+ #else
+- ofstream shl_stream(shl_name, ios::out | ios::bin | ios::trunc );
++ ofstream shl_stream(shl_name, ios::out | ios::binary | ios::trunc );
+ #endif
+ if (shl_stream.fail()) {
+ cerr << "ERROR: unable to open file '"+shl_name+"' for writing\n";
+@@ -528,7 +528,7 @@
+ BOstream dst_stream;
+ dst_stream.open (bin_name, ios::out | ios::bin | ios::trunc );
+ #else
+- ofstream dst_stream(bin_name, ios::out | ios::bin | ios::trunc );
++ ofstream dst_stream(bin_name, ios::out | ios::binary | ios::trunc );
+ #endif
+ if (dst_stream.fail()) {
+ cerr << "ERROR: unable to open file '"+bin_name+"' for writing\n";
diff --git a/devel/hp48xgcc/files/patch-class+clld.h b/devel/hp48xgcc/files/patch-class+clld.h
new file mode 100644
index 000000000000..336f8a1c6861
--- /dev/null
+++ b/devel/hp48xgcc/files/patch-class+clld.h
@@ -0,0 +1,10 @@
+--- class/clld.h 3 Nov 2004 06:57:51 -0000 1.1
++++ class/clld.h 3 Nov 2004 07:25:35 -0000 1.2
+@@ -76,6 +76,6 @@
+ extern bool verbose; // should we talk to the user?
+ extern bool shared; // are we linking into a shared library rather than an executable?
+
+-#endif clld_h
++#endif /* clld_h */
+
+
diff --git a/devel/hp48xgcc/files/patch-class+object.h b/devel/hp48xgcc/files/patch-class+object.h
new file mode 100644
index 000000000000..6b657462cb26
--- /dev/null
+++ b/devel/hp48xgcc/files/patch-class+object.h
@@ -0,0 +1,9 @@
+--- class/object.h 3 Nov 2004 06:57:51 -0000 1.1
++++ class/object.h 3 Nov 2004 07:25:35 -0000 1.2
+@@ -136,5 +136,5 @@
+ BOstream & operator<< (BOstream & out, const ObjectFile & of);
+ BIstream & operator>> (BIstream & in, ObjectFile & of);
+
+-#endif object_h
++#endif /* object_h */
+
diff --git a/devel/hp48xgcc/pkg-descr b/devel/hp48xgcc/pkg-descr
new file mode 100644
index 000000000000..1346e61032c7
--- /dev/null
+++ b/devel/hp48xgcc/pkg-descr
@@ -0,0 +1,6 @@
+HP48xgcc is a C cross-compiler. It is a program that runs on your computer
+and translates C code into objects that can be executed on the HP48. It is
+based on (well, that's an understatement) the GNU C compiler (gcc) and thus
+it supports complete C language, not just some subset.
+
+WWW: http://hp48xgcc.sourceforge.net/
diff --git a/devel/hp48xgcc/pkg-plist b/devel/hp48xgcc/pkg-plist
new file mode 100644
index 000000000000..f26b92394da4
--- /dev/null
+++ b/devel/hp48xgcc/pkg-plist
@@ -0,0 +1,155 @@
+bin/objdump
+bin/xgcc
+lib/gcc-lib/saturn-local-hp48/%%GCC_VER%%/as
+lib/gcc-lib/saturn-local-hp48/%%GCC_VER%%/cc1
+lib/gcc-lib/saturn-local-hp48/%%GCC_VER%%/cpp
+lib/gcc-lib/saturn-local-hp48/%%GCC_VER%%/crt0.o
+lib/gcc-lib/saturn-local-hp48/%%GCC_VER%%/ld
+lib/gcc-lib/saturn-local-hp48/%%GCC_VER%%/libc.slo
+lib/gcc-lib/saturn-local-hp48/%%GCC_VER%%/libcore.slo
+lib/gcc-lib/saturn-local-hp48/%%GCC_VER%%/libgcc.slo
+lib/gcc-lib/saturn-local-hp48/%%GCC_VER%%/libgraph.slo
+lib/gcc-lib/saturn-local-hp48/%%GCC_VER%%/libm.slo
+lib/gcc-lib/saturn-local-hp48/%%GCC_VER%%/specs
+@dirrm lib/gcc-lib/saturn-local-hp48/%%GCC_VER%%
+@dirrm lib/gcc-lib/saturn-local-hp48
+@dirrmtry lib/gcc-lib
+saturn-local-hp48/doc/hp48xgcc.htm
+saturn-local-hp48/doc/old-hp48xgcc.doc
+@dirrm saturn-local-hp48/doc
+saturn-local-hp48/download/GCCLDD
+saturn-local-hp48/download/libc.sl
+saturn-local-hp48/download/libcore.sl
+saturn-local-hp48/download/libgcc.sl
+saturn-local-hp48/download/libgraph.sl
+saturn-local-hp48/download/libm.sl
+@dirrm saturn-local-hp48/download
+saturn-local-hp48/include/hp48/core.h
+saturn-local-hp48/include/hp48/fb.h
+saturn-local-hp48/include/hp48/lcd.h
+saturn-local-hp48/include/hp48/main.h
+saturn-local-hp48/include/hp48/object.h
+saturn-local-hp48/include/hp48/stack.h
+saturn-local-hp48/include/hp48/types.h
+saturn-local-hp48/include/sys/cdefs.h
+saturn-local-hp48/include/sys/types.h
+saturn-local-hp48/include/features.h
+saturn-local-hp48/include/float.h
+saturn-local-hp48/include/huge_val.h
+saturn-local-hp48/include/limits.h
+saturn-local-hp48/include/malloc.h
+saturn-local-hp48/include/math.h
+saturn-local-hp48/include/stdarg.h
+saturn-local-hp48/include/stddef.h
+saturn-local-hp48/include/stdio.h
+saturn-local-hp48/include/stdlib.h
+saturn-local-hp48/include/string.h
+saturn-local-hp48/include/values.h
+@dirrm saturn-local-hp48/include/sys
+@dirrm saturn-local-hp48/include/hp48
+@dirrm saturn-local-hp48/include
+saturn-local-hp48/lib-source/Makefile
+saturn-local-hp48/lib-source/dos-make.bat
+saturn-local-hp48/lib-source/gccldd/GCCLDD.s
+saturn-local-hp48/lib-source/gccldd/Makefile
+saturn-local-hp48/lib-source/include/gx.h
+saturn-local-hp48/lib-source/include/rom.h
+saturn-local-hp48/lib-source/libc/Makefile
+saturn-local-hp48/lib-source/libc/stack.S
+saturn-local-hp48/lib-source/libc/string_c.c
+saturn-local-hp48/lib-source/libcore/Makefile
+saturn-local-hp48/lib-source/libcore/coreleft.S
+saturn-local-hp48/lib-source/libcore/memory.S
+saturn-local-hp48/lib-source/libgcc/Makefile
+saturn-local-hp48/lib-source/libgcc/floatlib.S
+saturn-local-hp48/lib-source/libgcc/lib0.S
+saturn-local-hp48/lib-source/libgcc/libgcc1.S
+saturn-local-hp48/lib-source/libgraph/Makefile
+saturn-local-hp48/lib-source/libgraph/__fb.c
+saturn-local-hp48/lib-source/libgraph/detect.S
+saturn-local-hp48/lib-source/libgraph/font.c
+saturn-local-hp48/lib-source/libgraph/lcd.S
+saturn-local-hp48/lib-source/libm/Makefile
+saturn-local-hp48/lib-source/libm/README
+saturn-local-hp48/lib-source/libm/acos.S
+saturn-local-hp48/lib-source/libm/acosh.S
+saturn-local-hp48/lib-source/libm/asin.S
+saturn-local-hp48/lib-source/libm/asinh.S
+saturn-local-hp48/lib-source/libm/atan.S
+saturn-local-hp48/lib-source/libm/atan2.S
+saturn-local-hp48/lib-source/libm/atanh.S
+saturn-local-hp48/lib-source/libm/ceil.S
+saturn-local-hp48/lib-source/libm/cos.S
+saturn-local-hp48/lib-source/libm/cosh.S
+saturn-local-hp48/lib-source/libm/exp.S
+saturn-local-hp48/lib-source/libm/expm1.S
+saturn-local-hp48/lib-source/libm/fabs.S
+saturn-local-hp48/lib-source/libm/floor.S
+saturn-local-hp48/lib-source/libm/hypot.S
+saturn-local-hp48/lib-source/libm/lgamma.c
+saturn-local-hp48/lib-source/libm/log.S
+saturn-local-hp48/lib-source/libm/log10.S
+saturn-local-hp48/lib-source/libm/log1p.S
+saturn-local-hp48/lib-source/libm/sin.S
+saturn-local-hp48/lib-source/libm/sinh.S
+saturn-local-hp48/lib-source/libm/sqrt.S
+saturn-local-hp48/lib-source/libm/tan.S
+saturn-local-hp48/lib-source/libm/tanh.S
+saturn-local-hp48/lib-source/libmalloc/Makefile
+saturn-local-hp48/lib-source/libmalloc/malloc.c
+saturn-local-hp48/lib-source/make.def
+saturn-local-hp48/lib-source/stub/Makefile
+saturn-local-hp48/lib-source/stub/crt0.S
+@dirrm saturn-local-hp48/lib-source/stub
+@dirrm saturn-local-hp48/lib-source/libmalloc
+@dirrm saturn-local-hp48/lib-source/libm
+@dirrm saturn-local-hp48/lib-source/libgraph
+@dirrm saturn-local-hp48/lib-source/libgcc
+@dirrm saturn-local-hp48/lib-source/libcore
+@dirrm saturn-local-hp48/lib-source/libc
+@dirrm saturn-local-hp48/lib-source/include
+@dirrm saturn-local-hp48/lib-source/gccldd
+@dirrm saturn-local-hp48/lib-source
+saturn-local-hp48/samples/Makefile
+saturn-local-hp48/samples/asm-test/Makefile
+saturn-local-hp48/samples/asm-test/len1.S
+saturn-local-hp48/samples/asm-test/len2.S
+saturn-local-hp48/samples/asm-test/len3.S
+saturn-local-hp48/samples/c++-hello/Makefile
+saturn-local-hp48/samples/c++-hello/hello.cc
+saturn-local-hp48/samples/download/README
+saturn-local-hp48/samples/float/Makefile
+saturn-local-hp48/samples/float/mandel.c
+saturn-local-hp48/samples/func/Makefile
+saturn-local-hp48/samples/func/external.c
+saturn-local-hp48/samples/func/function.c
+saturn-local-hp48/samples/hello/Makefile
+saturn-local-hp48/samples/hello/hello.c
+saturn-local-hp48/samples/lcd/Makefile
+saturn-local-hp48/samples/lcd/lcdtest.c
+saturn-local-hp48/samples/lib-test/Makefile
+saturn-local-hp48/samples/lib-test/addr_of.c
+saturn-local-hp48/samples/lib-test/bug.c
+saturn-local-hp48/samples/lib-test/cmp.c
+saturn-local-hp48/samples/lib-test/coreleft.c
+saturn-local-hp48/samples/lib-test/fortytwo.c
+saturn-local-hp48/samples/lib-test/inc.c
+saturn-local-hp48/samples/lib-test/layout.cc
+saturn-local-hp48/samples/lib-test/len.c
+saturn-local-hp48/samples/lib-test/reverse.c
+saturn-local-hp48/samples/make.def
+saturn-local-hp48/samples/mandel/Makefile
+saturn-local-hp48/samples/mandel/mandel.c
+saturn-local-hp48/samples/math/Makefile
+saturn-local-hp48/samples/math/gamma.c
+@dirrm saturn-local-hp48/samples/math
+@dirrm saturn-local-hp48/samples/mandel
+@dirrm saturn-local-hp48/samples/lib-test
+@dirrm saturn-local-hp48/samples/lcd
+@dirrm saturn-local-hp48/samples/hello
+@dirrm saturn-local-hp48/samples/func
+@dirrm saturn-local-hp48/samples/float
+@dirrm saturn-local-hp48/samples/download
+@dirrm saturn-local-hp48/samples/c++-hello
+@dirrm saturn-local-hp48/samples/asm-test
+@dirrm saturn-local-hp48/samples