diff options
author | Alexey Dokuchaev <danfe@FreeBSD.org> | 2015-08-31 10:54:15 +0800 |
---|---|---|
committer | Alexey Dokuchaev <danfe@FreeBSD.org> | 2015-08-31 10:54:15 +0800 |
commit | 4614f1c06fceec0d90f6a694fcbf4ace3d4cc147 (patch) | |
tree | 5f47b92d38bd7c1ef5e4a301972dae3fe41a0f9f /graphics/hdr_tools | |
parent | b7bae501e7de90eb4121bdad7b440a84ce83120d (diff) | |
download | freebsd-ports-gnome-4614f1c06fceec0d90f6a694fcbf4ace3d4cc147.tar.gz freebsd-ports-gnome-4614f1c06fceec0d90f6a694fcbf4ace3d4cc147.tar.zst freebsd-ports-gnome-4614f1c06fceec0d90f6a694fcbf4ace3d4cc147.zip |
Fix the build against `math/ldouble' when logl(), expl(), and log2l() are
not available in the base libm by wrapping #include <mathl.h> with extern
"C" block.
Diffstat (limited to 'graphics/hdr_tools')
-rw-r--r-- | graphics/hdr_tools/Makefile | 5 | ||||
-rw-r--r-- | graphics/hdr_tools/files/patch-helpers.hh | 17 |
2 files changed, 19 insertions, 3 deletions
diff --git a/graphics/hdr_tools/Makefile b/graphics/hdr_tools/Makefile index f8f562051aff..42e3796341c8 100644 --- a/graphics/hdr_tools/Makefile +++ b/graphics/hdr_tools/Makefile @@ -36,10 +36,9 @@ CXXFLAGS+= -msse2 -mfpmath=sse CXXFLAGS+= -fopenmp .endif -# NB: `math/ldouble' port provides these functions, but does not export -# them correctly; as a result linking with C++ code is currently broken .if ${OPSYS} == FreeBSD && ${OSVERSION} < 1000034 -BROKEN= requires logl(), expl(), log2l() +LIB_DEPENDS+= libml.so:${PORTSDIR}/math/ldouble +LDFLAGS+= -lml .endif post-patch: diff --git a/graphics/hdr_tools/files/patch-helpers.hh b/graphics/hdr_tools/files/patch-helpers.hh new file mode 100644 index 000000000000..444bd37e415a --- /dev/null +++ b/graphics/hdr_tools/files/patch-helpers.hh @@ -0,0 +1,17 @@ +--- helpers.hh.orig 2010-11-23 21:22:51 UTC ++++ helpers.hh +@@ -35,6 +35,14 @@ + + #include <stdint.h> + ++#if defined __FreeBSD__ ++#include <osreldate.h> ++#if __FreeBSD_version < 1000034 ++extern "C" { ++#include <mathl.h> ++} ++#endif ++#endif + + + |