1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-30 10:38:37 +00:00
freebsd-ports/irc/weechat/Makefile

118 lines
3.2 KiB
Makefile
Raw Normal View History

# Created by: clement
# $FreeBSD$
PORTNAME= weechat
2016-01-12 17:39:03 +00:00
PORTVERSION= 1.4
CATEGORIES= irc
2015-10-10 20:52:20 +00:00
MASTER_SITES= http://weechat.org/files/src/
MAINTAINER= jase@FreeBSD.org
COMMENT= Lightweight and user friendly ncurses based IRC client
LICENSE= GPLv3
CONFLICTS= weechat-devel-[0-9]*
USE_LDCONFIG= yes
USES= cmake iconv localbase ncurses tar:bzip2
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 \
-DICONV_INCLUDE_PATH=${ICONV_INCLUDE_PATH}
2016-01-12 17:39:03 +00:00
LIB_DEPENDS+= libcurl.so:ftp/curl \
libgcrypt.so:security/libgcrypt
OPTIONS_DEFINE= RUBY PYTHON PERL TCL LUA JAVASCRIPT CHARSET BACKTRACE ASPELL \
2015-10-10 20:52:20 +00:00
GNUTLS CA_BUNDLE NLS ICON MANPAGES DOCS
OPTIONS_DEFAULT=RUBY PYTHON PERL TCL LUA CHARSET BACKTRACE ASPELL \
2015-10-10 20:52:20 +00:00
GNUTLS CA_BUNDLE ICON MANPAGES
OPTIONS_SUB= yes
BACKTRACE_DESC= Provide crash backtraces
CA_BUNDLE_DESC= Include CA bundle for certificate verification
CHARSET_DESC= Charset conversion support
2015-10-10 20:52:20 +00:00
ICON_DESC= Desktop icon
JAVASCRIPT_DESC=Javascript support
PYTHON_DESC= Python scripting language support
2015-10-10 20:52:20 +00:00
RUBY_DESC= Ruby scripting language support
ASPELL_CMAKE_OFF= -DENABLE_ASPELL=no
2016-01-12 17:39:03 +00:00
ASPELL_LIB_DEPENDS= libaspell.so:textproc/aspell
BACKTRACE_USES= execinfo
2015-10-10 20:52:20 +00:00
CA_BUNDLE_CMAKE_ON= -DCA_FILE=${LOCALBASE}/share/certs/ca-root-nss.crt
2016-01-12 17:39:03 +00:00
CA_BUNDLE_RUN_DEPENDS= ${LOCALBASE}/share/certs/ca-root-nss.crt:security/ca_root_nss
CHARSET_CMAKE_OFF= -DENABLE_CHARSET=no
2015-10-10 20:52:20 +00:00
DOCS_CMAKE_ON= -DENABLE_DOC=yes
JAVASCRIPT_CMAKE_OFF= -DENABLE_JAVASCRIPT=no
JAVASCRIPT_CMAKE_ON= -DENABLE_JAVASCRIPT=yes
2016-01-12 17:39:03 +00:00
JAVASCRIPT_LIB_DEPENDS= libv8.so:lang/v8
GNUTLS_CMAKE_OFF= -DENABLE_GNUTLS=no
GNUTLS_USES= pkgconfig
2016-01-12 17:39:03 +00:00
GNUTLS_LIB_DEPENDS= libgnutls.so.28:security/gnutls
LUA_CMAKE_OFF= -DENABLE_LUA=no
LUA_CMAKE_ON= -DBSD_LUA_LIBDIR=${LUA_LIBDIR} \
2015-10-10 20:52:20 +00:00
-DBSD_LUA_INCDIR=${LUA_INCDIR} \
-DBSD_LUA_VER=${LUA_VER}
LUA_USES= lua:51
MANPAGES_CMAKE_ON= -DENABLE_MAN=yes -DMANDIR=${MANPREFIX}/man
NLS_CMAKE_OFF= -DENABLE_NLS=no
2015-10-10 20:52:20 +00:00
NLS_USES= gettext
PERL_CMAKE_OFF= -DENABLE_PERL=no
2015-10-10 20:52:20 +00:00
PERL_USES= perl5
PYTHON_CMAKE_OFF= -DENABLE_PYTHON=no
PYTHON_CMAKE_ON= -DBSD_PYTHON_CMD=${PYTHON_CMD} \
2015-10-10 20:52:20 +00:00
-DBSD_PYTHON_VER=${PYTHON_VERSION}
PYTHON_USES= python
RUBY_CMAKE_OFF= -DENABLE_RUBY=no
RUBY_CMAKE_ON= -DBSD_RUBY_CMD=${RUBY} \
2015-10-10 20:52:20 +00:00
-DBSD_RUBY_VER=${RUBY_NAME}
RUBY_USE= ruby=yes
TCL_CMAKE_OFF= -DENABLE_TCL=no
TCL_CMAKE_ON= -DBSD_TCL_VER=${TCL_VER} \
2015-10-10 20:52:20 +00:00
-DBSD_TCL_LIBDIR=${LOCALBASE}/lib \
-DBSD_TCL_INCDIR=${TCL_INCLUDEDIR}
TCL_USES= tcl:85+
.include <bsd.port.options.mk>
2015-10-10 20:52:20 +00:00
.if ${PORT_OPTIONS:MDOCS} || ${PORT_OPTIONS:MMANPAGES}
2016-01-12 17:39:03 +00:00
BUILD_DEPENDS+= xsltproc:textproc/libxslt \
docbook-xsl>=0:textproc/docbook-xsl \
asciidoc:textproc/asciidoc \
source-highlight>=3.1.5:textproc/source-highlight
.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
.if empty(PORT_OPTIONS:MBACKTRACE)
2015-10-10 20:52:20 +00:00
@${REINPLACE_CMD} -e '/IF.*FreeBSD/,/ENDIF.*FreeBSD/d' \
${WRKSRC}/src/core/CMakeLists.txt
.endif
.if empty(PORT_OPTIONS:MICON)
2015-10-10 20:52:20 +00:00
@${REINPLACE_CMD} -e '/^# icon$$/,/^$$/d' \
${WRKSRC}/CMakeLists.txt
.endif
post-install:
${LN} -sf ${PREFIX}/bin/weechat ${STAGEDIR}${PREFIX}/bin/weechat-curses
.include <bsd.port.mk>