Skip to content

Commit

Permalink
*/*: convert to USES=cmake:indirect
Browse files Browse the repository at this point in the history
Convert several ports to use cmake:indirect
  • Loading branch information
MaxBrazhnikov committed Apr 8, 2024
1 parent ba50bfd commit f3b9cb1
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 18 deletions.
9 changes: 5 additions & 4 deletions deskutils/mindforger/Makefile
Expand Up @@ -26,7 +26,8 @@ OPTIONS_DEFINE= CMARK
OPTIONS_DEFAULT= CMARK
CMARK_DESC= CommonMark support (Markdown -> HTML rendering)

CMARK_BUILD_DEPENDS= cmake:devel/cmake-core
CMARK_USES= cmake:indirect
CMAKE_OFF= CMARK_SHARED CMARK_TESTS
CMARK_QMAKE_OFF= CONFIG+="mfnomd2html"

.include <bsd.port.options.mk>
Expand All @@ -39,9 +40,9 @@ USE_QT+= webkit
.endif

pre-build-CMARK-on:
@cd ${WRKSRC_cm} && cmake -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \
-DCMARK_TESTS:BOOL=OFF -DCMARK_SHARED:BOOL=OFF \
-B build && cmake --build build
@cd ${WRKSRC_cm} && ${SETENVI} ${WRK_ENV} ${CONFIGURE_ENV} \
${CMAKE_BIN} ${CMAKE_ARGS} -B build && \
${CMAKE_BIN} --build build

post-patch:
@${REINPLACE_CMD} -e '/_WIN32/s,_APPLE,_${OPSYS},' \
Expand Down
6 changes: 2 additions & 4 deletions devel/py-Levenshtein/Makefile
Expand Up @@ -12,12 +12,10 @@ LICENSE= GPLv2
LICENSE_FILE= ${WRKSRC}/COPYING

BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}scikit-build>=0.13:devel/py-scikit-build@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}setuptools>=0:devel/py-setuptools@${PY_FLAVOR} \
cmake-core>0:devel/cmake-core

${PYTHON_PKGNAMEPREFIX}setuptools>=0:devel/py-setuptools@${PY_FLAVOR}
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}rapidfuzz>0:devel/py-rapidfuzz@${PY_FLAVOR}

USES= python
USES= cmake:indirect python
USE_PYTHON= autoplist pep517

post-install:
Expand Down
5 changes: 2 additions & 3 deletions graphics/py-pivy/Makefile
Expand Up @@ -10,12 +10,11 @@ WWW= https://github.com/coin3d/pivy

LICENSE= MIT

BUILD_DEPENDS= cmake:devel/cmake-core \
swig:devel/swig
BUILD_DEPENDS= swig:devel/swig
LIB_DEPENDS= libCoin.so:graphics/Coin \
libSoQt.so:x11-toolkits/soqt

USES= compiler:c11 python qt:5
USES= cmake:indirect compiler:c11 python qt:5
USE_GITHUB= yes
GH_ACCOUNT= coin3d
USE_PYTHON= distutils
Expand Down
12 changes: 5 additions & 7 deletions x11/waybar/Makefile
Expand Up @@ -165,9 +165,10 @@ pre-test:

# XXX https://github.com/HowardHinnant/date/issues/799
.if ${CXX} == c++ && exists(/usr/include/c++/v1/__chrono/concepts.h)
BUILD_DEPENDS+= ${CMAKE_BIN}:devel/cmake-core
CONFIGURE_ENV+= CC="${CC}" CXX="${CXX}" CPP="${CPP}"
CMAKE_BIN= ${LOCALBASE}/bin/cmake
USES+= cmake:indirect
CMAKE_ARGS= -B ${WRKDIR}/libcxx_build -S ${WRKSRC_libcxx}/libcxx
CMAKE_OFF= LIBCXX_INCLUDE_BENCHMARKS
CMAKE_INSTALL_PREFIX= ${WRKDIR}/libcxx_prefix

# XXX Move into separate port and standardize via USES
GH_TUPLE+= llvm:llvm-project:llvmorg-16.0.1:libcxx
Expand All @@ -177,10 +178,7 @@ CXXFLAGS+= -nostdinc++ -isystem${WRKDIR}/libcxx_prefix/include/c++/v1

pre-configure: bundled-libcxx
bundled-libcxx:
@${SETENV} ${CONFIGURE_ENV} ${CMAKE_BIN} ${CMAKE_ARGS} \
-DLIBCXX_INCLUDE_BENCHMARKS:BOOL=OFF \
-DCMAKE_INSTALL_PREFIX:PATH=${WRKDIR}/libcxx_prefix \
-B ${WRKDIR}/libcxx_build -S ${WRKSRC_libcxx}/libcxx
@${SETENVI} ${WRK_ENV} ${CONFIGURE_ENV} ${CMAKE_BIN} ${CMAKE_ARGS}
@${DO_MAKE_BUILD:NDESTDIR*} install -C ${WRKDIR}/libcxx_build
.endif # exists(/usr/include/c++/v1/__chrono/concepts.h)

Expand Down

0 comments on commit f3b9cb1

Please sign in to comment.