mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-22 00:35:15 +00:00
f358732b18
The way we deal with iconv in base and ports across different FreeBSD releases is complicated: 9.x does not have iconv.h in base, 10.1 has it with a different prototype for iconv(3) and later versions have the right iconv(3) prototype. And, in some cases (USES=iconv:{translit,wchar_t}), we must always use the libiconv port. This is why there are so many checks in Uses/iconv.mk: we need to know the situation we currently have in order to decide whether to pull iconv from converters/libiconv, whether to just use its header (and pull the library from base) or whether to use everything from base. r384038 adjusted several CMake-based ports, but did so in a way that was not very scalable and required a few intrusive patches to some ports. Most ports that have both USES=cmake and USES=iconv use variations of FindIconv.cmake that behave similarly. This change passes the header and library values we really want to use to CMake using the most common variable names, bypassing the calls to find_path() and find_library() that would sometimes end up finding the wrong file. The few ports that use different variable names have had their Makefiles adjusted (we manually pass the values we want via CMAKE_ARGS). Other changes: - chinese/fcitx: Explicitly set LIBICONV_LIBC_HAS_ICONV_OPEN=OFF as we always want the version from ports because of USES=iconv:wchar_t. - editors/calligra: Explicitly use iconv:translit because Kexi needs it. - irc/weechat and irc/weechat-devel: The FindIconv.cmake patches could not be entirely removed because the check_library_exists() calls are wrong. Sent upstream: https://github.com/weechat/weechat/pull/513 - textproc/ctpp2: Use iconv:translit when the TRANSLITERATE option is used. PORTREVISION has been bumped in editors/calligra and textproc/ctpp2 because their dependency list has changed in 10.2 and later as the ports version is always used now. PR: 202798 Reviewed by: antoine, tijl Approved by: portmgr (antoine)
45 lines
1.5 KiB
Plaintext
45 lines
1.5 KiB
Plaintext
--- CMakeLists.txt.orig 2012-11-10 20:45:57.000000000 +0000
|
|
+++ CMakeLists.txt 2013-10-17 11:18:51.783970185 +0000
|
|
@@ -21,6 +21,7 @@
|
|
|
|
OPTION(ICONV_DISCARD_ILSEQ "Discard illegal sequence and continue (iconv) [default: ON]" ON)
|
|
OPTION(ICONV_TRANSLITERATE "Enable transliteration in the conversion (iconv) [default: ON]" ON)
|
|
+OPTION(ENABLE_DOCS "Enable docs [default: OFF]" OFF)
|
|
|
|
# Build optimized code for following CPU (default i386)
|
|
#SET(CPU_TUNE "i686")
|
|
@@ -660,6 +661,8 @@
|
|
SET_TESTS_PROPERTIES(Calls_D PROPERTIES DEPENDS Calls_R)
|
|
ENDIF (DIFF_EXECUTABLE)
|
|
|
|
+
|
|
+IF(ENABLE_DOCS MATCHES "ON")
|
|
FIND_PROGRAM(RST2HTML_EXECUTABLE "rst2html" /usr/local/bin /usr/bin)
|
|
IF (RST2HTML_EXECUTABLE)
|
|
ADD_CUSTOM_COMMAND(
|
|
@@ -669,6 +672,7 @@
|
|
)
|
|
ADD_CUSTOM_TARGET(doc ALL DEPENDS template_language.html)
|
|
ENDIF (RST2HTML_EXECUTABLE)
|
|
+ENDIF(ENABLE_DOCS MATCHES "ON")
|
|
|
|
# Install Headers
|
|
INSTALL(FILES include/CDT.hpp
|
|
@@ -814,13 +818,15 @@
|
|
GROUP_READ
|
|
WORLD_READ)
|
|
|
|
+IF(ENABLE_DOCS MATCHES "ON")
|
|
IF(RST2HTML_EXECUTABLE)
|
|
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/template_language.html
|
|
- DESTINATION share/doc
|
|
+ DESTINATION share/doc/ctpp2
|
|
PERMISSIONS OWNER_READ OWNER_WRITE
|
|
GROUP_READ
|
|
WORLD_READ)
|
|
ENDIF(RST2HTML_EXECUTABLE)
|
|
+ENDIF(ENABLE_DOCS MATCHES "ON")
|
|
|
|
ENDIF("${CMAKE_SYSTEM_NAME}" MATCHES "Windows")
|
|
|