[112614] trunk/dports/science/htcondor
aronnax at macports.org
aronnax at macports.org
Sun Oct 27 21:17:39 PDT 2013
Revision: 112614
https://trac.macports.org/changeset/112614
Author: aronnax at macports.org
Date: 2013-10-27 21:17:39 -0700 (Sun, 27 Oct 2013)
Log Message:
-----------
htcondor: fix build on Lion, Mountain Lion
On Lion, this patch should fix the error message:
htcondor-8_1_1/src/classad/util.cpp:433:9: error: use of undeclared identifier 'finite'
And on Mountain Lion, this patch should fix the error message:
ar: -lc++: No such file or directory
Modified Paths:
--------------
trunk/dports/science/htcondor/Portfile
Added Paths:
-----------
trunk/dports/science/htcondor/files/patch-src-classad-util.cpp.diff
Modified: trunk/dports/science/htcondor/Portfile
===================================================================
--- trunk/dports/science/htcondor/Portfile 2013-10-28 03:02:40 UTC (rev 112613)
+++ trunk/dports/science/htcondor/Portfile 2013-10-28 04:17:39 UTC (rev 112614)
@@ -10,6 +10,7 @@
github.setup htcondor htcondor 8_1_1 V
version [strsed ${github.version} g/_/\./]
maintainers aronnax
+revision 1
categories science parallel net
license apache
@@ -94,11 +95,15 @@
patch-src-python-bindings-CMakeLists.txt.diff \
patch-build-cmake-CondorPackageConfig.cmake.diff
+# Fix error on Lion:
+# htcondor-8_1_1/src/classad/util.cpp:433:9: error: use of undeclared identifier 'finite'
+patchfiles-append patch-src-classad-util.cpp.diff
+
# makeman.C:182:26: error: no member named '_Ios_Fmtflags' in namespace 'std'
patchfiles-append patch-doc-makeman-makeman.C.diff
# ar: -lc++: No such file or directory
-if {${os.major} >= 13} {
+if {${os.major} >= 12} {
patchfiles-append patch-build-cmake-CondorConfigure.cmake.diff
}
Added: trunk/dports/science/htcondor/files/patch-src-classad-util.cpp.diff
===================================================================
--- trunk/dports/science/htcondor/files/patch-src-classad-util.cpp.diff (rev 0)
+++ trunk/dports/science/htcondor/files/patch-src-classad-util.cpp.diff 2013-10-28 04:17:39 UTC (rev 112614)
@@ -0,0 +1,97 @@
+--- src/classad/util.cpp.orig 2013-10-27 21:00:59.000000000 -0700
++++ src/classad/util.cpp 2013-10-27 21:01:02.000000000 -0700
+@@ -24,36 +24,10 @@
+ #include "classad/util.h"
+ #include <limits.h>
+ #include <math.h>
++#include <boost/math/special_functions/fpclassify.hpp>
+
+ using namespace std;
+
+-// The following definitions of isnan() and isinf() are recommended here:
+-// http://www.gnu.org/software/libtool/manual/autoconf/Function-Portability.html
+-// We have observed isinf(HUGE_VAL) to return 0 on HPUX, but only apparently
+-// because of an errant #pragma extern applied to this constant in the system
+-// header files. When passed a normal variable assigned to HUGE_VAL, isinf()
+-// does the right thing on that platform.
+-
+-#ifndef isnan
+-# define isnan(x) \
+- (sizeof (x) == sizeof (long double) ? isnan_ld (x) \
+- : sizeof (x) == sizeof (double) ? isnan_d (x) \
+- : isnan_f (x))
+-static inline int isnan_f (float x) { return x != x; }
+-static inline int isnan_d (double x) { return x != x; }
+-static inline int isnan_ld (long double x) { return x != x; }
+-#endif
+-
+-#ifndef isinf
+-# define isinf(x) \
+- (sizeof (x) == sizeof (long double) ? isinf_ld (x) \
+- : sizeof (x) == sizeof (double) ? isinf_d (x) \
+- : isinf_f (x))
+-static inline int isinf_f (float x) { return isnan (x - x); }
+-static inline int isinf_d (double x) { return isnan (x - x); }
+-static inline int isinf_ld (long double x) { return isnan (x - x); }
+-#endif
+-
+ namespace classad {
+
+ #ifdef WIN32
+@@ -406,42 +380,9 @@
+ return leap_year;
+ }
+
+-#ifdef WIN32
+-int classad_isinf(double x)
+-{
+-
+- int result;
+- result = _fpclass(x);
+-
+- if (result == _FPCLASS_NINF ) {
+- /* negative infinity */
+- return -1;
+- } else if ( result == _FPCLASS_PINF ) {
+- /* positive infinity */
+- return 1;
+- } else {
+- /* otherwise */
+- return 0;
+- }
+-}
+-#elif (defined (__SVR4) && defined (__sun)) || defined(__APPLE_CC__)
+-#ifndef __APPLE_CC__
+-#include <ieeefp.h>
+-#endif
+-int classad_isinf(double x)
+-{
+- if (finite(x) || x != x) {
+- return 0;
+- } else if (x > 0) {
+- return 1;
+- } else {
+- return -1;
+- }
+-}
+-#else
+ int classad_isinf(double x)
+ {
+- if (!isinf(x) || x != x) {
++ if (boost::math::isfinite(x) || boost::math::isnan(x)) {
+ return 0;
+ } else if (x > 0) {
+ return 1;
+@@ -449,11 +390,10 @@
+ return -1;
+ }
+ }
+-#endif
+
+ int classad_isnan(double x)
+ {
+- return isnan(x);
++ return boost::math::isnan(x);
+ }
+
+ } // classad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20131027/01a92fbe/attachment-0001.html>
More information about the macports-changes
mailing list