aboutsummaryrefslogtreecommitdiff
path: root/lang/librep
diff options
context:
space:
mode:
authorJoe Marcus Clarke <marcus@FreeBSD.org>2003-11-27 19:40:08 +0000
committerJoe Marcus Clarke <marcus@FreeBSD.org>2003-11-27 19:40:08 +0000
commit12831d9a039e21065ced6a27ae6c49fef641cdd2 (patch)
tree5f5307c3bd697c3c666b8136c53421a89d0505fe /lang/librep
parent8a546d812b976fc016e86c24bf596b3ba6c6e3c4 (diff)
downloadports-12831d9a039e21065ced6a27ae6c49fef641cdd2.tar.gz
ports-12831d9a039e21065ced6a27ae6c49fef641cdd2.zip
This patch is still needed for -STABLE and older versions of 5.x.
Approved by: portmgr (implicit)
Notes
Notes: svn path=/head/; revision=94810
Diffstat (limited to 'lang/librep')
-rw-r--r--lang/librep/Makefile2
-rw-r--r--lang/librep/files/stable-patch-src_numbers.c22
2 files changed, 24 insertions, 0 deletions
diff --git a/lang/librep/Makefile b/lang/librep/Makefile
index df40be697547..7808dcc1cf9e 100644
--- a/lang/librep/Makefile
+++ b/lang/librep/Makefile
@@ -41,6 +41,8 @@ PREFIX?= ${X11BASE}
.include <bsd.port.pre.mk>
.if ${OSVERSION} > 500023
LIB_DEPENDS+= gmp.6:${PORTSDIR}/math/libgmp4
+.else
+EXTRA_PATCHES+= ${FILESDIR}/stable-patch-src_numbers.c
.endif
.if ${XFREE86_VERSION} == 3
diff --git a/lang/librep/files/stable-patch-src_numbers.c b/lang/librep/files/stable-patch-src_numbers.c
new file mode 100644
index 000000000000..189ad75de6ae
--- /dev/null
+++ b/lang/librep/files/stable-patch-src_numbers.c
@@ -0,0 +1,22 @@
+--- src/numbers.c.orig Sat May 31 17:50:08 2003
++++ src/numbers.c Sat May 31 18:15:24 2003
+@@ -2696,13 +2696,14 @@
+ #ifdef HAVE_GMP
+ else
+ {
+- rep_number_q *q;
++ double x, y;
++ rep_number_z *z;
+
+- q = make_number (rep_NUMBER_RATIONAL);
+- mpq_init (q->q);
+- mpq_set_d (q->q, rep_get_float (arg));
++ rationalize (arg, &x, &y);
++ z = make_number (rep_NUMBER_BIGNUM);
++ mpz_init_set_d (z->z, (x / y));
+
+- return maybe_demote (rep_VAL (q));
++ return maybe_demote (rep_VAL (z));
+ }
+ #else
+ else