1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-22 04:17:44 +00:00
freebsd-ports/math/ndiff/Makefile
Alexander Leidinger eb05069865 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
2004-06-02 17:18:39 +00:00

60 lines
1.3 KiB
Makefile

# New ports collection makefile for: ndiff
# Date created: 31 January 2004
# Whom: Stefan A. Deutscher (sad@mailaps.org)
#
# $FreeBSD$
#
PORTNAME= ndiff
PORTVERSION= 2.00
PORTREVISION= 1
CATEGORIES= math
MASTER_SITES= ftp://ftp.math.utah.edu/pub/misc/
PKGNAMEPREFIX=
MAINTAINER= ports@FreeBSD.org
COMMENT= Compare putatively similar files, ignoring small numeric differences
.include <bsd.port.pre.mk>
.if !defined(WITHOUT_GMP)
.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
ALL_TARGET= all check
MAN1= ndiff.1
.if !defined(NOPORTDOCS)
PORTDOCS= *
.endif
post-build:
@${ECHO_MSG} "If there were no errors in the above checks then type"
@${ECHO_MSG}
@${ECHO_MSG} " ${MAKE} install"
@${ECHO_MSG}
@${ECHO_MSG} "to install ${PORTNAME}-${PORTVERSION}"
post-install:
.if !defined(NOPORTDOCS)
${MKDIR} ${DOCSDIR}
${INSTALL_MAN} ${WRKSRC}/${PORTNAME}.pdf ${DOCSDIR}
${INSTALL_MAN} ${WRKSRC}/${PORTNAME}.ps ${DOCSDIR}
${INSTALL_MAN} ${WRKSRC}/${PORTNAME}.html ${DOCSDIR}
.endif
.include <bsd.port.post.mk>