[math/gnuplot+] fix amd64 build failure

It is marked BROKEN on amd64 because FreeBSD/amd64 does not
	have some IEEE FP functions like fpresetsticky(). The build
	failure log is now available at
	http://pointyhat.freebsd.org/errorlogs/amd64-5-full/gnuplot371+-1.2.0_1.log

	I found file/patch-za causes the problem. The feature of
	this patch as reported in ports/16120 can take effect only
	on FreeBSD/i386.

PR:		ports/69143
Submitted by:	NAKAJI Hiroyuki <nakaji@jp.freebsd.org>
This commit is contained in:
Edwin Groothuis 2004-07-16 10:50:50 +00:00
parent affd65b055
commit befca8acf5
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=113764
2 changed files with 8 additions and 14 deletions

View file

@ -7,7 +7,7 @@
PORTNAME= gnuplot371+
PORTVERSION= 1.2.0
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= math japanese graphics
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} \
http://www.yama-ga.com/gnuplot/:patch \
@ -52,12 +52,6 @@ GP_DOCS= ${WRKSRC}/Copyright.plus \
${WRKSRC}/gp+/plus.ps \
${WRKSRC}/gp+/plus.tex
.include <bsd.port.pre.mk>
.if ${ARCH} == "amd64"
BROKEN= "Does not compile on amd64"
.endif
post-extract:
${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} ${_DISTDIR}/gnuplot3.7.1+${PORTVERSION}.patch.tar.gz ${EXTRACT_AFTER_ARGS} -C ${WRKSRC}
@ -82,4 +76,4 @@ post-install:
${MKDIR} ${PREFIX}/share/examples/gnuplot+
${INSTALL_DATA} ${WRKSRC}/demo/* ${PREFIX}/share/examples/gnuplot+
.include <bsd.port.post.mk>
.include <bsd.port.mk>

View file

@ -4,7 +4,7 @@
# define EINTR E_ILLFNC
#endif
+#if defined(__FreeBSD__) && ( defined(__i386__) || defined(__amd64__) )
+#if defined(__FreeBSD__) && ( defined(__i386__)
+# include <floatingpoint.h>
+#endif
+
@ -15,7 +15,7 @@
int argc;
char *argv[];
{
+#if defined(__FreeBSD__) && ( defined(__i386__) || defined(__amd64__) )
+#if defined(__FreeBSD__) && ( defined(__i386__)
+ /* allow divide by zero -- Inf */
+ fpsetmask(fpgetmask() & ~(FP_X_DZ | FP_X_INV));
+#endif
@ -27,7 +27,7 @@
}
XCloseDisplay(dpy);
+
+#if defined(__FreeBSD__) && ( defined(__i386__) || defined(__amd64__) )
+#if defined(__FreeBSD__) && ( defined(__i386__)
+ fpresetsticky(FP_X_DZ | FP_X_INV);
+ fpsetmask(fpgetmask() | (FP_X_DZ | FP_X_INV));
+#endif
@ -41,7 +41,7 @@
# endif
#endif /* _Windows */
+#if defined(__FreeBSD__) && ( defined(__i386__) || defined(__amd64__) )
+#if defined(__FreeBSD__) && ( defined(__i386__)
+# include <floatingpoint.h>
+#endif
+
@ -52,7 +52,7 @@
_control87(MCW_EM, MCW_EM);
#endif
+#if defined(__FreeBSD__) && ( defined(__i386__) || defined(__amd64__) )
+#if defined(__FreeBSD__) && ( defined(__i386__)
+ /* allow divide by zero -- Inf */
+ fpsetmask(fpgetmask() & ~(FP_X_DZ | FP_X_INV));
+#endif
@ -66,7 +66,7 @@
RexxDeregisterSubcom("GNUPLOT", NULL);
+#endif
+
+#if defined(__FreeBSD__) && ( defined(__i386__) || defined(__amd64__) )
+#if defined(__FreeBSD__) && ( defined(__i386__)
+ fpresetsticky(FP_X_DZ | FP_X_INV);
+ fpsetmask(fpgetmask() | (FP_X_DZ | FP_X_INV));
#endif