Skip to content

Commit

Permalink
bugfix: fix ccache issue with cmake
Browse files Browse the repository at this point in the history
add empty plist for filling ccache cache
  • Loading branch information
trombik committed Oct 21, 2024
1 parent b3de8a1 commit f6bc377
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion devel/esp-llvm-embedded-toolchain/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ CMAKE_ARGS= \
# our own CMAKE_ARGS
CMAKE_ARGS+= \
-DCLANG_REPOSITORY_STRING=${WWW}

# TODO are gcc13 and g++13 necessary?
BINARY_ALIAS= gcc13=${CC} g++13=${CXX} \
${ESP_ARCH}-unknown-freebsd-gcc=${ESP_ARCH}-portbld-freebsd${OSREL}-${CC} \
Expand Down Expand Up @@ -175,6 +176,15 @@ CMAKE_ARGS= \
-B ${CONFIGURE_WRKSRC}
.endif

.include <bsd.port.pre.mk>

# work around CMAKE/CCACHE flaw (cmake stomps over ccache)
# obtained from graphics/darktable.
.if "${WITH_CCACHE_BUILD}" == "yes" && !defined(NO_CCACHE)
CMAKE_ARGS+= -DCMAKE_C_COMPILER_LAUNCHER=${CCACHE_BIN} \
-DCMAKE_CXX_COMPILER_LAUNCHER=${CCACHE_BIN}
.endif

pre-configure:
@${REINPLACE_CMD} -e 's|%%ESP_TMPDIR%%|${ESP_TMPDIR}|g' \
${WRKSRC}/cmake/esp-gnu-components.cmake
Expand All @@ -199,13 +209,15 @@ pre-build:

# TODO should be removed
do-install:
.if ${INSTALL_TARGET} != clang
(cd ${INSTALL_WRKSRC} && ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${FAKEROOT} \
${MAKE_CMD} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} ${INSTALL_TARGET})
.endif

post-install:
.for F in ${ESP_STRIP_FILES}
@${STRIP_CMD} ${STAGEDIR}${ESP_PREFIX}/${F}
@${RM} ${STAGEDIR}${ESP_PREFIX}/bin/*.cfg
.endfor

.include <bsd.port.mk>
.include <bsd.port.post.mk>
Empty file.

0 comments on commit f6bc377

Please sign in to comment.