1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-04 01:48:54 +00:00
freebsd-ports/textproc/ctpp2/Makefile

48 lines
1.4 KiB
Makefile
Raw Normal View History

# Created by: Andrei V. Shetuhin <reki@reki.ru>
# $FreeBSD$
PORTNAME= ctpp2
PORTVERSION= 2.8.3
PORTREVISION= 5
CATEGORIES= textproc devel
MASTER_SITES= http://ctpp.havoc.ru/download/
MAINTAINER= vg@FreeBSD.org
COMMENT= C++ library to use templates in C/C++ projects, version 2
Uses/iconv.mk: Set iconv-related CMake variables. 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)
2015-09-03 15:44:13 +00:00
USES= cmake gettext compiler:c++11-lang
USE_LDCONFIG= yes
Uses/iconv.mk: Set iconv-related CMake variables. 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)
2015-09-03 15:44:13 +00:00
CMAKE_ARGS= -DICONV_INCLUDE=${ICONV_INCLUDE_PATH}
PLIST_SUB+= PORTVERSION=${PORTVERSION}
OPTIONS_DEFINE= DEBUG DISCARD_ILSEQ DOCS MD5 OPTIMIZATION TRANSLITERATE
OPTIONS_DEFAULT= DISCARD_ILSEQ MD5 OPTIMIZATION TRANSLITERATE
DEBUG_DESC= Enable debug output
OPTIMIZATION_DESC= Enable optimization
MD5_DESC= Enable md5 support
DISCARD_ILSEQ_DESC= Discard illegal sequence and continue
TRANSLITERATE_DESC= Enable transliteration in the conversion
OPTIONS_SUB= yes
DEBUG_CMAKE_ON= -DDEBUG_MODE=ON
DEBUG_CMAKE_OFF= -DDEBUG_MODE=OFF
DOCS_BUILD_DEPENDS= rst2html:textproc/py-docutils
DOCS_CMAKE_ON= -DENABLE_DOCS=ON
DOCS_CMAKE_OFF= -DENABLE_DOCS=OFF
MD5_CMAKE_ON= -DMD5_SUPPORT=ON
MD5_CMAKE_OFF= -DMD5_SUPPORT=OFF
DISCARD_ILSEQ_CMAKE_ON= -DICONV_DISCARD_ILSEQ=ON
DISCARD_ILSEQ_CMAKE_OFF= -DICONV_DISCARD_ILSEQ=OFF
TRANSLITERATE_CMAKE_ON= -DICONV_TRANSLITERATE=ON
TRANSLITERATE_CMAKE_OFF= -DICONV_TRANSLITERATE=OFF
Uses/iconv.mk: Set iconv-related CMake variables. 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)
2015-09-03 15:44:13 +00:00
TRANSLITERATE_USES= iconv:translit
TRANSLITERATE_USES_OFF= iconv
OPTIMIZATION_CMAKE_ON= -DENABLE_OPTIMIZATION=ON
OPTIMIZATION_CMAKE_OFF= -DENABLE_OPTIMIZATION=OFF
PORTDOCS= template_language.html
Uses/iconv.mk: Set iconv-related CMake variables. 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)
2015-09-03 15:44:13 +00:00
.include <bsd.port.mk>