From 927f49630639122d0051ec6c05602000be6ed98d Mon Sep 17 00:00:00 2001 From: Michael Kuhn Date: Wed, 11 Dec 2019 19:22:59 +0100 Subject: doxygen: Fix libiconv checks (#14106) PR #10589 introduced a libiconv dependency to doxygen. This causes problems on Linux systems, since the iconv symbols are included in libc, which causes CMake to use the external header but not the external library. Work around this by always using the external libiconv. --- var/spack/repos/builtin/packages/doxygen/package.py | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/doxygen/package.py b/var/spack/repos/builtin/packages/doxygen/package.py index a39d8b4eeb..5084b16b10 100644 --- a/var/spack/repos/builtin/packages/doxygen/package.py +++ b/var/spack/repos/builtin/packages/doxygen/package.py @@ -43,3 +43,13 @@ class Doxygen(CMakePackage): # https://github.com/Sleepyowl/doxygen/commit/6c380ba91ae41c6d5c409a5163119318932ae2a3?diff=unified # Also - https://github.com/doxygen/doxygen/pull/6588 patch('shared_ptr.patch', when='@1.8.14') + + def patch(self): + # On Linux systems, iconv is provided by libc. Since CMake finds the + # symbol in libc, it does not look for libiconv, which leads to linker + # errors. This makes sure that CMake always looks for the external + # libconv instead. + filter_file('check_function_exists(iconv_open ICONV_IN_GLIBC)', + 'set(ICONV_IN_GLIBC FALSE)', + join_path('cmake', 'FindIconv.cmake'), + string=True) -- cgit v1.2.3-70-g09d2