1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-20 08:27:15 +00:00
freebsd-ports/irc/weechat/Makefile

112 lines
3.0 KiB
Makefile
Raw Normal View History

# Created by: clement
# $FreeBSD$
PORTNAME= weechat
PORTVERSION= 1.7
CATEGORIES= irc
MASTER_SITES= https://weechat.org/files/src/
MAINTAINER= brnrd@FreeBSD.org
COMMENT= Lightweight and user friendly ncurses based IRC client
LICENSE= GPLv3
LICENSE_FILE= ${WRKSRC}/COPYING
LIB_DEPENDS+= libcurl.so:ftp/curl \
libgcrypt.so:security/libgcrypt \
libgpg-error.so:security/libgpg-error
USES= cmake:outsource ncurses tar:xz
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+= -DENABLE_GUILE=no \
-DLIBDATADIR=${LOCALBASE}/libdata
OPTIONS_DEFINE= BACKTRACE DOCS CA_BUNDLE GNUTLS ICON ICONV MANPAGES NLS
OPTIONS_DEFAULT= ASPELL BACKTRACE CA_BUNDLE CHARSET GNUTLS ICON LUA MANPAGES PERL PYTHON RUBY TCL
OPTIONS_SUB= yes
OPTIONS_GROUP= PLUGINS
OPTIONS_GROUP_PLUGINS= ASPELL CHARSET JAVASCRIPT LUA PERL PYTHON RUBY TCL
BACKTRACE_DESC= Provide crash backtraces
CA_BUNDLE_DESC= Include CA bundle for certificate verification
ICON_DESC= Desktop icon
PLUGINS_DESC= Weechat Plugins
CHARSET_DESC= Charset plugin (implies ICONV)
JAVASCRIPT_DESC= Javascript script support
PYTHON_DESC= Python script support
RUBY_DESC= Ruby script support
ASPELL_CMAKE_BOOLL= ENABLE_ASPELL
ASPELL_LIB_DEPENDS= libaspell.so:textproc/aspell
BACKTRACE_CMAKE_BOOL= ENABLE_BACKTRACE
BACKTRACE_USES= execinfo
2015-10-10 20:52:20 +00:00
CA_BUNDLE_CMAKE_ON= -DCA_FILE=${LOCALBASE}/share/certs/ca-root-nss.crt
CA_BUNDLE_RUN_DEPENDS= ${LOCALBASE}/share/certs/ca-root-nss.crt:security/ca_root_nss
CHARSET_CMAKE_BOOL= ENABLE_CHARSET
CHARSET_IMPLIES= ICONV
DOCS_CMAKE_BOOL= ENABLE_DOC
DOCS_BUILD_DEPENDS= ${LOCALBASE}/bin/asciidoctor:textproc/rubygem-asciidoctor
ICONV_CMAKE_BOOL= ENABLE_ICONV
ICONV_USES= iconv
2015-10-10 20:52:20 +00:00
JAVASCRIPT_CMAKE_BOOL= ENABLE_JAVASCRIPT
JAVASCRIPT_LIB_DEPENDS= libv8.so:lang/v8
GNUTLS_CMAKE_BOOL= ENABLE_GNUTLS
GNUTLS_LIB_DEPENDS= libgnutls.so:security/gnutls
GNUTLS_USES= pkgconfig
LUA_CMAKE_BOOL= ENABLE_LUA
LUA_USES= lua pkgconfig
2015-10-10 20:52:20 +00:00
MANPAGES_CMAKE_BOOL= ENABLE_MAN
MANPAGES_CMAKE_ON= -DMANDIR=${MANPREFIX}/man
MANPAGES_BUILD_DEPENDS= ${LOCALBASE}/bin/asciidoctor:textproc/rubygem-asciidoctor
NLS_CMAKE_BOOL= ENABLE_NLS
2015-10-10 20:52:20 +00:00
NLS_USES= gettext
PERL_CMAKE_BOOL= ENABLE_PERL
2015-10-10 20:52:20 +00:00
PERL_USES= perl5
PYTHON_CMAKE_BOOL= ENABLE_PYTHON
PYTHON_USES= python
RUBY_CMAKE_BOOL= ENABLE_RUBY
2015-10-10 20:52:20 +00:00
RUBY_USE= ruby=yes
TCL_CMAKE_BOOL= ENABLE_TCL
2015-10-10 20:52:20 +00:00
TCL_USES= tcl:85+
.include <bsd.port.pre.mk>
.if defined(PORT_OPTIONS:MPYTHON) && ${PYTHON_MAJOR_VER} >= 3
WARNING= "Using Python 3.x is NOT recommended because many \"official\" scripts won\'t work"
CMAKE_ARGS+= -DENABLE_PYTHON3:BOOL=true \
-DPYTHON_LIBRARY:FILEPATH=${LOCALBASE}/lib/libpython${PYTHON_VER}m.so
.endif
post-patch:
2015-10-10 20:52:20 +00:00
@${REINPLACE_CMD} -e 's|$${LIBDIR}/../pkgconfig|$${CMAKE_INSTALL_PREFIX}/libdata/pkgconfig|' \
${WRKSRC}/CMakeLists.txt
.for f in src/CMakeLists.txt src/core/CMakeLists.txt cmake/*.cmake
2015-10-10 20:52:20 +00:00
@${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|' \
${WRKSRC}/${f}
.endfor
post-patch-ICON-off:
@${REINPLACE_CMD} -e '/^# icon$$/,/^$$/d' ${WRKSRC}/CMakeLists.txt
post-install:
${LN} -sf weechat ${STAGEDIR}${PREFIX}/bin/weechat-curses
.include <bsd.port.post.mk>