freebsd-ports/devel/cmake/Makefile
Adriaan de Groot aac918473d Update the cmake family to 3.9.6 (skip 3.9.5, the upstream
releases are coming quick and fast). Upstream changes are
 - AUTOMOC options fixes (3.9.5)
 - gcc_eh linking (3.9.6)

Thanks antoine@ for the exp-runs.

PR:		223436
Approved by:	tcberner (mentor)
Differential Revision:	https://reviews.freebsd.org/D12958
2017-11-16 10:15:15 +00:00

73 lines
2.2 KiB
Makefile

# Created by: Kyle Martin <mkm@ieee.org>
# $FreeBSD$
PORTNAME= cmake
# Remember to update devel/cmake-doc and devel/cmake-gui as well.
DISTVERSION= 3.9.6
CATEGORIES= devel
MASTER_SITES= https://www.cmake.org/files/v${PORTVERSION:R}/
MAINTAINER= kde@FreeBSD.org
COMMENT= Cross-platform Makefile generator
LICENSE= BSD3CLAUSE
LICENSE_FILE= ${WRKSRC}/Copyright.txt
LIB_DEPENDS= libcurl.so:ftp/curl \
libexpat.so:textproc/expat2 \
libjsoncpp.so:devel/jsoncpp \
libuv.so:devel/libuv \
librhash.so:security/rhash
USES= libarchive ncurses
HAS_CONFIGURE= yes
CONFIGURE_ENV= MAKE=make
CONFIGURE_ARGS= --prefix=${PREFIX} \
--datadir="/${DATADIR_REL}" \
--docdir="/${DOCSDIR_REL}" \
--system-libs \
--parallel=${MAKE_JOBS_NUMBER} \
--init="${PATCHDIR}/InitialCache.cmake"
OPTIONS_DEFINE= DOCS MANPAGES
OPTIONS_DEFAULT=MANPAGES
OPTIONS_SUB= yes
MANPAGES_BUILD_DEPENDS= sphinx-build:textproc/py-sphinx
MANPAGES_CONFIGURE_ON= --sphinx-man
CONFLICTS_INSTALL= cmake-modules-*
.include <bsd.port.pre.mk>
.if defined(STRIP) && ${STRIP} != "" && !defined(WITH_DEBUG)
INSTALL_TARGET= install/strip
.endif
post-patch:
@(${FIND} ${WRKSRC}/Modules -name "*.cmake" -print0; \
${FIND} ${WRKSRC}/Tests -name "CMakeLists.txt" -print0 ) | \
${XARGS} -0 -n 100 ${REINPLACE_CMD} -e 's,/usr/local,${LOCALBASE},g; \
s,/usr/X11R6,${LOCALBASE},g'
@${REINPLACE_CMD} -e 's,/usr/local,${LOCALBASE},g' \
${WRKSRC}/Source/cmLocalGenerator.cxx \
${WRKSRC}/Source/CPack/cmCPackGenerator.cxx \
${WRKSRC}/bootstrap
@${REINPLACE_CMD} -e 's,/opt/kde4,${PREFIX},g' \
${WRKSRC}/Modules/FindKDE4.cmake
@${REINPLACE_CMD} -e 's,/usr/include,${LOCALBASE}/include,' \
${WRKSRC}/Modules/FindDCMTK.cmake
@${FIND} ${WRKSRC} -name "*.bak" -delete -o -name "*.orig" -delete
# cmake-gui(1) is installed by devel/cmake-gui. Remove the man page's source to
# prevent it from being built/installed by devel/cmake.
${RM} ${WRKSRC}/Help/manual/cmake-gui.1.rst
post-install:
${INSTALL_DATA} ${WRKSRC}/Auxiliary/cmake-mode.el ${STAGEDIR}${PREFIX}/share/emacs/site-lisp
# The .NoDartCoverage is supposed to suppress testing in the
# source directories, but gets accidentally installed.
@${FIND} ${STAGEDIR}${PREFIX} -name ".NoDartCoverage" -delete
.include <bsd.port.post.mk>