Is it intentional that the cmake port still installs a custom version of
FindIconv.cmake?
This can cause problems because this it misses the 'IMPORTED target' provided
by cmake's original version of FindIconv.cmake, see:
https://cmake.org/cmake/help/v3.16/module/FindIconv.html

I guess the attached diff does not break anything, but I can't tell for sure..

Index: Makefile
===================================================================
RCS file: /cvs/ports/devel/cmake/Makefile,v
retrieving revision 1.183
diff -u -p -u -p -r1.183 Makefile
--- Makefile    30 Mar 2020 20:12:38 -0000      1.183
+++ Makefile    31 Mar 2020 17:23:52 -0000
@@ -8,7 +8,7 @@ VER =           3.16.2
 EPOCH =                0
 DISTNAME =     cmake-${VER}
 CATEGORIES =   devel
-REVISION =     1
+REVISION =     2
 
 HOMEPAGE =     https://www.cmake.org/
 
Index: files/FindIconv.cmake
===================================================================
RCS file: files/FindIconv.cmake
diff -N files/FindIconv.cmake
--- files/FindIconv.cmake       15 Jun 2012 10:26:56 -0000      1.4
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,58 +0,0 @@
-# - Try to find Iconv 
-# Once done this will define 
-# 
-#  ICONV_FOUND - system has Iconv 
-#  ICONV_INCLUDE_DIR - the Iconv include directory 
-#  ICONV_LIBRARIES - Link these to use Iconv 
-#  ICONV_SECOND_ARGUMENT_IS_CONST - the second argument for iconv() is const
-# 
-include(CheckCXXSourceCompiles)
-
-IF (ICONV_INCLUDE_DIR AND ICONV_LIBRARIES)
-  # Already in cache, be silent
-  SET(ICONV_FIND_QUIETLY TRUE)
-ENDIF (ICONV_INCLUDE_DIR AND ICONV_LIBRARIES)
-
-FIND_PATH(ICONV_INCLUDE_DIR iconv.h) 
- 
-FIND_LIBRARY(ICONV_LIBRARIES NAMES iconv libiconv libiconv-2 c)
- 
-IF(ICONV_INCLUDE_DIR AND ICONV_LIBRARIES) 
-   SET(ICONV_FOUND TRUE) 
-ENDIF(ICONV_INCLUDE_DIR AND ICONV_LIBRARIES) 
-
-set(CMAKE_REQUIRED_INCLUDES ${ICONV_INCLUDE_DIR})
-set(CMAKE_REQUIRED_LIBRARIES ${ICONV_LIBRARIES})
-IF(ICONV_FOUND)
-  check_cxx_source_compiles("
-  #include <iconv.h>
-  int main(){
-    iconv_t conv = 0;
-    const char* in = 0;
-    size_t ilen = 0;
-    char* out = 0;
-    size_t olen = 0;
-    iconv(conv, &in, &ilen, &out, &olen);
-    return 0;
-  }
-" ICONV_SECOND_ARGUMENT_IS_CONST )
-ENDIF(ICONV_FOUND)
-set(CMAKE_REQUIRED_INCLUDES)
-set(CMAKE_REQUIRED_LIBRARIES)
-
-IF(ICONV_FOUND) 
-  IF(NOT ICONV_FIND_QUIETLY) 
-    MESSAGE(STATUS "Found Iconv: ${ICONV_LIBRARIES}") 
-  ENDIF(NOT ICONV_FIND_QUIETLY) 
-ELSE(ICONV_FOUND) 
-  IF(Iconv_FIND_REQUIRED) 
-    MESSAGE(FATAL_ERROR "Could not find Iconv") 
-  ENDIF(Iconv_FIND_REQUIRED) 
-ENDIF(ICONV_FOUND) 
-
-MARK_AS_ADVANCED(
-  ICONV_INCLUDE_DIR
-  ICONV_LIBRARIES
-  ICONV_SECOND_ARGUMENT_IS_CONST
-)
-

Reply via email to