aboutsummaryrefslogtreecommitdiffstats
path: root/math
diff options
context:
space:
mode:
authoranholt <anholt@FreeBSD.org>2004-07-15 14:37:53 +0800
committeranholt <anholt@FreeBSD.org>2004-07-15 14:37:53 +0800
commitedf2585a0ccdb464695337c9bc407a048cdf529c (patch)
tree8882aff29921fcdbd8968cd7d37cf0356cb14137 /math
parent4fcd75d2d2f410a147da002626d5465005dab155 (diff)
downloadfreebsd-ports-gnome-edf2585a0ccdb464695337c9bc407a048cdf529c.tar.gz
freebsd-ports-gnome-edf2585a0ccdb464695337c9bc407a048cdf529c.tar.zst
freebsd-ports-gnome-edf2585a0ccdb464695337c9bc407a048cdf529c.zip
Fix build on 5.x and fix build with new X headers.
Reported by: pointyhat via kris
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>