summaryrefslogtreecommitdiff
path: root/math
diff options
context:
space:
mode:
authorEric Anholt <anholt@FreeBSD.org>2004-07-15 06:37:53 +0000
committerEric Anholt <anholt@FreeBSD.org>2004-07-15 06:37:53 +0000
commit29be1c94519115224b70a0a3f389156bea880803 (patch)
tree1c6fc317f8f63fe542030f127d81e5b5014b0fb5 /math
parentAdd enscribe 0.0.3, (diff)
Fix build on 5.x and fix build with new X headers.
Reported by: pointyhat via kris
Notes
Notes: svn path=/head/; revision=113689
Diffstat (limited to 'math')
-rw-r--r--math/oleo/Makefile4
-rw-r--r--math/oleo/files/patch-src::eval.c28
-rw-r--r--math/oleo/files/patch-src::io-x11.c10
-rw-r--r--math/oleo/files/patch-src::xrdb.c10
4 files changed, 45 insertions, 7 deletions
diff --git a/math/oleo/Makefile b/math/oleo/Makefile
index 742ed666a5ee..114cb90ec47f 100644
--- a/math/oleo/Makefile
+++ b/math/oleo/Makefile
@@ -47,10 +47,6 @@ PLIST_SUB= NLS=""
.include <bsd.port.pre.mk>
-.if ${OSVERSION} >= 502112
-BROKEN= "Does not compile on FreeBSD >= 5.x"
-.endif
-
pre-everything::
.if !defined(WITH_MOTIF)
@${ECHO_MSG}
diff --git a/math/oleo/files/patch-src::eval.c b/math/oleo/files/patch-src::eval.c
index 81e13020ce62..aa889457419f 100644
--- a/math/oleo/files/patch-src::eval.c
+++ b/math/oleo/files/patch-src::eval.c
@@ -1,6 +1,19 @@
---- src/eval.c.org Sat Jul 19 13:42:11 2003
-+++ src/eval.c Sat Jul 19 13:47:43 2003
-@@ -565,7 +565,7 @@
+--- src/eval.c.orig Wed Jul 14 23:06:00 2004
++++ src/eval.c Wed Jul 14 23:11:06 2004
+@@ -78,7 +78,11 @@
+ RETSIGTYPE math_sig ();
+ #endif
+
+-int fls (long);
++#if __FreeBSD_version < 502112
++int local_fls (long);
++#define fls local_fls
++#endif
++
+ #ifdef SMALLEVAL
+ int __to_flt (struct value *);
+ int __to_int (struct value *);
+@@ -565,7 +569,7 @@
case CONST_NINF:
case CONST_NAN:
p->type = TYP_FLT;
@@ -9,3 +22,12 @@
break;
case VAR:
+@@ -1540,7 +1544,7 @@
+ }
+
+ int
+-fls (num)
++local_fls (num)
+ long num;
+ {
+ int ret = 1;
diff --git a/math/oleo/files/patch-src::io-x11.c b/math/oleo/files/patch-src::io-x11.c
new file mode 100644
index 000000000000..99ddcb4ffad4
--- /dev/null
+++ b/math/oleo/files/patch-src::io-x11.c
@@ -0,0 +1,10 @@
+--- src/io-x11.c.orig Wed Jul 14 23:14:24 2004
++++ src/io-x11.c Wed Jul 14 23:14:28 2004
+@@ -34,7 +34,6 @@
+ #include <stdio.h>
+ #include <ctype.h>
+ #include <sys/param.h>
+-#define NeedFunctionPrototypes 0
+ #include <X11/X.h>
+ #include <X11/Xlib.h>
+ #include <X11/Xutil.h>
diff --git a/math/oleo/files/patch-src::xrdb.c b/math/oleo/files/patch-src::xrdb.c
new file mode 100644
index 000000000000..baec3df8fbe9
--- /dev/null
+++ b/math/oleo/files/patch-src::xrdb.c
@@ -0,0 +1,10 @@
+--- src/xrdb.c.orig Wed Jul 14 23:30:28 2004
++++ src/xrdb.c Wed Jul 14 23:30:29 2004
+@@ -57,7 +57,6 @@
+ /* This should be included before the X include files; otherwise, we get
+ warnings about redefining NULL under BSD 4.3. */
+ #include <sys/param.h>
+-#define NeedFunctionPrototypes 0
+ #include <X11/X.h>
+ #include <X11/Xlib.h>
+ #include <X11/Xutil.h>