aboutsummaryrefslogtreecommitdiffstats
path: root/misc/estic
diff options
context:
space:
mode:
authordanfe <danfe@FreeBSD.org>2004-12-23 23:07:11 +0800
committerdanfe <danfe@FreeBSD.org>2004-12-23 23:07:11 +0800
commit6a1cbf6e620122491b896eb03874c92932eb5a66 (patch)
tree7a66b10b887d944574902df32be45805def4cf3e /misc/estic
parent2b98e6b108c911dfc50484e67bb4d2734624755a (diff)
downloadfreebsd-ports-gnome-6a1cbf6e620122491b896eb03874c92932eb5a66.tar.gz
freebsd-ports-gnome-6a1cbf6e620122491b896eb03874c92932eb5a66.tar.zst
freebsd-ports-gnome-6a1cbf6e620122491b896eb03874c92932eb5a66.zip
Fix bad C++ code and thus unbreak with recent GCC.
Diffstat (limited to 'misc/estic')
-rw-r--r--misc/estic/Makefile8
-rw-r--r--misc/estic/files/patch-spunk_check.cc12
-rw-r--r--misc/estic/files/patch-spunk_check.h13
-rw-r--r--misc/estic/files/patch-spunk_coll.h48
4 files changed, 74 insertions, 7 deletions
diff --git a/misc/estic/Makefile b/misc/estic/Makefile
index 64c30fe1dc20..7f955f3dd972 100644
--- a/misc/estic/Makefile
+++ b/misc/estic/Makefile
@@ -32,12 +32,6 @@ PBX_DOC=${DOCSDIR}
ESTIC=${WRKSRC}/estic
MAKE_E= make X11BASE=${X11BASE} -f make/freebsd${X_OR_NOT}.mak
-.include <bsd.port.pre.mk>
-
-.if ${OSVERSION} >= 500113
-BROKEN= "Does not compile (bad C++ code)"
-.endif
-
do-configure:
@cd ${WRKSRC}/spunk ; ${MAKE_E} dep
@cd ${ESTIC} ; ${MAKE_E} dep
@@ -86,4 +80,4 @@ demo:
# CDROMs, # (despite the original German phraseology) as I (<jhs@freebsd.org>)
# have obtained a waiver. See ${FILESDIR}/README for explanation.
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/misc/estic/files/patch-spunk_check.cc b/misc/estic/files/patch-spunk_check.cc
new file mode 100644
index 000000000000..c62be9001a20
--- /dev/null
+++ b/misc/estic/files/patch-spunk_check.cc
@@ -0,0 +1,12 @@
+--- spunk/check.cc.orig Tue Jul 30 20:10:24 1996
++++ spunk/check.cc Thu Dec 23 20:52:21 2004
+@@ -50,9 +50,6 @@
+
+
+ // The fail vector
+-#ifdef __GNUC__
+-volatile
+-#endif
+ void (*CheckFailed) (const char*, const char* Cond,
+ int Code, const char* File, int Line) = _CheckFailed;
+
diff --git a/misc/estic/files/patch-spunk_check.h b/misc/estic/files/patch-spunk_check.h
new file mode 100644
index 000000000000..6b112002607c
--- /dev/null
+++ b/misc/estic/files/patch-spunk_check.h
@@ -0,0 +1,13 @@
+--- spunk/check.h.orig Tue Jul 30 20:10:26 1996
++++ spunk/check.h Thu Dec 23 20:54:22 2004
+@@ -38,9 +38,6 @@
+
+
+ extern
+-#ifdef __GNUC__
+-volatile
+-#endif
+ void (*CheckFailed) (const char* Msg, const char* Cond, int Code,
+ const char* File, int Line);
+ // Function pointer that is called from Check if the condition code is true.
+Only in foo/spunk: check.o
diff --git a/misc/estic/files/patch-spunk_coll.h b/misc/estic/files/patch-spunk_coll.h
new file mode 100644
index 000000000000..30ab6b294e21
--- /dev/null
+++ b/misc/estic/files/patch-spunk_coll.h
@@ -0,0 +1,48 @@
+--- spunk/coll.h.orig Thu Dec 23 20:58:57 2004
++++ spunk/coll.h Thu Dec 23 20:50:11 2004
+@@ -418,15 +418,15 @@
+
+ // Duplicates allowed. Do a linear search.
+ // (Hint: Search returns the first of all entrys with the same key)
+- Item2 = (T*) Items [Index];
++ Item2 = (T*) this->Items [Index];
+ do {
+ if (Item2 == Item) {
+ // That's it !
+ return Index;
+ }
+ // Get next
+- Item2 = (T*) Items [++Index];
+- } while (Index < Count && Compare (Key, KeyOf (Item2)) == 0);
++ Item2 = (T*) this->Items [++Index];
++ } while (Index < this->Count && Compare (Key, KeyOf (Item2)) == 0);
+
+ // Item not found
+ return -1;
+@@ -461,7 +461,7 @@
+ {
+ // do a binary search
+ int First = 0;
+- int Last = Count - 1;
++ int Last = this->Count - 1;
+ int Current;
+ int Result;
+ int S = 0;
+@@ -472,7 +472,7 @@
+ Current = (Last + First) / 2;
+
+ // Do a compare
+- Result = Compare (KeyOf ((T*) Items [Current]), Key);
++ Result = Compare (KeyOf ((T*) this->Items [Current]), Key);
+ if (Result < 0) {
+ First = Current + 1;
+ } else {
+@@ -516,7 +516,7 @@
+ int I;
+ if (Search (Key, I) != 0) {
+ // We found the key, I is the index
+- return At (I);
++ return this->At (I);
+ } else {
+ // We did not find the key
+ return 0;