rsadowski 4cb5b2f199 Update cmake to 3.19.1
Changelog:
https://cmake.org/cmake/help/v3.18/release/3.18.html
https://cmake.org/cmake/help/v3.19/release/3.19.html

This update went through a amd64 bulk build and also tested with ~500 ports on
macppc without issues by cwen@
2020-12-30 07:17:34 +00:00

90 lines
2.0 KiB
Makefile

# $OpenBSD: Makefile,v 1.190 2020/12/30 07:17:34 rsadowski Exp $
DPB_PROPERTIES = parallel
COMMENT = portable build system
VER = 3.19.1
EPOCH = 0
DISTNAME = cmake-${VER}
CATEGORIES = devel
HOMEPAGE = https://www.cmake.org/
MASTER_SITES = https://www.cmake.org/files/v${VER:R}/
# BSD
PERMIT_PACKAGE = Yes
WANTLIB += ${COMPILER_LIBCXX} archive c curl curses expat form
WANTLIB += jsoncpp m rhash uv z
COMPILER = base-clang ports-gcc
MODULES = lang/python
MODPY_VERSION = ${MODPY_DEFAULT_VERSION_3}
MODPY_RUNDEP = No
BUILD_DEPENDS = textproc/py-sphinx${MODPY_FLAVOR}>=1.5
LIB_DEPENDS = archivers/libarchive \
devel/libuv \
devel/jsoncpp \
net/curl \
security/rhash
CONFIGURE_STYLE = simple
CONFIGURE_ARGS = --datadir=share/cmake \
--docdir=share/doc/cmake \
--mandir=man \
--no-qt-gui \
--parallel=${MAKE_JOBS} \
--prefix=${PREFIX} \
--sphinx-build=${LOCALBASE}/bin/sphinx-build${MODPY_BIN_SUFFIX} \
--sphinx-html \
--sphinx-man \
--system-libs \
--verbose
CONFIGURE_ENV += MAKE=${MAKE_PROGRAM}
MAKE_FLAGS += VERBOSE=1
# bootstrap build
CONFIGURE_ENV += MODCMAKE_PORT_BUILD=yes
MAKE_ENV += MODCMAKE_PORT_BUILD=yes
PORTHOME = ${WRKDIR}
SEPARATE_BUILD = Yes
TEST_TARGET = test
TEST_DEPENDS += devel/git
SUBST_FILES = ${WRKSRC}/Source/cmLocalGenerator.cxx \
${WRKSRC}/Source/CPack/cmCPackGenerator.cxx \
${WRKSRC}/bootstrap
post-patch:
find ${WRKSRC}/Modules -name "*.cmake" \
-exec perl -e 's,/usr/(local|X11R6),${LOCALBASE},g' {} +
find ${WRKSRC}/Tests -name "CMakeLists.txt" \
-exec perl -e 's,/usr/(local|X11R6),${LOCALBASE},g' {} +
perl -e 's,/usr/local,${LOCALBASE},g' \
${SUBST_FILES}
perl -e 's,/usr/include,${LOCALBASE}/include,' \
${WRKSRC}/Modules/FindDCMTK.cmake \
pre-configure:
find ${WRKSRC}/Modules -name "*.cmake" -exec ${SUBST_CMD} {} +
find ${WRKSRC}/Tests -name "CMakeLists.txt" -exec ${SUBST_CMD} {} +
${SUBST_CMD} ${SUBST_FILES}
post-install:
@find ${WRKINST}${LOCALBASE} \( -name "*.bak" -o -name "*.orig" -o \
-name "*.beforesubst" \) -delete
.include <bsd.port.mk>