aboutsummaryrefslogtreecommitdiffstats
path: root/math
diff options
context:
space:
mode:
authornetchild <netchild@FreeBSD.org>2004-06-03 01:18:39 +0800
committernetchild <netchild@FreeBSD.org>2004-06-03 01:18:39 +0800
commitad76174787f929462e60068470ca776f7f346177 (patch)
tree9f3fb37233fd12a63d6200195a31f685533618d1 /math
parente086c2d93c0d6c435da9437c3b036b2c549f5ad1 (diff)
downloadfreebsd-ports-gnome-ad76174787f929462e60068470ca776f7f346177.tar.gz
freebsd-ports-gnome-ad76174787f929462e60068470ca776f7f346177.tar.zst
freebsd-ports-gnome-ad76174787f929462e60068470ca776f7f346177.zip
Deal with the libgmp dependency properly:
- Don't depend on math/libgmp-freebsd on FreeBSD <= 500023, use the base libgmp instead. On FreeBSD > 500023 depend on math/libgmp4, as math/libgmp-freebsd doesn't build on all architectures. - Don't add PREFIX/include and PREFIX/lib to the search paths by default, so on FreeBSD 4 the base libgmp is used. This protects from using one of the libgmp ports if installed without registering a dependency on it. - Keep from auto-detecting libgmp when WITHOUT_GMP is defined by specifying the arithmetic to use. Note: When using auto-detection and libgmp can't be found ndiff normally would check for extended precision arithmetic first and succeed with it. But using extended precision arithmetic causes the test suite to fail (i.e. lots of differences) on all architectures expect sparc64. Therefore specify double precision arithmetic for all other architectures when built with WITHOUT_GMP. Submitted by: marius
Diffstat (limited to 'math')
-rw-r--r--math/ndiff/Makefile19
-rw-r--r--math/ndiff/files/patch-Makefile.in12
2 files changed, 29 insertions, 2 deletions
diff --git a/math/ndiff/Makefile b/math/ndiff/Makefile
index e32da3cb94aa..5801a223f881 100644
--- a/math/ndiff/Makefile
+++ b/math/ndiff/Makefile
@@ -7,6 +7,7 @@
PORTNAME= ndiff
PORTVERSION= 2.00
+PORTREVISION= 1
CATEGORIES= math
MASTER_SITES= ftp://ftp.math.utah.edu/pub/misc/
PKGNAMEPREFIX=
@@ -14,8 +15,22 @@ PKGNAMEPREFIX=
MAINTAINER= ports@FreeBSD.org
COMMENT= Compare putatively similar files, ignoring small numeric differences
+.include <bsd.port.pre.mk>
+
.if !defined(WITHOUT_GMP)
-LIB_DEPENDS= gmp:${PORTSDIR}/math/libgmp-freebsd
+.if ${OSVERSION} > 500023
+LIB_DEPENDS= gmp.6:${PORTSDIR}/math/libgmp4
+CFLAGS+= -I${LOCALBASE}/include
+LDFLAGS+= -L${LOCALBASE}/lib
+.endif
+CONFIGURE_ARGS= --with-gmp
+CONFIGURE_ENV= CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}"
+.else
+.if ${ARCH} == sparc64
+CONFIGURE_ARGS= --with-long-double
+.else
+CONFIGURE_ARGS= --with-double
+.endif
.endif
GNU_CONFIGURE= yes
@@ -41,4 +56,4 @@ post-install:
${INSTALL_MAN} ${WRKSRC}/${PORTNAME}.html ${DOCSDIR}
.endif
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff --git a/math/ndiff/files/patch-Makefile.in b/math/ndiff/files/patch-Makefile.in
index a9e603a03884..6d2926c662df 100644
--- a/math/ndiff/files/patch-Makefile.in
+++ b/math/ndiff/files/patch-Makefile.in
@@ -1,5 +1,17 @@
--- Makefile.in.orig Wed Feb 18 14:17:22 2004
+++ Makefile.in Wed Feb 18 14:19:31 2004
+@@ -191,9 +191,9 @@
+
+ DEFINES = -DVERSION='"@VERSION@"' -DDATE='"@DATE@"' $(XDEFINES)
+
+-INCLUDES = -I. -I$(prefix)/include $(XINCLUDES)
++INCLUDES = -I. $(XINCLUDES)
+
+-LDFLAGS = @LDFLAGS@ -L$(prefix)/lib $(XLDFLAGS)
++LDFLAGS = @LDFLAGS@ $(XLDFLAGS)
+
+ LIBS = @LIBS@ $(XLIBS)
+
@@ -602,14 +602,12 @@
if test -f $(PROGNAME) ; \
then \